This commit was manufactured by cvs2svn to create tag 'v201205110000'.
diff --git a/jpa/plugins/org.eclipse.jpt.core/.classpath b/jpa/plugins/org.eclipse.jpt.core/.classpath
new file mode 100644
index 0000000..5ee7c76
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/.classpath
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="property_files"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="org/eclipse/wst/**"/>
+			<accessrule kind="accessible" pattern="org/eclipse/jst/**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/jpa/plugins/org.eclipse.jpt.core/.cvsignore b/jpa/plugins/org.eclipse.jpt.core/.cvsignore
new file mode 100644
index 0000000..31362a7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/.cvsignore
@@ -0,0 +1,6 @@
+bin
+@dot
+temp.folder
+build.xml
+javaCompiler...args
+javaCompiler...args.*
diff --git a/jpa/plugins/org.eclipse.jpt.core/.project b/jpa/plugins/org.eclipse.jpt.core/.project
new file mode 100644
index 0000000..6ab3035
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.jpt.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/jpa/plugins/org.eclipse.jpt.core/.settings/org.eclipse.core.resources.prefs b/jpa/plugins/org.eclipse.jpt.core/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..a35e16a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Jan 20 17:49:11 EST 2010
+eclipse.preferences.version=1
+encoding/<project>=ISO-8859-1
diff --git a/jpa/plugins/org.eclipse.jpt.core/.settings/org.eclipse.jdt.core.prefs b/jpa/plugins/org.eclipse.jpt.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..00070b7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Sun Nov 12 15:24:36 EST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/jpa/plugins/org.eclipse.jpt.core/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fdd94b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/META-INF/MANIFEST.MF
@@ -0,0 +1,93 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.jpt.core;singleton:=true
+Bundle-Version: 2.3.3.qualifier
+Bundle-Activator: org.eclipse.jpt.core.JptCorePlugin
+Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.jpt.core.internal.resource.contenttypes"
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.commands;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.filebuffers;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.jem.util;bundle-version="[2.0.100,3.0.0)",
+ org.eclipse.jpt.db;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.jpt.utility;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.100,2.0.0)",
+ org.eclipse.jst.j2ee;bundle-version="[1.1.200,1.2.0)",
+ org.eclipse.jst.j2ee.core;bundle-version="[1.1.200,1.3.0)",
+ org.eclipse.pde.core;bundle-version="[3.6.0,4.0.0)";resolution:=optional,
+ org.eclipse.wst.common.emf;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.frameworks;bundle-version="[1.1.200,1.3.0)",
+ org.eclipse.wst.common.modulecore;bundle-version="[1.1.200,2.0.0)",
+ org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",
+ org.eclipse.wst.validation;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)"
+Export-Package: org.eclipse.jpt.core,
+ org.eclipse.jpt.core.context,
+ org.eclipse.jpt.core.context.java,
+ org.eclipse.jpt.core.context.orm,
+ org.eclipse.jpt.core.context.persistence,
+ org.eclipse.jpt.core.internal;x-internal:=true,
+ org.eclipse.jpt.core.internal.context;x-internal:=true,
+ org.eclipse.jpt.core.internal.context.java;x-internal:=true,
+ org.eclipse.jpt.core.internal.context.orm;x-internal:=true,
+ org.eclipse.jpt.core.internal.context.persistence;x-internal:=true,
+ org.eclipse.jpt.core.internal.facet;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1.context;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1.context.java;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1.context.orm;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1.context.persistence;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1.resource.java.binary;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa1.resource.java.source;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.context;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.context.java;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.context.orm;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.context.persistence;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.context.persistence.connection;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.context.persistence.options;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.resource.java;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.resource.java.binary;x-internal:=true,
+ org.eclipse.jpt.core.internal.jpa2.resource.java.source;x-internal:=true,
+ org.eclipse.jpt.core.internal.operations;x-internal:=true,
+ org.eclipse.jpt.core.internal.prefs;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.contenttypes;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.java;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.java.binary;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.java.source;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.orm;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.persistence;x-internal:=true,
+ org.eclipse.jpt.core.internal.resource.xml,
+ org.eclipse.jpt.core.internal.synch;x-internal:=true,
+ org.eclipse.jpt.core.internal.utility;x-internal:=true,
+ org.eclipse.jpt.core.internal.utility.jdt;x-internal:=true,
+ org.eclipse.jpt.core.internal.utility.translators;x-internal:=true,
+ org.eclipse.jpt.core.internal.validation;x-internal:=true,
+ org.eclipse.jpt.core.jpa2,
+ org.eclipse.jpt.core.jpa2.context,
+ org.eclipse.jpt.core.jpa2.context.java,
+ org.eclipse.jpt.core.jpa2.context.orm,
+ org.eclipse.jpt.core.jpa2.context.persistence,
+ org.eclipse.jpt.core.jpa2.context.persistence.connection,
+ org.eclipse.jpt.core.jpa2.context.persistence.options,
+ org.eclipse.jpt.core.jpa2.resource.java,
+ org.eclipse.jpt.core.resource,
+ org.eclipse.jpt.core.resource.java,
+ org.eclipse.jpt.core.resource.orm,
+ org.eclipse.jpt.core.resource.orm.v2_0,
+ org.eclipse.jpt.core.resource.persistence,
+ org.eclipse.jpt.core.resource.persistence.v2_0,
+ org.eclipse.jpt.core.resource.xml,
+ org.eclipse.jpt.core.utility,
+ org.eclipse.jpt.core.utility.jdt
+Import-Package: com.ibm.icu.text;version="4.0.1"
diff --git a/jpa/plugins/org.eclipse.jpt.core/about.html b/jpa/plugins/org.eclipse.jpt.core/about.html
new file mode 100644
index 0000000..be534ba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/about.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>May 02, 2008</P>
+
+<H3>License</H3>
+
+<P>The Eclipse Foundation makes available all content in this plug-in 
+("Content"). Unless otherwise indicated below, the Content is provided to you 
+under the terms and conditions of the Eclipse Public License Version 1.0 
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. 
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from the Eclipse Foundation, the 
+Content is being redistributed by another party ("Redistributor") and different 
+terms and conditions may apply to your use of any object code in the Content. 
+Check the Redistributor's license that was provided with the Content. If no such 
+license exists, contact the Redistributor. Unless otherwise indicated below, the 
+terms and conditions of the EPL still apply to any source code in the Content 
+and such source code may be obtained at
+<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/jpa/plugins/org.eclipse.jpt.core/build.properties b/jpa/plugins/org.eclipse.jpt.core/build.properties
new file mode 100644
index 0000000..1035f84
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/build.properties
@@ -0,0 +1,22 @@
+################################################################################
+# Copyright (c) 2006, 2010 Oracle. All rights reserved.
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0, which accompanies this distribution
+# and is available at http://www.eclipse.org/legal/epl-v10.html.
+# 
+# Contributors:
+#     Oracle - initial API and implementation
+################################################################################
+javacSource=1.5
+javacTarget=1.5
+source.. = src/,\
+               property_files/
+output.. = bin/
+bin.includes = .,\
+               META-INF/,\
+               about.html,\
+               plugin.xml,\
+               plugin.properties
+jars.compile.order = .
+src.includes = model/,\
+               schema/
diff --git a/jpa/plugins/org.eclipse.jpt.core/component.xml b/jpa/plugins/org.eclipse.jpt.core/component.xml
new file mode 100644
index 0000000..f6eef93
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/component.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2007, 2010 Oracle. All rights reserved.
+  This program and the accompanying materials are made available under the
+  terms of the Eclipse Public License v1.0, which accompanies this distribution
+  and is available at http://www.eclipse.org/legal/epl-v10.html.
+
+  Contributors:
+    Oracle - initial API and implementation
+ -->
+
+<component  xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.jpt.core"><description url=""></description><component-depends unrestricted="true"></component-depends><plugin id="org.eclipse.jpt.core" fragment="false"/></component>
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/DaliEmfFormatter.xml b/jpa/plugins/org.eclipse.jpt.core/model/DaliEmfFormatter.xml
new file mode 100644
index 0000000..147065a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/model/DaliEmfFormatter.xml
Binary files differ
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/common.ecore b/jpa/plugins/org.eclipse.jpt.core/model/common.ecore
new file mode 100644
index 0000000..f2415c0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/model/common.ecore
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="xml"
+    nsURI="jpt.common.xmi" nsPrefix="org.eclipse.jpt.core.resource.xml">
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractJpaRootEObject" abstract="true"
+      eSuperTypes="#//JpaRootEObject"/>
+  <eClassifiers xsi:type="ecore:EClass" name="JpaRootEObject" abstract="true" interface="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="version" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="schemaLocation" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+</ecore:EPackage>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/jpaResourceModels.genmodel b/jpa/plugins/org.eclipse.jpt.core/model/jpaResourceModels.genmodel
new file mode 100644
index 0000000..1bd4352
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/model/jpaResourceModels.genmodel
@@ -0,0 +1,513 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.jpt.core/src"
+    creationCommands="false" creationIcons="false" editDirectory="" editorDirectory=""
+    modelPluginID="org.eclipse.jpt.core" modelName="Core" editPluginClass="" editorPluginClass=""
+    updateClasspath="false" rootExtendsInterface="org.eclipse.jpt.core.resource.xml.JpaEObject"
+    rootExtendsClass="org.eclipse.jpt.core.resource.xml.AbstractJpaEObject" suppressInterfaces="true"
+    testsDirectory="" testSuiteClass="" importerID="org.eclipse.emf.importer.ecore"
+    complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
+  <foreignModel>common.ecore</foreignModel>
+  <foreignModel>orm.ecore</foreignModel>
+  <foreignModel>persistence.ecore</foreignModel>
+  <genPackages prefix="Common" basePackage="org.eclipse.jpt.core.resource" disposableProviderFactory="true"
+      adapterFactory="false" ecorePackage="common.ecore#/">
+    <genClasses image="false" ecoreClass="common.ecore#//AbstractJpaRootEObject"/>
+    <genClasses image="false" ecoreClass="common.ecore#//JpaRootEObject">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute common.ecore#//JpaRootEObject/version"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute common.ecore#//JpaRootEObject/schemaLocation"/>
+    </genClasses>
+  </genPackages>
+  <genPackages prefix="Orm" basePackage="org.eclipse.jpt.core.resource" disposableProviderFactory="true"
+      adapterFactory="false" ecorePackage="orm.ecore#/">
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//AccessType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//AccessType/PROPERTY"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//AccessType/FIELD"/>
+    </genEnums>
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//DiscriminatorType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//DiscriminatorType/STRING"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//DiscriminatorType/CHAR"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//DiscriminatorType/INTEGER"/>
+    </genEnums>
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//EnumType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//EnumType/ORDINAL"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//EnumType/STRING"/>
+    </genEnums>
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//FetchType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//FetchType/LAZY"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//FetchType/EAGER"/>
+    </genEnums>
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//GenerationType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//GenerationType/TABLE"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//GenerationType/SEQUENCE"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//GenerationType/IDENTITY"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//GenerationType/AUTO"/>
+    </genEnums>
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//InheritanceType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//InheritanceType/SINGLE_TABLE"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//InheritanceType/JOINED"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//InheritanceType/TABLE_PER_CLASS"/>
+    </genEnums>
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//TemporalType">
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//TemporalType/DATE"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//TemporalType/TIME"/>
+      <genEnumLiterals ecoreEnumLiteral="orm.ecore#//TemporalType/TIMESTAMP"/>
+    </genEnums>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlAttributeMapping"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlColumn">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlColumn/insertable"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlColumn/nullable"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlColumn/table"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlColumn/unique"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlColumn/updatable"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlEmbedded"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlMultiRelationshipMapping">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//AbstractXmlMultiRelationshipMapping/mapKey"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlNamedColumn">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlNamedColumn/columnDefinition"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlNamedColumn/name"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlRelationshipMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlRelationshipMapping/targetEntity"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlRelationshipMapping/fetch"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//AbstractXmlRelationshipMapping/cascade"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlSingleRelationshipMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlSingleRelationshipMapping/optional"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlReferenceTable"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlTable">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlTable/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlTable/catalog"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//AbstractXmlTable/schema"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//AbstractXmlTable/uniqueConstraints"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//AbstractXmlTypeMapping"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlAccessHolder">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlAccessHolder/access"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlAttributeMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlAttributeMapping/name"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlAssociationOverride"/>
+    <genClasses ecoreClass="orm.ecore#//XmlAssociationOverrideContainer">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlAssociationOverrideContainer/associationOverrides"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlAttributeOverride">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlAttributeOverride/column"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlAttributeOverrideContainer">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlAttributeOverrideContainer/attributeOverrides"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//Attributes">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/ids"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/embeddedIds"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/basics"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/versions"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/manyToOnes"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/oneToManys"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/oneToOnes"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/manyToManys"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/embeddeds"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//Attributes/transients"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlBasic">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlBasic/fetch"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlBasic/optional"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//CascadeType">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute orm.ecore#//CascadeType/cascadeAll"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute orm.ecore#//CascadeType/cascadePersist"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute orm.ecore#//CascadeType/cascadeMerge"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute orm.ecore#//CascadeType/cascadeRemove"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute orm.ecore#//CascadeType/cascadeRefresh"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlClassReference">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlClassReference/className"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlCollectionTable"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlColumn">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlColumn/length"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlColumn/precision"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlColumn/scale"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//ColumnMapping">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//ColumnMapping/column"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//ColumnResult">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//ColumnResult/name"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlConvertibleMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlConvertibleMapping/lob"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlConvertibleMapping/temporal"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlConvertibleMapping/enumerated"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlDiscriminatorColumn">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlDiscriminatorColumn/discriminatorType"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlDiscriminatorColumn/length"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlElementCollection"/>
+    <genClasses ecoreClass="orm.ecore#//XmlEmbeddable"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlEmbedded"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlEmbeddedId"/>
+    <genClasses ecoreClass="orm.ecore#//XmlEntity">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntity/name"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/table"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/secondaryTables"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/primaryKeyJoinColumns"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/inheritance"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntity/discriminatorValue"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/discriminatorColumn"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/sqlResultSetMappings"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntity/excludeDefaultListeners"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntity/excludeSuperclassListeners"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntity/entityListeners"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//EntityListener">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//EntityListener/className"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//EntityListeners">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//EntityListeners/entityListeners"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlEntityMappings">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntityMappings/description"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/persistenceUnitMetadata"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntityMappings/package"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntityMappings/schema"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlEntityMappings/catalog"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/sequenceGenerators"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/tableGenerators"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/sqlResultSetMappings"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/mappedSuperclasses"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/entities"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEntityMappings/embeddables"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//EntityResult">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//EntityResult/discriminatorColumn"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//EntityResult/entityClass"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//EntityResult/fieldResults"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//EventMethod">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//EventMethod/methodName"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlEventMethodContainer">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/prePersist"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/postPersist"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/preRemove"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/postRemove"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/preUpdate"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/postUpdate"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlEventMethodContainer/postLoad"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//FieldResult">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//FieldResult/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//FieldResult/column"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlGeneratedValue">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlGeneratedValue/generator"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlGeneratedValue/strategy"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlGenerator">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlGenerator/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlGenerator/initialValue"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlGenerator/allocationSize"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlGeneratorContainer">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlGeneratorContainer/sequenceGenerator"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlGeneratorContainer/tableGenerator"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlId">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlId/generatedValue"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlIdClassContainer">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlIdClassContainer/idClass"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//Inheritance">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//Inheritance/strategy"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlJoinColumn">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlJoinColumn/referencedColumnName"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlJoinColumnsMapping">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlJoinColumnsMapping/joinColumns"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlJoinTable">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlJoinTable/inverseJoinColumns"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlJoinTableMapping">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlJoinTableMapping/joinTable"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//Lob"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlManyToMany"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlManyToOne"/>
+    <genClasses ecoreClass="orm.ecore#//MapKey">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//MapKey/name"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlMappedByMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlMappedByMapping/mappedBy"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlMappedSuperclass">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlMappedSuperclass/excludeDefaultListeners"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlMappedSuperclass/excludeSuperclassListeners"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlMappedSuperclass/entityListeners"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlNamedNativeQuery">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlNamedNativeQuery/resultClass"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlNamedNativeQuery/resultSetMapping"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlNamedQuery"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlNullAttributeMapping"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlOneToMany"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlOneToOne">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlOneToOne/primaryKeyJoinColumns"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlOrderable">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlOrderable/orderBy"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlOrderColumn"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlOverride">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlOverride/name"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlPersistenceUnitDefaults">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlPersistenceUnitDefaults/schema"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlPersistenceUnitDefaults/catalog"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlPersistenceUnitDefaults/cascadePersist"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlPersistenceUnitDefaults/entityListeners"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlPersistenceUnitMetadata">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlPersistenceUnitMetadata/xmlMappingMetadataComplete"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlPersistenceUnitMetadata/persistenceUnitDefaults"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlReferenceTable">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlReferenceTable/joinColumns"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//PostLoad"/>
+    <genClasses ecoreClass="orm.ecore#//PostPersist"/>
+    <genClasses ecoreClass="orm.ecore#//PostRemove"/>
+    <genClasses ecoreClass="orm.ecore#//PostUpdate"/>
+    <genClasses ecoreClass="orm.ecore#//PrePersist"/>
+    <genClasses ecoreClass="orm.ecore#//PreRemove"/>
+    <genClasses ecoreClass="orm.ecore#//PreUpdate"/>
+    <genClasses ecoreClass="orm.ecore#//XmlPrimaryKeyJoinColumn">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlPrimaryKeyJoinColumn/referencedColumnName"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlQuery">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlQuery/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlQuery/query"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlQuery/hints"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlQueryContainer">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlQueryContainer/namedQueries"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlQueryContainer/namedNativeQueries"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlQueryHint">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlQueryHint/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlQueryHint/value"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlSecondaryTable">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlSecondaryTable/primaryKeyJoinColumns"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlSequenceGenerator">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlSequenceGenerator/sequenceName"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//SqlResultSetMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//SqlResultSetMapping/name"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//SqlResultSetMapping/entityResults"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//SqlResultSetMapping/columnResults"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlTable"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlTableGenerator">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTableGenerator/table"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTableGenerator/catalog"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTableGenerator/schema"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTableGenerator/pkColumnName"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTableGenerator/valueColumnName"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTableGenerator/pkColumnValue"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlTableGenerator/uniqueConstraints"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlTransient"/>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlTypeMapping">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTypeMapping/className"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTypeMapping/metadataComplete"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlTypeMapping/description"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//XmlTypeMapping/attributes"/>
+    </genClasses>
+    <genClasses ecoreClass="orm.ecore#//XmlUniqueConstraint">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//XmlUniqueConstraint/columnNames"/>
+    </genClasses>
+    <genClasses image="false" ecoreClass="orm.ecore#//XmlVersion"/>
+    <nestedGenPackages prefix="OrmV2_0" basePackage="org.eclipse.jpt.core.resource.orm"
+        disposableProviderFactory="true" adapterFactory="false" ecorePackage="orm.ecore#//v2_0">
+      <genEnums typeSafeEnumCompatible="false" ecoreEnum="orm.ecore#//v2_0/LockModeType_2_0">
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/NONE"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/READ"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/WRITE"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/OPTIMISTIC"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/OPTIMISTIC_FORCE_INCREMENT"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/PESSIMISTIC_READ"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/PESSIMISTIC_WRITE"/>
+        <genEnumLiterals ecoreEnumLiteral="orm.ecore#//v2_0/LockModeType_2_0/PESSIMISTIC_FORCE_INCREMENT"/>
+      </genEnums>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlAssociationOverride_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlAssociationOverride_2_0/description"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlAssociationOverride_2_0/joinTable"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlAttributeMapping_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlAttributeOverride_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlAttributeOverride_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlAttributes_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlAttributes_2_0/description"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlAttributes_2_0/elementCollections"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlCacheable_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlCacheable_2_0/cacheable"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlCascadeType_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlCascadeType_2_0/cascadeDetach"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlCollectionTable_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlDerivedId_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlDerivedId_2_0/id"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlElementCollection_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlElementCollection_2_0/targetClass"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlElementCollection_2_0/fetch"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlElementCollection_2_0/mapKey"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlElementCollection_2_0/mapKeyClass"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlElementCollection_2_0/mapKeyTemporal"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlElementCollection_2_0/mapKeyEnumerated"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlElementCollection_2_0/mapKeyColumn"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlElementCollection_2_0/mapKeyJoinColumns"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlElementCollection_2_0/column"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlElementCollection_2_0/collectionTable"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlEmbedded_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlEntity_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlEntityListener_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlEntityListener_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlEventMethod_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlEventMethod_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlGenerator_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlGenerator_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlManyToMany_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlMapKeyAttributeOverrideContainer_2_0">
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlMapKeyAttributeOverrideContainer_2_0/mapKeyAttributeOverrides"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlMapsId_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlMapsId_2_0/mapsId"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlMultiRelationshipMapping_2_0">
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlMultiRelationshipMapping_2_0/mapKeyClass"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlMultiRelationshipMapping_2_0/mapKeyTemporal"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlMultiRelationshipMapping_2_0/mapKeyEnumerated"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlMultiRelationshipMapping_2_0/mapKeyColumn"/>
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlMultiRelationshipMapping_2_0/mapKeyJoinColumns"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlNamedQuery_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlNamedQuery_2_0/lockMode"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlOneToMany_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlOneToOne_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlOrderable_2_0">
+        <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference orm.ecore#//v2_0/XmlOrderable_2_0/orderColumn"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlOrderColumn_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlOrderColumn_2_0/nullable"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlOrderColumn_2_0/insertable"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlOrderColumn_2_0/updatable"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlOrphanRemovable_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlOrphanRemovable_2_0/orphanRemoval"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlPersistenceUnitDefaults_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlPersistenceUnitDefaults_2_0/description"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlPersistenceUnitDefaults_2_0/delimitedIdentifiers"/>
+      </genClasses>
+      <genClasses ecoreClass="orm.ecore#//v2_0/XmlPersistenceUnitMetadata_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlPersistenceUnitMetadata_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlQuery_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlQuery_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlQueryHint_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlQueryHint_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlSequenceGenerator_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlSequenceGenerator_2_0/catalog"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlSequenceGenerator_2_0/schema"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlSingleRelationshipMapping_2_0"/>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlSqlResultSetMapping_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlSqlResultSetMapping_2_0/description"/>
+      </genClasses>
+      <genClasses image="false" ecoreClass="orm.ecore#//v2_0/XmlUniqueConstraint_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute orm.ecore#//v2_0/XmlUniqueConstraint_2_0/name"/>
+      </genClasses>
+    </nestedGenPackages>
+  </genPackages>
+  <genPackages prefix="Persistence" basePackage="org.eclipse.jpt.core.resource" disposableProviderFactory="true"
+      adapterFactory="false" ecorePackage="persistence.ecore#/">
+    <genEnums typeSafeEnumCompatible="false" ecoreEnum="persistence.ecore#//XmlPersistenceUnitTransactionType">
+      <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//XmlPersistenceUnitTransactionType/JTA"/>
+      <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//XmlPersistenceUnitTransactionType/RESOURCE_LOCAL"/>
+    </genEnums>
+    <genClasses ecoreClass="persistence.ecore#//XmlJavaClassRef">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlJavaClassRef/javaClass"/>
+    </genClasses>
+    <genClasses ecoreClass="persistence.ecore#//XmlJarFileRef">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlJarFileRef/fileName"/>
+    </genClasses>
+    <genClasses ecoreClass="persistence.ecore#//XmlMappingFileRef">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlMappingFileRef/fileName"/>
+    </genClasses>
+    <genClasses ecoreClass="persistence.ecore#//XmlPersistence">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference persistence.ecore#//XmlPersistence/persistenceUnits"/>
+    </genClasses>
+    <genClasses ecoreClass="persistence.ecore#//XmlPersistenceUnit">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/description"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/provider"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/jtaDataSource"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/nonJtaDataSource"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference persistence.ecore#//XmlPersistenceUnit/mappingFiles"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EReference persistence.ecore#//XmlPersistenceUnit/jarFiles"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference persistence.ecore#//XmlPersistenceUnit/classes"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/excludeUnlistedClasses"/>
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference persistence.ecore#//XmlPersistenceUnit/properties"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlPersistenceUnit/transactionType"/>
+    </genClasses>
+    <genClasses ecoreClass="persistence.ecore#//XmlProperties">
+      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference persistence.ecore#//XmlProperties/properties"/>
+    </genClasses>
+    <genClasses ecoreClass="persistence.ecore#//XmlProperty">
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlProperty/name"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//XmlProperty/value"/>
+    </genClasses>
+    <nestedGenPackages prefix="PersistenceV2_0" basePackage="org.eclipse.jpt.core.resource.persistence"
+        disposableProviderFactory="true" adapterFactory="false" ecorePackage="persistence.ecore#//v2_0">
+      <genEnums typeSafeEnumCompatible="false" ecoreEnum="persistence.ecore#//v2_0/XmlPersistenceUnitCachingType_2_0">
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitCachingType_2_0/ALL"/>
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitCachingType_2_0/NONE"/>
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitCachingType_2_0/ENABLE_SELECTIVE"/>
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitCachingType_2_0/DISABLE_SELECTIVE"/>
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitCachingType_2_0/UNSPECIFIED"/>
+      </genEnums>
+      <genEnums typeSafeEnumCompatible="false" ecoreEnum="persistence.ecore#//v2_0/XmlPersistenceUnitValidationModeType_2_0">
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitValidationModeType_2_0/AUTO"/>
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitValidationModeType_2_0/CALLBACK"/>
+        <genEnumLiterals ecoreEnumLiteral="persistence.ecore#//v2_0/XmlPersistenceUnitValidationModeType_2_0/NONE"/>
+      </genEnums>
+      <genClasses image="false" ecoreClass="persistence.ecore#//v2_0/XmlPersistenceUnit_2_0">
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//v2_0/XmlPersistenceUnit_2_0/sharedCacheMode"/>
+        <genFeatures createChild="false" ecoreFeature="ecore:EAttribute persistence.ecore#//v2_0/XmlPersistenceUnit_2_0/validationMode"/>
+      </genClasses>
+    </nestedGenPackages>
+  </genPackages>
+</genmodel:GenModel>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
new file mode 100644
index 0000000..c222b13
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/model/orm.ecore
@@ -0,0 +1,578 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="orm"
+    nsURI="jpt.orm.xmi" nsPrefix="org.eclipse.jpt.core.resource.orm">
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlAttributeMapping" abstract="true"
+      eSuperTypes="#//XmlAttributeMapping"/>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlColumn" abstract="true" eSuperTypes="#//AbstractXmlNamedColumn">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="insertable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="nullable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="table" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="unique" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="updatable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlEmbedded" abstract="true"
+      eSuperTypes="#//AbstractXmlAttributeMapping #//XmlAttributeOverrideContainer"/>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlMultiRelationshipMapping"
+      abstract="true" eSuperTypes="#//AbstractXmlRelationshipMapping #//XmlMappedByMapping #//XmlJoinTableMapping #//XmlOrderable #//v2_0/XmlMultiRelationshipMapping_2_0">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="mapKey" eType="#//MapKey"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlNamedColumn" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="columnDefinition" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlRelationshipMapping" abstract="true"
+      eSuperTypes="#//AbstractXmlAttributeMapping">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetEntity" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fetch" eType="#//FetchType"
+        defaultValueLiteral="LAZY"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="cascade" eType="#//CascadeType"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlSingleRelationshipMapping"
+      abstract="true" eSuperTypes="#//AbstractXmlRelationshipMapping #//XmlJoinTableMapping #//XmlJoinColumnsMapping #//v2_0/XmlSingleRelationshipMapping_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="optional" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlReferenceTable" abstract="true"
+      eSuperTypes="#//AbstractXmlTable #//XmlReferenceTable"/>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlTable" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="catalog" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="schema" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="uniqueConstraints" upperBound="-1"
+        eType="#//XmlUniqueConstraint" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AbstractXmlTypeMapping" abstract="true"
+      eSuperTypes="#//XmlTypeMapping"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlAccessHolder" abstract="true" interface="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="access" eType="#//AccessType"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlAttributeMapping" abstract="true"
+      interface="true" eSuperTypes="#//v2_0/XmlAttributeMapping_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlAssociationOverride" eSuperTypes="#//XmlOverride #//XmlJoinColumnsMapping #//v2_0/XmlAssociationOverride_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlAssociationOverrideContainer" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="associationOverrides" upperBound="-1"
+        eType="#//XmlAssociationOverride" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlAttributeOverride" eSuperTypes="#//XmlOverride #//v2_0/XmlAttributeOverride_2_0">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="column" lowerBound="1"
+        eType="#//XmlColumn" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlAttributeOverrideContainer" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="attributeOverrides" upperBound="-1"
+        eType="#//XmlAttributeOverride" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Attributes" eSuperTypes="#//v2_0/XmlAttributes_2_0">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="ids" upperBound="-1" eType="#//XmlId"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="embeddedIds" upperBound="-1"
+        eType="#//XmlEmbeddedId" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="basics" upperBound="-1"
+        eType="#//XmlBasic" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="versions" upperBound="-1"
+        eType="#//XmlVersion" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="manyToOnes" upperBound="-1"
+        eType="#//XmlManyToOne" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="oneToManys" upperBound="-1"
+        eType="#//XmlOneToMany" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="oneToOnes" upperBound="-1"
+        eType="#//XmlOneToOne" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="manyToManys" upperBound="-1"
+        eType="#//XmlManyToMany" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="embeddeds" upperBound="-1"
+        eType="#//XmlEmbedded" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="transients" upperBound="-1"
+        eType="#//XmlTransient" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlBasic" eSuperTypes="#//AbstractXmlAttributeMapping #//ColumnMapping #//XmlConvertibleMapping">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fetch" eType="#//FetchType"
+        defaultValueLiteral="LAZY"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="optional" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="CascadeType" eSuperTypes="#//v2_0/XmlCascadeType_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadeAll" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadePersist" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadeMerge" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadeRemove" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadeRefresh" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlClassReference">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlCollectionTable" eSuperTypes="#//AbstractXmlReferenceTable #//v2_0/XmlCollectionTable_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlColumn" eSuperTypes="#//AbstractXmlColumn">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="length" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IntObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="precision" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IntObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="scale" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IntObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ColumnMapping" abstract="true" interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="column" eType="#//XmlColumn"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ColumnResult">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlConvertibleMapping" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="lob" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="temporal" eType="#//TemporalType"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="enumerated" eType="#//EnumType"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlDiscriminatorColumn" eSuperTypes="#//AbstractXmlNamedColumn">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminatorType" eType="#//DiscriminatorType"
+        defaultValueLiteral="STRING"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="length" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IntObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlElementCollection" eSuperTypes="#//AbstractXmlAttributeMapping #//v2_0/XmlElementCollection_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlEmbeddable" eSuperTypes="#//AbstractXmlTypeMapping"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlEmbedded" eSuperTypes="#//AbstractXmlEmbedded #//v2_0/XmlEmbedded_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlEmbeddedId" eSuperTypes="#//AbstractXmlEmbedded"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlEntity" eSuperTypes="#//AbstractXmlTypeMapping #//XmlQueryContainer #//XmlGeneratorContainer #//XmlEventMethodContainer #//XmlAttributeOverrideContainer #//XmlAssociationOverrideContainer #//v2_0/XmlEntity_2_0 #//XmlIdClassContainer">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="table" eType="#//XmlTable"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="secondaryTables" upperBound="-1"
+        eType="#//XmlSecondaryTable" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="primaryKeyJoinColumns"
+        upperBound="-1" eType="#//XmlPrimaryKeyJoinColumn" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="inheritance" eType="#//Inheritance"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminatorValue" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="discriminatorColumn" eType="#//XmlDiscriminatorColumn"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="sqlResultSetMappings" upperBound="-1"
+        eType="#//SqlResultSetMapping" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="excludeDefaultListeners"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="excludeSuperclassListeners"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="entityListeners" eType="#//EntityListeners"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="EntityListener" eSuperTypes="#//XmlEventMethodContainer #//v2_0/XmlEntityListener_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="EntityListeners">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="entityListeners" upperBound="-1"
+        eType="#//EntityListener" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlEntityMappings" eSuperTypes="common.ecore#//AbstractJpaRootEObject #//XmlQueryContainer #//XmlAccessHolder">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="persistenceUnitMetadata"
+        eType="#//XmlPersistenceUnitMetadata" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="package" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="schema" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="catalog" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="sequenceGenerators" upperBound="-1"
+        eType="#//XmlSequenceGenerator" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="tableGenerators" upperBound="-1"
+        eType="#//XmlTableGenerator" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="sqlResultSetMappings" upperBound="-1"
+        eType="#//SqlResultSetMapping" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="mappedSuperclasses" upperBound="-1"
+        eType="#//XmlMappedSuperclass" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="entities" upperBound="-1"
+        eType="#//XmlEntity" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="embeddables" upperBound="-1"
+        eType="#//XmlEmbeddable" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="EntityResult">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminatorColumn" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="entityClass" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="fieldResults" upperBound="-1"
+        eType="#//FieldResult" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="EventMethod" abstract="true" eSuperTypes="#//v2_0/XmlEventMethod_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="methodName" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlEventMethodContainer" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="prePersist" eType="#//PrePersist"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="postPersist" eType="#//PostPersist"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="preRemove" eType="#//PreRemove"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="postRemove" eType="#//PostRemove"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="preUpdate" eType="#//PreUpdate"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="postUpdate" eType="#//PostUpdate"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="postLoad" eType="#//PostLoad"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="FieldResult">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="column" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlGeneratedValue">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="generator" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="strategy" eType="#//GenerationType"
+        defaultValueLiteral="TABLE"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlGenerator" abstract="true" interface="true"
+      eSuperTypes="#//v2_0/XmlGenerator_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="initialValue" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IntObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="allocationSize" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//IntObject"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlGeneratorContainer" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="sequenceGenerator" eType="#//XmlSequenceGenerator"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="tableGenerator" eType="#//XmlTableGenerator"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlId" eSuperTypes="#//AbstractXmlAttributeMapping #//ColumnMapping #//XmlConvertibleMapping #//XmlGeneratorContainer">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="generatedValue" eType="#//XmlGeneratedValue"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlIdClassContainer" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="idClass" eType="#//XmlClassReference"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Inheritance">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="strategy" eType="#//InheritanceType"
+        defaultValueLiteral="SINGLE_TABLE"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlJoinColumn" eSuperTypes="#//AbstractXmlColumn">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="referencedColumnName" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlJoinColumnsMapping" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="joinColumns" upperBound="-1"
+        eType="#//XmlJoinColumn" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlJoinTable" eSuperTypes="#//AbstractXmlReferenceTable">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="inverseJoinColumns" upperBound="-1"
+        eType="#//XmlJoinColumn" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlJoinTableMapping" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="joinTable" eType="#//XmlJoinTable"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Lob"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlManyToMany" eSuperTypes="#//AbstractXmlMultiRelationshipMapping #//v2_0/XmlManyToMany_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlManyToOne" eSuperTypes="#//AbstractXmlSingleRelationshipMapping"/>
+  <eClassifiers xsi:type="ecore:EClass" name="MapKey">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlMappedByMapping" abstract="true"
+      interface="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="mappedBy" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlMappedSuperclass" eSuperTypes="#//AbstractXmlTypeMapping #//XmlIdClassContainer">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="excludeDefaultListeners"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="excludeSuperclassListeners"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="entityListeners" eType="#//EntityListeners"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlNamedNativeQuery" eSuperTypes="#//XmlQuery">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="resultClass" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="resultSetMapping" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlNamedQuery" eSuperTypes="#//XmlQuery #//v2_0/XmlNamedQuery_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlNullAttributeMapping" abstract="true"
+      eSuperTypes="#//AbstractXmlAttributeMapping"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlOneToMany" eSuperTypes="#//AbstractXmlMultiRelationshipMapping #//XmlJoinColumnsMapping #//v2_0/XmlOneToMany_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlOneToOne" eSuperTypes="#//AbstractXmlSingleRelationshipMapping #//XmlMappedByMapping #//v2_0/XmlOneToOne_2_0">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="primaryKeyJoinColumns"
+        upperBound="-1" eType="#//XmlPrimaryKeyJoinColumn" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlOrderable" abstract="true" interface="true"
+      eSuperTypes="#//v2_0/XmlOrderable_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="orderBy" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlOrderColumn" eSuperTypes="#//AbstractXmlNamedColumn #//v2_0/XmlOrderColumn_2_0"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlOverride" abstract="true" interface="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlPersistenceUnitDefaults" eSuperTypes="#//XmlAccessHolder #//v2_0/XmlPersistenceUnitDefaults_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="schema" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="catalog" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadePersist" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="entityListeners" eType="#//EntityListeners"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlPersistenceUnitMetadata" eSuperTypes="#//v2_0/XmlPersistenceUnitMetadata_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="xmlMappingMetadataComplete"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="persistenceUnitDefaults"
+        eType="#//XmlPersistenceUnitDefaults" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlReferenceTable" abstract="true" interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="joinColumns" upperBound="-1"
+        eType="#//XmlJoinColumn" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="PostLoad" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="PostPersist" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="PostRemove" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="PostUpdate" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="PrePersist" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="PreRemove" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="PreUpdate" eSuperTypes="#//EventMethod"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlPrimaryKeyJoinColumn" eSuperTypes="#//AbstractXmlNamedColumn">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="referencedColumnName" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlQuery" abstract="true" interface="true"
+      eSuperTypes="#//v2_0/XmlQuery_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="query" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="hints" upperBound="-1"
+        eType="#//XmlQueryHint" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlQueryContainer" abstract="true" interface="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="namedQueries" upperBound="-1"
+        eType="#//XmlNamedQuery" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="namedNativeQueries" upperBound="-1"
+        eType="#//XmlNamedNativeQuery" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlQueryHint" eSuperTypes="#//v2_0/XmlQueryHint_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlSecondaryTable" eSuperTypes="#//AbstractXmlTable">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="primaryKeyJoinColumns"
+        upperBound="-1" eType="#//XmlPrimaryKeyJoinColumn" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlSequenceGenerator" eSuperTypes="#//XmlGenerator #//v2_0/XmlSequenceGenerator_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="sequenceName" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="SqlResultSetMapping" eSuperTypes="#//v2_0/XmlSqlResultSetMapping_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="entityResults" upperBound="-1"
+        eType="#//EntityResult" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="columnResults" upperBound="-1"
+        eType="#//ColumnResult" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlTable" eSuperTypes="#//AbstractXmlTable"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlTableGenerator" eSuperTypes="#//XmlGenerator">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="table" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="catalog" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="schema" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="pkColumnName" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="valueColumnName" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="pkColumnValue" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="uniqueConstraints" upperBound="-1"
+        eType="#//XmlUniqueConstraint" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlTransient" eSuperTypes="#//AbstractXmlAttributeMapping"/>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlTypeMapping" abstract="true" interface="true"
+      eSuperTypes="#//XmlAccessHolder">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="className" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="metadataComplete" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" eType="#//Attributes"
+        containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlUniqueConstraint" eSuperTypes="#//v2_0/XmlUniqueConstraint_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="columnNames" unique="false"
+        lowerBound="1" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlVersion" eSuperTypes="#//AbstractXmlAttributeMapping #//ColumnMapping #//XmlConvertibleMapping"/>
+  <eClassifiers xsi:type="ecore:EEnum" name="AccessType">
+    <eLiterals name="PROPERTY"/>
+    <eLiterals name="FIELD" value="1"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="DiscriminatorType">
+    <eLiterals name="STRING"/>
+    <eLiterals name="CHAR" value="1"/>
+    <eLiterals name="INTEGER" value="2"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="EnumType">
+    <eLiterals name="ORDINAL"/>
+    <eLiterals name="STRING" value="1"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="FetchType">
+    <eLiterals name="LAZY"/>
+    <eLiterals name="EAGER" value="1"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="GenerationType">
+    <eLiterals name="TABLE"/>
+    <eLiterals name="SEQUENCE" value="1"/>
+    <eLiterals name="IDENTITY" value="2"/>
+    <eLiterals name="AUTO" value="3"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="InheritanceType">
+    <eLiterals name="SINGLE_TABLE" literal="SINGLE_TABLE"/>
+    <eLiterals name="JOINED" value="1"/>
+    <eLiterals name="TABLE_PER_CLASS" value="2" literal="TABLE_PER_CLASS"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="TemporalType">
+    <eLiterals name="DATE"/>
+    <eLiterals name="TIME" value="1"/>
+    <eLiterals name="TIMESTAMP" value="2"/>
+  </eClassifiers>
+  <eSubpackages name="v2_0" nsURI="jpt.orm.v2_0.xmi" nsPrefix="org.eclipse.jpt.core.resource.orm.v2_0">
+    <eClassifiers xsi:type="ecore:EClass" name="XmlAssociationOverride_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="joinTable" eType="#//XmlJoinTable"
+          containment="true" resolveProxies="false"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlAttributeMapping_2_0" abstract="true"
+        interface="true" eSuperTypes="#//XmlAccessHolder"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlAttributeOverride_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlAttributes_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="elementCollections" upperBound="-1"
+          eType="#//XmlElementCollection" containment="true" resolveProxies="false"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlCacheable_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="cacheable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlCascadeType_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="cascadeDetach" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlCollectionTable_2_0" abstract="true"
+        interface="true" eSuperTypes="#//XmlReferenceTable"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlDerivedId_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlElementCollection_2_0" abstract="true"
+        interface="true" eSuperTypes="#//XmlConvertibleMapping #//XmlOrderable #//XmlAttributeOverrideContainer #//XmlAssociationOverrideContainer #//v2_0/XmlMapKeyAttributeOverrideContainer_2_0">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetClass" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="fetch" eType="#//FetchType"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKey" eType="#//MapKey"
+          containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyClass" eType="#//XmlClassReference"
+          containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="mapKeyTemporal" eType="#//TemporalType"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="mapKeyEnumerated" eType="#//EnumType"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyColumn" eType="#//XmlColumn"
+          containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyJoinColumns" upperBound="-1"
+          eType="#//XmlJoinColumn" containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="column" eType="#//XmlColumn"
+          containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="collectionTable" eType="#//XmlCollectionTable"
+          containment="true" resolveProxies="false"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlEmbedded_2_0" abstract="true" interface="true"
+        eSuperTypes="#//XmlAssociationOverrideContainer"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlEntity_2_0" abstract="true" interface="true"
+        eSuperTypes="#//v2_0/XmlCacheable_2_0"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlEntityListener_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlEventMethod_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlGenerator_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlManyToMany_2_0" abstract="true"
+        interface="true" eSuperTypes="#//v2_0/XmlMultiRelationshipMapping_2_0"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlMapKeyAttributeOverrideContainer_2_0"
+        abstract="true" interface="true">
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyAttributeOverrides"
+          upperBound="-1" eType="#//XmlAttributeOverride" containment="true" resolveProxies="false"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlMapsId_2_0" abstract="true" interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="mapsId" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlMultiRelationshipMapping_2_0" abstract="true"
+        interface="true" eSuperTypes="#//v2_0/XmlOrderable_2_0 #//v2_0/XmlMapKeyAttributeOverrideContainer_2_0">
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyClass" eType="#//XmlClassReference"
+          containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="mapKeyTemporal" eType="#//TemporalType"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="mapKeyEnumerated" eType="#//EnumType"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyColumn" eType="#//XmlColumn"
+          containment="true" resolveProxies="false"/>
+      <eStructuralFeatures xsi:type="ecore:EReference" name="mapKeyJoinColumns" upperBound="-1"
+          eType="#//XmlJoinColumn" containment="true" resolveProxies="false"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlNamedQuery_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="lockMode" eType="#//v2_0/LockModeType_2_0"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlOneToMany_2_0" abstract="true"
+        interface="true" eSuperTypes="#//v2_0/XmlMultiRelationshipMapping_2_0 #//v2_0/XmlOrphanRemovable_2_0"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlOneToOne_2_0" abstract="true" interface="true"
+        eSuperTypes="#//v2_0/XmlSingleRelationshipMapping_2_0 #//v2_0/XmlOrphanRemovable_2_0"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlOrderable_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EReference" name="orderColumn" eType="#//XmlOrderColumn"
+          containment="true" resolveProxies="false"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlOrderColumn_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="nullable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="insertable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="updatable" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlOrphanRemovable_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="orphanRemoval" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlPersistenceUnitDefaults_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="delimitedIdentifiers"
+          eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlPersistenceUnitMetadata_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlQuery_2_0" abstract="true" interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlQueryHint_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlSequenceGenerator_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="catalog" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="schema" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlSingleRelationshipMapping_2_0"
+        abstract="true" interface="true" eSuperTypes="#//v2_0/XmlDerivedId_2_0 #//v2_0/XmlMapsId_2_0"/>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlSqlResultSetMapping_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EClass" name="XmlUniqueConstraint_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EEnum" name="LockModeType_2_0">
+      <eLiterals name="NONE"/>
+      <eLiterals name="READ" value="1"/>
+      <eLiterals name="WRITE" value="2"/>
+      <eLiterals name="OPTIMISTIC" value="3"/>
+      <eLiterals name="OPTIMISTIC_FORCE_INCREMENT" value="4"/>
+      <eLiterals name="PESSIMISTIC_READ" value="5"/>
+      <eLiterals name="PESSIMISTIC_WRITE" value="6"/>
+      <eLiterals name="PESSIMISTIC_FORCE_INCREMENT" value="7"/>
+    </eClassifiers>
+  </eSubpackages>
+</ecore:EPackage>
diff --git a/jpa/plugins/org.eclipse.jpt.core/model/persistence.ecore b/jpa/plugins/org.eclipse.jpt.core/model/persistence.ecore
new file mode 100644
index 0000000..03599cb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/model/persistence.ecore
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="persistence"
+    nsURI="jpt.persistence.xmi" nsPrefix="org.eclipse.jpt.core.resource.persistence">
+  <eClassifiers xsi:type="ecore:EClass" name="XmlJavaClassRef">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="javaClass" ordered="false"
+        unique="false" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
+        defaultValueLiteral=""/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlJarFileRef">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fileName" ordered="false"
+        unique="false" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
+        defaultValueLiteral=""/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlMappingFileRef">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fileName" ordered="false"
+        unique="false" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
+        defaultValueLiteral=""/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlPersistence" eSuperTypes="common.ecore#//AbstractJpaRootEObject">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="persistenceUnits" upperBound="-1"
+        eType="#//XmlPersistenceUnit" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlPersistenceUnit" eSuperTypes="#//v2_0/XmlPersistenceUnit_2_0">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" unique="false"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="provider" unique="false"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="jtaDataSource" unique="false"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="nonJtaDataSource" unique="false"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="mappingFiles" upperBound="-1"
+        eType="#//XmlMappingFileRef" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="jarFiles" upperBound="-1"
+        eType="#//XmlJarFileRef" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="classes" upperBound="-1"
+        eType="#//XmlJavaClassRef" containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="excludeUnlistedClasses"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//BooleanObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="properties" eType="#//XmlProperties"
+        containment="true" resolveProxies="false"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="transactionType" unique="false"
+        eType="#//XmlPersistenceUnitTransactionType" defaultValueLiteral="JTA"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="XmlPersistenceUnitTransactionType">
+    <eLiterals name="JTA"/>
+    <eLiterals name="RESOURCE_LOCAL" value="1"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlProperties">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
+        eType="#//XmlProperty" containment="true" resolveProxies="false"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="XmlProperty">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" lowerBound="1"
+        eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/>
+  </eClassifiers>
+  <eSubpackages name="v2_0" nsURI="jpt.persistence.v2_0.xmi" nsPrefix="org.eclipse.jpt.core.resource.persistence.v2_0">
+    <eClassifiers xsi:type="ecore:EClass" name="XmlPersistenceUnit_2_0" abstract="true"
+        interface="true">
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="sharedCacheMode" unique="false"
+          eType="#//v2_0/XmlPersistenceUnitCachingType_2_0" defaultValueLiteral="UNSPECIFIED"/>
+      <eStructuralFeatures xsi:type="ecore:EAttribute" name="validationMode" unique="false"
+          eType="#//v2_0/XmlPersistenceUnitValidationModeType_2_0" defaultValueLiteral="AUTO"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EEnum" name="XmlPersistenceUnitCachingType_2_0">
+      <eLiterals name="ALL"/>
+      <eLiterals name="NONE" value="1"/>
+      <eLiterals name="ENABLE_SELECTIVE" value="2"/>
+      <eLiterals name="DISABLE_SELECTIVE" value="3"/>
+      <eLiterals name="UNSPECIFIED" value="4"/>
+    </eClassifiers>
+    <eClassifiers xsi:type="ecore:EEnum" name="XmlPersistenceUnitValidationModeType_2_0">
+      <eLiterals name="AUTO"/>
+      <eLiterals name="CALLBACK" value="1"/>
+      <eLiterals name="NONE" value="2"/>
+    </eClassifiers>
+  </eSubpackages>
+</ecore:EPackage>
diff --git a/jpa/plugins/org.eclipse.jpt.core/plugin.properties b/jpa/plugins/org.eclipse.jpt.core/plugin.properties
new file mode 100644
index 0000000..e77e457
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/plugin.properties
@@ -0,0 +1,48 @@
+###############################################################################
+# Copyright (c) 2006, 2010 Oracle. All rights reserved.
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0, which accompanies this distribution
+# and is available at http://www.eclipse.org/legal/epl-v10.html.
+# 
+# Contributors:
+#     Oracle - initial API and implementation
+###############################################################################
+# ====================================================================
+# To code developer:
+#   Do NOT change the properties between this line and the
+#   "%%% END OF TRANSLATED PROPERTIES %%%" line.
+#   Make a new property name, append to the end of the file and change
+#   the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = Dali Java Persistence Tools - Core
+providerName = Eclipse Web Tools Platform
+
+JPA_PLATFORM=JPA Platform
+JPA_RESOURCE_MODEL_PROVIDERS=JPA Resource Model Providers
+JPA_PROBLEM_MARKER=JPA Problem Marker
+JPA_FILE_CONTENT=JPA File Content
+
+BASE_JPA_CONTENT = Base content for JPA XML files
+PERSISTENCE_XML_CONTENT = JPA persistence.xml files
+MAPPING_FILE_CONTENT = Base content for JPA XML mapping files
+ORM_XML_CONTENT = JPA orm.xml mapping files
+JAR_CONTENT = JAR Content
+
+GENERIC_1_0_PLATFORM_LABEL=Generic 1.0
+GENERIC_2_0_PLATFORM_LABEL=Generic 2.0
+
+NO_OP_LIBRARY_PROVIDER_WARNING = Library configuration is disabled. The user may need to configure further classpath changes later.
+NO_OP_LIBRARY_PROVIDER_MESSAGE = The JPA facet requires a JPA implementation library to be present on the project classpath. By disabling library configuration, the user takes on the responsibility of ensuring that the classpath is configured appropriately via alternate means.
+
+JPA_PREREQ_GROUP_LABEL="JPA prerequisite facets"
+JPA_FACET_LABEL=JPA
+JPA_FACET_DESCRIPTION=Adds support for writing persistent meta-data using the Java Persistence API (JPA).
+JPA_1.0_PRESET_LABEL=Minimal JPA 1.0 Configuration
+JPA_2.0_PRESET_LABEL=Minimal JPA 2.0 Configuration
+JPA_TEMPLATE_LABEL=JPA Project
+JPA_VALIDATOR=JPA Validator
diff --git a/jpa/plugins/org.eclipse.jpt.core/plugin.xml b/jpa/plugins/org.eclipse.jpt.core/plugin.xml
new file mode 100644
index 0000000..26ccdd0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/plugin.xml
@@ -0,0 +1,508 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+  Copyright (c) 2007, 2010 Oracle. All rights reserved.
+  This program and the accompanying materials are made available under the
+  terms of the Eclipse Public License v1.0, which accompanies this distribution
+  and is available at http://www.eclipse.org/legal/epl-v10.html.
+
+  Contributors:
+    Oracle - initial API and implementation
+ -->
+
+<plugin>
+
+	<!-- ***** extension points ***** -->
+
+	<extension-point
+		id="jpaPlatforms"
+		name="%JPA_PLATFORM"
+		schema="schema/jpaPlatforms.exsd"
+	/>
+	
+	
+	<!-- ***** Eclipse core extensions ***** -->
+	
+	<extension
+		point="org.eclipse.core.contenttype.contentTypes">
+		
+		<!-- "abstract" content type to be extended by all JPA XML file content types -->
+		<content-type
+			id="org.eclipse.jpt.core.content.baseJpaContent"
+			name="%BASE_JPA_CONTENT"
+			base-type="org.eclipse.core.runtime.xml"
+			describer="org.eclipse.jpt.core.internal.resource.contenttypes.IndeterminateContentDescriber">
+		</content-type>
+		
+		<!-- persistence.xml content type -->
+  		<content-type
+			id="org.eclipse.jpt.core.content.persistence"
+			name="%PERSISTENCE_XML_CONTENT"
+			base-type="org.eclipse.jpt.core.content.baseJpaContent"
+			file-names="persistence.xml">
+			<describer
+				class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
+				<parameter 
+					name="element" 
+					value="{http://java.sun.com/xml/ns/persistence}persistence"/>
+			</describer>
+		</content-type>
+		
+		<!-- "abstract" mapping file content type -->
+		<content-type
+			id="org.eclipse.jpt.core.content.mappingFile"
+			name="%MAPPING_FILE_CONTENT"
+			base-type="org.eclipse.jpt.core.content.baseJpaContent">
+		</content-type>
+		
+		<!-- orm.xml content type -->
+		<content-type
+			id="org.eclipse.jpt.core.content.orm"
+			name="%ORM_XML_CONTENT"
+			base-type="org.eclipse.jpt.core.content.mappingFile">
+			<describer
+				class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
+				<parameter 
+					name="element" 
+					value="{http://java.sun.com/xml/ns/persistence/orm}entity-mappings"/>
+			</describer>
+		</content-type>
+		
+		<!-- JAR content type -->
+		<content-type
+			id="org.eclipse.jpt.core.content.jar"
+			name="%JAR_CONTENT"
+			file-extensions="jar, zip">
+			<describer
+				class="org.eclipse.core.runtime.content.BinarySignatureDescriber">
+				<parameter name="signature" value="50 4B 03 04"/>
+			</describer>
+		</content-type>
+		
+	</extension>
+	
+	
+	<extension 
+		point="org.eclipse.core.expressions.propertyTesters">
+		
+		<propertyTester
+			id="org.eclipse.jpt.core.propertyTester.persistentAttribute"
+			type="org.eclipse.jpt.core.context.PersistentAttribute"
+			namespace="org.eclipse.jpt.core"
+			properties="isMapped, isVirtual"
+			class="org.eclipse.jpt.core.internal.context.PersistentAttributePropertyTester"/>
+		
+		<propertyTester
+			id="org.eclipse.jpt.core.propertyTester.platformResource"
+			type="org.eclipse.core.resources.IResource"
+			namespace="org.eclipse.jpt.core"
+			properties="jpaPlatform"
+			class="org.eclipse.jpt.core.internal.JpaPlatformTester"/>
+		
+		<propertyTester
+			id="org.eclipse.jpt.core.propertyTester.javaElement"
+			type="org.eclipse.jdt.core.IJavaElement"
+			namespace="org.eclipse.jpt.core"
+			properties="jpaPlatform"
+			class="org.eclipse.jpt.core.internal.JpaPlatformTester"/>
+		
+		<propertyTester
+			id="org.eclipse.jpt.core.propertyTester.xmlResource"
+			type="org.eclipse.jpt.core.resource.xml.JpaXmlResource"
+			namespace="org.eclipse.jpt.core"
+			properties="isLatestSupportedVersion"
+			class="org.eclipse.jpt.core.internal.resource.xml.JpaXmlResourcePropertyTester"/>
+		
+		<propertyTester
+			id="org.eclipse.jpt.core.propertyTester.xmlFile"
+			type="org.eclipse.jpt.core.context.XmlFile"
+			namespace="org.eclipse.jpt.core"
+			properties="isLatestSupportedVersion"
+			class="org.eclipse.jpt.core.internal.resource.xml.JpaXmlResourcePropertyTester"/>
+		
+	</extension>
+	
+	
+	<extension
+		point="org.eclipse.core.runtime.adapters">
+		
+		<factory
+			class="org.eclipse.jpt.core.internal.ProjectAdapterFactory"
+			adaptableType="org.eclipse.core.resources.IProject">
+			<adapter type="org.eclipse.jpt.core.JpaProject"/>
+		</factory>
+		
+		<factory
+			class="org.eclipse.jpt.core.internal.ProjectAdapterFactory"
+			adaptableType="org.eclipse.jdt.core.IJavaProject">
+			<adapter type="org.eclipse.jpt.core.JpaProject"/>
+		</factory>
+		
+		<factory
+			class="org.eclipse.jpt.core.internal.ResourceAdapterFactory"
+			adaptableType="org.eclipse.core.resources.IResource">
+			<adapter type="org.eclipse.jpt.core.IResourcePart"/>
+		</factory>
+		
+		<factory
+			class="org.eclipse.jpt.core.internal.resource.xml.JpaXmlResourceAdapterFactory"
+			adaptableType="org.eclipse.core.resources.IFile">
+			<adapter type="org.eclipse.jpt.core.resource.xml.JpaXmlResource"/>
+		</factory>
+		
+	</extension>
+	
+	
+	<extension
+		point="org.eclipse.core.runtime.preferences">
+		
+		<initializer 
+			class="org.eclipse.jpt.core.internal.prefs.JpaPreferenceInitializer"/>
+		
+	</extension>
+	
+	
+	<!-- ***** JPT extensions (eat our own dogfood) ***** -->
+
+	<extension
+		point="org.eclipse.jpt.core.jpaPlatforms">
+		
+		<jpaPlatform
+			id="generic"
+			label="%GENERIC_1_0_PLATFORM_LABEL"
+			factoryClass="org.eclipse.jpt.core.internal.GenericJpaPlatformFactory"
+			jpaFacetVersion="1.0"
+			default="false">
+		</jpaPlatform>
+			
+	  <jpaPlatform
+	        id="generic2_0"
+	        label="%GENERIC_2_0_PLATFORM_LABEL"
+	        factoryClass="org.eclipse.jpt.core.internal.jpa2.Generic2_0JpaPlatformFactory"
+	        jpaFacetVersion="2.0"
+	        default="false">
+	  </jpaPlatform>
+		
+	</extension>
+	
+	
+	<!--
+	******************************************
+	* Library Provider Framework Integration *
+	******************************************
+	-->
+	
+	<extension 
+		point="org.eclipse.jst.common.project.facet.core.libraryProviders">
+		
+		<provider 
+			id="jpa-legacy-library-provider" 
+			extends="legacy-library-provider"
+			hidden="true">
+			<action type="UNINSTALL">
+				<operation
+					class="org.eclipse.jpt.core.internal.facet.LegacyJpaLibraryProviderInstallOperation"/>
+			</action>
+		</provider>		
+		
+		<provider 
+			id="jpa-no-op-library-provider" 
+			extends="no-op-library-provider">
+			<param name="message" value="%NO_OP_LIBRARY_PROVIDER_MESSAGE"/>
+			<param name="warning" value="%NO_OP_LIBRARY_PROVIDER_WARNING"/>
+			<enablement>
+				<with variable="requestingProjectFacet">
+					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+				</with>
+			</enablement>
+		</provider>
+		
+		<provider 
+			id="jpa-generic1_0-user-library-provider" 
+			extends="wtp-user-library-provider">
+			<param name="validator" value="org.eclipse.jpt.core.internal.utility.KeyClassesValidator"/>
+			<param name="validator.param.0" value="javax.persistence.Entity"/>
+			<enablement>
+				<and>
+					<with variable="requestingProjectFacet">
+						<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+					</with>
+					<with variable="jpaPlatform">
+						<equals value="generic"/>
+					</with>
+				</and>
+			</enablement>
+		</provider>
+		
+		<provider 
+			id="jpa-generic2_0-user-library-provider" 
+			extends="wtp-user-library-provider">
+			<param name="validator" value="org.eclipse.jpt.core.internal.utility.KeyClassesValidator"/>
+			<param name="validator.param.0" value="javax.persistence.Entity"/>
+			<param name="validator.param.1" value="javax.persistence.ElementCollection"/>
+			<enablement>
+				<and>
+					<with variable="requestingProjectFacet">
+						<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+					</with>
+					<with variable="jpaPlatform">
+						<equals value="generic2_0"/>
+					</with>
+				</and>
+			</enablement>
+		</provider>
+		
+	</extension>
+	
+	
+	<extension
+		point="org.eclipse.jst.common.project.facet.core.legacyLibraryProviderDetectors">
+		
+		<detector
+			class="org.eclipse.jpt.core.internal.facet.LegacyJpaLibraryProviderDetector"/>
+		
+	</extension>
+	
+	
+	<extension point="org.eclipse.jst.common.project.facet.core.libraryProviders">
+		
+		<provider id="eclipselink-102-osgi-bundles-library-provider" extends="wtp-osgi-bundles-library-provider">
+			<label>EclipseLink 1.0.x</label>
+				<param name="container.label" value="EclipseLink 1.0.x"/>
+				<param name="bundle.0" value="javax.persistence:[1.0.0, 2.0.0)"/>
+				<param name="bundle.1" value="org.eclipse.persistence.core:[1.0.0, 1.1.0)"/>
+				<param name="bundle.2" value="org.eclipse.persistence.jpa:[1.0.0, 1.1.0)"/>
+				<param name="bundle.3" value="org.eclipse.persistence.asm:[1.0.0, 1.1.0)"/>
+				<param name="bundle.4" value="org.eclipse.persistence.antlr:[1.0.0, 1.1.0)"/>
+			<enablement>
+				<with variable="requestingProjectFacet">
+					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+				</with>
+			</enablement>
+		</provider>
+		
+		<provider id="eclipselink-110-osgi-bundles-library-provider" extends="wtp-osgi-bundles-library-provider">
+			<label>EclipseLink 1.1.x</label>
+				<param name="container.label" value="EclipseLink 1.1.x"/>
+				<param name="bundle.0" value="javax.persistence:[1.99.0, 2.1.0)"/>
+				<param name="bundle.1" value="org.eclipse.persistence.core:[1.1.0, 1.2.0)"/>
+				<param name="bundle.2" value="org.eclipse.persistence.jpa:[1.1.0, 1.2.0)"/>
+				<param name="bundle.3" value="org.eclipse.persistence.asm:[1.1.0, 1.2.0)"/>
+				<param name="bundle.4" value="org.eclipse.persistence.antlr:[1.1.0, 1.2.0)"/>
+			<enablement>
+				<with variable="requestingProjectFacet">
+					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+				</with>
+			</enablement>
+		</provider>
+		
+		<provider id="eclipselink-120-osgi-bundles-library-provider" extends="wtp-osgi-bundles-library-provider">
+			<label>EclipseLink 1.2.x</label>
+				<param name="container.label" value="EclipseLink 1.2.x"/>
+				<param name="bundle.0" value="javax.persistence:[1.99.0, 2.1.0)"/>
+				<param name="bundle.1" value="org.eclipse.persistence.core:[1.2.0, 1.3.0)"/>
+				<param name="bundle.2" value="org.eclipse.persistence.jpa:[1.2.0, 1.3.0)"/>
+				<param name="bundle.3" value="org.eclipse.persistence.asm:[1.2.0, 1.3.0)"/>
+				<param name="bundle.4" value="org.eclipse.persistence.antlr:[1.2.0, 1.3.0)"/>
+			<enablement>
+				<with variable="requestingProjectFacet">
+					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+				</with>
+			</enablement>
+		</provider>
+		
+		<provider id="eclipselink-200-osgi-bundles-library-provider" extends="wtp-osgi-bundles-library-provider">
+			<label>EclipseLink 2.0.x</label>
+				<param name="container.label" value="EclipseLink 2.0.x"/>
+				<param name="bundle.0" value="javax.persistence:[2.0.0, 2.1.0)"/>
+				<param name="bundle.1" value="org.eclipse.persistence.core:[2.0.0, 2.1.0)"/>
+				<param name="bundle.2" value="org.eclipse.persistence.jpa:[2.0.0, 2.1.0)"/>
+				<param name="bundle.3" value="org.eclipse.persistence.asm:[2.0.0, 2.1.0)"/>
+				<param name="bundle.4" value="org.eclipse.persistence.antlr:[2.0.0, 2.1.0)"/>
+			<enablement>
+				<with variable="requestingProjectFacet">
+					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+				</with>
+			</enablement>
+		</provider>
+		
+		<provider id="eclipselink-210-osgi-bundles-library-provider" extends="wtp-osgi-bundles-library-provider">
+			<label>EclipseLink 2.1.x</label>
+				<param name="container.label" value="EclipseLink 2.1.x"/>
+				<param name="bundle.0" value="javax.persistence:[2.0.0, 2.1.0)"/>
+				<param name="bundle.1" value="org.eclipse.persistence.core:[2.1.0, 2.2.0)"/>
+				<param name="bundle.2" value="org.eclipse.persistence.jpa:[2.1.0, 2.2.0)"/>
+				<param name="bundle.3" value="org.eclipse.persistence.asm:[2.1.0, 2.2.0)"/>
+				<param name="bundle.4" value="org.eclipse.persistence.antlr:[2.1.0, 2.2.0)"/>
+			<enablement>
+				<with variable="requestingProjectFacet">
+					<test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jpt.jpa" forcePluginActivation="true"/>
+				</with>
+			</enablement>
+		</provider>
+		
+	</extension>
+	
+	
+	<!-- ***** WTP extensions ***** -->
+
+	<extension
+		point="org.eclipse.wst.common.modulecore.resourceFactories">
+		
+		<resourceFactory
+			class="org.eclipse.jpt.core.resource.persistence.PersistenceXmlResourceFactory"
+			isDefault="true">
+			<contentTypeBinding
+				contentTypeId="org.eclipse.jpt.core.content.persistence">
+			</contentTypeBinding>
+		</resourceFactory>
+		
+		<resourceFactory
+			class="org.eclipse.jpt.core.resource.orm.OrmXmlResourceFactory"
+			isDefault="true">
+			<contentTypeBinding
+				contentTypeId="org.eclipse.jpt.core.content.orm">
+			</contentTypeBinding>
+		</resourceFactory>
+		
+	</extension>
+	
+	
+	<extension 
+		point="org.eclipse.wst.common.project.facet.core.groups">
+		
+		<group id="jpa-prereqs">
+			<label>%JPA_PREREQ_GROUP_LABEL</label>
+			<description>The set of facets that each fulfill JPA prerequisites</description>
+			<include facet="jst.utility" versions="[1.0"/>
+			<include facet="jst.appclient" versions="[1.2"/>
+			<include facet="jst.ejb" versions="[1.1"/>
+			<include facet="jst.connector" versions="[1.0"/>
+			<include facet="jst.web" versions="[2.2"/>
+		</group>
+		
+	</extension>
+	
+	
+	<extension
+		point="org.eclipse.wst.common.project.facet.core.facets">
+		
+		<project-facet id="jpt.jpa">
+			<label>%JPA_FACET_LABEL</label>
+			<description>%JPA_FACET_DESCRIPTION</description>
+		</project-facet>
+		
+		<project-facet-version facet="jpt.jpa" version="1.0">
+			<constraint>
+				<and>
+					<requires facet="jst.java" version="[5.0"/>
+					<requires group="jpa-prereqs"/>
+				</and>
+			</constraint>
+		</project-facet-version>
+		
+		<project-facet-version facet="jpt.jpa" version="2.0">
+			<constraint>
+				<and>
+					<requires facet="jst.java" version="[5.0"/>
+					<requires group="jpa-prereqs"/>
+				</and>
+			</constraint>
+		</project-facet-version>
+		
+		<template id="jpt.jpa.template">
+			<label>%JPA_TEMPLATE_LABEL</label>
+			<fixed facet="jpt.jpa"/>
+			<fixed facet="jst.java"/>
+			<fixed facet="jst.utility"/>
+			<preset id="jpt.jpa.2_0.preset"/>
+		</template>
+		
+		<action facet="jpt.jpa" type="install" id="jpt.jpa.install">
+			<config-factory class="org.eclipse.jpt.core.internal.facet.JpaFacetInstallDataModelProvider"/>
+			<delegate class="org.eclipse.jpt.core.internal.facet.JpaFacetInstallDelegate"/>
+		</action>
+		
+		<!-- 
+			The uninstall action is only used to enable facet uninstallation
+			through the facet UI.  The delegate currently has no functionality. 
+		-->
+		<action facet="jpt.jpa" type="uninstall" id="jpt.jpa.uninstall">
+			<delegate class="org.eclipse.jpt.core.internal.facet.JpaFacetUninstallDelegate"/>
+		</action>
+		
+		<!-- 
+			The version change  
+		-->
+		<action facet="jpt.jpa" type="version-change" id="jpt.jpa.version-change">
+			<config-factory class="org.eclipse.jpt.core.internal.facet.JpaFacetVersionChangeDataModelProvider"/>
+			<delegate class="org.eclipse.jpt.core.internal.facet.JpaFacetVersionChangeDelegate"/>
+		</action>
+		
+	</extension>
+	
+	
+	<extension
+		point="org.eclipse.wst.common.project.facet.core.listeners">
+		
+		<listener
+			class="org.eclipse.jpt.core.internal.facet.RuntimeChangedListener"
+			eventTypes="TARGETED_RUNTIMES_CHANGED"/>
+		
+	</extension>
+	
+	
+	<extension
+		point="org.eclipse.wst.common.project.facet.core.presets">
+		
+		<static-preset id="jpt.jpa.1_0.preset">
+			<label>%JPA_1.0_PRESET_LABEL</label>
+			<facet id="jst.java" version="5.0"/>
+			<facet id="jst.utility" version="1.0"/>
+			<facet id="jpt.jpa" version="1.0"/>
+		</static-preset>
+		
+		<static-preset id="jpt.jpa.2_0.preset">
+			<label>%JPA_2.0_PRESET_LABEL</label>
+			<facet id="jst.java" version="6.0"/>
+			<facet id="jst.utility" version="1.0"/>
+			<facet id="jpt.jpa" version="2.0"/>
+		</static-preset>
+		
+	</extension>
+	
+	
+	<extension 
+		point="org.eclipse.wst.common.project.facet.core.runtimes">
+		
+		<supported>
+			<runtime-component any="true"/>
+			<facet id="jpt.jpa"/>
+		</supported>
+		
+	</extension>
+	
+	<extension
+		point="org.eclipse.wst.validation.validatorV2"
+		id="jpaValidator"
+		name="%JPA_VALIDATOR">
+		
+		<validator
+			class="org.eclipse.jpt.core.internal.validation.JpaValidator">
+			<include>
+				<rules>
+					<facet id="jpt.jpa"/>
+				</rules>
+			</include>
+			<include>
+				<rules>
+					<contentType id="org.eclipse.jdt.core.javaSource"/>
+					<contentType id="org.eclipse.jpt.core.content.jar"/>
+					<contentType id="org.eclipse.jpt.core.content.baseJpaContent" exactMatch="false"/>
+				</rules>
+			</include>
+		</validator>
+		
+	</extension>
+	
+</plugin>
diff --git a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_core.properties b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_core.properties
new file mode 100644
index 0000000..923fca3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_core.properties
@@ -0,0 +1,48 @@
+################################################################################
+# Copyright (c) 2006, 2009 Oracle. All rights reserved.
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0, which accompanies this distribution
+# and is available at http://www.eclipse.org/legal/epl-v10.html.
+# 
+# Contributors:
+#     Oracle - initial API and implementation
+################################################################################
+
+NONE=<None>
+VALIDATE_JOB=Validation
+VALIDATE_PROJECT_NOT_SPECIFIED=Project must be specified
+VALIDATE_SOURCE_FOLDER_NOT_SPECIFIED=Source folder must be specified
+VALIDATE_SOURCE_FOLDER_ILLEGAL=Source folder path is illegal
+VALIDATE_SOURCE_FOLDER_DOES_NOT_EXIST=Source folder ''{0}'' does not exist
+VALIDATE_SOURCE_FOLDER_NOT_IN_PROJECT=Source folder ''{0}'' is not in project ''{1}''
+VALIDATE_FILE_PATH_NOT_SPECIFIED=File path must be specified
+VALIDATE_FILE_ALREADY_EXISTS=File already exists at this location
+VALIDATE_FILE_VERSION_NOT_SUPPORTED=File version not supported
+VALIDATE_FILE_VERSION_NOT_SUPPORTED_FOR_FACET_VERSION=File version not supported for JPA facet version
+VALIDATE_PERSISTENCE_UNIT_DOES_NOT_SPECIFIED=Persistence unit not specified
+VALIDATE_PERSISTENCE_UNIT_NOT_IN_PROJECT=Persistence unit ''{0}'' not defined in project ''{1}''
+VALIDATE_PLATFORM_NOT_SPECIFIED=Platform must be specified
+VALIDATE_PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION=Platform does not support the current JPA facet version
+VALIDATE_CONNECTION_NOT_SPECIFIED=Connection must be specified
+VALIDATE_CONNECTION_INVALID=Connection profile ''{0}'' does not exist
+VALIDATE_CONNECTION_NOT_CONNECTED=Connection must be active to get data source specific help and validation.
+VALIDATE_DEFAULT_CATALOG_NOT_SPECIFIED=Default catalog is not specified
+VALIDATE_CONNECTION_DOESNT_CONTAIN_CATALOG=Catalog ''{0}'' does not exist on the connection specified
+VALIDATE_DEFAULT_SCHEMA_NOT_SPECIFIED=Default schema is not specified
+VALIDATE_CONNECTION_DOESNT_CONTAIN_SCHEMA=Schema ''{0}'' does not exist on the connection specified
+VALIDATE_RUNTIME_NOT_SPECIFIED=There is no server runtime associated with this project to provide a JPA implementation
+VALIDATE_RUNTIME_DOES_NOT_SUPPORT_EJB_30=The server runtime selected does not support EJB 3.0, so it likely does not provide a JPA implementation
+VALIDATE_LIBRARY_NOT_SPECIFIED=No JPA implementation library specified
+SYNCHRONIZE_CLASSES_JOB=Synchronizing classes
+SYNCHRONIZING_CLASSES_TASK=Synchronizing classes ...
+INVALID_PERSISTENCE_XML_CONTENT=Invalid persistence.xml content
+ERROR_SYNCHRONIZING_CLASSES_COULD_NOT_VALIDATE=Error synchronizing classes.  Could not validate.
+ERROR_WRITING_FILE=Could not write to persistence.xml
+REGISTRY_MISSING_ATTRIBUTE=The extension element ''{0}'' in plug-in ''{1}'' is missing the required attribute ''{2}''.
+REGISTRY_DUPLICATE=The plug-ins ''{0}'' and ''{1}'' have registered a duplicate attribute ''{2}'' for the extension element ''{3}'': ''{4}''.
+REGISTRY_FAILED_INSTANTIATION=Unable to instantiate the class ''{0}'' for the extension element ''{1}'' in the plug-in ''{2}''.
+UPDATE_JOB_NAME=Update JPA project: ''{0}''
+PLATFORM_ID_DOES_NOT_EXIST=No JPA platform exists for the id: ''{0}''. The JPA project was not created for project ''{1}''.  Ensure that the platform''s plugin has been added to this Eclipse installation.
+DALI_EVENT_HANDLER_THREAD_NAME=Dali Event Handler
+PREFERENCES_FLUSH_JOB_NAME=Flush Preferences: {0}
+KEY_CLASSES_VALIDATOR__CLASS_NOT_FOUND=The class ''{0}'' is required to be in the selected libraries.
diff --git a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
new file mode 100644
index 0000000..7ef934e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation.properties
@@ -0,0 +1,187 @@
+################################################################################
+# Copyright (c) 2006, 2010 Oracle. All rights reserved.
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0, which accompanies this distribution
+# and is available at http://www.eclipse.org/legal/epl-v10.html.
+# 
+# Contributors:
+#     Oracle - initial API and implementation
+################################################################################
+
+PROJECT_NO_CONNECTION=No connection specified for project.  No database-specific validation will be performed.
+PROJECT_INVALID_CONNECTION=Connection \"{0}\" does not exist.  No database-specific validation will be performed.
+PROJECT_INACTIVE_CONNECTION=Connection \"{0}\" is not active.  No validation will be done against the data source.
+PROJECT_NO_PERSISTENCE_XML=No persistence.xml file found in project
+PROJECT_MULTIPLE_PERSISTENCE_XML=Multiple persistence.xml files in project
+XML_VERSION_NOT_LATEST=A more recent version of this document is supported by this JPA platform
+PERSISTENCE_XML_INVALID_CONTENT=The persistence.xml file does not have recognized content.
+PERSISTENCE_XML_UNSUPPORTED_CONTENT=The persistence.xml file does not have supported content for this JPA platform.
+PERSISTENCE_NO_PERSISTENCE_UNIT=No persistence unit defined
+PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS=Multiple persistence units defined - only the first persistence unit will be recognized
+PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE=Unspecified mapping file
+PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT=Mapping file {0} does not have supported content for this JPA platform.
+PERSISTENCE_UNIT_INVALID_MAPPING_FILE=Mapping file {0} does not have recognized content.
+PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE=Mapping file \"{0}\" cannot be resolved.
+PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE=Duplicate mapping file \"{0}\"
+PERSISTENCE_UNIT_UNSPECIFIED_CLASS=Unspecified class
+PERSISTENCE_UNIT_NONEXISTENT_CLASS=Class \"{0}\" cannot be resolved
+PERSISTENCE_UNIT_INVALID_CLASS=Class \"{0}\" is included in a persistence unit, but is not mapped
+PERSISTENCE_UNIT_DUPLICATE_CLASS=Duplicate class \"{0}\"
+PERSISTENCE_UNIT_REDUNDANT_CLASS=Class \"{0}\" is already specified in mapping file \"{1}\"
+PERSISTENCE_UNIT_DUPLICATE_JAR_FILE=Duplicate JAR file \"{0}\"
+PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE=Unspecified JAR file
+PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING=The path to the JAR file will vary on your deployment environment.  Please make sure the specified path fits your particular environment.
+PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE=JAR file \"{0}\" cannot be resolved
+GENERATOR_DUPLICATE_NAME=Duplicate generator named \"{0}\" defined in this persistence unit
+QUERY_DUPLICATE_NAME=Duplicate query named \"{0}\" defined in this persistence unit
+MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_DEFAULTS=Extraneous persistence unit defaults found for mapping file \"{0}\".  These defaults will not be used.
+PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT=Class \"{0}\" is mapped, but is not included in any persistence unit
+PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT=Class \"{0}\" is annotated, but is not included in any persistence unit
+PERSISTENT_TYPE_UNSPECIFIED_CLASS=Unspecified class
+PERSISTENT_TYPE_UNRESOLVED_CLASS=Class \"{0}\" cannot be resolved
+TYPE_MAPPING_PK_REDEFINED_ID_CLASS=An ancestor of this class has already defined the primary key. The ID class may not be defined here.
+TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE=An ancestor of this class has already defined the primary key. Primary key attributes may not be defined here.
+TYPE_MAPPING_ID_CLASS_REDEFINED=An ancestor of this class has already defined the ID class. The ID class may not be defined here.
+TYPE_MAPPING_ID_CLASS_REQUIRED=This class has a composite primary key.  It must use an ID class.
+TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED=This class must use either an ID class or an embedded ID to specify its composite primary key, not both.
+TYPE_MAPPING_MULTIPLE_EMBEDDED_ID=This class uses multiple embedded ID mappings.  Only one is allowed.
+TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID=The relationship ''{0}'' maps an ID, which is not allowed in conjunction with an ID class.
+TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE=The type of the ID mapped by the relationship ''{0}'' does not agree with the primary key class of the target entity.
+TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH=There is no primary key attribute to match the ID class attribute {0}
+TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH=There is no ID class attribute to match the primary key attribute {0}
+TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH=Primary key attribute {0} is a duplicate match for ID class
+TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY=The attribute matching the ID class attribute {0} is not mapped as a primary key
+TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE=The attribute matching the ID class attribute {0} does not have the correct type {1}
+ENTITY_NON_ROOT_ID_CLASS_SPECIFIED=An ID class should only be defined on the root entity or a mapped superclass
+ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED=A primary key attribute should only be defined on the root entity or a mapped superclass
+ENTITY_NO_PK=The entity has no primary key attribute defined
+ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE=No table should be defined for non-root entity \"{0}\" using single-table inheritance
+ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE=No table should be defined for abstract entity \"{0}\" using table-per-concrete-class inheritance
+ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED = No discriminator value should be defined for abstract entity \"{0}\"
+ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED = No discriminator value should be defined for entity \"{0}\" using table-per-concrete-class inheritance
+ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED =No discriminator column should be defined for non-root entity \"{0}\"
+ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED = No discriminator column should be defined for entity \"{0}\" using table-per-concrete-class inheritance
+PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME=Unspecified name
+PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME=Attribute \"{0}\" in class \"{1}\" cannot be resolved
+PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED=Attribute \"{0}\" is inherited; referring to inherited attributes in the orm.xml may not be supported by all persistence providers
+PERSISTENT_ATTRIBUTE_INVALID_MAPPING=Attribute \"{0}\" has invalid mapping type in this context
+PERSISTENT_ATTRIBUTE_FINAL_FIELD=The java field for attribute \"{0}\" is final
+PERSISTENT_ATTRIBUTE_PUBLIC_FIELD=The java field for attribute \"{0}\" is public
+MAPPING_UNRESOLVED_MAPPED_BY=In {0}, the "mapped by" value ''{1}'' cannot be resolved to an attribute on the target entity.
+MAPPING_INVALID_MAPPED_BY=In {0}, the "mapped by" attribute ''{1}'' has an invalid mapping type for this relationship.
+MAPPING_MAPPED_BY_ON_BOTH_SIDES=In {0}, the "mapped by" attribute ''{1}'' also maps this attribute.  Every relationship must have an owner.
+ID_MAPPING_UNRESOLVED_GENERATOR_NAME=Unresolved generator name \"{0}\"
+ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED=In {0}, a column is specified, but it is mapped by a relationship. IDs that are mapped by a relationship should not specify a column.
+EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED=Embedded IDs that are mapped by a relationship should not specify any attribute overrides.
+ATTRIBUTE_OVERRIDE_MAPPED_BY_RELATIONSHIP_AND_SPECIFIED=Attributes (or subattributes of an attribute) that are mapped by a relationship should not be overridden.
+TABLE_UNRESOLVED_CATALOG=Catalog \"{0}\" cannot be resolved for table \"{1}\"
+TABLE_UNRESOLVED_SCHEMA=Schema \"{0}\" cannot be resolved for table \"{1}\"
+TABLE_UNRESOLVED_NAME=Table \"{0}\" cannot be resolved
+SECONDARY_TABLE_UNRESOLVED_CATALOG=Catalog \"{0}\" cannot be resolved for secondary table \"{1}\"
+SECONDARY_TABLE_UNRESOLVED_SCHEMA=Schema \"{0}\" cannot be resolved for secondary table \"{1}\"
+SECONDARY_TABLE_UNRESOLVED_NAME=Secondary table \"{0}\" cannot be resolved
+JOIN_TABLE_UNRESOLVED_CATALOG=Catalog \"{0}\" cannot be resolved for join table \"{1}\"
+JOIN_TABLE_UNRESOLVED_SCHEMA=Schema \"{0}\" cannot be resolved for join table \"{1}\"
+JOIN_TABLE_UNRESOLVED_NAME=Join table \"{0}\" cannot be resolved
+VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG=In implied attribute \"{0}\", catalog \"{1}\" cannot be resolved for join table \"{2}\"
+VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA=In implied attribute \"{0}\", schema \"{1}\" cannot be resolved for join table \"{2}\"
+VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME=In implied attribute \"{0}\", join table \"{1}\" cannot be resolved
+COLUMN_UNRESOLVED_TABLE=Table \"{0}\" for column \"{1}\" cannot be resolved
+COLUMN_UNRESOLVED_NAME=Column \"{0}\" cannot be resolved on table \"{1}\"
+VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME=In implied attribute override \"{0}\", column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", attribute override \"{1}\", column \"{2}\" cannot be resolved on table \"{3}\"
+VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME=In implied map key attribute override \"{0}\", column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", map key attribute override \"{1}\", column \"{2}\" cannot be resolved on table \"{3}\"
+JOIN_COLUMN_UNRESOLVED_NAME=Join column \"{0}\" cannot be resolved on table \"{1}\"
+JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=Name must be specified when there are multiple join columns
+JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=Join column referenced column name \"{0}\" cannot be resolved on table \"{1}\"
+JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=Referenced column name must be specified when there are multiple join columns
+
+VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_TABLE=In implied attribute \"{0}\", table \"{1}\" for join column \"{2}\" cannot be resolved
+VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", join column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", name must be specified when there are multiple join columns
+VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied attribute \"{0}\", join column referenced column name \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", referenced column name must be specified when there are multiple join columns
+INVERSE_JOIN_COLUMN_UNRESOLVED_NAME=Inverse join column \"{0}\" cannot be resolved on table \"{1}\"
+INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=Name must be specified when there are multiple inverse join columns
+INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=Inverse join column referenced column name \"{0}\" cannot be resolved on table \"{1}\"
+INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=Referenced column name must be specified when there are multiple inverse join columns
+VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", inverse join column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", name must be specified when there are multiple inverse join columns
+VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", referenced column name must be specified when there are multiple inverse join columns
+VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied attribute \"{0}\", inverse join column referenced column name \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME=In implied association override \"{0}\", join column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied association override \"{0}\", join column referenced column name \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied association override \"{0}\", name must be specified when there are multiple join columns
+VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied association override \"{0}\", referenced column name must be specified when there are multiple join columns
+VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", association override \"{1}\", join column \"{2}\" cannot be resolved on table \"{3}\"
+VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", association override \"{1}\", join column referenced column name \"{2}\" cannot be resolved on table \"{3}\"
+VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", association override \"{1}\", name must be specified when there are multiple join columns
+VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied attribute \"{0}\", association override \"{1}\", referenced column name must be specified when there are multiple join columns
+GENERATED_VALUE_UNRESOLVED_GENERATOR=No generator named \"{0}\" is defined in the persistence unit
+PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME=Primary key join column \"{0}\" cannot be resolved on table \"{1}\"
+PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=Name must be specified when there are multiple primary key join columns
+PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=Primary key join column referenced column name \"{0}\" cannot be resolved on table \"{1}\"
+PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=Referenced column name must be specified when there are multiple primary key join columns
+VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME=In implied primary key join column, name \"{0}\" cannot be resolved on table \"{1}\"
+VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied primary key join column, referenced column name \"{0}\" cannot be resolved on table \"{1}\"
+VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME=In implied secondary table \"{0}\", primary key join column \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME=In implied secondary table \"{0}\", primary key join column referenced column name \"{1}\" cannot be resolved on table \"{2}\"
+VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied secondary table \"{0}\", name must be specified when there are multiple primary key join columns
+VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS=In implied secondary table \"{0}\", referenced column name must be specified when there are multiple primary key join columns
+
+NO_JPA_PROJECT=This project has the JPA facet, but no JPA project could be created.  See the error log for more details.
+TARGET_ENTITY_NOT_DEFINED=Target entity for \"{0}\" is not defined
+VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED=In implied attribute \"{0}\", target entity is not defined
+TARGET_ENTITY_IS_NOT_AN_ENTITY=Target entity \"{0}\" for \"{1}\" is not an Entity
+VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY=In implied attribute \"{0}\", target entity \"{1}\" is not an Entity
+DISCRIMINATOR_COLUMN_UNRESOLVED_NAME=Discriminator column \"{0}\" cannot be resolved on table \"{1}\"
+ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM=Entity \"{0}\" cannot use table-per-concrete-class inheritance because the chosen JPA platform does not support it
+ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM=Entity \"{0}\" uses table-per-concrete-class inheritance which is not portable and may not be supported by the JPA provider
+TARGET_NOT_AN_EMBEDDABLE={0} is not mapped as an embeddable
+
+MAPS_ID_VALUE_NOT_SPECIFIED=In {0}, the "maps ID" value is not specified and could not be determined from defaults
+MAPS_ID_VALUE_NOT_RESOLVED=In {0}, the "maps ID" value ''{1}'' could not be resolved to an attribute on this entity or this entity''s embedded ID
+MAPS_ID_VALUE_INVALID=In {0}, the "maps ID" value ''{1}'' does not refer to an attribute that is used as an ID for this entity
+ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED=Attribute \"{0}\" specifies both OrderColumn and OrderBy annotations
+ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED=Target class is not defined
+VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED=In implied attribute \"{0}\", target class is not defined
+ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED=Map key class is not defined
+VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED=In implied attribute \"{0}\", map key class is not defined
+ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE=Target class \"{0}\" is not an embeddable or basic type
+VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE=In implied attribute \"{0}\" target class \"{1}\" is not an embeddable or basic type
+MAP_KEY_COLUMN_UNRESOLVED_NAME = Map key column \"{0}\" cannot be resolved on table \"{1}\"
+VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME = In implied attribute \"{0}\", map key column \"{1}\" cannot be resolved on table \"{2}\"
+COLLECTION_TABLE_UNRESOLVED_CATALOG = Catalog \"{0}\" cannot be resolved for collection table \"{1}\"
+COLLECTION_TABLE_UNRESOLVED_NAME = Collection table \"{0}\" cannot be resolved
+COLLECTION_TABLE_UNRESOLVED_SCHEMA = Schema \"{0}\" cannot be resolved for collection table \"{1}\"
+VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG = In implied attribute \"{0}\", catalog \"{1}\" cannot be resolved for collection table \"{2}\"
+VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA = In implied attribute \"{0}\", schema \"{1}\" cannot be resolved for collection table \"{2}\"
+VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME = In implied attribute \"{0}\", collection table \"{1}\" cannot be resolved
+ORDER_COLUMN_UNRESOLVED_NAME=Order column \"{0}\" cannot be resolved on table \"{1}\"
+VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME=In implied attribute \"{0}\", order column \"{1}\" cannot be resolved on table \"{2}\"
+
+
+#These messages have a parameter at the end which is used to plugin a different description.
+#The possible message endings are found in jpa_validation_description.properties.
+COLUMN_TABLE_NOT_VALID=Table \"{0}\" for column \"{1}\" {2}
+VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", table \"{1}\" for column \"{2}\" {3}
+VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID=In implied attribute override \"{0}\", table \"{1}\" for column \"{2}\" {3}
+VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", attribute override \"{1}\", table \"{2}\" for column \"{3}\" {4}
+JOIN_COLUMN_TABLE_NOT_VALID=Table \"{0}\" for join column \"{1}\" {2}
+VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", table \"{1}\" for join column \"{2}\" {3}
+INVERSE_JOIN_COLUMN_TABLE_NOT_VALID=Table \"{0}\" for inverse join column \"{1}\" {2}
+VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", table \"{1}\" for inverse join column \"{2}\" {3}
+VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID=In implied association override \"{0}\", table \"{1}\" for join column \"{2}\" {3}
+VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", association override \"{1}\", table \"{2}\" for join column \"{3}\" {4}
+
+VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID=In implied map key attribute override \"{0}\", table \"{1}\" for column \"{2}\" {3}
+VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", map key attribute override \"{1}\", table \"{2}\" for column \"{3}\" {4}
+MAP_KEY_COLUMN_TABLE_NOT_VALID=Table \"{0}\" for map key column \"{1}\" {2}
+VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID=In implied attribute \"{0}\", table \"{1}\" for map key column \"{2}\" {3}
+
+
+
+
+
diff --git a/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation_description.properties b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation_description.properties
new file mode 100644
index 0000000..4d59ad0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/property_files/jpa_validation_description.properties
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2010 Oracle. All rights reserved.
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0, which accompanies this distribution
+# and is available at http://www.eclipse.org/legal/epl-v10.html.
+# 
+# Contributors:
+#     Oracle - initial API and implementation
+#
+# The messages are used as the description of validation messages found in the
+# jpa_validation.properties bundle. They are used as parameters to validation messages.
+#
+################################################################################
+
+DOES_NOT_MATCH_JOIN_TABLE=does not match join table
+DOES_NOT_MATCH_COLLECTION_TABLE=does not match collection table
+NOT_VALID_FOR_THIS_ENTITY=is not valid for this entity
+
+ATTRIBUTE_DESC=attribute ''{0}''
+VIRTUAL_ATTRIBUTE_DESC=implied attribute ''{0}''
diff --git a/jpa/plugins/org.eclipse.jpt.core/schema/jpaPlatforms.exsd b/jpa/plugins/org.eclipse.jpt.core/schema/jpaPlatforms.exsd
new file mode 100644
index 0000000..1923aa8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/schema/jpaPlatforms.exsd
@@ -0,0 +1,166 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jpt.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.jpt.core" id="jpaPlatforms" name="JPA Platforms"/>
+      </appInfo>
+      <documentation>
+         Used to add JPA platforms as choices when configuring a project with the JPA facet.  The optional &quot;jpaFacetVersion&quot; attribute is used to tie a platform to a particular JPA facet version (if not present, the platform is available for all facet versions.)  The optional &quot;default&quot; attribute is used to determine if a platform should have a higher priority when calculating the default platform for a project.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="jpaPlatform" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="jpaPlatform">
+      <annotation>
+         <documentation>
+            Declares a JPA platform, one jpaPlatform will be chosen per JpaProject. See &lt;samp&gt;org.eclipse.jpt.core.JpaPlatform&lt;/samp&gt; for more information on JPA platforms.  Also see the org.eclipse.jpt.ui.jpaPlatforms extension point.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="label" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A translatable string representation of the platform.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="factoryClass" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The class that implements &lt;samp&gt;org.eclipse.jpt.core.JpaPlatformFactory&lt;/samp&gt;.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.jpt.core.JpaPlatformFactory"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="jpaFacetVersion" type="string">
+            <annotation>
+               <documentation>
+                  Declares the JPA facet version for which this platform may be used. If no JPA facet version is specified, this platform is available for all JPA facet versions.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="default" type="boolean" use="default" value="false">
+            <annotation>
+               <documentation>
+                  Declares whether this platform should be used as a default JPA platform for new JPA project content.  Note that if a workspace contains more than one default platform for a JPA facet version, one of them will be chosen at random.  By default, a platform is not a default platform.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         2.2
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following example shows a basic JPA platform which should be considered a prominent platform for JPA 1.0
+
+&lt;extension point=&quot;org.eclipse.jpt.core.jpaPlatforms&quot;&gt;
+   &lt;jpaPlatform
+      id=&quot;myJpaPlatform&quot;
+      label=&quot;My JPA Platform&quot;
+      factoryClass=&quot;org.foo.MyJpaPlatformFactory&quot;
+      jpaFacetVersion=&quot;1.0&quot;
+      default=&quot;true&quot;&gt;
+   &lt;/jpaPlatform&gt;
+&lt;/extension&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         Provisional API: This interface is part of an interim API that is still
+under development and expected to change significantly before reaching
+stability. It is available at this early stage to solicit feedback from
+pioneering adopters on the understanding that any code that uses this API
+will almost certainly be broken (repeatedly) as the API evolves.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2006, 2009 Oracle. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0, which accompanies this distribution
+and is available at http://www.eclipse.org/legal/epl-v10.html.
+ 
+Contributors:
+Oracle - initial API and implementation
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/EntityGeneratorDatabaseAnnotationNameBuilder.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/EntityGeneratorDatabaseAnnotationNameBuilder.java
new file mode 100644
index 0000000..7e25fdd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/EntityGeneratorDatabaseAnnotationNameBuilder.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.ForeignKey;
+import org.eclipse.jpt.db.Table;
+
+/**
+ * Provide a pluggable way to determine whether and how the entity generator
+ * prints the names of various database objects.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface EntityGeneratorDatabaseAnnotationNameBuilder {
+
+	/**
+	 * Given the name of an entity and the table to which it is mapped,
+	 * build and return a string to be used as the value for the entity's
+	 * Table annotation's 'name' element. Return null if the entity
+	 * maps to the table by default.
+	 */
+	String buildTableAnnotationName(String entityName, Table table);
+
+	/**
+	 * Given the name of an attribute (field or property) and the column
+	 * to which it is mapped,
+	 * build and return a string to be used as the value for the attribute's
+	 * Column annotation's 'name' element. Return null if the attribute
+	 * maps to the column by default.
+	 */
+	String buildColumnAnnotationName(String attributeName, Column column);
+
+	/**
+	 * Given the name of an attribute (field or property) and the
+	 * many-to-one or many-to-many foreign key to which it is mapped,
+	 * build and return a string to be used as the value for the attribute's
+	 * JoinColumn annotation's 'name' element. Return null if the attribute
+	 * maps to the join column by default.
+	 * The specified foreign key consists of a single column pair whose
+	 * referenced column is the single-column primary key of the foreign
+	 * key's referenced table.
+	 */
+	String buildJoinColumnAnnotationName(String attributeName, ForeignKey foreignKey);
+
+	/**
+	 * Build and return a string to be used as the value for a JoinColumn
+	 * annotation's 'name' or 'referencedColumnName' element.
+	 * This is called for many-to-one and many-to-many mappings when
+	 * the default join column name and/or referenced column name are/is
+	 * not applicable.
+	 * @see #buildJoinColumnAnnotationName(String, ForeignKey)
+	 */
+	String buildJoinColumnAnnotationName(Column column);
+
+	/**
+	 * Build and return a string to be used as the value for a JoinTable
+	 * annotation's 'name' element.
+	 * This is called for many-to-many mappings when the default
+	 * join table name is not applicable.
+	 */
+	String buildJoinTableAnnotationName(Table table);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/GenericJpaProjectManager.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/GenericJpaProjectManager.java
new file mode 100644
index 0000000..71e427a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/GenericJpaProjectManager.java
@@ -0,0 +1,1042 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.ILock;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jpt.core.internal.AsynchronousJpaProjectUpdater;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.core.internal.SimpleJpaProjectConfig;
+import org.eclipse.jpt.utility.Command;
+import org.eclipse.jpt.utility.internal.AsynchronousCommandExecutor;
+import org.eclipse.jpt.utility.internal.SimpleCommandExecutor;
+import org.eclipse.jpt.utility.internal.StatefulCommandExecutor;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.SynchronizedBoolean;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.model.AbstractModel;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
+import org.eclipse.wst.common.project.facet.core.events.IProjectFacetActionEvent;
+
+/**
+ * The JPA project manager maintains a list of all JPA projects in the workspace.
+ * It keeps the list (and the state of the JPA projects themselves)
+ * synchronized with the workspace by listening for various
+ * changes:<ul>
+ * <li>Resource
+ * <li>Java
+ * <li>Faceted Project
+ * </ul>
+ * We use an Eclipse {@link ILock lock} to synchronize access to the JPA
+ * projects when dealing with these events. In an effort to reduce deadlocks,
+ * the simple Resource and Java change events are dispatched to a background
+ * thread, allowing us to handle the events outside of the workspace lock held
+ * during resource and Java change notifications.
+ * <p>
+ * Events that trigger either the adding or removing of a JPA project (e.g.
+ * {@link IResourceChangeEvent#POST_CHANGE}) are handled "synchronously"
+ * by allowing the background thread to handle any outstanding events before
+ * updating the list of JPA projects and returning execution to the event
+ * source.
+ * <p>
+ * Various things that cause us to add or remove a JPA project:<ul>
+ * <li>The {@link JptCorePlugin} will "lazily" instantiate and {@link #start() start}
+ *     a JPA project manager as appropriate. This will trigger the manager
+ *     to find and add all pre-existing JPA projects.
+ * 
+ * <li>Project created and facet installed<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ * <li>Project facet uninstalled<p>
+ *     {@link IFacetedProjectEvent.Type#PRE_UNINSTALL}
+ * 
+ * <li>Project opened<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#ADDED} facet settings file
+ *     (<code>/.settings/org.eclipse.wst.common.project.facet.core.xml</code>)
+ * <li>Project closed<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#REMOVED} facet settings file
+ * 
+ * <li>Pre-existing project imported from directory or archive (created and opened)<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#ADDED} facet settings file
+ * <li>Project renamed<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#REMOVED} facet settings file of old project
+ *     -> {@link IResourceDelta#ADDED} facet settings file of new project
+ * <li>Project deleted<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#REMOVED} facet settings file
+ * 
+ * <li>Project facet installed by editing the facets settings file directly<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#CHANGED} facet settings file
+ * <li>Project facet uninstalled by editing the facets settings file directly<p>
+ *     {@link IResourceChangeEvent#POST_CHANGE}
+ *     -> {@link IResource#FILE}
+ *     -> {@link IResourceDelta#CHANGED} facet settings file
+ * </ul>
+ */
+//TODO Still need to look at faceted project listener for facet uninstall
+class GenericJpaProjectManager
+	extends AbstractModel
+	implements JpaProjectManager
+{
+	/**
+	 * All the JPA projects in the workspace.
+	 */
+	private final Vector<JpaProject> jpaProjects = new Vector<JpaProject>();
+
+	/**
+	 * Synchronize access to the JPA projects.
+	 */
+	/* private */ final ILock lock = this.getJobManager().newLock();
+
+	/**
+	 * Determine how Resource and Java change events are
+	 * handled (i.e. synchronously or asynchronously).
+	 */
+	private volatile StatefulCommandExecutor eventHandler = new AsynchronousCommandExecutor(JptCoreMessages.DALI_EVENT_HANDLER_THREAD_NAME);
+
+	/**
+	 * Listen for<ul>
+	 * <li>changes to projects and files
+	 * <li>clean builds
+	 * </ul>
+	 */
+	private final IResourceChangeListener resourceChangeListener = new ResourceChangeListener();
+
+	/**
+	 * The types of resource change events that interest
+	 * {@link #resourceChangeListener}.
+	 */
+	private static final int RESOURCE_CHANGE_EVENT_TYPES =
+			IResourceChangeEvent.POST_CHANGE |
+			IResourceChangeEvent.POST_BUILD;
+
+	/**
+	 * Listen for changes to this file to determine when the JPA facet is
+	 * added to or removed from a "faceted" project.
+	 */
+	private static final String FACETED_PROJECT_FRAMEWORK_SETTINGS_FILE_NAME = FacetedProjectFramework.PLUGIN_ID + ".xml"; //$NON-NLS-1$
+
+	/**
+	 * Listen for the JPA facet being added to or removed from a "faceted" project.
+	 */
+	private final IFacetedProjectListener facetedProjectListener = new FacetedProjectListener();
+
+	/**
+	 * The types of faceted project events that interest
+	 * {@link #facetedProjectListener}.
+	 */
+	private static final IFacetedProjectEvent.Type[] FACETED_PROJECT_EVENT_TYPES = new IFacetedProjectEvent.Type[] {
+			IFacetedProjectEvent.Type.PRE_UNINSTALL
+		};
+
+	/**
+	 * Listen for Java changes (unless the Dali UI is active).
+	 * @see #javaElementChangeListenerIsActive()
+	 */
+	private final JavaElementChangeListener javaElementChangeListener = new JavaElementChangeListener();
+
+	/**
+	 * The types of resource change events that interest
+	 * {@link #javaElementChangeListener}.
+	 */
+	private static final int JAVA_CHANGE_EVENT_TYPES =
+			ElementChangedEvent.POST_CHANGE |
+			ElementChangedEvent.POST_RECONCILE;
+
+
+	// ********** constructor **********
+
+	/**
+	 * Internal: called by {@link JptCorePlugin Dali plug-in}.
+	 */
+	GenericJpaProjectManager() {
+		super();
+	}
+
+
+	// ********** plug-in controlled life-cycle **********
+
+	/**
+	 * Internal: called by {@link JptCorePlugin Dali plug-in}.
+	 */
+	void start() {
+		try {
+			this.lock.acquire();
+			this.start_();
+		} finally {
+			this.lock.release();
+		}
+	}
+
+	private void start_() {
+		debug("*** JPA project manager START ***"); //$NON-NLS-1$
+		try {
+			this.buildJpaProjects();
+			this.eventHandler.start();
+			this.getWorkspace().addResourceChangeListener(this.resourceChangeListener, RESOURCE_CHANGE_EVENT_TYPES);
+			FacetedProjectFramework.addListener(this.facetedProjectListener, FACETED_PROJECT_EVENT_TYPES);
+			JavaCore.addElementChangedListener(this.javaElementChangeListener, JAVA_CHANGE_EVENT_TYPES);
+		} catch (RuntimeException ex) {
+			JptCorePlugin.log(ex);
+			this.stop_();
+		}
+	}
+
+	/**
+	 * Side-effect: {@link #jpaProjects} populated.
+	 */
+	private void buildJpaProjects() {
+		try {
+			this.buildJpaProjects_();
+		} catch (Exception ex) {
+			// if we have a problem, leave the currently built JPA projects in
+			// place and keep executing (should be OK...)
+			JptCorePlugin.log(ex);
+		}
+	}
+
+	private void buildJpaProjects_() throws CoreException {
+		this.getWorkspace().getRoot().accept(new ResourceProxyVisitor(), IResource.NONE);
+	}
+
+	/**
+	 * Internal: called by {@link JptCorePlugin Dali plug-in}.
+	 */
+	void stop() throws Exception {
+		try {
+			this.lock.acquire();
+			this.stop_();
+		} finally {
+			this.lock.release();
+		}
+	}
+
+	private void stop_() {
+		debug("*** JPA project manager STOP ***"); //$NON-NLS-1$
+		JavaCore.removeElementChangedListener(this.javaElementChangeListener);
+		FacetedProjectFramework.removeListener(this.facetedProjectListener);
+		this.getWorkspace().removeResourceChangeListener(this.resourceChangeListener);
+		this.eventHandler.stop();
+		this.clearJpaProjects();
+	}
+
+	private void clearJpaProjects() {
+		// clone to prevent concurrent modification exceptions
+		for (JpaProject jpaProject : this.getJpaProjects_()) {
+			this.removeJpaProject(jpaProject);
+		}
+	}
+
+
+	// ********** JpaProjectManager implementation **********
+
+	public Iterable<JpaProject> getJpaProjects() {
+		try {
+			this.lock.acquire();
+			return this.getJpaProjects_();
+		} finally {
+			this.lock.release();
+		}
+	}
+
+	private Iterable<JpaProject> getJpaProjects_() {
+		return new LiveCloneIterable<JpaProject>(this.jpaProjects);
+	}
+
+	public int getJpaProjectsSize() {
+		return this.jpaProjects.size();
+	}
+
+	public JpaProject getJpaProject(IProject project) {
+		try {
+			this.lock.acquire();
+			return this.getJpaProject_(project);
+		} finally {
+			this.lock.release();
+		}
+	}
+
+	private JpaProject getJpaProject_(IProject project) {
+		for (JpaProject jpaProject : this.jpaProjects) {
+			if (jpaProject.getProject().equals(project)) {
+				return jpaProject;
+			}
+		}
+		return null;
+	}
+
+	public JpaFile getJpaFile(IFile file) {
+		JpaProject jpaProject = this.getJpaProject(file.getProject());
+		return (jpaProject == null) ? null : jpaProject.getJpaFile(file);
+	}
+
+	public void rebuildJpaProject(IProject project) {
+		try {
+			this.lock.acquire();
+			this.rebuildJpaProject_(project);
+		} finally {
+			this.lock.release();
+		}
+	}
+
+	/**
+	 * assumption: the JPA project holder exists
+	 */
+	private void rebuildJpaProject_(IProject project) {
+		this.removeJpaProject(this.getJpaProject_(project));
+		this.addJpaProject(project);
+	}
+
+	public boolean javaElementChangeListenerIsActive() {
+		return this.javaElementChangeListener.isActive();
+	}
+
+	public void setJavaElementChangeListenerIsActive(boolean javaElementChangeListenerIsActive) {
+		this.javaElementChangeListener.setActive(javaElementChangeListenerIsActive);
+	}
+
+	public IWorkspace getWorkspace() {
+		return ResourcesPlugin.getWorkspace();
+	}
+
+	public IJobManager getJobManager() {
+		return Job.getJobManager();
+	}
+
+
+	// ********** adding/removing JPA projects **********
+
+	/* private */ void addJpaProject(IProject project) {
+		this.addJpaProject(this.buildJpaProject(project));
+	}
+
+	private void addJpaProject(JpaProject jpaProject) {
+		// figure out exactly when JPA projects are added
+		dumpStackTrace("add: ", jpaProject); //$NON-NLS-1$
+		// the JPA project will be null if we have any problems building it...
+		// (e.g. if we have problems getting the JPA platform)
+		if (jpaProject != null) {
+			this.addItemToCollection(jpaProject, this.jpaProjects, JPA_PROJECTS_COLLECTION);
+		}
+	}
+
+	/**
+	 * return null if we have any problems...
+	 */
+	private JpaProject buildJpaProject(IProject project) {
+		return this.buildJpaProject(this.buildJpaProjectConfig(project));
+	}
+
+	/**
+	 * return null if we have any problems...
+	 */
+	private JpaProject buildJpaProject(JpaProject.Config config) {
+		JpaPlatform jpaPlatform = config.getJpaPlatform();
+		if (jpaPlatform == null) {
+			return null;
+		}
+		JpaProject jpaProject = this.buildJpaProject(jpaPlatform, config);
+		if (jpaProject == null) {
+			return null;
+		}
+		jpaProject.setUpdater(new AsynchronousJpaProjectUpdater(jpaProject));
+		return jpaProject;
+	}
+
+	/**
+	 * return null if we have any problems...
+	 */
+	private JpaProject buildJpaProject(JpaPlatform jpaPlatform, JpaProject.Config config) {
+		try {
+			return jpaPlatform.getJpaFactory().buildJpaProject(config);
+		} catch (RuntimeException ex) {
+			JptCorePlugin.log(ex);
+			return null;
+		}
+	}
+
+	private JpaProject.Config buildJpaProjectConfig(IProject project) {
+		SimpleJpaProjectConfig config = new SimpleJpaProjectConfig();
+		config.setProject(project);
+		config.setJpaPlatform(JptCorePlugin.getJpaPlatform(project));
+		config.setConnectionProfileName(JptCorePlugin.getConnectionProfileName(project));
+		config.setUserOverrideDefaultCatalog(JptCorePlugin.getUserOverrideDefaultCatalog(project));
+		config.setUserOverrideDefaultSchema(JptCorePlugin.getUserOverrideDefaultSchema(project));
+		config.setDiscoverAnnotatedClasses(JptCorePlugin.discoverAnnotatedClasses(project));
+		config.setMetamodelSourceFolderName(JptCorePlugin.getMetamodelSourceFolderName(project));
+		return config;
+	}
+
+	/* private */ void removeJpaProject(JpaProject jpaProject) {
+		// figure out exactly when JPA projects are removed
+		dumpStackTrace("remove: ", jpaProject); //$NON-NLS-1$
+		this.removeItemFromCollection(jpaProject, this.jpaProjects, JPA_PROJECTS_COLLECTION);
+		jpaProject.dispose();
+	}
+
+
+	// ********** Project POST_CHANGE **********
+
+	/* private */ void projectChanged(IResourceDelta delta) {
+		this.eventHandler.execute(this.buildProjectChangedCommand(delta));
+	}
+
+	private Command buildProjectChangedCommand(final IResourceDelta delta) {
+		return new EventHandlerCommand("Project POST_CHANGE Command") { //$NON-NLS-1$
+			@Override
+			void execute_() {
+				GenericJpaProjectManager.this.projectChanged_(delta);
+			}
+		};
+	}
+
+	/**
+	 * Forward the specified resource delta to all our JPA projects;
+	 * they will each determine whether the event is significant.
+	 */
+	/* private */ void projectChanged_(IResourceDelta delta) {
+		for (JpaProject jpaProject : this.jpaProjects) {
+			jpaProject.projectChanged(delta);
+		}
+	}
+
+
+	// ********** Project POST_BUILD (CLEAN_BUILD) **********
+
+	/* private */ void projectPostCleanBuild(IProject project) {
+		this.executeAfterEventsHandled(this.buildProjectPostCleanBuildCommand(project));
+	}
+
+	private Command buildProjectPostCleanBuildCommand(final IProject project) {
+		return new EventHandlerCommand("Project POST_BUILD (CLEAN_BUILD) Command") { //$NON-NLS-1$
+			@Override
+			void execute_() {
+				GenericJpaProjectManager.this.projectPostCleanBuild_(project);
+			}
+		};
+	}
+
+	/* private */ void projectPostCleanBuild_(IProject project) {
+		JpaProject jpaProject = this.getJpaProject_(project);
+		if (jpaProject != null) {
+			this.removeJpaProject(jpaProject);
+			this.addJpaProject(project);
+		}
+	}
+
+
+	// ********** File POST_CHANGE **********
+
+	/**
+	 * The Faceted Project settings file has changed in some fashion, check
+	 * whether the JPA facet has been added to or removed from the specified
+	 * project.
+	 */
+	/* private */ void checkForJpaFacetTransition(IProject project) {
+		JpaProject jpaProject = this.getJpaProject_(project);
+
+		if (JptCorePlugin.projectHasJpaFacet(project)) {
+			if (jpaProject == null) {  // JPA facet added
+				this.executeAfterEventsHandled(this.buildAddJpaProjectCommand(project));
+			}
+		} else {
+			if (jpaProject != null) {  // JPA facet removed
+				this.executeAfterEventsHandled(this.buildRemoveJpaProjectCommand(jpaProject));
+			}
+		}
+	}
+
+	private Command buildAddJpaProjectCommand(final IProject project) {
+		return new EventHandlerCommand("Add JPA Project Command") { //$NON-NLS-1$
+			@Override
+			void execute_() {
+				GenericJpaProjectManager.this.addJpaProject(project);
+			}
+		};
+	}
+
+	private Command buildRemoveJpaProjectCommand(final JpaProject jpaProject) {
+		return new EventHandlerCommand("Remove JPA Project Command") { //$NON-NLS-1$
+			@Override
+			void execute_() {
+				GenericJpaProjectManager.this.removeJpaProject(jpaProject);
+			}
+		};
+	}
+
+	// ********** FacetedProject PRE_UNINSTALL **********
+
+	/* private */ void jpaFacetedProjectPreUninstall(IProjectFacetActionEvent event) {
+		IProject project = event.getProject().getProject();
+		this.executeAfterEventsHandled(this.buildJpaFacetedProjectPreUninstallCommand(project));
+	}
+
+	private Command buildJpaFacetedProjectPreUninstallCommand(final IProject project) {
+		return new EventHandlerCommand("Faceted Project PRE_UNINSTALL Command") { //$NON-NLS-1$
+			@Override
+			void execute_() {
+				GenericJpaProjectManager.this.jpaFacetedProjectPreUninstall_(project);
+			}
+		};
+	}
+
+	/* private */ void jpaFacetedProjectPreUninstall_(IProject project) {
+		// assume(?) this is the first event to indicate we need to remove the JPA project from the JPA project manager
+		this.removeJpaProject(this.getJpaProject_(project));
+	}
+
+
+	// ********** Java element changed **********
+
+	/* private */ void javaElementChanged(ElementChangedEvent event) {
+		this.eventHandler.execute(this.buildJavaElementChangedCommand(event));
+	}
+
+	private Command buildJavaElementChangedCommand(final ElementChangedEvent event) {
+		return new EventHandlerCommand("Java element changed Command") { //$NON-NLS-1$
+			@Override
+			void execute_() {
+				GenericJpaProjectManager.this.javaElementChanged_(event);
+			}
+		};
+	}
+
+	/**
+	 * Forward the Java element changed event to all the JPA projects
+	 * because the event could affect multiple projects.
+	 */
+	/* private */ void javaElementChanged_(ElementChangedEvent event) {
+		for (JpaProject jpaProject : this.jpaProjects) {
+			jpaProject.javaElementChanged(event);
+		}
+	}
+
+
+	// ********** miscellaneous **********
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.jpaProjects);
+	}
+
+
+	// ********** event handler **********
+
+	/**
+	 * If the event handler is executing asynchronously:<br>
+	 * Allow all the commands currently on the command executor's queue to execute.
+	 * Once they have executed, suspend the command executor and process the
+	 * specified command (on <em>this</em> thread, <em>not</em> the command
+	 * executor thread). Once the specified command is finished, allow the
+	 * command executor to resume processing its command queue.
+	 * <p>
+	 * If the event handler is executing synchronously:<br>
+	 * All the events have already been handled synchronously, so we simply
+	 * execute the specified command [sorta] directly.
+	 */
+	private void executeAfterEventsHandled(Command command) {
+		SynchronizedBoolean flag = new SynchronizedBoolean(false);
+		this.eventHandler.execute(new PauseCommand(flag));
+		try {
+			flag.waitUntilTrue();
+		} catch (InterruptedException ex) {
+			// ignore - not sure why this thread would be interrupted
+		}
+		try {
+			command.execute();
+		} finally {
+			flag.setFalse();
+		}
+	}
+
+	/**
+	 * If this "pause" command is executing (asynchronously) on a different
+	 * thread than the JPA project manager:<ol>
+	 * <li>it will set the flag to <code>true</code>, allowing the JPA project
+	 * manager to resume executing on its own thread
+	 * <li>then it will suspend its command executor until the JPA project
+	 * manager sets the flag back to <code>false</code>.
+	 * </ol>
+	 * If this "pause" command is executing (synchronously) on the same thread
+	 * as the JPA project manager, it will simply set the flag to
+	 * <code>true</code> and return.
+	 */
+	private static class PauseCommand
+		implements Command
+	{
+		private final Thread producerThread;
+		private final SynchronizedBoolean flag;
+
+		PauseCommand(SynchronizedBoolean flag) {
+			this(Thread.currentThread(), flag);
+		}
+
+		PauseCommand(Thread producerThread, SynchronizedBoolean flag) {
+			super();
+			this.producerThread = producerThread;
+			this.flag = flag;
+		}
+
+		public void execute() {
+			this.flag.setTrue();
+			if (Thread.currentThread() != this.producerThread) {
+				try {
+					this.flag.waitUntilFalse();
+				} catch (InterruptedException ex) {
+					// ignore - the command executor will check for interruptions
+				}
+			}
+		}
+	}
+
+	/**
+	 * This method is called (via reflection) when the test plug-in is loaded.
+	 * @see JptCoreTestsPlugin#start(BundleContext)
+	 */
+	public void handleEventsSynchronously() {
+		try {
+			this.lock.acquire();
+			this.handleEventsSynchronously_();
+		} finally {
+			this.lock.release();
+		}
+	}
+
+	private void handleEventsSynchronously_() {
+		this.eventHandler.stop();
+		this.eventHandler = new SimpleCommandExecutor();
+		this.eventHandler.start();
+	}
+
+
+	// ********** resource proxy visitor **********
+
+	/**
+	 * Visit the workspace resource tree, adding a JPA project to the
+	 * JPA project manager for each open Eclipse project that has a JPA facet.
+	 */
+	private class ResourceProxyVisitor implements IResourceProxyVisitor {
+		ResourceProxyVisitor() {
+			super();
+		}
+
+		public boolean visit(IResourceProxy resourceProxy) {
+			switch (resourceProxy.getType()) {
+				case IResource.ROOT :
+					return true;  // all projects are in the "root"
+				case IResource.PROJECT :
+					this.processProject(resourceProxy);
+					return false;  // no nested projects
+				case IResource.FOLDER :
+					return false;  // ignore
+				case IResource.FILE :
+					return false;  // ignore
+				default :
+					return false;
+			}
+		}
+
+		private void processProject(IResourceProxy resourceProxy) {
+			if (resourceProxy.isAccessible()) {  // the project exists and is open
+				IProject project = (IProject) resourceProxy.requestResource();
+				if (JptCorePlugin.projectHasJpaFacet(project)) {
+					GenericJpaProjectManager.this.addJpaProject(project);
+				}
+			}
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+
+	// ********** event handler command **********
+
+	/**
+	 * Command that holds the JPA project manager lock while
+	 * executing.
+	 */
+	private abstract class EventHandlerCommand
+		implements Command
+	{
+		private final String name;
+
+		EventHandlerCommand(String name) {
+			super();
+			this.name = name;
+		}
+
+		public final void execute() {
+			try {
+				GenericJpaProjectManager.this.lock.acquire();
+				this.execute_();
+			} catch (RuntimeException ex) {
+				JptCorePlugin.log(ex);
+			} finally {
+				GenericJpaProjectManager.this.lock.release();
+			}
+		}
+
+		abstract void execute_();
+
+		@Override
+		public String toString() {
+			return this.name;
+		}
+	}
+
+
+	// ********** resource change listener **********
+
+	private class ResourceChangeListener implements IResourceChangeListener {
+
+		ResourceChangeListener() {
+			super();
+		}
+
+		/**
+		 * PRE_UNINSTALL is the only facet event we use for 
+		 * removing JPA projects. These are the cases where we listen for resource events.
+		 * <p>
+		 * Check for:<ul>
+		 * <li>facet settings file added/removed/changed
+		 * (<code>/.settings/org.eclipse.wst.common.project.facet.core.xml</code>)
+		 * <li>file add/remove - forwarded to the individual JPA projects
+		 * <li>project clean
+		 * </ul>
+		 */
+		public void resourceChanged(IResourceChangeEvent event) {
+			switch (event.getType()) {
+				case IResourceChangeEvent.POST_CHANGE :
+					this.processPostChangeEvent(event);
+					break;
+
+				// workspace or project events
+				case IResourceChangeEvent.PRE_REFRESH :
+					break;  // ignore
+				case IResourceChangeEvent.PRE_BUILD :
+					break;  // ignore
+				case IResourceChangeEvent.POST_BUILD :
+					this.processPostBuildEvent(event);
+					break;
+
+				// project-only events
+				case IResourceChangeEvent.PRE_CLOSE :  
+					break;  // ignore
+				case IResourceChangeEvent.PRE_DELETE :
+					break;  // ignore
+				default :
+					break;
+			}
+		}
+
+		private void processPostChangeEvent(IResourceChangeEvent event) {
+			debug("Resource POST_CHANGE"); //$NON-NLS-1$
+			this.processPostChangeDelta(event.getDelta());
+		}
+
+		private void processPostChangeDelta(IResourceDelta delta) {
+			IResource resource = delta.getResource();
+			switch (resource.getType()) {
+				case IResource.ROOT :
+					this.processPostChangeRootDelta(delta);
+					break;
+				case IResource.PROJECT :
+					this.processPostChangeProjectDelta(delta);
+					break;
+				case IResource.FOLDER :
+					this.processPostChangeFolderDelta((IFolder) resource, delta);
+					break;
+				case IResource.FILE :
+					this.processPostChangeFileDelta((IFile) resource, delta);
+					break;
+				default :
+					break;
+			}
+		}
+
+		// ***** POST_CHANGE ROOT
+		private void processPostChangeRootDelta(IResourceDelta delta) {
+			this.processPostChangeDeltaChildren(delta);
+		}
+
+		// ***** POST_CHANGE PROJECT
+		/**
+		 * Process the project first for the Opening project case.
+		 * The JPA project will not be built until the children are processed
+		 * and we see that the facet metadata file is added.
+		 * Otherwise the JPA project would be built and then we would process
+		 * the ADDED deltas for all the files in the project.
+		 */
+		private void processPostChangeProjectDelta(IResourceDelta delta) {
+			GenericJpaProjectManager.this.projectChanged(delta);
+			this.processPostChangeDeltaChildren(delta);
+		}
+
+		// ***** POST_CHANGE FOLDER
+		private void processPostChangeFolderDelta(IFolder folder, IResourceDelta delta) {
+			if (folder.getName().equals(".settings")) { //$NON-NLS-1$
+				this.processPostChangeDeltaChildren(delta);
+			}
+		}
+
+		// ***** POST_CHANGE FILE
+		private void processPostChangeFileDelta(IFile file, IResourceDelta delta) {
+			if (file.getName().equals(FACETED_PROJECT_FRAMEWORK_SETTINGS_FILE_NAME)) {
+				this.checkForFacetFileChanges(file, delta);
+			}
+		}
+		
+		private void checkForFacetFileChanges(IFile file, IResourceDelta delta) {
+			switch (delta.getKind()) {
+				case IResourceDelta.ADDED :
+				case IResourceDelta.REMOVED :
+				case IResourceDelta.CHANGED : 
+					GenericJpaProjectManager.this.checkForJpaFacetTransition(file.getProject());
+					break;
+				case IResourceDelta.ADDED_PHANTOM :
+					break;  // ignore
+				case IResourceDelta.REMOVED_PHANTOM :
+					break;  // ignore
+				default :
+					break;
+			}
+		}
+
+		private void processPostChangeDeltaChildren(IResourceDelta delta) {
+			for (IResourceDelta child : delta.getAffectedChildren()) {
+				this.processPostChangeDelta(child);  // recurse
+			}
+		}
+
+		/**
+		 * A post build event has occurred.
+		 * Check for whether the build was a "clean" build and trigger project update.
+		 */
+		// ***** POST_BUILD
+		private void processPostBuildEvent(IResourceChangeEvent event) {
+			debug("Resource POST_BUILD: ", event.getResource()); //$NON-NLS-1$
+			if (event.getBuildKind() == IncrementalProjectBuilder.CLEAN_BUILD) {
+				this.processPostCleanBuildDelta(event.getDelta());
+			}
+		}
+
+		private void processPostCleanBuildDelta(IResourceDelta delta) {
+			IResource resource = delta.getResource();
+			switch (resource.getType()) {
+				case IResource.ROOT :
+					this.processPostCleanBuildDeltaChildren(delta);
+					break;
+				case IResource.PROJECT :
+					this.processProjectPostCleanBuild((IProject) resource);
+					break;
+				case IResource.FOLDER :
+					break;  // ignore
+				case IResource.FILE :
+					break;  // ignore
+				default :
+					break;
+			}
+		}
+
+		private void processPostCleanBuildDeltaChildren(IResourceDelta delta) {
+			for (IResourceDelta child : delta.getAffectedChildren()) {
+				this.processPostCleanBuildDelta(child);  // recurse
+			}
+		}
+
+		private void processProjectPostCleanBuild(IProject project) {
+			debug("\tProject CLEAN: ", project.getName()); //$NON-NLS-1$
+			GenericJpaProjectManager.this.projectPostCleanBuild(project);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+
+	// ********** faceted project listener **********
+
+	/**
+	 * Forward the Faceted project change event back to the JPA project manager.
+	 */
+	private class FacetedProjectListener implements IFacetedProjectListener {
+
+		FacetedProjectListener() {
+			super();
+		}
+
+		/**
+		 * Check for:<ul>
+		 * <li>un-install of JPA facet
+		 * </ul>
+		 */
+		public void handleEvent(IFacetedProjectEvent event) {
+			switch (event.getType()) {
+				case PRE_UNINSTALL :
+					this.processPreUninstallEvent((IProjectFacetActionEvent) event);
+					break;
+				default :
+					break;
+			}
+		}
+
+		private void processPreUninstallEvent(IProjectFacetActionEvent event) {
+			debug("Facet PRE_UNINSTALL: ", event.getProjectFacet()); //$NON-NLS-1$
+			if (event.getProjectFacet().getId().equals(JptCorePlugin.FACET_ID)) {
+				GenericJpaProjectManager.this.jpaFacetedProjectPreUninstall(event);
+			}
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+
+	// ********** Java element change listener **********
+
+	/**
+	 * Forward the Java element change event back to the JPA project manager.
+	 */
+	private class JavaElementChangeListener implements IElementChangedListener {
+		/**
+		 * A flag to activate/deactivate the listener
+		 * so we can ignore Java events whenever Dali is manipulating the Java
+		 * source code via the Dali model. We do this because the 0.5 sec delay
+		 * between the Java source being changed and the corresponding event
+		 * being fired causes us no end of pain.
+		 */
+		private volatile boolean active = true;
+
+		JavaElementChangeListener() {
+			super();
+		}
+
+		public void elementChanged(ElementChangedEvent event) {
+			if (this.active) {
+				GenericJpaProjectManager.this.javaElementChanged(event);
+			}
+		}
+
+		void setActive(boolean active) {
+			this.active = active;
+		}
+
+		boolean isActive() {
+			return this.active;
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+
+	// ********** DEBUG **********
+
+	// @see JpaProjectManagerTests#testDEBUG()
+	private static final boolean DEBUG = false;
+
+	/**
+	 * trigger #toString() call and string concatenation only if DEBUG is true
+	 */
+	/* private */ static void debug(String message, Object object) {
+		if (DEBUG) {
+			debug_(message + object);
+		}
+	}
+
+	/* private */ static void debug(String message) {
+		if (DEBUG) {
+			debug_(message);
+		}
+	}
+
+	private static void debug_(String message) {
+		System.out.println(Thread.currentThread().getName() + ": " + message); //$NON-NLS-1$
+	}
+
+	/* private */ static void dumpStackTrace() {
+		dumpStackTrace(null);
+	}
+
+	/* private */ static void dumpStackTrace(String message, Object object) {
+		if (DEBUG) {
+			dumpStackTrace_(message + object);
+		}
+	}
+
+	/* private */ static void dumpStackTrace(String message) {
+		if (DEBUG) {
+			dumpStackTrace_(message);
+		}
+	}
+
+	private static void dumpStackTrace_(String message) {
+		// lock System.out so the stack elements are printed out contiguously
+		synchronized (System.out) {
+			if (message != null) {
+				debug_(message);
+			}
+			StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
+			// skip the first 3 elements - those are this method and 2 methods in Thread
+			for (int i = 3; i < stackTrace.length; i++) {
+				StackTraceElement element = stackTrace[i];
+				if (element.getMethodName().equals("invoke0")) { //$NON-NLS-1$
+					break;  // skip all elements outside of the JUnit test
+				}
+				System.out.println("\t" + element); //$NON-NLS-1$
+			}
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/IResourcePart.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/IResourcePart.java
new file mode 100644
index 0000000..21eccaa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/IResourcePart.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.resources.IResource;
+
+
+/**
+ * Represents an object that can be described as being part of an {@link IResource}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface IResourcePart
+{
+	/**
+	 * Return the resource of which this object is a part
+	 */
+	IResource getResource();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaAnnotationDefinitionProvider.java
new file mode 100644
index 0000000..f48c8ee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaAnnotationDefinitionProvider.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+
+/**
+ * Provides annotationDefinitions for types and attributes. JpaAnnotationProvider
+ * then uses a collection of these to build annotations.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JpaAnnotationDefinitionProvider
+{
+	/**
+	 * Return all annotation definitions which can appear on a type
+	 */
+	Iterator<AnnotationDefinition> typeAnnotationDefinitions();
+	
+	/**
+	 * Return all annotation definitions which can appear on a type and are used to determine
+	 * whether and how the type is persisted (how it is "mapped").
+	 * This should be a subset of {@link #typeAnnotationDefinitions()}.
+	 */
+	Iterator<AnnotationDefinition> typeMappingAnnotationDefinitions();
+	
+	/**
+	 * Return all annotation definitions which can appear on an attribute
+	 */
+	Iterator<AnnotationDefinition> attributeAnnotationDefinitions();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaAnnotationProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaAnnotationProvider.java
new file mode 100644
index 0000000..a26aaf8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaAnnotationProvider.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * This is used to provide type and attribute annotations.
+ * Also provides list of supported annotation names, check the appropriate list
+ * before trying to build an annotation with that name. An exception will
+ * be thrown on an attempt to build an annotation that does not exist.
+ * 
+ * This interface is not intended to be implemented.  Instead implement 
+ * JpaAnnotationDefinitionProvider to extend the list of supported annotation definitions.
+ * 
+ * @see JpaAnnotationDefinitionProvider
+ * @version 2.3
+ * @since 2.0?
+ *  
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JpaAnnotationProvider 
+{
+	// ********** type annotations **********
+	
+	/**
+	 * Return the names of the annotations that can appear on a type.
+	 */
+	Iterator<String> typeAnnotationNames();
+	
+	/**
+	 * Return the names of the annotations that can appear on a type and are used to 
+	 * determine whether and how the type is persisted (how it is "mapped").
+	 * This should be a subset of {@link #typeAnnotationNames()}.
+	 */
+	Iterator<String> typeMappingAnnotationNames();
+	
+	/**
+	 * Build a type annotation with the specified name.
+	 * Throw an IllegalArgumentException if the specified name is unsupported.
+	 * @see #typeAnnotationNames()
+	 */
+	Annotation buildTypeAnnotation(
+			JavaResourcePersistentType parent, Type type, String annotationName);
+	
+	/**
+	 * Build a type annotation for the specified JDT annotation.
+	 * Throw an IllegalArgumentException if the specified annotation is unsupported.
+	 * @see #typeAnnotationNames()
+	 */
+	Annotation buildTypeAnnotation(
+			JavaResourcePersistentType parent, IAnnotation jdtAnnotation);
+	
+	/**
+	 * Build a null type annotation with the specified name.
+	 * Throw an IllegalArgumentException if the specified annotation is unsupported.
+	 * @see #typeAnnotationNames()
+	 */
+	Annotation buildNullTypeAnnotation(
+			JavaResourcePersistentType parent, String annotationName);
+	
+	
+	// ********** attribute annotations **********
+	
+	/**
+	 * Return the names of the annotations that can appear on an attribute.
+	 */
+	Iterator<String> attributeAnnotationNames();
+	
+	/**
+	 * Build an attribute annotation with the specified name.
+	 * Throw an IllegalArgumentException if the specified name is unsupported.
+	 * @see #attributeAnnotationNames()
+	 */
+	Annotation buildAttributeAnnotation(
+			JavaResourcePersistentAttribute parent, Attribute attribute, String annotationName);
+	
+	/**
+	 * Build an attribute annotation for the specified JDT annotation.
+	 * Throw an IllegalArgumentException if the specified annotation is unsupported.
+	 * @see #attributeAnnotationNames()
+	 */
+	Annotation buildAttributeAnnotation(
+			JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation);
+	
+	/**
+	 * Build a null attribute annotation with the specified name.
+	 * Throw an IllegalArgumentException if the specified annotation is unsupported.
+	 * @see #attributeMappingAnnotationNames()
+	 */
+	Annotation buildNullAttributeAnnotation(
+			JavaResourcePersistentAttribute parent, String annotationName);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaDataSource.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaDataSource.java
new file mode 100644
index 0000000..8bc2f6d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaDataSource.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.DatabaseObject;
+
+/**
+ * Interface to the connection profile.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JpaDataSource
+	extends JpaNode {
+
+	/**
+	 * Return the data source's connection profile name.
+	 * The connection profile is looked up based on this setting.
+	 */
+	String getConnectionProfileName();
+
+	/**
+	 * Set the data source's connection profile name.
+	 * The connection profile is looked up based on this setting.
+	 */
+	void setConnectionProfileName(String connectionProfileName);
+
+	/**
+	 * ID string used when connectionProfileName property is changed
+	 * @see org.eclipse.jpt.utility.model.Model#addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	String CONNECTION_PROFILE_NAME_PROPERTY = "connectionProfileName"; //$NON-NLS-1$
+
+	/**
+	 * The connection profile is null if the connection profile name is invalid.
+	 */
+	ConnectionProfile getConnectionProfile();
+
+	/**
+	 * ID string used when connectionProfile property is changed
+	 * @see org.eclipse.jpt.utility.model.Model#addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	String CONNECTION_PROFILE_PROPERTY = "connectionProfile"; //$NON-NLS-1$
+
+	/**
+	 * Return whether the profile is either connected to a live database
+	 * session or working off-line (i.e. it has access to meta-data).
+	 */
+	boolean connectionProfileIsActive();
+
+	/**
+	 * If the connection profile is active, return its database.
+	 */
+	Database getDatabase();
+
+	/**
+	 * Select and return the database object with the specified identifier.
+	 */
+	<T extends DatabaseObject> T selectDatabaseObjectForIdentifier(Iterable<T> databaseObjects, String identifier);
+
+	/**
+	 * Dispose the data source.
+	 */
+	void dispose();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaFactory.java
new file mode 100644
index 0000000..8f67a12
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaFactory.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.context.MappingFile;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaBaseJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.context.java.JavaDiscriminatorColumn;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaEnumeratedConverter;
+import org.eclipse.jpt.core.context.java.JavaGeneratedValue;
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinTable;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaLobConverter;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaNamedNativeQuery;
+import org.eclipse.jpt.core.context.java.JavaNamedQuery;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaOrderable;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaQuery;
+import org.eclipse.jpt.core.context.java.JavaQueryContainer;
+import org.eclipse.jpt.core.context.java.JavaQueryHint;
+import org.eclipse.jpt.core.context.java.JavaSecondaryTable;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.context.java.JavaTable;
+import org.eclipse.jpt.core.context.java.JavaTableGenerator;
+import org.eclipse.jpt.core.context.java.JavaTemporalConverter;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+/**
+ * Use a JPA factory to build any core (e.g. {@link JpaProject})
+ * model object or any Java (e.g. {@link JavaEntity}), ORM (e.g.
+ * {@link EntityMappings}), or persistence (e.g. {@link PersistenceUnit})
+ * context model objects.
+ * <p>
+ * Assumes a base JPA project context structure 
+ * corresponding to the JPA spec:
+ * <pre>
+ *     RootContext
+ *      |- persistence.xml
+ *          |- persistence unit(s)
+ *               |- mapping file(s)  (e.g. orm.xml)
+ *               |   |- persistent type mapping(s)  (e.g. Entity)
+ *               |       |- persistent attribute mapping(s)  (e.g. Basic)
+ *               |- persistent type mapping(s)
+ * </pre>
+ *   ... and associated objects.
+ *<p> 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @see org.eclipse.jpt.core.internal.jpa1.GenericJpaFactory
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JpaFactory 
+{
+	// ********** Core Model **********
+	
+	/**
+	 * Construct a JpaProject for the specified config, to be
+	 * added to the specified JPA project. Return null if unable to create
+	 * the JPA file (e.g. the content type is unrecognized).
+	 */
+	JpaProject buildJpaProject(JpaProject.Config config);
+	
+	JpaDataSource buildJpaDataSource(JpaProject jpaProject, String connectionProfileName);
+
+	/**
+	 * Construct a JPA file for the specified JPA project, file, content type,
+	 * and resource model.
+	 */
+	JpaFile buildJpaFile(JpaProject jpaProject, IFile file, IContentType contentType, JpaResourceModel resourceModel);
+	
+	
+	// ********** Context Nodes **********
+	
+	/**
+	 * Build a (/an updated) root context node to be associated with the given 
+	 * JPA project.
+	 * The root context node will be built once, but updated many times.
+	 * @see JpaProject#update(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	JpaRootContextNode buildRootContextNode(JpaProject jpaProject);
+
+
+	// ********** XML Context Model **********
+
+	PersistenceXml buildPersistenceXml(JpaRootContextNode parent, JpaXmlResource resource);
+
+	MappingFile buildMappingFile(MappingFileRef parent, JpaXmlResource resource);
+
+
+	// ********** Java Context Model **********
+	
+	JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourcePersistentType jrpt);
+	
+	JavaEntity buildJavaEntity(JavaPersistentType parent);
+	
+	JavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent);
+	
+	JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent);
+	
+	JavaTypeMapping buildJavaNullTypeMapping(JavaPersistentType parent);
+	
+	JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent, JavaResourcePersistentAttribute jrpa);
+	
+	JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent);
+	
+	JavaEmbeddedIdMapping buildJavaEmbeddedIdMapping(JavaPersistentAttribute parent);
+	
+	JavaEmbeddedMapping buildJavaEmbeddedMapping(JavaPersistentAttribute parent);
+	
+	JavaGeneratorContainer buildJavaGeneratorContainer(JavaJpaContextNode parent);
+
+	JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent);
+	
+	JavaManyToManyMapping buildJavaManyToManyMapping(JavaPersistentAttribute parent);
+	
+	JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent);
+	
+	JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent);
+	
+	JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent);
+	
+	JavaTransientMapping buildJavaTransientMapping(JavaPersistentAttribute parent);
+	
+	JavaVersionMapping buildJavaVersionMapping(JavaPersistentAttribute parent);
+	
+	JavaAttributeMapping buildJavaNullAttributeMapping(JavaPersistentAttribute parent);
+	
+	JavaTable buildJavaTable(JavaEntity parent);
+	
+	JavaJoinTable buildJavaJoinTable(JavaJoinTableJoiningStrategy parent);
+	
+	JavaColumn buildJavaColumn(JavaJpaContextNode parent, JavaBaseColumn.Owner owner);
+	
+	JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner);
+	
+	JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaJoinColumn.Owner owner);
+	
+	JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent);
+	
+	JavaSequenceGenerator buildJavaSequenceGenerator(JavaJpaContextNode parent);
+	
+	JavaTableGenerator buildJavaTableGenerator(JavaJpaContextNode parent);
+	
+	JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent);
+	
+	JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaBaseJoinColumn.Owner owner);
+	
+	JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner);
+
+	JavaAttributeOverride buildJavaAttributeOverride(JavaAttributeOverrideContainer parent, JavaAttributeOverride.Owner owner);
+	
+	JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner);
+
+	JavaAssociationOverride buildJavaAssociationOverride(JavaAssociationOverrideContainer parent, JavaAssociationOverride.Owner owner);
+	
+	JavaAssociationOverrideRelationshipReference buildJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent);
+	
+	JavaQueryContainer buildJavaQueryContainer(JavaJpaContextNode parent);
+
+	JavaNamedQuery buildJavaNamedQuery(JavaJpaContextNode parent);
+	
+	JavaNamedNativeQuery buildJavaNamedNativeQuery(JavaJpaContextNode parent);
+	
+	JavaQueryHint buildJavaQueryHint(JavaQuery parent);
+	
+	JavaUniqueConstraint buildJavaUniqueConstraint(JavaJpaContextNode parent, UniqueConstraint.Owner owner);
+	
+	JavaEnumeratedConverter buildJavaEnumeratedConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa);
+	
+	JavaTemporalConverter buildJavaTemporalConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa);
+	
+	JavaLobConverter buildJavaLobConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa);
+
+	JavaConverter buildJavaNullConverter(JavaAttributeMapping parent);
+	
+	JavaOrderable buildJavaOrderable(JavaAttributeMapping parent, Orderable.Owner owner);
+	
+	AssociationOverrideAnnotation buildJavaVirtualAssociationOverrideAnnotation(JavaResourcePersistentMember jrpm, String name, JoiningStrategy joiningStrategy);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaFile.java
new file mode 100644
index 0000000..b2f4da7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaFile.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.Iterator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * A JPA Project contains JPA files for all files in the project that
+ * are relevant to the JPA spec.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JpaFile
+	extends JpaNode
+{
+	/**
+	 * Return the JPA file's Eclipse file.
+	 */
+	IFile getFile();
+	
+	/**
+	 * Return the JPA file's content type.
+	 */
+	IContentType getContentType();
+	
+	/**
+	 * Return the resource model corresponding to the JPA file; typically a JPA
+	 * compilation unit, a JPA XML resource, or a JPA package fragment root (JAR).
+	 */
+	JpaResourceModel getResourceModel();
+	
+	/**
+	 * Convenience method. Return the resource model corresponding to the JPA
+	 * file if the file's content is a "kind-of" the specified content type;
+	 * otherwise, return null. This is useful when a client has looked up the
+	 * JPA file via a file name [and assumed content type].
+	 * @see #getResourceModel()
+	 */
+	JpaResourceModel getResourceModel(IContentType contentType);
+	
+	
+	// ********** root structure nodes **********
+
+	/**
+	 * Return the JPA file's root structure nodes.
+	 */
+	Iterator<JpaStructureNode> rootStructureNodes();
+		String ROOT_STRUCTURE_NODES_COLLECTION = "rootStructureNodes"; //$NON-NLS-1$
+
+	/**
+	 * Return the count of the JPA file's root context model objects.
+	 */
+	int rootStructureNodesSize();
+
+	/**
+	 * Add a root structure node.
+	 * There is the potential for multiple root structure nodes 
+	 * for a particular key. For example, a Java file that is listed
+	 * both as a <class> in the persistence.xml and as an <entity> in
+	 * an orm.xml file. In this case the orm.xml file needs to set
+	 * the root structure node after the Java class reference.
+	 * Last one in during project "update" wins.
+	 */
+	void addRootStructureNode(Object key, JpaStructureNode rootStructureNode);
+
+	/**
+	 * @see #addRootStructureNode(Object, JpaStructureNode)
+	 */
+	void removeRootStructureNode(Object key);
+
+	/**
+	 * Return the structure node best corresponding to the location in the file.
+	 */
+	JpaStructureNode getStructureNode(int textOffset);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaNode.java
new file mode 100644
index 0000000..741b35d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaNode.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jpt.utility.model.Model;
+
+/**
+ * JPA-specific protocol. All JPA objects belong to a JPA project, are
+ * associated with a resource, and have a parent (excepting the JPA project).
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JpaNode
+	extends Model, IAdaptable, IResourcePart
+{
+	/**
+	 * Return the JPA project the node belongs to.
+	 */
+	JpaProject getJpaProject();
+
+	/**
+	 * Return the JPA node's parent. The JPA project will not have a parent.
+	 */
+	JpaNode getParent();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java
new file mode 100644
index 0000000..75f15ee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.db.ConnectionProfileFactory;
+
+/**
+ * This interface is to be implemented by a JPA vendor to provide extensions to 
+ * the core JPA model. The core JPA model will provide functionality for JPA
+ * spec annotations in Java, <code>persistence.xml</code> and mapping
+ * (<code>orm.xml</code>) files.
+ * The <code>org.eclipse.jpt.core.generic</code> extension supplies 
+ * resource models for those file types. As another vendor option you 
+ * will have to supply those resource models as well or different ones 
+ * as necessary. In the extension point you actually provide a
+ * {@link JpaPlatformFactory} that will build the JPA platform.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <p>
+ * See the <code>org.eclipse.jpt.core.jpaPlatforms</code> extension point.
+ * @see JpaPlatformFactory
+ * @see JpaPlatformProvider
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JpaPlatform
+{
+	/**
+	 * Get the ID for this platform
+	 */
+	String getId();
+	
+	/**
+	 * Get the version object for this platform. 
+	 */
+	Version getJpaVersion();
+	
+	// ********** factory **********
+
+	/**
+	 * Return a factory responsible for creating core (e.g. JpaProject), resource
+	 * (e.g. PersistenceResource), and context (e.g. PersistenceUnit) model
+	 * objects
+	 */
+	JpaFactory getJpaFactory();
+
+
+	// ********** JPA files **********
+
+	/**
+	 * Return a JPA file corresponding to the specified Eclipse file.
+	 * Return null if the file's content is unsupported.
+	 */
+	JpaFile buildJpaFile(JpaProject jpaProject, IFile file);
+
+
+	// ********** Java annotations **********
+
+	/**
+	 * Return an annotation provider responsible for determining what Java
+	 * annotations are supported and constructing java resource model objects.
+	 */
+	JpaAnnotationProvider getAnnotationProvider();
+
+	/**
+	 * Return a formatter that can clean up the Java annotations added to source
+	 * code.
+	 */
+	AnnotationEditFormatter getAnnotationEditFormatter();
+
+
+	// ********** Java type/attribute mappings **********
+	
+	/**
+	 * Return a {@link JavaTypeMappingDefinition} that describes the interpretation of the type
+	 * as it exists, complete with annotations.
+	 * This may not be null (@see {@link NullJavaTypeMappingDefinition},) else
+	 * an {@link IllegalStateException} is thrown.
+	 * 
+	 * @param type The persistent type to analyze
+	 * @return The mapping definition used to describe the annotated state of the type
+	 */
+	JavaTypeMappingDefinition getJavaTypeMappingDefinition(JavaPersistentType type);
+	
+	/**
+	 * Return a {@link JavaTypeMappingDefinition} for the given mapping key.
+	 * Throw an {@link IllegalArgumentException} if the key is not supported by the platform.
+	 */
+	JavaTypeMappingDefinition getJavaTypeMappingDefinition(String mappingKey);
+	
+	/**
+	 * Return a {@link JavaAttributeMappingDefinition} that describes the interpretation of the attribute
+	 * as it exists, ignoring all annotations.
+	 * This may not be null (@see {@link NullDefaultJavaAttributeMappingDefinition},) else
+	 * an {@link IllegalStateException} is thrown.
+	 * 
+	 * @param attribute The persistent attribute to analyze
+	 * @return The mapping definition describing the unannotated state of the attribute
+	 */
+	JavaAttributeMappingDefinition getDefaultJavaAttributeMappingDefinition(JavaPersistentAttribute attribute);
+	
+	/**
+	 * Return a {@link JavaAttributeMappingDefinition} that describes the interpretation of the attribute
+	 * as it exists, complete with annotations.  It is assumed that the attribute's default mapping
+	 * has already been determined.
+	 * This may not be null (@see {@link NullSpecifiedJavaAttributeMappingDefinition},) else
+	 * an {@link IllegalStateException} is thrown.
+	 * 
+	 * @param attribute The persistent attribute to analyze
+	 * @return The mapping definition describing the annotated state of the attribute
+	 */
+	JavaAttributeMappingDefinition getSpecifiedJavaAttributeMappingDefinition(JavaPersistentAttribute attribute);
+	
+	/**
+	 * Return a {@link JavaAttributeMappingDefinition} for the given mapping key.
+	 * Throw an {@link IllegalArgumentException} if the key is not supported by the platform.
+	 */
+	JavaAttributeMappingDefinition getSpecifiedJavaAttributeMappingDefinition(String mappingKey);
+	
+	
+	// ********** resource types and definitions **********
+	
+	/**
+	 * Return true if the resource type is supported.  The result of this call is consistent with
+	 * the result of {@link #getResourceDefinition(JpaResourceType)}
+	 */
+	boolean supportsResourceType(JpaResourceType resourceType);
+	
+	/**
+	 * Return a {@link ResourceDefinition} to describe the context model for a file of the given
+	 * resource type.
+	 * Throw an {@link IllegalArgumentException} if the resource type is not supported by the platform.
+	 * 
+	 * @param resourceType The resource type of a potential resource definition
+	 * @return The resource definition that can be used for such a file
+	 */
+	ResourceDefinition getResourceDefinition(JpaResourceType resourceType);
+	
+	/**
+	 * Return the most recent supported {@link JpaResourceType} for the given content type.
+	 * Throw an {@link IllegalArgumentException} if the content type is not supported by the platform.
+	 * 
+	 * @param contentType A content type supported by the platform
+	 * @return The most recent resource type supported by the platform
+	 */
+	JpaResourceType getMostRecentSupportedResourceType(IContentType contentType);
+	
+	
+	// ********** database **********
+
+	/**
+	 * Return a connection repository that can be used to query the database
+	 * about database metadata.
+	 */
+	ConnectionProfileFactory getConnectionProfileFactory();
+
+	/**
+	 * Return an entity generator database annotation name builder, which is
+	 * used by Entity Generation to determine whether and how the entity generator
+	 * prints the names of various database objects.
+	 */
+	EntityGeneratorDatabaseAnnotationNameBuilder getEntityGeneratorDatabaseAnnotationNameBuilder();
+
+	
+	// ********** platform variation **********
+
+	/**
+	 * Return a platform variation that is used to determine differences platforms and/or JPA specification versions
+	 */
+	JpaPlatformVariation getJpaVariation();
+
+	
+	interface Version 
+	{
+		/**
+		 * Return the platform's version.
+		 */
+		String getVersion();
+		
+		/**
+		 * Return the highest JPA specification version supported by the platform.
+		 * @see JptCorePlugin#JPA_FACET_VERSION_1_0
+		 * @see JptCorePlugin#JPA_FACET_VERSION_2_0
+		 */
+		String getJpaVersion();
+		
+		/**
+		 * Return whether the platform is compatible with the specified JPA
+		 * specification version.
+		 * @see JptCorePlugin#JPA_FACET_VERSION_1_0
+		 * @see JptCorePlugin#JPA_FACET_VERSION_2_0
+		 */
+		boolean isCompatibleWithJpaVersion(String jpaVersion);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformFactory.java
new file mode 100644
index 0000000..7c085af
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformFactory.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+/**
+ * This interface is to be implemented by a JPA vendor to build a
+ * {@link JpaPlatform}.
+ * <p>
+ * See the <code>org.eclipse.jpt.core.jpaPlatforms</code> extension point.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JpaPlatformFactory {
+	/**
+	 * Build the JPA platform with the specified ID.
+	 */
+	JpaPlatform buildJpaPlatform(String id);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformProvider.java
new file mode 100644
index 0000000..d08bc96
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformProvider.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.ListIterator;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+
+/**
+ * This interface is to be implemented by a JPA vendor to provide extensions to 
+ * the core JPA model.  The core JPA model will provide functionality for JPA
+ * spec annotations in java, persistence.xml and mapping (orm.xml) files.
+ * The org.eclipse.jpt.core.generic extension supplies 
+ * resource models for those file types in GenericJpaPlatformProvider. 
+ * 
+ * This JpaPlatformProvider implementation most likely only returns providers
+ * that are extensions of other platforms.  Then in the GenericJpaPlatform implementation
+ * you pass in 1 or more JpaPlatformProviders.
+ * 
+ * See the org.eclipse.jpt.core.jpaPlatforms extension point
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JpaPlatformProvider
+{
+	/**
+	 * Return the most recent resource type for the given content type supported by this platform
+	 */
+	public JpaResourceType getMostRecentSupportedResourceType(IContentType contentType);
+	
+	/**
+	 * Return the resource model providers that apply to this platform.
+	 */
+	ListIterator<JpaResourceModelProvider> resourceModelProviders();
+
+	/**
+	 * Return the resource definitions supported by this platform.
+	 */
+	ListIterator<ResourceDefinition> resourceDefinitions();
+
+	/**
+	 * Return the java type mapping definitions that apply to this platform.
+	 */
+	ListIterator<JavaTypeMappingDefinition> javaTypeMappingDefinitions();
+	
+	/**
+	 * Return the mapping definitions to use for default java attribute mappings for this platform.
+	 */
+	ListIterator<JavaAttributeMappingDefinition> defaultJavaAttributeMappingDefinitions();
+
+	/**
+	 * Return the mapping definitions to use for specified java attribute mappings for this platform.
+	 */
+	ListIterator<JavaAttributeMappingDefinition> specifiedJavaAttributeMappingDefinitions();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformVariation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformVariation.java
new file mode 100644
index 0000000..74710d4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatformVariation.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+/**
+ * A JpaPlatform contains a JpaPlatformVariation.  This is used for various jpa spec
+ * items that are either optional or only supported by certain version of the spec.
+ * Each platform implementation must determine if it supports these things.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaPlatformVariation
+{
+	/**
+	 * Return whether table-per-concrete-class is a supported
+	 * inheritance strategy in the JPA platform.
+	 * Supported.MAYBE means that it is in the JPA spec, but not portable
+	 * or might not be supported by a particular provider. 
+	 * @return
+	 */
+	Supported getTablePerConcreteClassInheritanceIsSupported();
+
+	/**
+	 * This is used to determine if a relationship mapping that uses a join table
+	 * can be overridden with an association override.
+	 */
+	boolean isJoinTableOverridable();
+	
+
+	public enum Supported {
+		/**
+		 * fully supported by the platform
+		 */
+		YES,
+		
+		/**
+		 * not supported by the platform
+		 */
+		NO,
+		
+		/**
+		 * in the JPA spec, might not supported be supported by a particular provider
+		 */
+		MAYBE,
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaProject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaProject.java
new file mode 100644
index 0000000..6d3b8f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaProject.java
@@ -0,0 +1,541 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentTypeCache;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.CommandExecutor;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * A JPA project is associated with an Eclipse project (and its corresponding
+ * Java project). It holds the "resource" model that corresponds to the various
+ * JPA-related resources (the <code>persistence.xml</code> file, its mapping files
+ * [<code>orm.xml</code>],
+ * and the Java source files). It also holds the "context" model that represents
+ * the JPA metadata, as derived from spec-defined defaults, Java source code
+ * annotations, and XML descriptors.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JpaProject
+	extends JpaNode
+{
+
+	// ********** general **********
+
+	/**
+	 * Return the JPA project's name, which is the same as the associated
+	 * Eclipse project's name.
+	 */
+	String getName();
+
+	/**
+	 * Return the Eclipse project associated with the JPA project.
+	 */
+	IProject getProject();
+
+	/**
+	 * Return the Java project associated with the JPA project.
+	 */
+	IJavaProject getJavaProject();
+
+	/**
+	 * Return the vendor-specific JPA platform that builds the JPA project
+	 * and its contents.
+	 */
+	JpaPlatform getJpaPlatform();
+
+	/**
+	 * Return the root of the JPA project's context model.
+	 */
+	JpaRootContextNode getRootContextNode();
+
+	/**
+	 * The JPA project has been removed from the JPA model. Clean up any
+	 * hooks to external resources etc.
+	 */
+	void dispose();
+
+
+	// ********** JPA files **********
+
+	/** 
+	 * ID string used when the JPA project's collection of JPA files changes.
+	 * @see #addCollectionChangeListener(String, org.eclipse.jpt.utility.model.listener.CollectionChangeListener)
+	 */
+	String JPA_FILES_COLLECTION = "jpaFiles"; //$NON-NLS-1$
+
+	/**
+	 * Return the JPA project's JPA files.
+	 */
+	Iterator<JpaFile> jpaFiles();
+
+	/**
+	 * Return the size of the JPA project's JPA files.
+	 */
+	int jpaFilesSize();
+
+	/**
+	 * Return the JPA file corresponding to the specified file.
+	 * Return null if there is no JPA file associated with the specified file.
+	 */
+	JpaFile getJpaFile(IFile file);
+
+
+	// ********** external Java resource compilation units **********
+
+	/** 
+	 * ID string used when the JPA project's collection of external Java
+	 * resource compilation units changes.
+	 * @see #addCollectionChangeListener(String, org.eclipse.jpt.utility.model.listener.CollectionChangeListener)
+	 */
+	String EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION = "externalJavaResourceCompilationUnits"; //$NON-NLS-1$
+
+	/**
+	 * Return the JPA project's external Java resource compilation units.
+	 */
+	Iterator<JavaResourceCompilationUnit> externalJavaResourceCompilationUnits();
+
+	/**
+	 * Return the size of the JPA project's external Java resource compilation units.
+	 */
+	int externalJavaResourceCompilationUnitsSize();
+
+
+	// ********** external Java resource persistent types **********
+
+	/**
+	 * Return the JPA project's external Java resource persistent type cache.
+	 */
+	JavaResourcePersistentTypeCache getExternalJavaResourcePersistentTypeCache();
+
+
+	// ********** XML resources **********
+
+	/**
+	 * Return the XML resource model corresponding to the file
+	 * <code>META-INF/persistence.xml</code> if that file has the persistence content type
+	 * (<code>"org.eclipse.jpt.core.content.persistence"</code>).
+	 * 
+	 * @see JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATH
+	 */
+	JpaXmlResource getPersistenceXmlResource();
+	
+	/**
+	 * Return the XML resource model corresponding to the specified file
+	 * if that file has the mapping file content type
+	 * (<code>"org.eclipse.jpt.core.content.mappingFile"</code>)
+	 * 
+	 * @see JptCorePlugin#MAPPING_FILE_CONTENT_TYPE
+	 */
+	JpaXmlResource getMappingFileXmlResource(String filePath);
+
+	/**
+	 * Return the XML resource model corresponding to the file
+	 * <code>META-INF/orm.xml</code> if that file has the mapping file content type.
+	 * 
+	 * @see JptCorePlugin#DEFAULT_ORM_XML_FILE_PATH
+	 */
+	JpaXmlResource getDefaultOrmXmlResource();
+	
+	
+	// ********** Java resources **********
+
+	/**
+	 * Return the names of the JPA project's annotated Java classes
+	 * (ignoring classes in JARs referenced in the persistence.xml).
+	 */
+	Iterator<String> annotatedJavaSourceClassNames();
+	
+	/**
+	 * Return the names of the JPA project's mapped (i.e. annotated with @Entity, etc.) Java 
+	 * classes (ignoring classes in JARs referenced in the persistence.xml).
+	 */
+	Iterator<String> mappedJavaSourceClassNames();
+
+	/**
+	 * Return the Java resource persistent type for the specified type.
+	 * Return null if invalid or absent.
+	 */
+	JavaResourcePersistentType getJavaResourcePersistentType(String typeName);
+
+	/**
+	 * Return the Java resource package fragement root for the specified JAR.
+	 * Return null if absent.
+	 */
+	JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(String jarFileName);
+
+
+	// ********** model synchronization **********
+
+	/**
+	 * Synchronize the JPA project with the specified project resource
+	 * delta, watching for added and removed files in particular.
+	 */
+	void projectChanged(IResourceDelta delta);
+
+	/**
+	 * Synchronize the JPA project with the specified Java change.
+	 */
+	void javaElementChanged(ElementChangedEvent event);
+
+
+	// ********** synchronize context model with resource model **********
+
+	void synchronizeContextModel();
+
+
+	// ********** project "update" **********
+
+	/**
+	 * Return the implementation of the Updater
+	 * interface that will be used to "update" the JPA project.
+	 */
+	Updater getUpdater();
+
+	/**
+	 * Set the implementation of the Updater
+	 * interface that will be used to "update" the JPA project.
+	 * Before setting the updater, clients should save the current updater so
+	 * it can be restored later.
+	 */
+	void setUpdater(Updater updater);
+
+	/**
+	 * The JPA project's state has changed, "update" those parts of the
+	 * JPA project that are dependent on other parts of the JPA project.
+	 * This is called when<ul>
+	 * <li>(almost) any state in the JPA project changes
+	 * <li>the JPA project's database connection is changed, opened, or closed
+	 * </ul>
+	 */
+	void update();
+
+	/**
+	 * This is the callback used by the updater to perform the actual
+	 * "update", which most likely will happen asynchronously.
+	 */
+	IStatus update(IProgressMonitor monitor);
+
+	/**
+	 * This is the callback used by the updater to notify the JPA project that
+	 * the "update" has quiesced (i.e. the "update" has completed and there
+	 * are no outstanding requests for further "updates").
+	 */
+	void updateQuiesced();
+
+
+	/**
+	 * Define a strategy that can be used to "update" a JPA project whenever
+	 * something changes.
+	 */
+	interface Updater {
+
+		/**
+		 * The updater has just been assigned to its JPA project.
+		 */
+		void start();
+
+		/**
+		 * Update the JPA project.
+		 * <p>
+		 * {@link JpaProject#update()} will call {@link Updater#update()},
+		 * from which the updater is to call {@link JpaProject#update(IProgressMonitor)}
+		 * as appropriate (typically from an asynchronously executing job).
+		 * Once the updating has quiesced (i.e. there are no outstanding requests
+		 * for another update), the updater is to call {@link JpaProject#updateQuiesced()}.
+		 */
+		void update();
+
+		/**
+		 * The JPA project is disposed; stop the updater.
+		 */
+		void stop();
+
+		/**
+		 * This updater does nothing. Useful for testing.
+		 */
+		final class Null implements Updater {
+			private static final Updater INSTANCE = new Null();
+			public static Updater instance() {
+				return INSTANCE;
+			}
+			// ensure single instance
+			private Null() {
+				super();
+			}
+			public void start() {
+				// do nothing
+			}
+			public void update() {
+				// do nothing
+			}
+			public void stop() {
+				// do nothing
+			}
+			@Override
+			public String toString() {
+				return "JpaProject.Updater.Null"; //$NON-NLS-1$
+			}
+		}
+
+	}
+
+
+	// ********** utility **********
+
+	/**
+	 * Convert the specified file name to a file mapped to the appropriate
+	 * deployment location.
+	 */
+	IFile convertToPlatformFile(String fileName);
+
+
+	// ********** validation **********
+
+	/**
+	 * Return JPA project's validation messages.
+	 */
+	Iterator<IMessage> validationMessages(IReporter reporter);
+
+
+	// ********** database **********
+
+	/**
+	 * Return the data source the JPA project is mapped to.
+	 */
+	JpaDataSource getDataSource();
+
+	/**
+	 * Return the JPA project's connection.
+	 * The connection profile is null if the JPA project's connection profile
+	 * name does not match the name of a DTP connection profile.
+	 */
+	ConnectionProfile getConnectionProfile();
+
+	/**
+	 * Return the JPA project's default database schema container;
+	 * which is either the JPA project's default catalog or the JPA project's
+	 * database, depending on how the DTP model is implemented.
+	 */
+	SchemaContainer getDefaultDbSchemaContainer();
+
+	/**
+	 * Return the JPA project's default catalog; which is either the user
+	 * override catalog or the database's default catalog.
+	 */
+	String getDefaultCatalog();
+
+	/**
+	 * Return the JPA project's default database catalog.
+	 * @see #getDefaultCatalog()
+	 */
+	Catalog getDefaultDbCatalog();
+
+	/**
+	 * Return the JPA project's default schema; which can be one of the
+	 * following:<ul>
+	 * <li>the user override schema
+	 * <li>the default catalog's default schema
+	 * <li>the database's default schema (if catalogs are not supported)
+	 * </ul>
+	 */
+	String getDefaultSchema();
+
+	/**
+	 * Return the JPA project's default database schema.
+	 * @see #getDefaultSchema()
+	 * @see #getDefaultDbSchemaContainer()
+	 */
+	Schema getDefaultDbSchema();
+
+
+	// ********** user override default catalog **********
+
+	/** 
+	 * ID string used when the JPA project's user override default catalog changes.
+	 * @see #addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	String USER_OVERRIDE_DEFAULT_CATALOG_PROPERTY = "userOverrideDefaultCatalog"; //$NON-NLS-1$
+
+	/**
+	 * Return the <em>identifier</em> of the catalog to be used as a default
+	 * for the JPA project instead of the one that is associated by default
+	 * with the connection profile.
+	 * @return The catalog identifier. May be null (implying the connection profile
+	 * default catalog should be used).
+	 */
+	String getUserOverrideDefaultCatalog();
+
+	/**
+	 * Set the <em>identifier</em> of the catalog to be used as a default
+	 * for the JPA project instead of the one that is associated by default
+	 * with the connection profile.
+	 * @parameter catalog The catalog identifier. May be null (implying the connection profile
+	 * default catalog should be used).
+	 */
+	void setUserOverrideDefaultCatalog(String catalog);
+
+
+	// ********** user override default schema **********
+
+	/** 
+	 * ID string used when the JPA project's user override default schema changes.
+	 * @see #addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	String USER_OVERRIDE_DEFAULT_SCHEMA_PROPERTY = "userOverrideDefaultSchema"; //$NON-NLS-1$
+
+	/**
+	 * Return the <em>identifier</em> of the schema to be used as a default
+	 * for the JPA project instead of the one that is associated by default
+	 * with the connection profile.
+	 * @return The schema identifier. May be null (implying the connection profile
+	 * default schema should be used).
+	 */
+	String getUserOverrideDefaultSchema();
+
+	/**
+	 * Set the <em>identifier</em> of the schema to be used as a default
+	 * for the JPA project instead of the one that is associated by default
+	 * with the connection profile.
+	 * @parameter schema The schema identifier. May be null (implying the connection profile
+	 * default schema should be used).
+	 */
+	void setUserOverrideDefaultSchema(String schema);
+
+
+	// ********** discover annotated classes **********
+
+	/** 
+	 * ID string used when discoversAnnotatedClasses property is changed.
+	 * @see #addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	String DISCOVERS_ANNOTATED_CLASSES_PROPERTY = "discoversAnnotatedClasses"; //$NON-NLS-1$
+
+	/**
+	 * Return whether the JPA project will "discover" annotated classes
+	 * automatically, as opposed to requiring the classes to be listed in the
+	 * persistence.xml or one of its mapping files.
+	 * This is a user-specified preference that is probably
+	 * only helpful when deploying to a JavaSE environment. The JPA spec
+	 * says annotated classes are to be discovered automatically in a JavaEE
+	 * environment; while the managed persistence classes must be explicitly
+	 * listed in a JavaSE environment: "A list of all named managed persistence
+	 * classes must be specified in Java SE environments to insure portability".
+	 * This flag allows Dali to behave consistently with the user's JPA
+	 * implementation, which may allow "discovery" in a JavaSE environment
+	 * (e.g. EclipseLink). This setting can also be used when the user wants
+	 * to explicitly list classes, even when the classes are "discovered"
+	 * by the JPA implementation. If this flag is set to false, error messages
+	 * will be generated for all of the annotated classes that are not
+	 * explicitly listed.
+	 */
+	boolean discoversAnnotatedClasses();
+
+	/**
+	 * Set whether the JPA project will "discover" annotated classes
+	 * automatically, as opposed to requiring the classes to be listed in the
+	 * persistence.xml.
+	 */
+	void setDiscoversAnnotatedClasses(boolean discoversAnnotatedClasses);
+
+
+	// ********** modifying shared documents **********
+
+	/**
+	 * Set a thread-specific implementation of the {@link CommandExecutor}
+	 * interface that will be used to execute a command to modify a shared
+	 * document. If necessary, the command executor can be cleared by
+	 * setting it to null.
+	 * This allows background clients to modify documents that are
+	 * already present in the UI. See implementations of {@link CommandExecutor}.
+	 */
+	void setThreadLocalModifySharedDocumentCommandExecutor(CommandExecutor commandExecutor);
+
+	/**
+	 * Return the project-wide implementation of the
+	 * {@link CommandExecutor} interface.
+	 */
+	CommandExecutor getModifySharedDocumentCommandExecutor();
+
+
+	// ********** construction config **********
+
+	/**
+	 * The settings used to construct a JPA project.
+	 */
+	interface Config {
+
+		/**
+		 * Return the Eclipse project to be associated with the new JPA project.
+		 */
+		IProject getProject();
+
+		/**
+		 * Return the JPA platform to be associated with the new JPA project.
+		 */
+		JpaPlatform getJpaPlatform();
+
+		/**
+		 * Return the name of the connection profile to be associated
+		 * with the new JPA project. (This connection profile wraps a DTP
+		 * connection profile.)
+		 */
+		String getConnectionProfileName();
+
+		/**
+		 * Return the catalog to use instead of the connection profile's
+		 * default catalog.
+		 * May be null.
+		 */
+		String getUserOverrideDefaultCatalog();
+
+		/**
+		 * Return the name of the schema to use instead of the default schema
+		 * of the connection profile.
+		 * May be null.
+		 */
+		String getUserOverrideDefaultSchema();
+
+		/**
+		 * Return whether the new JPA project is to "discover" annotated
+		 * classes.
+		 */
+		boolean discoverAnnotatedClasses();
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaProjectManager.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaProjectManager.java
new file mode 100644
index 0000000..88e70ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaProjectManager.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jpt.utility.model.Model;
+
+/**
+ * The JPA project manager holds all the JPA projects in the workspace.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaProjectManager
+	extends Model {
+
+	/**
+	 * Return the JPA model's JPA projects.
+	 */
+	Iterable<JpaProject> getJpaProjects();
+		public static final String JPA_PROJECTS_COLLECTION = "jpaProjects"; //$NON-NLS-1$
+
+	/**
+	 * Return the size of the JPA model's list of JPA projects.
+	 */
+	int getJpaProjectsSize();
+
+	/**
+	 * Return the JPA project corresponding to the specified Eclipse project.
+	 * Return null if unable to associate the specified Eclipse project
+	 * with a JPA project.
+	 */
+	JpaProject getJpaProject(IProject project);
+
+	/**
+	 * Return the JPA file corresponding to the specified Eclipse file,
+	 * or null if unable to associate the specified file with a JPA file.
+	 */
+	JpaFile getJpaFile(IFile file);
+
+	/**
+	 * The JPA settings associated with the specified Eclipse project
+	 * have changed in such a way as to require the associated
+	 * JPA project to be completely rebuilt
+	 * (e.g. when the user changes a project's JPA platform).
+	 */
+	void rebuildJpaProject(IProject project);
+
+	/**
+	 * Return whether the model's Java change listener is active.
+	 */
+	boolean javaElementChangeListenerIsActive();
+
+	/**
+	 * Set whether the model's Java change listener is active.
+	 */
+	void setJavaElementChangeListenerIsActive(boolean javaElementChangeListenerIsActive);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModel.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModel.java
new file mode 100644
index 0000000..c516342
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModel.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+/**
+ * Listeners are notified whenever anything in the JPA resource model changes.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JpaResourceModel {
+
+	/**
+	 * Return the resource type of the model.  This may potentially change.
+	 * Return null if it cannot be determined, the content type or version is null.
+	 */
+	JpaResourceType getResourceType();
+
+	/**
+	 * Changes to the resource model result in events.
+	 * In particular, the JPA project performs an "update" whenever a resource
+	 * model changes.
+	 */
+	void addResourceModelListener(JpaResourceModelListener listener);
+
+	/**
+	 * @see #addResourceModelListener(ResourceModelListener)
+	 */
+	void removeResourceModelListener(JpaResourceModelListener listener);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModelListener.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModelListener.java
new file mode 100644
index 0000000..233485c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModelListener.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import java.util.EventListener;
+
+/**
+ * The listener is notified whenever anything in the JPA resource model changes.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JpaResourceModelListener
+	extends EventListener
+{
+	void resourceModelChanged(JpaResourceModel jpaResourceModel);
+	
+	void resourceModelReverted(JpaResourceModel jpaResourceModel);
+	
+	void resourceModelUnloaded(JpaResourceModel jpaResourceModel);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModelProvider.java
new file mode 100644
index 0000000..9d78132
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceModelProvider.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * Map a content type to a JPA resource model.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JpaResourceModelProvider 
+{
+	/**
+	 * Return the file content type the provider is for.
+	 */
+	IContentType getContentType();
+
+	/**
+	 * Build a JPA resource model for the specified JPA project and file.
+	 * Use the specified factory for creation so extenders can simply override
+	 * the appropriate creation method instead of building a provider for the
+	 * same content.
+	 */
+	JpaResourceModel buildResourceModel(JpaProject jpaProject, IFile file);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceType.java
new file mode 100644
index 0000000..037a0f3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaResourceType.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.core.runtime.content.IContentType;
+
+/**
+ * Describes the file content type and version for JPA resources.
+ * This is a value object that defines an {@link #equals(Object)} method.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public class JpaResourceType
+{
+	private final IContentType contentType;
+
+	private final String version;
+
+
+	/**
+	 * Version used when version can not be determined or when there is no
+	 * sense of version (e.g. Java).
+	 */
+	public static final String UNDETERMINED_VERSION = "<undetermined>"; //$NON-NLS-1$
+
+
+	public JpaResourceType(IContentType contentType) {
+		this(contentType, UNDETERMINED_VERSION);
+	}
+
+	public JpaResourceType(IContentType contentType, String version) {
+		super();
+		if (contentType == null) {
+			throw new NullPointerException("content type"); //$NON-NLS-1$
+		}
+		if (version == null) {
+			throw new NullPointerException("version"); //$NON-NLS-1$
+		}
+		this.contentType = contentType;
+		this.version = version;
+	}
+
+
+	public IContentType getContentType() {
+		return this.contentType;
+	}
+
+	public String getVersion() {
+		return this.version;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (obj == this) {
+			return true;
+		}
+		if ((obj == null) || (obj.getClass() != this.getClass())) {
+			return false;
+		}
+		JpaResourceType other = (JpaResourceType) obj;
+		return this.contentType.equals(other.contentType) && this.version.equals(other.version);
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int hash = 17;
+		hash = hash * prime + this.contentType.hashCode();
+		hash = hash * prime + this.version.hashCode();
+		return hash;
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		sb.append(this.getClass().getSimpleName());
+		sb.append("(content = "); //$NON-NLS-1$
+		sb.append(this.contentType);
+		sb.append(", "); //$NON-NLS-1$
+		sb.append("version = "); //$NON-NLS-1$
+		sb.append(this.version);
+		sb.append(')');
+		return sb.toString();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaStructureNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaStructureNode.java
new file mode 100644
index 0000000..75959b3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaStructureNode.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+/**
+ * Implement this interface for objects that appear in the Structure view
+ * This is used by JpaSelection to determine selection in the editor.
+ * Details pages are also provided for each JpaStructureNode.
+ * 
+ * I did not implement JpaContextNode and I'm not even sure we should implement
+ * JpaNode.  It is possibly someone could want a structure node that is
+ * not actually a contextNode in the model.//TODO
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JpaStructureNode
+	extends JpaNode
+{
+	/**
+	 * Return the structure node at the given offset.
+	 */
+	JpaStructureNode getStructureNode(int textOffset);
+	
+	/**
+	 * Return the text range to be used to select text in the editor
+	 * corresponding to this node.
+	 */
+	TextRange getSelectionTextRange();
+	
+	/**
+	 * Return a unique identifier for all of this class of structure nodes
+	 */
+	String getId();
+	
+	/**
+	 * Return the content type of the structure node's resource.
+	 * This is used to find the appropriate ui provider for building composites 
+	 */
+	JpaResourceType getResourceType();
+
+	/**
+	 * Dispose of this structureNode and dispose of child structureNodes.
+	 * Typically this would be used to update the JpaFile rootStructureNodes.
+	 */
+	void dispose();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JptCorePlugin.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JptCorePlugin.java
new file mode 100644
index 0000000..eae7089
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JptCorePlugin.java
@@ -0,0 +1,807 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+import javax.xml.parsers.SAXParserFactory;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jpt.core.internal.GenericJpaPlatformProvider;
+import org.eclipse.jpt.core.internal.JpaPlatformRegistry;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.core.internal.jpa2.Generic2_0JpaPlatformProvider;
+import org.eclipse.jpt.core.internal.prefs.JpaPreferenceInitializer;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jst.j2ee.internal.J2EEConstants;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The Dali core plug-in lifecycle implementation.
+ * A number of globally-available constants and methods.
+ * <p>
+ * Provisional API: This class is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public class JptCorePlugin extends Plugin {
+
+	private volatile GenericJpaProjectManager jpaProjectManager;
+	private volatile ServiceTracker parserTracker;
+	private static volatile boolean flushPreferences = true;
+
+
+	// ********** public constants **********
+
+	/**
+	 * The plug-in identifier of the persistence support
+	 * (value <code>"org.eclipse.jpt.core"</code>).
+	 */
+	public static final String PLUGIN_ID = "org.eclipse.jpt.core";  //$NON-NLS-1$
+	public static final String PLUGIN_ID_ = PLUGIN_ID + '.';
+
+	/**
+	 * The identifier for the JPA facet
+	 * (value <code>"jpt.jpa"</code>).
+	 */
+	public static final String FACET_ID = "jpt.jpa";  //$NON-NLS-1$
+	
+	/**
+	 * Version string for JPA facet version 1.0
+	 */
+	public static final String JPA_FACET_VERSION_1_0 = "1.0";  //$NON-NLS-1$
+	
+	/**
+	 * Version string for JPA facet version 2.0
+	 */
+	public static final String JPA_FACET_VERSION_2_0 = "2.0";  //$NON-NLS-1$
+	
+	/**
+	 * The key for storing a JPA project's platform ID in the Eclipse
+	 * project's preferences.
+	 */
+	private static final String JPA_PLATFORM_PREF_KEY = PLUGIN_ID_ + "platform";  //$NON-NLS-1$
+
+	/**
+	 * The old key for storing the default JPA platform ID in the workspace preferences.
+	 * @deprecated  As of version 2.3.  Instead use {@link #DEFAULT_JPA_PLATFORM_1_0_PREF_KEY} or 
+	 * 		{@link #DEFAULT_JPA_PLATFORM_2_0_PREF_KEY}
+	 */
+	@Deprecated
+	public static final String DEFAULT_JPA_PLATFORM_PREF_KEY = "defaultJpaPlatform"; //$NON-NLS-1$
+	
+	/**
+	 * The key for storing the default JPA platform ID for JPA 1.0 in the workspace preferences.
+	 */
+	public static final String DEFAULT_JPA_PLATFORM_1_0_PREF_KEY = 
+			DEFAULT_JPA_PLATFORM_PREF_KEY + "_" + JPA_FACET_VERSION_1_0; //$NON-NLS-1$
+	
+	/**
+	 * The key for storing the default JPA platform ID for JPA 2.0 in the workspace preferences.
+	 */
+	public static final String DEFAULT_JPA_PLATFORM_2_0_PREF_KEY = 
+			DEFAULT_JPA_PLATFORM_PREF_KEY + "_" + JPA_FACET_VERSION_2_0; //$NON-NLS-1$
+	
+	/**
+	 * The key for storing a JPA project's "discover" flag in the Eclipse
+	 * project's preferences.
+	 */
+	public static final String DISCOVER_ANNOTATED_CLASSES = PLUGIN_ID_ + "discoverAnnotatedClasses";  //$NON-NLS-1$
+
+	/**
+	 * The key for storing the name of a JPA project's metamodel source folder
+	 * in the Eclipse project's preferences.
+	 */
+	public static final String METAMODEL_SOURCE_FOLDER_NAME = PLUGIN_ID_ + "metamodelSourceFolderName";  //$NON-NLS-1$
+
+	/**
+	 * The key for storing a JPA project's data source connection profile name
+	 * in the Eclipse project's persistent properties.
+	 */
+	public static final QualifiedName DATA_SOURCE_CONNECTION_PROFILE_NAME = 
+			new QualifiedName(PLUGIN_ID, "dataSource.connectionProfileName");  //$NON-NLS-1$
+
+	/**
+	 * The key for storing a JPA project's user overridden default catalog name
+	 * in the Eclipse project's persistent properties.
+	 */
+	public static final QualifiedName USER_OVERRIDE_DEFAULT_CATALOG = 
+		new QualifiedName(PLUGIN_ID, "userOverrideDefaultCatalogName");  //$NON-NLS-1$
+
+	/**
+	 * The key for storing a JPA project's user overridden default schema name
+	 * in the Eclipse project's persistent properties.
+	 */
+	public static final QualifiedName USER_OVERRIDE_DEFAULT_SCHEMA = 
+			new QualifiedName(PLUGIN_ID, "userOverrideDefaultSchemaName");  //$NON-NLS-1$
+
+	/**
+	 * The identifier for the JPA validator
+	 * (value <code>"org.eclipse.jpt.core.jpaValidator"</code>).
+	 */
+	public static final String VALIDATOR_ID = PLUGIN_ID_ + "jpaValidator";  //$NON-NLS-1$
+
+	/**
+	 * The content type for Java source code files.
+	 */
+	public static final IContentType JAVA_SOURCE_CONTENT_TYPE = getContentType(JavaCore.JAVA_SOURCE_CONTENT_TYPE);
+	
+	/**
+	 * The resource type for Java source code files
+	 */
+	public static final JpaResourceType JAVA_SOURCE_RESOURCE_TYPE = new JpaResourceType(JAVA_SOURCE_CONTENT_TYPE);
+	
+	/**
+	 * The content type for <code>persistence.xml</code> files.
+	 */
+	public static final IContentType PERSISTENCE_XML_CONTENT_TYPE = getJpaContentType("persistence"); //$NON-NLS-1$
+	
+	/**
+	 * The resource type for <code>persistence.xml</code> version 1.0 files
+	 */
+	public static final JpaResourceType PERSISTENCE_XML_1_0_RESOURCE_TYPE = 
+			new JpaResourceType(PERSISTENCE_XML_CONTENT_TYPE, org.eclipse.jpt.core.resource.persistence.JPA.SCHEMA_VERSION);
+	
+	/**
+	 * The resource type for <code>persistence.xml</code> version 2.0 files
+	 */
+	public static final JpaResourceType PERSISTENCE_XML_2_0_RESOURCE_TYPE = 
+			new JpaResourceType(PERSISTENCE_XML_CONTENT_TYPE, org.eclipse.jpt.core.resource.persistence.v2_0.JPA2_0.SCHEMA_VERSION);
+	
+	/**
+	 * The base content type for all mapping files.
+	 */
+	public static final IContentType MAPPING_FILE_CONTENT_TYPE = getJpaContentType("mappingFile"); //$NON-NLS-1$
+
+	/**
+	 * The content type for <code>orm.xml</code> mapping files.
+	 */
+	public static final IContentType ORM_XML_CONTENT_TYPE = getJpaContentType("orm"); //$NON-NLS-1$
+	
+	/**
+	 * The resource type for <code>orm.xml</code> version 1.0 mapping files
+	 */
+	public static final JpaResourceType ORM_XML_1_0_RESOURCE_TYPE = 
+			new JpaResourceType(ORM_XML_CONTENT_TYPE, org.eclipse.jpt.core.resource.orm.JPA.SCHEMA_VERSION);
+	
+	/**
+	 * The resource type for <code>orm.xml</code> version 2.0 mapping files
+	 */
+	public static final JpaResourceType ORM_XML_2_0_RESOURCE_TYPE = 
+			new JpaResourceType(ORM_XML_CONTENT_TYPE, org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0.SCHEMA_VERSION);
+	
+	/**
+	 * The content type for Java archives (JARs).
+	 */
+	public static final IContentType JAR_CONTENT_TYPE = getJpaContentType("jar"); //$NON-NLS-1$
+	
+	/**
+	 * The resource type for Java archives (JARs).
+	 */
+	public static final JpaResourceType JAR_RESOURCE_TYPE = new JpaResourceType(JAR_CONTENT_TYPE);
+	
+	/**
+	 * Web projects have some special exceptions.
+	 */
+	public static final String WEB_PROJECT_FACET_ID = IModuleConstants.JST_WEB_MODULE;
+
+	/**
+	 * Web projects have some special exceptions.
+	 */
+	public static final String WEB_PROJECT_DEPLOY_PREFIX = J2EEConstants.WEB_INF_CLASSES;
+
+	public static final String DEFAULT_PERSISTENCE_XML_FILE_PATH = "META-INF/persistence.xml"; //$NON-NLS-1$
+
+	public static final String DEFAULT_ORM_XML_FILE_PATH = "META-INF/orm.xml"; //$NON-NLS-1$
+	
+	private static IContentType getJpaContentType(String jpaContentType) {
+		return getContentType(CONTENT_PREFIX_ + jpaContentType);
+	}
+	
+	public static final String CONTENT_PREFIX = PLUGIN_ID_ + "content"; //$NON-NLS-1$
+	
+	public static final String CONTENT_PREFIX_ = CONTENT_PREFIX + '.';
+	
+	private static IContentType getContentType(String contentType) {
+		return Platform.getContentTypeManager().getContentType(contentType);
+	}
+	
+	
+	// ********** singleton **********
+
+	private static JptCorePlugin INSTANCE;
+
+	/**
+	 * Return the singleton Dali core plug-in.
+	 */
+	public static JptCorePlugin instance() {
+		return INSTANCE;
+	}
+
+
+	// ********** public static methods **********
+
+	/**
+	 * Return the singular JPA project manager corresponding
+	 * to the current workspace.
+	 */
+	public static JpaProjectManager getJpaProjectManager() {
+		return INSTANCE.getJpaProjectManager_();
+	}
+
+	/**
+	 * Return the JPA project corresponding to the specified Eclipse project,
+	 * or <code>null</code> if unable to associate the specified project with a
+	 * JPA project.
+	 */
+	public static JpaProject getJpaProject(IProject project) {
+		return getJpaProjectManager().getJpaProject(project);
+	}
+
+	/**
+	 * Return the JPA file corresponding to the specified Eclipse file,
+	 * or <code>null</code> if unable to associate the specified file with a JPA file.
+	 */
+	public static JpaFile getJpaFile(IFile file) {
+		return getJpaProjectManager().getJpaFile(file);
+	}
+
+	/**
+	 * The JPA settings associated with the specified Eclipse project
+	 * have changed in such a way as to require the associated
+	 * JPA project to be completely rebuilt
+	 * (e.g. when the user changes a project's JPA platform).
+	 */
+	public static void rebuildJpaProject(IProject project) {
+		getJpaProjectManager().rebuildJpaProject(project);
+	}
+
+	/**
+	 * Return whether the specified Eclipse project has a JPA facet.
+	 */
+	public static boolean projectHasJpaFacet(IProject project) {
+		return projectHasFacet(project, FACET_ID);
+	}
+
+	/**
+	 * Return whether the specified Eclipse project has a Web facet.
+	 */
+	public static boolean projectHasWebFacet(IProject project) {
+		return projectHasFacet(project, WEB_PROJECT_FACET_ID);
+	}
+	
+	/**
+	 * Return whether the specified Eclipse project has a Plug-in nature.
+	 */
+	public static boolean projectHasPluginNature(IProject project) {
+		try {
+			return project.hasNature("org.eclipse.pde.PluginNature");
+		}
+		catch (CoreException ce) {
+			// fall through
+			log(ce);
+		}
+		return false;
+	}
+
+	/**
+	 * Checked exceptions bite.
+	 */
+	private static boolean projectHasFacet(IProject project, String facetId) {
+		try {
+			return FacetedProjectFramework.hasProjectFacet(project, facetId);
+		} catch (CoreException ex) {
+			log(ex);  // problems reading the project metadata - assume facet doesn't exist - return 'false'
+			return false;
+		}
+	}
+
+	/**
+	 * Return the <code>persistence.xml</code> (specified as <code>"META-INF/persistence.xml"</code>)
+	 * deployment URI for the specified project.
+	 */
+	public static String getPersistenceXmlDeploymentURI(IProject project) {
+		return getDeploymentURI(project, DEFAULT_PERSISTENCE_XML_FILE_PATH);
+	}
+
+	/**
+	 * Return the default mapping file (specified as <code>"META-INF/orm.xml"</code>)
+	 * deployment URI for the specified project.
+	 */
+	public static String getDefaultOrmXmlDeploymentURI(IProject project) {
+		return getDeploymentURI(project, DEFAULT_ORM_XML_FILE_PATH);
+	}
+
+	/**
+	 * Return the mapping file (specified as {@code"META-INF/<mappingFileName>"})
+	 * deployment URI for the specified project.
+	 */
+	public static String getOrmXmlDeploymentURI(IProject project, String mappingFileName) {
+		return getDeploymentURI(project, mappingFileName);
+	}
+
+	/**
+	 * Tweak the specified deployment URI if the specified project
+	 * has a Web facet.
+	 */
+	public static String getDeploymentURI(IProject project, String defaultURI) {
+		return (projectHasWebFacet(project) && ! projectHasPluginNature(project))
+				? WEB_PROJECT_DEPLOY_PREFIX + '/' + defaultURI
+				: defaultURI;
+	}
+
+	/**
+	 * Return the deployment path to which JARs are relatively specified for 
+	 * the given project.
+	 * (Web projects have a different deployment structure than non-web projects.)
+	 */
+	public static IPath getJarDeploymentRootPath(IProject project) {
+		return new Path(getJarDeploymentRootPathName(project));
+	}
+
+	private static String getJarDeploymentRootPathName(IProject project) {
+		return projectHasWebFacet(project) ? ("/" + J2EEConstants.WEB_INF) : "/"; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public static IFile getPlatformFile(IProject project, String defaultURI) {
+		IPath deploymentPath = new Path(getDeploymentURI(project, defaultURI));
+		IVirtualFile vFile = ComponentCore.createFile(project, deploymentPath);
+		return vFile.getUnderlyingFile();
+
+	}
+
+	public static JpaFile getJpaFile(IProject project, String defaultURI) {
+		IFile xmlFile = getPlatformFile(project, defaultURI);
+		return xmlFile.exists() ? getJpaFile(xmlFile) : null;
+	}
+
+	public static void initializeDefaultPreferences() {
+		IEclipsePreferences node = getDefaultPreferences();
+
+		// default JPA platforms
+		String defaultPlatformId_1_0 = JpaPlatformRegistry.instance().getDefaultJpaPlatformId(JPA_FACET_VERSION_1_0);
+		if (StringTools.stringIsEmpty(defaultPlatformId_1_0)) {
+			defaultPlatformId_1_0 = GenericJpaPlatformProvider.ID;
+		}
+		node.put(DEFAULT_JPA_PLATFORM_1_0_PREF_KEY, defaultPlatformId_1_0);
+		
+		String defaultPlatformId_2_0 = JpaPlatformRegistry.instance().getDefaultJpaPlatformId(JPA_FACET_VERSION_2_0);
+		if (StringTools.stringIsEmpty(defaultPlatformId_2_0)) {
+			defaultPlatformId_2_0 = Generic2_0JpaPlatformProvider.ID;
+		}
+		node.put(DEFAULT_JPA_PLATFORM_2_0_PREF_KEY, defaultPlatformId_2_0);
+	}
+
+	/**
+	 * Return the default Dali preferences
+	 * @see JpaPreferenceInitializer
+	 */
+	public static IEclipsePreferences getDefaultPreferences() {
+		return getPreferences(new DefaultScope());
+	}
+
+	/**
+	 * Return the Dali preferences for the current workspace instance.
+	 */
+	public static IEclipsePreferences getWorkspacePreferences() {
+		return getPreferences(new InstanceScope());
+	}
+
+	/**
+	 * Return the Dali preferences for the specified Eclipse project.
+	 */
+	public static IEclipsePreferences getProjectPreferences(IProject project) {
+		return getPreferences(new ProjectScope(project));
+	}
+
+	/**
+	 * Return the Dali preferences for the specified context.
+	 */
+	private static IEclipsePreferences getPreferences(IScopeContext context) {
+		return context.getNode(PLUGIN_ID);
+	}
+	
+	/**
+	 * Return the default JPA Platform ID for new JPA projects with the given JPA facet version.
+	 */
+	public static String getDefaultJpaPlatformId(String jpaFacetVersion) {
+		String defaultPlatformId = 
+				getDefaultJpaPlatformId(jpaFacetVersion, getWorkspacePreferences(), getDefaultPreferences());
+		if (defaultPlatformId == null) {
+			// if the platform ID stored in the workspace prefs is invalid (i.e. null), look in the default prefs
+			defaultPlatformId = getDefaultJpaPlatformId(jpaFacetVersion, getDefaultPreferences());
+		}
+		return defaultPlatformId;
+	}
+	
+	private static String getDefaultJpaPlatformId(String jpaFacetVersion, Preferences ... nodes) {
+		String defaultDefaultPlatformId = 
+				getDefaultJpaPlatformId(jpaFacetVersion, DEFAULT_JPA_PLATFORM_PREF_KEY, null, nodes);
+		String preferenceKey = null;
+		if (jpaFacetVersion.equals(JPA_FACET_VERSION_1_0)) {
+			if (defaultDefaultPlatformId == null) {
+				defaultDefaultPlatformId = GenericJpaPlatformProvider.ID;
+			}
+			preferenceKey = DEFAULT_JPA_PLATFORM_1_0_PREF_KEY; 
+		}
+		else if (jpaFacetVersion.equals(JPA_FACET_VERSION_2_0)) {
+			if (defaultDefaultPlatformId == null) {
+				defaultDefaultPlatformId = Generic2_0JpaPlatformProvider.ID;
+			}
+			preferenceKey = DEFAULT_JPA_PLATFORM_2_0_PREF_KEY;
+		}
+		else {
+			throw new IllegalArgumentException("Illegal JPA facet version: " + jpaFacetVersion); //$NON-NLS-1$
+		}
+		return getDefaultJpaPlatformId(jpaFacetVersion, preferenceKey, defaultDefaultPlatformId, nodes);
+	}
+	
+	private static String getDefaultJpaPlatformId(
+			String jpaFacetVersion, String preferenceKey, String defaultDefault, Preferences ... nodes) {	
+		String defaultPlatformId = Platform.getPreferencesService().get(preferenceKey, defaultDefault, nodes);
+		if (jpaPlatformIdIsValid(defaultPlatformId)
+				&& JpaPlatformRegistry.instance().platformSupportsJpaFacetVersion(defaultPlatformId, jpaFacetVersion)) {
+			return defaultPlatformId;
+		}
+		else if (jpaPlatformIdIsValid(defaultDefault)
+				&& JpaPlatformRegistry.instance().platformSupportsJpaFacetVersion(defaultDefault, jpaFacetVersion)) {
+			return defaultDefault;
+		}
+		return null;
+	}
+	
+	private static boolean jpaPlatformIdIsValid(String platformId) {
+		return JpaPlatformRegistry.instance().containsPlatform(platformId);
+	}
+
+	/**
+	 * Set the default JPA platform ID for creating new JPA projects
+	 */
+	public static void setDefaultJpaPlatformId(String jpaFacetVersion, String platformId) {
+		IEclipsePreferences prefs = getWorkspacePreferences();
+		String preferenceKey = null;
+		if (JPA_FACET_VERSION_1_0.equals(jpaFacetVersion)) {
+			preferenceKey = DEFAULT_JPA_PLATFORM_1_0_PREF_KEY;
+		}
+		else if (JPA_FACET_VERSION_2_0.equals(jpaFacetVersion)) {
+			preferenceKey = DEFAULT_JPA_PLATFORM_2_0_PREF_KEY;
+		}
+		else {
+			throw new IllegalArgumentException("Illegal JPA facet version: " + jpaFacetVersion); //$NON-NLS-1$
+		}
+		prefs.put(preferenceKey, platformId);
+		flush(prefs);
+	}
+
+	/**
+	 * Return the JPA platform associated with the specified Eclipse project.
+	 */
+	public static JpaPlatform getJpaPlatform(IProject project) {
+		return JpaPlatformRegistry.instance().getJpaPlatform(project);
+	}
+
+	/**
+	 * Return the JPA platform ID associated with the specified Eclipse project.
+	 */
+	public static String getJpaPlatformId(IProject project) {
+		return getProjectPreferences(project).get(JPA_PLATFORM_PREF_KEY, GenericJpaPlatformProvider.ID);
+	}
+
+	/**
+	 * Set the JPA platform ID associated with the specified Eclipse project.
+	 */
+	public static void setJpaPlatformId(IProject project, String jpaPlatformId) {
+		IEclipsePreferences prefs = getProjectPreferences(project);
+		prefs.put(JPA_PLATFORM_PREF_KEY, jpaPlatformId);
+		flush(prefs);
+	}
+
+	/**
+	 * Return the preferences key used to look up an Eclipse project's
+	 * JPA platform ID.
+	 */
+	public static String getJpaPlatformIdPrefKey() {
+		return JPA_PLATFORM_PREF_KEY;
+	}
+
+	/**
+	 * Return the JPA "discover" flag associated with the specified
+	 * Eclipse project.
+	 */
+	public static boolean discoverAnnotatedClasses(IProject project) {
+		return getProjectPreferences(project).getBoolean(DISCOVER_ANNOTATED_CLASSES, false);
+	}
+
+	/**
+	 * Set the JPA "discover" flag associated with the specified
+	 * Eclipse project.
+	 */
+	public static void setDiscoverAnnotatedClasses(IProject project, boolean discoverAnnotatedClasses) {
+		IEclipsePreferences prefs = getProjectPreferences(project);
+		prefs.putBoolean(DISCOVER_ANNOTATED_CLASSES, discoverAnnotatedClasses);
+		flush(prefs);
+	}
+
+	/**
+	 * Return the name of the metamodel source folder associated with the
+	 * specified Eclipse project.
+	 */
+	public static String getMetamodelSourceFolderName(IProject project) {
+		return getProjectPreferences(project).get(METAMODEL_SOURCE_FOLDER_NAME, null);
+	}
+
+	/**
+	 * Set the name of the metamodel source folder associated with the
+	 * specified Eclipse project.
+	 */
+	public static void setMetamodelSourceFolderName(IProject project, String metamodelSourceFolderName) {
+		IEclipsePreferences prefs = getProjectPreferences(project);
+		if (metamodelSourceFolderName == null) {
+			prefs.remove(METAMODEL_SOURCE_FOLDER_NAME);
+		}
+		else {
+			prefs.put(METAMODEL_SOURCE_FOLDER_NAME, metamodelSourceFolderName);
+		}
+		flush(prefs);
+	}
+
+	/**
+	 * This method is called (via reflection) when the test plug-in is loaded.
+	 * The prefs end up getting flushed after the test case has deleted the
+	 * project, resulting resource exceptions in the log, e.g.
+	 *     Resource '/JpaProjectManagerTests' is not open.
+	 * @see JptCoreTestsPlugin#start(BundleContext)
+	 */
+	@SuppressWarnings("unused")
+	private static void doNotFlushPreferences() {
+		flushPreferences = false;
+	}
+
+	/**
+	 * Flush preferences in an asynchronous Job because the flush request will
+	 * trigger a lock on the project, which can cause us some deadlocks (e.g.
+	 * when deleting the metamodel source folder).
+	 */
+	private static void flush(IEclipsePreferences prefs) {
+		if (flushPreferences) {
+			new PreferencesFlushJob(prefs).schedule();
+		}
+	}
+
+	private static class PreferencesFlushJob extends Job {
+		private final IEclipsePreferences prefs;
+		PreferencesFlushJob(IEclipsePreferences prefs) {
+			super(NLS.bind(JptCoreMessages.PREFERENCES_FLUSH_JOB_NAME, prefs.absolutePath()));
+			this.prefs = prefs;
+		}
+		@Override
+		protected IStatus run(IProgressMonitor monitor) {
+			try {
+				prefs.flush();
+			} catch(BackingStoreException ex) {
+				log(ex);
+			}
+			return Status.OK_STATUS;
+		}
+	}
+
+	/**
+	 * Return the name of the connection profile associated with the specified
+	 * Eclipse project.
+	 */
+	public static String getConnectionProfileName(IProject project) {
+		try {
+			String connectionProfileName = project.getPersistentProperty(DATA_SOURCE_CONNECTION_PROFILE_NAME);
+			// some old connection profile names were stored as empty strings instead of nulls :-(
+			// convert them here
+			return (StringTools.stringIsEmpty(connectionProfileName)) ? null : connectionProfileName;
+		} catch (CoreException ex) {
+			log(ex);
+			return null;
+		}
+	}
+
+	/**
+	 * Set the name of the connection profile associated with the specified
+	 * Eclipse project.
+	 */
+	public static void setConnectionProfileName(IProject project, String connectionProfileName) {
+		try {
+			project.setPersistentProperty(DATA_SOURCE_CONNECTION_PROFILE_NAME, connectionProfileName);
+		} catch (CoreException ex) {
+			log(ex);
+		}
+	}
+
+	/**
+	 * Return the default catalog (identifier) associated with the specified Eclipse project.
+	 * @see JpaProject#getUserOverrideDefaultCatalog()
+	 */
+	public static String getUserOverrideDefaultCatalog(IProject project) {
+		try {
+			return project.getPersistentProperty(USER_OVERRIDE_DEFAULT_CATALOG);
+		} catch (CoreException ex) {
+			log(ex);
+			return null;
+		}
+	}
+
+	/**
+	 * Set the default catalog (identifier) associated with the specified Eclipse project.
+	 * @see JpaProject#setUserOverrideDefaultCatalog(String)
+	 */
+	public static void setUserOverrideDefaultCatalog(IProject project, String defaultCatalog) {
+		try {
+			project.setPersistentProperty(USER_OVERRIDE_DEFAULT_CATALOG, defaultCatalog);
+		} catch (CoreException ex) {
+			log(ex);
+		}
+	}
+
+	/**
+	 * Return the default schema (identifier) associated with the specified Eclipse project.
+	 * @see JpaProject#getUserOverrideDefaultSchema()
+	 */
+	public static String getUserOverrideDefaultSchema(IProject project) {
+		try {
+			return project.getPersistentProperty(USER_OVERRIDE_DEFAULT_SCHEMA);
+		} catch (CoreException ex) {
+			log(ex);
+			return null;
+		}
+	}
+
+	/**
+	 * Set the default schema (identifier) associated with the specified Eclipse project.
+	 * @see JpaProject#setUserOverrideDefaultSchema(String)
+	 */
+	public static void setUserOverrideDefaultSchema(IProject project, String defaultSchema) {
+		try {
+			project.setPersistentProperty(USER_OVERRIDE_DEFAULT_SCHEMA, defaultSchema);
+		} catch (CoreException ex) {
+			log(ex);
+		}
+	}
+
+	public static boolean nodeIsJpa2_0Compatible(JpaNode jpaNode) {
+		return jpaNode.getJpaProject().getJpaPlatform().getJpaVersion().isCompatibleWithJpaVersion(JPA_FACET_VERSION_2_0);
+	}
+
+	/**
+	 * Return whether the JPA project manager's Java change listener is active.
+	 */
+	public static boolean javaElementChangeListenerIsActive() {
+		return getJpaProjectManager().javaElementChangeListenerIsActive();
+	}
+
+	/**
+	 * Set whether the JPA project manager's Java change listener is active.
+	 */
+	public static void setJavaElementChangeListenerIsActive(boolean javaElementChangeListenerIsActive) {
+		getJpaProjectManager().setJavaElementChangeListenerIsActive(javaElementChangeListenerIsActive);
+	}
+
+	/**
+	 * Log the specified status.
+	 */
+	public static void log(IStatus status) {
+        INSTANCE.getLog().log(status);
+    }
+
+	/**
+	 * Log the specified message.
+	 */
+	public static void log(String msg) {
+        log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, null));
+    }
+
+	/**
+	 * Log the specified exception or error.
+	 */
+	public static void log(Throwable throwable) {
+		log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, throwable.getLocalizedMessage(), throwable));
+	}
+
+
+	// ********** plug-in implementation **********
+
+	public JptCorePlugin() {
+		super();
+		if (INSTANCE != null) {
+			throw new IllegalStateException();
+		}
+		// this convention is *wack*...  ~bjv
+		INSTANCE = this;
+	}
+
+
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		// nothing yet...
+	}
+
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		try {
+			if (this.jpaProjectManager != null) {
+				this.jpaProjectManager.stop();
+				this.jpaProjectManager = null;
+			}
+			if (this.parserTracker != null) {
+				this.parserTracker.close();
+				this.parserTracker = null;
+			}
+		} finally {
+			super.stop(context);
+		}
+	}
+
+	private synchronized GenericJpaProjectManager getJpaProjectManager_() {
+		if (this.jpaProjectManager == null) {
+			this.jpaProjectManager = this.buildJpaProjectManager();
+			this.jpaProjectManager.start();
+		}
+		return this.jpaProjectManager;
+	}
+
+	private GenericJpaProjectManager buildJpaProjectManager() {
+		return new GenericJpaProjectManager();
+	}
+
+	public synchronized SAXParserFactory getSAXParserFactory() {
+		SAXParserFactory factory = (SAXParserFactory) this.getParserTracker().getService();
+		if (factory != null) {
+			factory.setNamespaceAware(true);
+		}
+		return factory;
+	}
+
+	private ServiceTracker getParserTracker() {
+		if (this.parserTracker == null) {
+			this.parserTracker = this.buildParserTracker();
+			this.parserTracker.open();
+		}
+		return this.parserTracker;
+	}
+
+	private ServiceTracker buildParserTracker() {
+		return new ServiceTracker(this.getBundle().getBundleContext(), "javax.xml.parsers.SAXParserFactory", null); //$NON-NLS-1$
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/MappingKeys.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/MappingKeys.java
new file mode 100644
index 0000000..bafb1fa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/MappingKeys.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+@SuppressWarnings("nls")
+public interface MappingKeys {
+
+	String ENTITY_TYPE_MAPPING_KEY = "entity";
+	String MAPPED_SUPERCLASS_TYPE_MAPPING_KEY = "mappedSuperclass";
+	String EMBEDDABLE_TYPE_MAPPING_KEY = "embeddable";
+	String NULL_TYPE_MAPPING_KEY = null;
+
+	String BASIC_ATTRIBUTE_MAPPING_KEY = "basic";
+	String ID_ATTRIBUTE_MAPPING_KEY = "id";
+	String VERSION_ATTRIBUTE_MAPPING_KEY = "version";
+	String ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY  = "oneToOne";
+	String ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY = "oneToMany";
+	String MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY = "manyToOne";
+	String MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY = "manyToMany";
+	String EMBEDDED_ATTRIBUTE_MAPPING_KEY = "embedded";
+	String EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY = "embeddedId";
+	String TRANSIENT_ATTRIBUTE_MAPPING_KEY = "transient";
+	String NULL_ATTRIBUTE_MAPPING_KEY = null;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/ResourceDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/ResourceDefinition.java
new file mode 100644
index 0000000..36e58c1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/ResourceDefinition.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core;
+
+/**
+ * A JpaPlatform can support multiple resources.  Each will
+ * have a unique resource type and must be defined with a resource definition.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ResourceDefinition
+{
+	/**
+	 * Return the associated resource type.
+	 */
+	JpaResourceType getResourceType();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AccessHolder.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AccessHolder.java
new file mode 100644
index 0000000..add227e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AccessHolder.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface AccessHolder
+	extends JpaContextNode
+{
+	/**
+	 * Return the access type, whether specified or defaulted.
+	 * This should never return null since at least the default will be set
+	 */
+	AccessType getAccess();
+	
+	/**
+	 * Return the default access type, never null
+	 */
+	AccessType getDefaultAccess();
+
+	/**
+	 * String constant associated with changes to the default access type
+	 */
+	String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$
+
+	/**
+	 * Return the specified access type;
+	 */
+	AccessType getSpecifiedAccess();
+	
+	/**
+	 * Set the specified access type.
+	 */
+	void setSpecifiedAccess(AccessType newSpecifiedAccess);
+
+	/**
+	 * String constant associated with changes to the specified access type
+	 */
+	String SPECIFIED_ACCESS_PROPERTY = "specifiedAccess"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AccessType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AccessType.java
new file mode 100644
index 0000000..05e6ca8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AccessType.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Access Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum AccessType {
+
+	FIELD(
+			org.eclipse.jpt.core.resource.java.AccessType.FIELD,
+			org.eclipse.jpt.core.resource.orm.AccessType.FIELD
+		),
+	PROPERTY(
+			org.eclipse.jpt.core.resource.java.AccessType.PROPERTY,
+			org.eclipse.jpt.core.resource.orm.AccessType.PROPERTY
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.AccessType javaAccessType;
+	private org.eclipse.jpt.core.resource.orm.AccessType ormAccessType;
+
+	AccessType(org.eclipse.jpt.core.resource.java.AccessType javaAccessType, org.eclipse.jpt.core.resource.orm.AccessType ormAccessType) {
+		if (javaAccessType == null) {
+			throw new NullPointerException();
+		}
+		if (ormAccessType == null) {
+			throw new NullPointerException();
+		}
+		this.javaAccessType = javaAccessType;
+		this.ormAccessType = ormAccessType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.AccessType getJavaAccessType() {
+		return this.javaAccessType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.AccessType getOrmAccessType() {
+		return this.ormAccessType;
+	}
+
+
+	// ********** static methods **********
+
+	public static AccessType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.AccessType javaAccessType) {
+		return (javaAccessType == null) ? null : fromJavaResourceModel_(javaAccessType);
+	}
+
+	private static AccessType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.AccessType javaAccessType) {
+		for (AccessType accessType : AccessType.values()) {
+			if (accessType.getJavaAccessType() == javaAccessType) {
+				return accessType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.AccessType toJavaResourceModel(AccessType accessType) {
+		return (accessType == null) ? null : accessType.getJavaAccessType();
+	}
+
+	public static AccessType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.AccessType ormAccessType) {
+		return (ormAccessType == null) ? null : fromOrmResourceModel_(ormAccessType);
+	}
+
+	private static AccessType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.AccessType ormAccessType) {
+		for (AccessType accessType : AccessType.values()) {
+			if (accessType.getOrmAccessType() == ormAccessType) {
+				return accessType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.AccessType toOrmResourceModel(AccessType accessType) {
+		return (accessType == null) ? null : accessType.getOrmAccessType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverride.java
new file mode 100644
index 0000000..51aefb7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverride.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface AssociationOverride
+	extends BaseOverride
+{
+	AssociationOverrideRelationshipReference getRelationshipReference();
+	
+	AssociationOverride.Owner getOwner();
+	
+	AssociationOverride setVirtual(boolean virtual);
+	
+	void initializeFrom(AssociationOverride oldAssociationOverride);
+
+	interface Owner extends BaseOverride.Owner
+	{
+		/**
+		 * Return the relationship mapping with the given attribute name.
+		 * Return null if it does not exist.  This relationship mapping
+		 * will be found in the mapped superclass, not in the owning entity
+		 */
+		RelationshipMapping getRelationshipMapping(String attributeName);
+
+
+		/**
+		 * Return a validation message for the join column referenced column name 
+		 * not resolving to the table. The given text range is for the referenced 
+		 * column name if it is specified or for the relevant owning object.
+		 */
+		IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange);
+
+		/**
+		 * Return a validation message for multiple join columns and the name 
+		 * is unspecified on the given join column. Use the given text range in the message.
+		 */
+		IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange);
+
+		/**
+		 * Return a validation message for multiple join columns and the 
+		 * referenced column name is unspecified on the given join column.
+		 * Use the given text range in the message.
+		 */
+		IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange);
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverrideContainer.java
new file mode 100644
index 0000000..a8f9030
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverrideContainer.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AssociationOverrideContainer
+	extends OverrideContainer 
+{
+
+	// **************** association overrides **************************************
+
+	/**
+	 * Return a list iterator of the association overrides whether specified or default.
+	 * This will not be null.
+	 */
+	<T extends AssociationOverride> ListIterator<T> associationOverrides();
+
+	/**
+	 * Return the number of association overrides, both specified and default.
+	 */
+	int associationOverridesSize();
+
+	/**
+	 * Return a list iterator of the specified association overrides.
+	 * This will not be null.  No add/remove for specified association overrides, the
+	 * virtual association overrides will be populated from superclasses, then use
+	 * {@link AssociationOverride#setVirtual(boolean)} to add/remove the association
+	 * override from the source
+	 */
+	<T extends AssociationOverride> ListIterator<T> specifiedAssociationOverrides();
+
+	/**
+	 * Return the number of specified association overrides.
+	 */
+	int specifiedAssociationOverridesSize();
+
+	/**
+	 * Return the number of default association overrides.
+	 */
+	<T extends AssociationOverride> ListIterator<T> virtualAssociationOverrides();
+
+	/**
+	 * Return the number of default association overrides.
+	 */
+	int virtualAssociationOverridesSize();
+
+	/**
+	 * Move the specified association override from the source index to the target index.
+	 */
+	void moveSpecifiedAssociationOverride(int targetIndex, int sourceIndex);
+		String SPECIFIED_ASSOCIATION_OVERRIDES_LIST = "specifiedAssociationOverrides"; //$NON-NLS-1$
+		String VIRTUAL_ASSOCIATION_OVERRIDES_LIST = "virtualAssociationOverrides"; //$NON-NLS-1$
+
+	/**
+	 * Return the association override, whether specified or default,
+	 * with the given name.
+	 */
+	AssociationOverride getAssociationOverrideNamed(String name);
+	
+	interface Owner extends OverrideContainer.Owner
+	{
+		
+		RelationshipReference resolveRelationshipReference(String associationOverrideName);
+		
+		/**
+		 * Return a validation message for the join column's referenced column name not resolving on the 
+		 * table either specified or default. Use the given text range in the message
+		 */
+		IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange);
+		
+		/**
+		 * Return a validation message for multiple join columns and the name 
+		 * is unspecified on the given join column. Use the given text range in the message.
+		 */
+		IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange);
+		
+		/**
+		 * Return a validation message for multiple join columns and the 
+		 * referenced column name is unspecified on the given join column.
+		 * Use the given text range in the message.
+		 */
+		IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange);
+	}
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..98749aa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AssociationOverrideRelationshipReference.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * An <code>AssociationOverrideRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinColumnJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see AssociationOverride
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AssociationOverrideRelationshipReference 
+	extends 
+		RelationshipReference,
+		JoinColumnEnabledRelationshipReference
+{
+	AssociationOverride getAssociationOverride();
+	
+	void initializeFrom(AssociationOverrideRelationshipReference oldAssociationOverride);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeMapping.java
new file mode 100644
index 0000000..cd0b2a2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeMapping.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+
+/**
+ * JPA attribute mapping.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface AttributeMapping
+	extends JpaContextNode
+{
+	PersistentAttribute getPersistentAttribute();
+	
+	String getName();
+
+	boolean isDefault();
+	
+	/**
+	 * Return a unique key for the attribute mapping.  If this is defined in
+	 * an extension they should be equal.
+	 */
+	String getKey();
+	
+	/**
+	 * Return whether the "attribute" mapping can be overridden.
+	 * Must be a {@link ColumnMapping}
+	 */
+	boolean isOverridableAttributeMapping();
+
+	/**
+	 * Return whether the "association" mapping can be overridden.
+	 * Must be a {@link RelationshipMapping}
+	 */
+	boolean isOverridableAssociationMapping();
+
+	/**
+	 * Return the mapping for the attribute mapping's attribute's type.
+	 */
+	TypeMapping getTypeMapping();
+
+	/**
+	 * If the mapping is for a primary key column, return the column's name,
+	 * otherwise return null.
+	 */
+	String getPrimaryKeyColumnName();
+
+	/**
+	 * Return whether this mapping is the owning side of the relationship.
+	 * Either this is a unidirectional mapping or it is the owning side of a
+	 * bidirectional relationship. If bidirectional, the owning side is the
+	 * side that does not specify 'mappedBy'. The owning side is the side where
+	 * the join table would be specified. If this returns true then the mapping
+	 * will be a RelationshipMapping
+	 */
+	boolean isRelationshipOwner();
+
+	/**
+	 * Return whether the given mapping manages a relationship with this mapping
+	 */
+	boolean isOwnedBy(AttributeMapping mapping);
+	
+	/**
+	 * Return whether any database metadata specific validation should occur.
+	 * (For instance, if the connection is not active, then it should not.)
+	 */
+	boolean shouldValidateAgainstDatabase();
+
+	/**
+	 * This is used for mappedBy choices in a relationship mapping.
+	 * Typically this will just be a single element iterator with the name of the mapping.
+	 * In a 2.0 project, an embedded mapping should return its own name as well as 
+	 * the name of its target Embeddable's mappings with the embedded mapping name 
+	 * prepended : "embedded", "embedded.foo", "embedded.bar".
+	 */
+	Iterator<String> allMappingNames();
+	
+	/**
+	 * This is used to determine the virtual attribute overrides for an embedded mapping
+	 * or an entity. Return an Iterator of all attribute names that can be overridden.
+	 * In a 2.0 project this will include nested attributes that are overridable
+	 * @see isOverridableAttributeMapping()
+	 */
+	Iterator<String> allOverrideableAttributeMappingNames();
+	
+	/**
+	 * This is used to determine the virtual association overrides for an embedded mapping
+	 * or an entity. Return an Iterator of all association names that can be overridden.
+	 * In a 2.0 project this will include nested associations that are overridable
+	 * @see isOverridableAssociationMapping()
+	 */
+	Iterator<String> allOverrideableAssociationMappingNames();
+
+	/**
+	 * Returns this attribute mapping if its name matches the name.
+	 * In 2.0 this name could use dot-notation for nested mappings.
+	 * 2.0 Embedded mappings will have to parse this name and return the appropriate 
+	 * nested attribute mapping.
+	 */
+	AttributeMapping resolveAttributeMapping(String name);
+	
+	/**
+	 * Returns the Column of the overridable attribute mapping with the given 
+	 * attribute name. In 2.0 this name could use dot-notation for nested mappings.
+	 */
+	Column resolveOverriddenColumn(String attributeName);
+
+	RelationshipReference resolveRelationshipReference(String attributeName);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeOverride.java
new file mode 100644
index 0000000..273f0be
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeOverride.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface AttributeOverride
+	extends BaseOverride, Column.Owner
+{
+	Column getColumn();
+	
+	AttributeOverride setVirtual(boolean virtual);
+	
+	interface Owner extends BaseOverride.Owner
+	{
+		/**
+		 * Return the column of the mapping or attribute override with the given attribute name.
+		 * Return null if it does not exist.  This column mapping
+		 * will be found in the mapped superclass (or embeddable), not in the owning entity
+		 */
+		Column resolveOverriddenColumn(String attributeName);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeOverrideContainer.java
new file mode 100644
index 0000000..a6f6275
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/AttributeOverrideContainer.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AttributeOverrideContainer
+	extends OverrideContainer
+{
+
+	// **************** attribute overrides **************************************
+
+	/**
+	 * Return a list iterator of the attribute overrides whether specified or default.
+	 * This will not be null.
+	 */
+	<T extends AttributeOverride> ListIterator<T> attributeOverrides();
+
+	/**
+	 * Return the number of attribute overrides, both specified and default.
+	 */
+	int attributeOverridesSize();
+
+	/**
+	 * Return a list iterator of the specified attribute overrides.
+	 * This will not be null.  No add/remove for specified attribute overrides, the
+	 * virtual attribute overrides will be populated from superclasses, then use
+	 * {@link AttributeOverride#setVirtual(boolean)} to add/remove the attribute
+	 * override from the source
+	 */
+	<T extends AttributeOverride> ListIterator<T> specifiedAttributeOverrides();
+
+	/**
+	 * Return the number of specified attribute overrides.
+	 */
+	int specifiedAttributeOverridesSize();
+
+	/**
+	 * Return a list iterator of the virtual attribute overrides, those not specified.
+	 * This will not be null.
+	 */
+	<T extends AttributeOverride> ListIterator<T> virtualAttributeOverrides();
+
+	/**
+	 * Return the number of default attribute overrides.
+	 */
+	int virtualAttributeOverridesSize();
+
+	/**
+	 * Move the specified attribute override from the source index to the target index.
+	 */
+	void moveSpecifiedAttributeOverride(int targetIndex, int sourceIndex);
+		String SPECIFIED_ATTRIBUTE_OVERRIDES_LIST = "specifiedAttributeOverrides"; //$NON-NLS-1$
+		String VIRTUAL_ATTRIBUTE_OVERRIDES_LIST = "virtualAttributeOverrides"; //$NON-NLS-1$
+
+	/**
+	 * Return the attribute override, whether specified or default,
+	 * with the given name.
+	 */
+	AttributeOverride getAttributeOverrideNamed(String name);
+	
+	interface Owner extends OverrideContainer.Owner
+	{
+		Column resolveOverriddenColumn(String attributeOverrideName);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseColumn.java
new file mode 100644
index 0000000..057248a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseColumn.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface BaseColumn
+	extends NamedColumn
+{
+
+	String getDefaultTable();
+		String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$
+
+	String getSpecifiedTable();
+	void setSpecifiedTable(String value);
+		String SPECIFIED_TABLE_PROPERTY = "specifiedTable"; //$NON-NLS-1$
+
+	
+	boolean isUnique();
+	
+	boolean isDefaultUnique();
+		String DEFAULT_UNIQUE_PROPERTY = "defaultUnique"; //$NON-NLS-1$
+		boolean DEFAULT_UNIQUE = false;
+	Boolean getSpecifiedUnique();
+	void setSpecifiedUnique(Boolean newSpecifiedUnique);
+		String SPECIFIED_UNIQUE_PROPERTY = "specifiedUnique"; //$NON-NLS-1$
+	
+
+	boolean isNullable();
+		
+	boolean isDefaultNullable();
+		String DEFAULT_NULLABLE_PROPERTY = "defaultNullable"; //$NON-NLS-1$
+		boolean DEFAULT_NULLABLE = true;
+	Boolean getSpecifiedNullable();
+	void setSpecifiedNullable(Boolean newSpecifiedNullable);
+		String SPECIFIED_NULLABLE_PROPERTY = "specifiedNullable"; //$NON-NLS-1$
+
+
+	boolean isInsertable();
+	
+	boolean isDefaultInsertable();
+		String DEFAULT_INSERTABLE_PROPERTY = "defaultInsertable"; //$NON-NLS-1$
+		boolean DEFAULT_INSERTABLE = true;
+	Boolean getSpecifiedInsertable();
+	void setSpecifiedInsertable(Boolean newSpecifiedInsertable);
+		String SPECIFIED_INSERTABLE_PROPERTY = "specifiedInsertable"; //$NON-NLS-1$
+	
+	
+	boolean isUpdatable();
+	
+	boolean isDefaultUpdatable();
+		String DEFAULT_UPDATABLE_PROPERTY = "defaultUpdatable"; //$NON-NLS-1$
+		boolean DEFAULT_UPDATABLE = true;
+	Boolean getSpecifiedUpdatable();
+	void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable);
+		String SPECIFIED_UPDATABLE_PROPERTY = "specifiedUpdatable"; //$NON-NLS-1$
+
+	/**
+	 * return whether the column's table is invalid in the given context
+	 */
+	boolean tableNameIsInvalid();
+
+	//TODO This is used by ColumnComposite to get a list of possible associated tables,
+	//but right now that list isn't going to update in the UI except when we repopulate
+	/**
+	 * Return a list of table names that are valid for this column
+	 */
+	Iterator<String> candidateTableNames();
+
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner extends NamedColumn.Owner
+	{
+		
+		/**
+		 * return whether the given table cannot be explicitly specified
+		 * in the column's 'table' element
+		 */
+		boolean tableNameIsInvalid(String tableName);
+		
+		/**
+		 * Return a list of table names that are valid for this column
+		 */
+		Iterator<String> candidateTableNames();
+
+		/**
+		 * Return a validation message for when the specified table is not valid in this context.
+		 * An example is a basic mapping column where a table is specified that is
+		 * not included as table or secondary tables of the owning entity.
+		 */
+		IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange);
+
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseEmbeddedMapping.java
new file mode 100644
index 0000000..a4ef731
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseEmbeddedMapping.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface BaseEmbeddedMapping
+	extends AttributeMapping
+{
+	AttributeOverrideContainer getAttributeOverrideContainer();
+	
+	/**
+	 * Return the Embeddable that matches the type of this mapping.
+	 * If none, return null.
+	 */
+	Embeddable getTargetEmbeddable();
+	
+	/**
+	 * String associated with property change events for the target embeddable
+	 */
+	public final static String TARGET_EMBEDDABLE_PROPERTY = "targetEmbeddable";  //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseJoinColumn.java
new file mode 100644
index 0000000..7481041
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseJoinColumn.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface BaseJoinColumn
+	extends NamedColumn
+{
+	String getReferencedColumnName();
+	String getSpecifiedReferencedColumnName();
+	void setSpecifiedReferencedColumnName(String value);
+		String SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY = "specifiedReferencedColumnName"; //$NON-NLS-1$
+	String getDefaultReferencedColumnName();
+		String DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY = "defaultReferencedColumnName"; //$NON-NLS-1$
+	
+	/**
+	 * Return the wrapper for the datasource referenced column
+	 */
+	Column getReferencedDbColumn();
+
+	/**
+	 * Return whether the reference column is found on the datasource
+	 * @see #getReferencedDbColumn()
+	 */
+	boolean isReferencedColumnResolved();
+
+	/**
+	 * Return the wrapper for the referenced column datasource table
+	 */
+	Table getReferencedColumnDbTable();
+
+	boolean isVirtual();
+
+	interface Owner extends NamedColumn.Owner
+	{
+		/**
+		 * Return the wrapper for the datasource table for the referenced column
+		 */
+		Table getReferencedColumnDbTable();
+		
+		boolean isVirtual(BaseJoinColumn joinColumn);
+		
+		/**
+		 * return the size of the joinColumns collection this join column is a part of
+		 */
+		int joinColumnsSize();
+
+		/**
+		 * On a virtual object validation message for when the column name does not resolve on the table
+		 */
+		IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange);
+
+		/**
+		 * Validation message for when multiple join columns exist and the
+		 * name is not specified and the owner is virtual
+		 */
+		IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange);
+
+		/**
+		 * Validation message for when multiple join columns exist and the 
+		 * referenced column name is not specified and the owner is virtual
+		 */
+		IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseOverride.java
new file mode 100644
index 0000000..3963a1f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BaseOverride.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface BaseOverride
+	extends JpaContextNode
+{
+
+	String getName();
+	void setName(String value);
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+	
+	/**
+	 * Return true if override exists as specified on the owning object, or false
+	 * if the override is "gotten for free" as a result of defaults calculation
+	 */
+	boolean isVirtual();
+
+	/**
+	 * If false, add the given override as a specified override and remove
+	 * it from the list of virtual overrides.  If true, then remove it
+	 * from the specified overrides and add it to the virtual overrides
+	 * as applicable.  Return the new override (whether virtual or specified)
+	 */
+	BaseOverride setVirtual(boolean virtual);
+	
+	interface Owner
+	{
+		/**
+		 * Return the type mapping that this override is contained in
+		 * @return
+		 */
+		TypeMapping getTypeMapping();
+		
+		/**
+		 * Return an Iterator of all attribute names that can be overridden
+		 */
+		Iterator<String> allOverridableAttributeNames();
+
+		/**
+		 * Return whether the given override is virtual. Virtual means that
+		 * it is not specified, but defaulted in from the mapped superclass or
+		 * embeddable.
+		 */
+		boolean isVirtual(BaseOverride override);
+		
+		/**
+		 * If false, add the given override as a specified override and remove
+		 * it from the list of virtual overrides.  If true, then remove it
+		 * from the specified overrides and add it to the virtual overrides
+		 * as applicable.  Return the new override (whether virtual or specified)
+		 */
+		BaseOverride setVirtual(boolean virtual, BaseOverride override);	
+
+		/**
+		 * return whether the given table cannot be explicitly specified
+		 * in the column or join column's 'table' element
+		 */
+		boolean tableNameIsInvalid(String tableName);
+
+		/**
+		 * Return a list of table names that are valid for the overrides column or join columns
+		 */
+		Iterator<String> candidateTableNames();
+
+		/**
+		 * Return the database table for the specified table name
+		 */
+		Table getDbTable(String tableName);
+
+		/**
+		 * Return the name of the table which the column belongs to by default
+		 */
+		String getDefaultTableName();
+
+		/**
+		 * 
+		 */
+		IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange);
+
+		/**
+		 * Return a validation message for the column's name not resolving on the 
+		 * table either specified or default. Use the given text range in the message
+		 */
+		IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange);
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BasicMapping.java
new file mode 100644
index 0000000..893b4bb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/BasicMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface BasicMapping 
+	extends AttributeMapping, ColumnMapping, Fetchable, Nullable, ConvertibleMapping
+{
+	FetchType DEFAULT_FETCH_TYPE = FetchType.EAGER;
+
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Cascade.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Cascade.java
new file mode 100644
index 0000000..dcd7902
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Cascade.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Cascade
+	extends JpaContextNode
+{
+	boolean isAll();
+	void setAll(boolean value);
+		String ALL_PROPERTY = "all"; //$NON-NLS-1$
+	
+	boolean isPersist();
+	void setPersist(boolean value);
+		String PERSIST_PROPERTY = "persist"; //$NON-NLS-1$
+	
+	boolean isMerge();
+	void setMerge(boolean value);
+		String MERGE_PROPERTY = "merge"; //$NON-NLS-1$
+	
+	boolean isRemove();
+	void setRemove(boolean value);
+		String REMOVE_PROPERTY = "remove"; //$NON-NLS-1$
+	
+	boolean isRefresh();
+	void setRefresh(boolean value);
+		String REFRESH_PROPERTY = "refresh"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/CollectionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/CollectionMapping.java
new file mode 100644
index 0000000..038a4b6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/CollectionMapping.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+
+/**
+ * 1:m, m:m, element collection are all collection mappings.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface CollectionMapping
+	extends AttributeMapping, Fetchable
+{
+	FetchType DEFAULT_FETCH_TYPE = FetchType.LAZY;
+
+	Orderable getOrderable();
+	
+	PersistentType getResolvedTargetType();
+
+
+
+	Type getValueType();
+		String VALUE_TYPE_PROPERTY = "valueType"; //$NON-NLS-1$
+
+	Type getKeyType();
+		String KEY_TYPE_PROPERTY = "keyType"; //$NON-NLS-1$
+
+	public enum Type {
+		BASIC_TYPE,
+		EMBEDDABLE_TYPE,
+		ENTITY_TYPE,
+		NO_TYPE
+	}
+
+	//**************** map key *****************
+
+	String getMapKey();
+
+	String getSpecifiedMapKey();
+	void setSpecifiedMapKey(String mapKey);
+		String SPECIFIED_MAP_KEY_PROPERTY = "specifiedMapKey"; //$NON-NLS-1$
+
+	boolean isNoMapKey();
+	void setNoMapKey(boolean noMapKey);
+		String NO_MAP_KEY_PROPERTY = "noMapKey"; //$NON-NLS-1$
+	
+	boolean isPkMapKey();
+	void setPkMapKey(boolean pkMapKey);
+		String PK_MAP_KEY_PROPERTY = "pkMapKey"; //$NON-NLS-1$
+	
+	boolean isCustomMapKey();
+	void setCustomMapKey(boolean customMapKey);
+		String CUSTOM_MAP_KEY_PROPERTY = "customMapKey"; //$NON-NLS-1$
+
+	Iterator<String> candidateMapKeyNames();
+
+	String getMetamodelFieldMapKeyTypeName();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Column.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Column.java
new file mode 100644
index 0000000..c5c4868
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Column.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Column
+	extends BaseColumn
+{
+	int getLength();
+
+	int getDefaultLength();
+		int DEFAULT_LENGTH = 255;
+		String DEFAULT_LENGTH_PROPERTY = "defaultLength"; //$NON-NLS-1$
+
+	Integer getSpecifiedLength();
+	void setSpecifiedLength(Integer newSpecifiedLength);
+		String SPECIFIED_LENGTH_PROPERTY = "specifiedLength"; //$NON-NLS-1$
+		
+	int getPrecision();
+
+	int getDefaultPrecision();
+		int DEFAULT_PRECISION = 0;
+		String DEFAULT_PRECISION_PROPERTY = "defaultPrecision"; //$NON-NLS-1$
+
+	Integer getSpecifiedPrecision();
+	void setSpecifiedPrecision(Integer newSpecifiedPrecision);
+		String SPECIFIED_PRECISION_PROPERTY = "specifiedPrecision"; //$NON-NLS-1$
+
+	
+	int getScale();
+
+	int getDefaultScale();
+		int DEFAULT_SCALE = 0;
+		String DEFAULT_SCALE_PROPERTY = "defaultScale"; //$NON-NLS-1$
+
+	Integer getSpecifiedScale();
+	void setSpecifiedScale(Integer newSpecifiedScale);
+		String SPECIFIED_SCALE_PROPERTY = "specifiedScale"; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ColumnMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ColumnMapping.java
new file mode 100644
index 0000000..ec20c0b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ColumnMapping.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface ColumnMapping
+	extends AttributeMapping, Column.Owner
+{
+	Column getColumn();
+
+} 
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Converter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Converter.java
new file mode 100644
index 0000000..d46548b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Converter.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface Converter extends JpaContextNode
+{
+	/**
+	 * Return a string that represents the type of converter.
+	 * Possibilities are below, NO_CONVERTER, LOB_CONVERTER, ENUMERATED_CONVERTER, TEMPORAL_CONVERTER
+	 */
+	String getType();
+	
+	String NO_CONVERTER = "noConverter"; //$NON-NLS-1$
+	String LOB_CONVERTER = "lobConverter"; //$NON-NLS-1$
+	String ENUMERATED_CONVERTER = "enumeratedConverter"; //$NON-NLS-1$
+	String TEMPORAL_CONVERTER = "temporalConverter"; //$NON-NLS-1$
+	
+	/**
+	 * Remove the Converter from the resource model
+	 */
+	void removeFromResourceModel();
+	
+	/**
+	 * Add the appropriate Converter to the resource model
+	 */
+	void addToResourceModel();
+	
+	
+	//****** covariant overrides ******
+	AttributeMapping getParent();
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ConvertibleMapping.java
new file mode 100644
index 0000000..a71d1c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ConvertibleMapping.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.1
+ */
+
+public interface ConvertibleMapping
+{
+	
+	/**
+	 * Return a converter of type Converter.NO_CONVERTER
+	 * instead of null if no converter is specified.
+	 */
+	Converter getConverter();
+	
+	/**
+	 * Set the converter type, adding the converter to the resource model
+	 * and removing the old converter, if any, from the resource model.  JPA 1.0
+	 * support Enumerated, Lob, and Temporal as converter types.
+	 * {@link Converter#ENUMERATED_CONVERTER}
+	 * {@link Converter#LOB_CONVERTER}
+	 * {@link Converter#TEMPORAL_CONVERTER}
+	 * {@link Converter#NO_CONVERTER}
+	 */
+	void setConverter(String converterType);
+		String CONVERTER_PROPERTY = "converter"; //$NON-NLS-1$
+	
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/DiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/DiscriminatorColumn.java
new file mode 100644
index 0000000..bfd9fe8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/DiscriminatorColumn.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface DiscriminatorColumn
+	extends NamedColumn
+{
+	String DEFAULT_NAME = "DTYPE"; //$NON-NLS-1$
+
+	DiscriminatorType getDiscriminatorType();
+
+	DiscriminatorType getDefaultDiscriminatorType();
+		String DEFAULT_DISCRIMINATOR_TYPE_PROPERTY = "defaultDiscriminatorType"; //$NON-NLS-1$
+		DiscriminatorType DEFAULT_DISCRIMINATOR_TYPE = DiscriminatorType.STRING;
+		
+	DiscriminatorType getSpecifiedDiscriminatorType();
+	void setSpecifiedDiscriminatorType(DiscriminatorType newSpecifiedDiscriminatorType);
+		String SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY = "specifiedDiscriminatorType"; //$NON-NLS-1$
+
+
+	int getLength();
+
+	int getDefaultLength();
+		int DEFAULT_LENGTH = 31;
+		String DEFAULT_LENGTH_PROPERTY = "defaultLength"; //$NON-NLS-1$
+
+	Integer getSpecifiedLength();
+	void setSpecifiedLength(Integer value);
+		String SPECIFIED_LENGTH_PROPERTY = "specifiedLength"; //$NON-NLS-1$
+
+		
+	/**
+	 * Return whether the column is specified in the resource.
+	 */
+	boolean isResourceSpecified();
+		
+	/**
+	 * interface allowing columns to be used in multiple places
+	 */
+	interface Owner extends NamedColumn.Owner {
+		
+		/**
+		 * Return the default discriminator column length
+		 */
+		int getDefaultLength();
+		
+		/**
+		 * Return the default discriminator column type
+		 */
+		DiscriminatorType getDefaultDiscriminatorType();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/DiscriminatorType.java
new file mode 100644
index 0000000..f238d65
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/DiscriminatorType.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Discriminator Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum DiscriminatorType {
+
+	STRING(
+			org.eclipse.jpt.core.resource.java.DiscriminatorType.STRING,
+			org.eclipse.jpt.core.resource.orm.DiscriminatorType.STRING
+		),
+	CHAR(
+			org.eclipse.jpt.core.resource.java.DiscriminatorType.CHAR,
+			org.eclipse.jpt.core.resource.orm.DiscriminatorType.CHAR
+		),
+	INTEGER(
+			org.eclipse.jpt.core.resource.java.DiscriminatorType.INTEGER,
+			org.eclipse.jpt.core.resource.orm.DiscriminatorType.INTEGER
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.DiscriminatorType javaDiscriminatorType;
+	private org.eclipse.jpt.core.resource.orm.DiscriminatorType ormDiscriminatorType;
+
+	DiscriminatorType(org.eclipse.jpt.core.resource.java.DiscriminatorType javaDiscriminatorType, org.eclipse.jpt.core.resource.orm.DiscriminatorType ormDiscriminatorType) {
+		if (javaDiscriminatorType == null) {
+			throw new NullPointerException();
+		}
+		if (ormDiscriminatorType == null) {
+			throw new NullPointerException();
+		}
+		this.javaDiscriminatorType = javaDiscriminatorType;
+		this.ormDiscriminatorType = ormDiscriminatorType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.DiscriminatorType getJavaDiscriminatorType() {
+		return this.javaDiscriminatorType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.DiscriminatorType getOrmDiscriminatorType() {
+		return this.ormDiscriminatorType;
+	}
+
+
+	// ********** static methods **********
+
+	public static DiscriminatorType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.DiscriminatorType javaDiscriminatorType) {
+		return (javaDiscriminatorType == null) ? null : fromJavaResourceModel_(javaDiscriminatorType);
+	}
+
+	private static DiscriminatorType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.DiscriminatorType javaDiscriminatorType) {
+		for (DiscriminatorType discriminatorType : DiscriminatorType.values()) {
+			if (discriminatorType.getJavaDiscriminatorType() == javaDiscriminatorType) {
+				return discriminatorType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.DiscriminatorType toJavaResourceModel(DiscriminatorType discriminatorType) {
+		return (discriminatorType == null) ? null : discriminatorType.getJavaDiscriminatorType();
+	}
+
+	public static DiscriminatorType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.DiscriminatorType ormDiscriminatorType) {
+		return (ormDiscriminatorType == null) ? null : fromOrmResourceModel_(ormDiscriminatorType);
+	}
+
+	private static DiscriminatorType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.DiscriminatorType ormDiscriminatorType) {
+		for (DiscriminatorType discriminatorType : DiscriminatorType.values()) {
+			if (discriminatorType.getOrmDiscriminatorType() == ormDiscriminatorType) {
+				return discriminatorType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.DiscriminatorType toOrmResourceModel(DiscriminatorType discriminatorType) {
+		return (discriminatorType == null) ? null : discriminatorType.getOrmDiscriminatorType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Embeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Embeddable.java
new file mode 100644
index 0000000..ef9d28f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Embeddable.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface Embeddable
+	extends TypeMapping {
+	// nothing yet
+}
+
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EmbeddedIdMapping.java
new file mode 100644
index 0000000..f669ceb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EmbeddedIdMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface EmbeddedIdMapping
+	extends BaseEmbeddedMapping
+{
+	//nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EmbeddedMapping.java
new file mode 100644
index 0000000..bd82e76
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EmbeddedMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface EmbeddedMapping
+	extends BaseEmbeddedMapping
+{
+	//nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Entity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Entity.java
new file mode 100644
index 0000000..094511a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Entity.java
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * Entity
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface Entity
+	extends TypeMapping
+{
+	// **************** name **************************************
+	
+	/**
+	 * Return the name, specified or default if not specified.
+	 */
+	String getName();
+	
+	/**
+	 * Return the specified name.
+	 */
+	String getSpecifiedName();
+	
+	/**
+	 * Set the specified name on the entity.
+	 */
+	void setSpecifiedName(String value);
+		String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$
+	
+	/**
+	 * Return the default name, based on the class name.
+	 */
+	String getDefaultName();
+		String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
+	
+	
+	// **************** id class **********************************************
+ 	
+ 	/**
+ 	 * Return the (aggregate) class reference for configuring and validating id class
+ 	 */
+ 	IdClassReference getIdClassReference();
+ 	
+ 	
+	// **************** table **************************************
+	
+	/**
+	 * Return the table for this entity, either specified or default.
+	 * This will not be null.
+	 */
+	Table getTable();
+	
+	/**
+	 * Return the name of the entity's primary key column.
+	 * Return null if the entity's primary key is "compound"
+	 * (i.e. the primary key is composed of multiple columns).
+	 */
+	String getPrimaryKeyColumnName();
+	
+	/**
+	 * Return the entity's default table name, which depends on the entity's
+	 * inheritance hierarchy.
+	 */
+	String getDefaultTableName();
+	
+	/**
+	 * Return the entity's default schema, which depends on the entity's
+	 * inheritance hierarchy.
+	 */
+	String getDefaultSchema();
+	
+	/**
+	 * Return the entity's default catalog, which depends on the entity's
+	 * inheritance hierarchy.
+	 */
+	String getDefaultCatalog();
+	
+	
+	// **************** secondary tables **************************************
+	
+	/**
+	 * Return a list iterator of the secondary tables whether specified or default.
+	 * This will not be null.
+	 */
+	<T extends SecondaryTable> ListIterator<T> secondaryTables();
+	
+	/**
+	 * Return the number of secondary tables, both specified and default.
+	 */
+	int secondaryTablesSize();
+	
+	/**
+	 * Return a list iterator of the specified secondary tables.
+	 * This will not be null.
+	 */
+	<T extends SecondaryTable> ListIterator<T> specifiedSecondaryTables();
+	
+	/**
+	 * Return the number of specified secondary tables.
+	 */
+	int specifiedSecondaryTablesSize();
+	
+	/**
+	 * Add a specified secondary table to the entity return the object 
+	 * representing it.
+	 */
+	SecondaryTable addSpecifiedSecondaryTable(int index);
+	
+	/**
+	 * Add a specified secondary table to the entity return the object 
+	 * representing it.
+	 */
+	SecondaryTable addSpecifiedSecondaryTable();
+	
+	/**
+	 * Remove the specified secondary table from the entity.
+	 */
+	void removeSpecifiedSecondaryTable(int index);
+	
+	/**
+	 * Remove the specified secondary table at the index from the entity.
+	 */
+	void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable);
+	
+	/**
+	 * Move the specified secondary table from the source index to the target index.
+	 */
+	void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex);
+		String SPECIFIED_SECONDARY_TABLES_LIST = "specifiedSecondaryTables"; //$NON-NLS-1$
+	
+	
+	// **************** inheritance **************************************
+	
+	InheritanceType getInheritanceStrategy();
+	
+	InheritanceType getDefaultInheritanceStrategy();
+		String DEFAULT_INHERITANCE_STRATEGY_PROPERTY = "defaultInheritanceStrategy"; //$NON-NLS-1$
+	
+	InheritanceType getSpecifiedInheritanceStrategy();
+	void setSpecifiedInheritanceStrategy(InheritanceType newInheritanceType);
+		String SPECIFIED_INHERITANCE_STRATEGY_PROPERTY = "specifiedInheritanceStrategy"; //$NON-NLS-1$
+	
+	/**
+	 * The first parent in the class hierarchy that is an entity. 
+	 * This is the parent in the entity (persistent) inheritance hierarchy
+	 * (vs class inheritance hierarchy).  Return null if there is no parent entity.
+	 */
+	Entity getParentEntity();
+	
+	DiscriminatorColumn getDiscriminatorColumn();
+	
+	String getDiscriminatorValue();
+	
+	String getDefaultDiscriminatorValue();
+		String DEFAULT_DISCRIMINATOR_VALUE_PROPERTY = "defaultDiscriminatorValue"; //$NON-NLS-1$
+	
+	String getSpecifiedDiscriminatorValue();
+	void setSpecifiedDiscriminatorValue(String value);
+		String SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY = "specifiedDiscriminatorValue"; //$NON-NLS-1$
+	
+	/** 
+	 * Return whether a DiscriminatorValue is allowed for this Entity.
+	 * It is allowed if the entity is not abstract and not part of 
+	 * a table-per-class inheritance hierarchy
+	 */
+	boolean specifiedDiscriminatorValueIsAllowed();
+ 		String SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY = "discriminatorValueIsAllowed"; //$NON-NLS-1$
+ 	
+	 /**
+	 * Return whether a DiscriminatorValue is undefined for this Entity.
+	 * It is undefined if the entity is abstract or if it
+	 * is part of a table-per-class inheritance hierarchy
+	 */
+	boolean discriminatorValueIsUndefined();
+ 		String DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY = "discriminatorValueIsUndefined"; //$NON-NLS-1$
+ 	
+	/**
+	 * Return whether a DiscriminatorColumn is allowed for this Entity.
+	 * It is allowed if the entity is the root of the inheritance hierarchy (with descendant entities)
+	 * and the strategy is not table-per-class
+	 */
+	boolean specifiedDiscriminatorColumnIsAllowed();
+ 		String SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY = "specifiedDiscriminatorColumnIsAllowed"; //$NON-NLS-1$
+ 	
+	/**
+	 * Return whether a DiscriminatorColumn is undefined for this Entity.
+	 * It is undefined if the inheritance strategy is table-per-class
+	 */
+ 	boolean discriminatorColumnIsUndefined();
+		String DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY = "discriminatorColumnIsUndefined"; //$NON-NLS-1$
+	
+	/**
+	 * Return whether a Table is allowed for this Entity.
+	 * If the inheritance strategy is single-table, Table is allowed only  
+	 * on the root entity.
+	 * If the inheritance strategy is table-per-class it is allowed only
+	 * on concrete entities.
+	 */
+ 	boolean specifiedTableIsAllowed();
+ 		String SPECIFIED_TABLE_IS_ALLOWED_PROPERTY = "specifiedTableIsAllowed"; //$NON-NLS-1$
+ 		
+	/**
+	 * Return whether a Table is undefined for this Entity.
+	 * If the inheritance strategy is table-per-class and the entity is
+	 * abstract, then a Table object is undefined
+	 */
+ 	boolean tableIsUndefined();
+ 		String TABLE_IS_UNDEFINED_PROPERTY = "tableIsUndefined"; //$NON-NLS-1$
+ 	
+ 	
+ 	// **************** primary key join columns ******************************
+ 	
+	<T extends PrimaryKeyJoinColumn> ListIterator<T> primaryKeyJoinColumns();
+	
+	int primaryKeyJoinColumnsSize();
+	
+	<T extends PrimaryKeyJoinColumn> ListIterator<T> specifiedPrimaryKeyJoinColumns();
+		String SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST = "specifiedPrimaryKeyJoinColumns"; //$NON-NLS-1$
+	
+	int specifiedPrimaryKeyJoinColumnsSize();
+	
+	PrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+		String DEFAULT_PRIMARY_KEY_JOIN_COLUMN = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$
+	
+	PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+	
+	void removeSpecifiedPrimaryKeyJoinColumn(int index);
+	
+	void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn);
+	
+	void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex);
+	
+	
+	// ********** misc **********
+	
+	AttributeOverrideContainer getAttributeOverrideContainer();
+	
+	AssociationOverrideContainer getAssociationOverrideContainer();
+		
+	QueryContainer getQueryContainer();
+	
+	GeneratorContainer getGeneratorContainer();
+	
+	
+	// **************** entity inheritance ************************************
+	
+	/**
+	 * Return whether this entity is a root entity in an inheritance hierarchy
+	 */
+	boolean isRoot();
+	
+	/**
+	 * Return the ultimate top of the inheritance hierarchy 
+	 * This method should never return null. The root
+	 * is defined as the persistent type in the inheritance hierarchy
+	 * that has no parent.  The root should be an entity
+	 *  
+	 * Non-entities in the hierarchy should be ignored, ie skip
+	 * over them in the search for the root. 
+	 */
+	Entity getRootEntity();
+	
+	/**
+	 * The given Entity has this entity as its root entity, add
+	 * it as a sub entity.
+	 * @see org.eclipse.jpt.core.context.persistence.PersistenceUnit#addRootWithSubEntities(String)
+	 */
+	void addSubEntity(Entity subEntity);
+	
+	
+	// ************************************************************************
+	
+	/**
+	 * Returns the attribute mapping that matches the name.
+	 * In 2.0 this name could use dot-notation for nested mappings.
+	 */
+	AttributeMapping resolveAttributeMapping(String name);
+	
+	/**
+	 * If an entity has a single id attribute, return that attribute.  
+	 * Else return null.
+	 */
+	PersistentAttribute getIdAttribute();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EnumType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EnumType.java
new file mode 100644
index 0000000..ddb3440
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EnumType.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Enum Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum EnumType {
+
+	ORDINAL(
+			org.eclipse.jpt.core.resource.java.EnumType.ORDINAL,
+			org.eclipse.jpt.core.resource.orm.EnumType.ORDINAL
+		),
+	STRING(
+			org.eclipse.jpt.core.resource.java.EnumType.STRING,
+			org.eclipse.jpt.core.resource.orm.EnumType.STRING
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.EnumType javaEnumType;
+	private org.eclipse.jpt.core.resource.orm.EnumType ormEnumType;
+
+	EnumType(org.eclipse.jpt.core.resource.java.EnumType javaEnumType, org.eclipse.jpt.core.resource.orm.EnumType ormEnumType) {
+		if (javaEnumType == null) {
+			throw new NullPointerException();
+		}
+		if (ormEnumType == null) {
+			throw new NullPointerException();
+		}
+		this.javaEnumType = javaEnumType;
+		this.ormEnumType = ormEnumType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.EnumType getJavaEnumType() {
+		return this.javaEnumType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.EnumType getOrmEnumType() {
+		return this.ormEnumType;
+	}
+
+
+	// ********** static methods **********
+
+	public static EnumType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.EnumType javaEnumType) {
+		return (javaEnumType == null) ? null : fromJavaResourceModel_(javaEnumType);
+	}
+
+	private static EnumType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.EnumType javaEnumType) {
+		for (EnumType enumType : EnumType.values()) {
+			if (enumType.getJavaEnumType() == javaEnumType) {
+				return enumType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.EnumType toJavaResourceModel(EnumType enumType) {
+		return (enumType == null) ? null : enumType.getJavaEnumType();
+	}
+
+	public static EnumType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.EnumType ormEnumType) {
+		return (ormEnumType == null) ? null : fromOrmResourceModel_(ormEnumType);
+	}
+
+	private static EnumType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.EnumType ormEnumType) {
+		for (EnumType enumType : EnumType.values()) {
+			if (enumType.getOrmEnumType() == ormEnumType) {
+				return enumType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.EnumType toOrmResourceModel(EnumType enumType) {
+		return (enumType == null) ? null : enumType.getOrmEnumType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EnumeratedConverter.java
new file mode 100644
index 0000000..ca42d9d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/EnumeratedConverter.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.1
+ */
+public interface EnumeratedConverter
+	extends Converter
+{
+	EnumType getEnumType();
+	
+	EnumType getDefaultEnumType();
+		EnumType DEFAULT_ENUM_TYPE = EnumType.ORDINAL;
+
+	EnumType getSpecifiedEnumType();
+	void setSpecifiedEnumType(EnumType newSpecifiedEnumType);
+		String SPECIFIED_ENUM_TYPE_PROPERTY = "specifiedEnumType"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/FetchType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/FetchType.java
new file mode 100644
index 0000000..ff5d584
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/FetchType.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Fetch Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum FetchType {
+
+	EAGER(
+			org.eclipse.jpt.core.resource.java.FetchType.EAGER,
+			org.eclipse.jpt.core.resource.orm.FetchType.EAGER
+		),
+	LAZY(
+			org.eclipse.jpt.core.resource.java.FetchType.LAZY,
+			org.eclipse.jpt.core.resource.orm.FetchType.LAZY
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.FetchType javaFetchType;
+	private org.eclipse.jpt.core.resource.orm.FetchType ormFetchType;
+
+	FetchType(org.eclipse.jpt.core.resource.java.FetchType javaFetchType, org.eclipse.jpt.core.resource.orm.FetchType ormFetchType) {
+		if (javaFetchType == null) {
+			throw new NullPointerException();
+		}
+		if (ormFetchType == null) {
+			throw new NullPointerException();
+		}
+		this.javaFetchType = javaFetchType;
+		this.ormFetchType = ormFetchType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.FetchType getJavaFetchType() {
+		return this.javaFetchType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.FetchType getOrmFetchType() {
+		return this.ormFetchType;
+	}
+
+
+	// ********** static methods **********
+
+	public static FetchType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.FetchType javaFetchType) {
+		return (javaFetchType == null) ? null : fromJavaResourceModel_(javaFetchType);
+	}
+
+	private static FetchType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.FetchType javaFetchType) {
+		for (FetchType fetchType : FetchType.values()) {
+			if (fetchType.getJavaFetchType() == javaFetchType) {
+				return fetchType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.FetchType toJavaResourceModel(FetchType fetchType) {
+		return (fetchType == null) ? null : fetchType.getJavaFetchType();
+	}
+
+	public static FetchType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.FetchType ormFetchType) {
+		return (ormFetchType == null) ? null : fromOrmResourceModel_(ormFetchType);
+	}
+
+	private static FetchType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.FetchType ormFetchType) {
+		for (FetchType fetchType : FetchType.values()) {
+			if (fetchType.getOrmFetchType() == ormFetchType) {
+				return fetchType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.FetchType toOrmResourceModel(FetchType fetchType) {
+		return (fetchType == null) ? null : fetchType.getOrmFetchType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Fetchable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Fetchable.java
new file mode 100644
index 0000000..74443c1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Fetchable.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Fetchable
+	extends AttributeMapping
+{
+	FetchType getFetch();
+
+	FetchType getDefaultFetch();
+		String DEFAULT_FETCH_PROPERTY = "defaultFetch"; //$NON-NLS-1$
+		
+	FetchType getSpecifiedFetch();
+	void setSpecifiedFetch(FetchType newSpecifiedFetch);
+		String SPECIFIED_FETCH_PROPERTY = "specifiedFetch"; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GeneratedValue.java
new file mode 100644
index 0000000..c833062
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GeneratedValue.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface GeneratedValue
+	extends JpaContextNode
+{
+
+	GenerationType getStrategy();
+	GenerationType getDefaultStrategy();
+		String DEFAULT_STRATEGY_PROPERTY = "defaultStrategy"; //$NON-NLS-1$
+		GenerationType DEFAULT_STRATEGY = GenerationType.AUTO;
+	GenerationType getSpecifiedStrategy();
+	void setSpecifiedStrategy(GenerationType strategy);
+		String SPECIFIED_STRATEGY_PROPERTY = "specifiedStrategy"; //$NON-NLS-1$
+	
+	String getGenerator();
+	String getDefaultGenerator();
+		String DEFAULT_GENERATOR_PROPERTY = "defaultGenerator"; //$NON-NLS-1$
+	String getSpecifiedGenerator();
+	void setSpecifiedGenerator(String generator);
+		String SPECIFIED_GENERATOR_PROPERTY = "specifiedGenerator"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GenerationType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GenerationType.java
new file mode 100644
index 0000000..58b99fa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GenerationType.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Generation Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum GenerationType {
+
+	TABLE(
+			org.eclipse.jpt.core.resource.java.GenerationType.TABLE,
+			org.eclipse.jpt.core.resource.orm.GenerationType.TABLE
+		),
+	SEQUENCE(
+			org.eclipse.jpt.core.resource.java.GenerationType.SEQUENCE,
+			org.eclipse.jpt.core.resource.orm.GenerationType.SEQUENCE
+		),
+	IDENTITY(
+			org.eclipse.jpt.core.resource.java.GenerationType.IDENTITY,
+			org.eclipse.jpt.core.resource.orm.GenerationType.IDENTITY
+		),
+	AUTO(
+			org.eclipse.jpt.core.resource.java.GenerationType.AUTO,
+			org.eclipse.jpt.core.resource.orm.GenerationType.AUTO
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.GenerationType javaGenerationType;
+	private org.eclipse.jpt.core.resource.orm.GenerationType ormGenerationType;
+
+	GenerationType(org.eclipse.jpt.core.resource.java.GenerationType javaGenerationType, org.eclipse.jpt.core.resource.orm.GenerationType ormGenerationType) {
+		if (javaGenerationType == null) {
+			throw new NullPointerException();
+		}
+		if (ormGenerationType == null) {
+			throw new NullPointerException();
+		}
+		this.javaGenerationType = javaGenerationType;
+		this.ormGenerationType = ormGenerationType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.GenerationType getJavaGenerationType() {
+		return this.javaGenerationType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.GenerationType getOrmGenerationType() {
+		return this.ormGenerationType;
+	}
+
+
+	// ********** static methods **********
+
+	public static GenerationType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.GenerationType javaGenerationType) {
+		return (javaGenerationType == null) ? null : fromJavaResourceModel_(javaGenerationType);
+	}
+
+	private static GenerationType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.GenerationType javaGenerationType) {
+		for (GenerationType generationType : GenerationType.values()) {
+			if (generationType.getJavaGenerationType() == javaGenerationType) {
+				return generationType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.GenerationType toJavaResourceModel(GenerationType generationType) {
+		return (generationType == null) ? null : generationType.getJavaGenerationType();
+	}
+
+	public static GenerationType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.GenerationType ormGenerationType) {
+		return (ormGenerationType == null) ? null : fromOrmResourceModel_(ormGenerationType);
+	}
+
+	private static GenerationType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.GenerationType ormGenerationType) {
+		for (GenerationType generationType : GenerationType.values()) {
+			if (generationType.getOrmGenerationType() == ormGenerationType) {
+				return generationType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.GenerationType toOrmResourceModel(GenerationType generationType) {
+		return (generationType == null) ? null : generationType.getOrmGenerationType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Generator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Generator.java
new file mode 100644
index 0000000..72140f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Generator.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Generator
+	extends JpaContextNode
+{
+	String SEQUENCE_GENERATOR = "sequenceGenerator"; //$NON-NLS-1$
+	String TABLE_GENERATOR = "tableGenerator"; //$NON-NLS-1$
+
+	// ********** name **********
+
+	String getName();
+	void setName(String value);
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+
+	// ********** initial value **********
+
+	int getInitialValue();
+	Integer getSpecifiedInitialValue();
+	void setSpecifiedInitialValue(Integer value);
+		String SPECIFIED_INITIAL_VALUE_PROPERTY = "specifiedInitialValue"; //$NON-NLS-1$
+	int getDefaultInitialValue();
+		String DEFAULT_INITIAL_VALUE_PROPERTY = "defaultInitialValue"; //$NON-NLS-1$
+
+
+	// ********** allocation size **********
+	
+	int getAllocationSize();
+	Integer getSpecifiedAllocationSize();
+	void setSpecifiedAllocationSize(Integer value);
+		String SPECIFIED_ALLOCATION_SIZE_PROPERTY = "specifiedAllocationSize"; //$NON-NLS-1$
+	int getDefaultAllocationSize();
+	int DEFAULT_ALLOCATION_SIZE = 50;
+		String DEFAULT_ALLOCATION_SIZE_PROPERTY = "defaultAllocationSize"; //$NON-NLS-1$
+
+
+	// ********** validation **********
+	
+	/**
+	 * Return whether the generator overrides the definition of the given generator
+	 * (e.g. a generator defined in orm.xml overrides one defined in java).
+	 */
+	boolean overrides(Generator generator);
+	
+	/**
+	 * Return whether the generator is a duplicate of the given generator.
+	 * A generator is not a duplicate of another generator if is the same exact generator,
+	 * if it is a nameless generator (which is an error condition), or if it overrides 
+	 * or is overridden by the other generator. 
+	 */
+	boolean duplicates(Generator generator);
+
+	boolean isVirtual();
+
+
+	// ********** database stuff **********
+
+	/**
+	 * Return a db Schema object with the specified/default schema name.
+	 * This can return null if no Schema exists on the database with that name.
+	 */
+	Schema getDbSchema();
+
+	/**
+	 * Return a db Catalog object with the specified/default catalog name.
+	 * This can return null if no Catalog exists on the database with that name.
+	 */
+	Catalog getDbCatalog();
+
+	/**
+	 * Return a db container object that hold the relevant schemata.
+	 */
+	SchemaContainer getDbSchemaContainer();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GeneratorContainer.java
new file mode 100644
index 0000000..b1f8e20
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/GeneratorContainer.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface GeneratorContainer
+	extends JpaContextNode
+{
+	//******************** table generator *****************
+	
+	String TABLE_GENERATOR_PROPERTY = "tableGenerator"; //$NON-NLS-1$
+	
+	TableGenerator getTableGenerator();
+	
+	TableGenerator addTableGenerator();
+	
+	void removeTableGenerator();
+	
+	
+	//******************** sequence generator *****************
+	
+	String SEQUENCE_GENERATOR_PROPERTY = "sequenceGenerator"; //$NON-NLS-1$
+	
+	SequenceGenerator getSequenceGenerator();
+	
+	SequenceGenerator addSequenceGenerator();
+	
+	void removeSequenceGenerator();
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/IdClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/IdClassReference.java
new file mode 100644
index 0000000..2b93018
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/IdClassReference.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.JpaNode;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface IdClassReference
+	extends JpaNode, PersistentType.Owner
+{
+	/**
+	 * Property string associated with changes to the {@link IdClassHolder}'s specified id class name
+	 */
+	String SPECIFIED_ID_CLASS_NAME_PROPERTY = "specifiedIdClassName"; //$NON-NLS-1$
+	
+	/**
+	 * Return the specified name of the id class, null if none is specified in the resource model
+	 */
+	String getSpecifiedIdClassName();
+	
+	/**
+	 * Set the specified name of the id class.
+	 * Use null to remove the id class specification from the resource model
+	 */
+	void setSpecifiedIdClassName(String value);
+	
+	/**
+	 * Property string associated with changes to the {@link IdClassHolder}'s default id class name
+	 */
+	String DEFAULT_ID_CLASS_NAME_PROPERTY = "defaultIdClassName"; //$NON-NLS-1$
+	
+	/**
+	 * Return the default name of the id class, null if there is none
+	 */
+	String getDefaultIdClassName();
+	
+	/**
+	 * Return the name of the id class, taking into consideration the default value if applicable
+	 */
+	String getIdClassName();
+	
+	/**
+	 * Return whether the id class has been specified.
+	 * Generally, this simply means that the id class name has been set, although if a default
+	 * applies, this should also return true.
+	 */
+	boolean isSpecified();
+	
+	/**
+	 * Property string associated with changes to the {@link IdClassHolder}'s id class.
+	 * This will change (potentially) if the id class name changes, or if other changes result
+	 * in changes in the id class' resolution.
+	 */
+	String ID_CLASS_PROPERTY = "idClass"; //$NON-NLS-1$
+	
+	/**
+	 * Return the {@link JavaPersistentType} that is resolved from the id class name.
+	 * This will be null if the id class name is null or if the class cannot be resolved from that 
+	 * name.
+	 */
+	JavaPersistentType getIdClass();
+	
+	/**
+	 * Return the char to be used for browsing or creating the id class IType.
+	 * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
+	 */
+	char getIdClassEnclosingTypeSeparator();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/IdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/IdMapping.java
new file mode 100644
index 0000000..12fd9d9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/IdMapping.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface IdMapping
+	extends AttributeMapping, ColumnMapping, ConvertibleMapping
+{
+	GeneratorContainer getGeneratorContainer();
+
+	GeneratedValue getGeneratedValue();
+	GeneratedValue addGeneratedValue();
+	void removeGeneratedValue();
+		String GENERATED_VALUE_PROPERTY = "generatedValue"; //$NON-NLS-1$
+	
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/InheritanceType.java
new file mode 100644
index 0000000..7510324
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/InheritanceType.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Inheritance Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum InheritanceType {
+
+	SINGLE_TABLE(
+			org.eclipse.jpt.core.resource.java.InheritanceType.SINGLE_TABLE,
+			org.eclipse.jpt.core.resource.orm.InheritanceType.SINGLE_TABLE
+		),
+	JOINED(
+			org.eclipse.jpt.core.resource.java.InheritanceType.JOINED,
+			org.eclipse.jpt.core.resource.orm.InheritanceType.JOINED
+		),
+	TABLE_PER_CLASS(
+			org.eclipse.jpt.core.resource.java.InheritanceType.TABLE_PER_CLASS,
+			org.eclipse.jpt.core.resource.orm.InheritanceType.TABLE_PER_CLASS
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.InheritanceType javaInheritanceType;
+	private org.eclipse.jpt.core.resource.orm.InheritanceType ormInheritanceType;
+
+	InheritanceType(org.eclipse.jpt.core.resource.java.InheritanceType javaInheritanceType, org.eclipse.jpt.core.resource.orm.InheritanceType ormInheritanceType) {
+		if (javaInheritanceType == null) {
+			throw new NullPointerException();
+		}
+		if (ormInheritanceType == null) {
+			throw new NullPointerException();
+		}
+		this.javaInheritanceType = javaInheritanceType;
+		this.ormInheritanceType = ormInheritanceType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.InheritanceType getJavaInheritanceType() {
+		return this.javaInheritanceType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.InheritanceType getOrmInheritanceType() {
+		return this.ormInheritanceType;
+	}
+
+
+	// ********** static methods **********
+
+	public static InheritanceType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.InheritanceType javaInheritanceType) {
+		return (javaInheritanceType == null) ? null : fromJavaResourceModel_(javaInheritanceType);
+	}
+
+	private static InheritanceType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.InheritanceType javaInheritanceType) {
+		for (InheritanceType inheritanceType : InheritanceType.values()) {
+			if (inheritanceType.getJavaInheritanceType() == javaInheritanceType) {
+				return inheritanceType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.InheritanceType toJavaResourceModel(InheritanceType inheritanceType) {
+		return (inheritanceType == null) ? null : inheritanceType.getJavaInheritanceType();
+	}
+
+	public static InheritanceType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.InheritanceType ormInheritanceType) {
+		return (ormInheritanceType == null) ? null : fromOrmResourceModel_(ormInheritanceType);
+	}
+
+	private static InheritanceType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.InheritanceType ormInheritanceType) {
+		for (InheritanceType inheritanceType : InheritanceType.values()) {
+			if (inheritanceType.getOrmInheritanceType() == ormInheritanceType) {
+				return inheritanceType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.InheritanceType toOrmResourceModel(InheritanceType inheritanceType) {
+		return (inheritanceType == null) ? null : inheritanceType.getOrmInheritanceType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumn.java
new file mode 100644
index 0000000..b0ec521
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumn.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * join column
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JoinColumn
+	extends BaseColumn, BaseJoinColumn
+{
+
+	/**
+	 * interface allowing join columns to be used in multiple places
+	 * (e.g. 1:1 mappings and join tables)
+	 */
+	interface Owner
+		extends BaseJoinColumn.Owner, BaseColumn.Owner
+	{
+
+		/**
+		 * The target of the relationship will usually be the target entity.
+		 * In the case of a target foreign key relationship the source and target
+		 * are swapped.
+		 */
+		Entity getRelationshipTarget();
+
+		/**
+		 * return the join column's attribute name
+		 */
+		String getAttributeName();
+
+		/**
+		 * return the persistent attribute for this join column
+		 */
+		PersistentAttribute getPersistentAttribute();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumnEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumnEnabledRelationshipReference.java
new file mode 100644
index 0000000..eb49580
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumnEnabledRelationshipReference.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * A <code>JoinColumnEnabledRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinColumnJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * @see RelationshipReference
+ * @see JoinColumn
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JoinColumnEnabledRelationshipReference
+	extends RelationshipReference
+{
+	/**
+	 * Return the aggregate (never null) object used to configure the join column 
+	 * joining strategy
+	 */
+	JoinColumnJoiningStrategy getJoinColumnJoiningStrategy();
+	
+	/**
+	 * Return whether the join column joining strategy is currently the 
+	 * predominant joining strategy
+	 */
+	boolean usesJoinColumnJoiningStrategy();
+	
+	/**
+	 * Set the join column joining strategy as the predominant joining strategy
+	 */
+	void setJoinColumnJoiningStrategy();
+	
+	/**
+	 * Unset the join column joining strategy as the predominant joining strategy.
+	 * This will not set any other joining strategy as the predominant one, so
+	 * whichever one is also configured (is specified) or the default strategy
+	 * will apply at that point.
+	 */
+	// TODO remove this API (bug 311945)- wanted to remove it when I fixed bug 311248.
+	// API users should just call set on another strategy, this will unset all other strategies
+	void unsetJoinColumnJoiningStrategy();
+	
+	/**
+	 * Return whether this reference may potentially have a default join column.
+	 * (For example, a 1-1 mapping may have one if it does not specify a mappedBy
+	 * or a join table, but a 1-M mapping may not.)
+	 */
+	boolean mayHaveDefaultJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..2e81b53
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinColumnJoiningStrategy.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * Joining strategy that uses join columns
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ * 
+ * @see {@link RelationshipMapping}
+ * @see {@link JoinColumnEnabledRelationshipReference}
+ */
+public interface JoinColumnJoiningStrategy
+	extends JoiningStrategy
+{
+	
+	void initializeFrom(JoinColumnJoiningStrategy oldStrategy);
+	
+	/**
+	 * The source of the relationship will usually be the owning type mapping.
+	 * In the case of a target foreign key relationship the source and target
+	 * are swapped.
+	 * @see isTargetForeignKeyRelationship()
+	 */
+	TypeMapping getRelationshipSource();
+
+	/**
+	 * The target of the relationship will usually be the target entity.
+	 * In the case of a target foreign key relationship the source and target
+	 * are swapped.
+	 * @see isTargetForeignKeyRelationship()
+	 */
+	TypeMapping getRelationshipTarget();
+
+	/**
+	 * Return whether this relationship is a target foreign key relationship.
+	 * A one-to-many mapping with a join column will have the foreign key
+	 * in the target table.
+	 */
+	boolean isTargetForeignKeyRelationship();
+
+	/**
+	 * Return a list iterator of the join columns whether specified or default.
+	 * This will not be null.
+	 */
+	<T extends JoinColumn> ListIterator<T> joinColumns();
+	
+	/**
+	 * Return the number of join columns, both specified and default.
+	 */
+	int joinColumnsSize();
+	
+	/**
+	 * Change notification identifier for "defaultJoinColumn" property
+	 */
+	String DEFAULT_JOIN_COLUMN_PROPERTY = "defaultJoinColumn"; //$NON-NLS-1$
+	
+	/**
+	 * Return the default join column or null.  If there are specified join 
+	 * columns, then there will be no default join column (though there are 
+	 * times that there may be no default join column even if there are no
+	 * specified join columns.)
+	 */
+	JoinColumn getDefaultJoinColumn();
+	
+	/**
+	 * Change notification identifier for "specifiedJoinColumns" list
+	 */
+	String SPECIFIED_JOIN_COLUMNS_LIST = "specifiedJoinColumns"; //$NON-NLS-1$
+	
+	/**
+	 * Return a list iterator of the specified join columns.
+	 * This will not be null.
+	 */
+	<T extends JoinColumn> ListIterator<T> specifiedJoinColumns();
+	
+	/**
+	 * Return the number of specified join columns.
+	 */
+	int specifiedJoinColumnsSize();
+	
+	/**
+	 * Return whether this has any specified join columns.
+	 * (Equivalent to {@link #specifiedJoinColumnsSize()} == 0)
+	 */
+	boolean hasSpecifiedJoinColumns();
+	
+	/**
+	 * Add a specified join column to the join table return the object 
+	 * representing it.
+	 */
+	JoinColumn addSpecifiedJoinColumn(int index);
+	
+	/**
+	 * Remove the specified join column from the join table.
+	 */
+	void removeSpecifiedJoinColumn(int index);
+	
+	/**
+	 * Remove the specified join column at the index from the join table.
+	 */
+	void removeSpecifiedJoinColumn(JoinColumn joinColumn);
+	
+	/**
+	 * Move the specified join column from the source index to the target index.
+	 */
+	void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTable.java
new file mode 100644
index 0000000..7911302
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTable.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * Used by ManyToMany and OneToMany mappings.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JoinTable
+	extends ReferenceTable
+{
+	RelationshipMapping getRelationshipMapping();
+
+	JoinTableJoiningStrategy getParent();
+
+
+	// ********** inverse join columns **********
+
+	/**
+	 * Return the join table's inverse join columns, whether specified or default.
+	 */
+	<T extends JoinColumn> ListIterator<T> inverseJoinColumns();
+
+	/**
+	 * Return the number of inverse join columns, whether specified or default.
+	 */
+	int inverseJoinColumnsSize();
+
+	/**
+	 * Convert the join table's default inverse join column to a specified
+	 * inverse join column.
+	 */
+	void convertDefaultToSpecifiedInverseJoinColumn();
+
+	/**
+	 * Return the specified inverse join columns.
+	 */
+	<T extends JoinColumn> ListIterator<T> specifiedInverseJoinColumns();
+		String SPECIFIED_INVERSE_JOIN_COLUMNS_LIST = "specifiedInverseJoinColumns"; //$NON-NLS-1$
+
+	/**
+	 * Return the number of specified inverse join columns.
+	 */
+	int specifiedInverseJoinColumnsSize();
+
+	/**
+	 * Return the default inverse join column or null. A default inverse join column
+	 * only exists if there are no specified inverse join columns.
+	 */
+	JoinColumn getDefaultInverseJoinColumn();
+		String DEFAULT_INVERSE_JOIN_COLUMN = "defaultInverseJoinColumn"; //$NON-NLS-1$
+
+	/**
+	 * Add a specified join column to the join table.
+	 * Return the newly-created join column.
+	 */
+	JoinColumn addSpecifiedInverseJoinColumn(int index);
+
+	/**
+	 * Remove the inverse join column at the specified index from the join table.
+	 */
+	void removeSpecifiedInverseJoinColumn(int index);
+
+	/**
+	 * Remove the specified inverse join column from the join table.
+	 */
+	void removeSpecifiedInverseJoinColumn(JoinColumn joinColumn);
+
+	/**
+	 * Move an inverse join column from the specified source index to the
+	 * specified target index.
+	 */
+	void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex);
+
+	/**
+	 * Return whether the join table has specified inverse join columns.
+	 */
+	boolean hasSpecifiedInverseJoinColumns();
+
+	/**
+	 * Remove all the join table's inverse join columns.
+	 */
+	void clearSpecifiedInverseJoinColumns();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTableEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTableEnabledRelationshipReference.java
new file mode 100644
index 0000000..6533730
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTableEnabledRelationshipReference.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * A <code>JoinTableEnabledRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinTableJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * @see RelationshipReference
+ * @see JoinTableJoiningStrategy
+ * @see JoinTable
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JoinTableEnabledRelationshipReference
+	extends RelationshipReference
+{
+	/**
+	 * Return the aggregate (never null) object used to configure the join table 
+	 * joining strategy
+	 */
+	JoinTableJoiningStrategy getJoinTableJoiningStrategy();
+	
+	/**
+	 * Return whether the join table joining strategy is currently the 
+	 * predominant joining strategy
+	 */
+	boolean usesJoinTableJoiningStrategy();
+	
+	/**
+	 * Set the join table joining strategy as the predominant joining strategy
+	 */
+	void setJoinTableJoiningStrategy();
+	
+	/**
+	 * Unset the join table joining strategy as the predominant joining strategy.
+	 * This will not set any other joining strategy as the predominant one, so
+	 * whichever one is also configured (is specified) or the default strategy
+	 * will apply at that point.
+	 */
+	// TODO remove this API (bug 311945)- wanted to remove it when I fixed bug 311248.
+	// API users should just call set on another strategy, this will unset all other strategies
+	void unsetJoinTableJoiningStrategy();
+	
+	/**
+	 * Return whether this reference may potentially have a default join table.
+	 * (For example, a M-M mapping may have one if it does not specify a 
+	 * mappedBy)
+	 */
+	boolean mayHaveDefaultJoinTable();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTableJoiningStrategy.java
new file mode 100644
index 0000000..6f045bf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoinTableJoiningStrategy.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Joining strategy that uses a join table
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ * 
+ * @see {@link RelationshipMapping}
+ * @see {@link JoinTableEnabledRelationshipReference}
+ */
+public interface JoinTableJoiningStrategy 
+	extends JoiningStrategy
+{
+		
+	void initializeFrom(JoinTableJoiningStrategy oldStrategy);
+	
+	/**
+	 * Change notification identifier for "joinTable" property
+	 */
+	String JOIN_TABLE_PROPERTY = "joinTable"; //$NON-NLS-1$
+	
+	/**
+	 * Return the join table used in this reference or null.  This will be the 
+	 * specified or default join table if one has been specified or a default 
+	 * join table applies, otherwise null.
+	 */
+	JoinTable getJoinTable();
+	
+	/**
+	 * Return the default name for the JoinTable in this context
+	 */
+	String getJoinTableDefaultName();
+
+	boolean shouldValidateAgainstDatabase();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoiningStrategy.java
new file mode 100644
index 0000000..778f4b8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JoiningStrategy.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.db.Table;
+
+/**
+ * Represents how the information in two entities are joined together via a 
+ * {@link RelationshipMapping}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ * 
+ * @see {@link RelationshipMapping}
+ * @see {@link RelationshipReference}
+ */
+public interface JoiningStrategy
+	extends JpaContextNode
+{
+	/**
+	 * Return the relationship reference that owns this strategy
+	 */
+	RelationshipReference getRelationshipReference();
+	
+	/**
+	 * Add this strategy to the relationship reference
+	 */
+	void addStrategy();
+	
+	/**
+	 * Remove this strategy from the relationship reference
+	 */
+	void removeStrategy();
+	
+	/**
+	 * Return whether the mapping can be overridden with an association override
+	 */
+	boolean isOverridableAssociation();
+	
+	/**
+	 * Return the table name associated with columns on this joining strategy.
+	 * The join table name, for instance, or in the case of a bi-directional relationship, 
+	 * the table of the owning relationship.
+	 */
+	String getTableName();
+	
+	/**
+	 * Return the database table for the specified table name
+	 */
+	Table getDbTable(String tableName);
+
+	/**
+	 * return whether the given table cannot be explicitly specified
+	 * in the column's 'table' element
+	 */
+	boolean tableNameIsInvalid(String tableName);
+
+	/**
+	 * Return a message description used when the column's table is not valid 
+	 * in this context. This will be passed in as a parameter to a validation
+	 * message. Here is an example where the description is what is returned 
+	 * by the implementation:
+	 * <p>location:
+	 * Table "table name" for map key column "column name" 
+	 * <p>description:
+	 * does not match join table
+	 */
+	String getColumnTableNotValidDescription();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JpaContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JpaContextNode.java
new file mode 100644
index 0000000..1fc39f1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JpaContextNode.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.JpaNode;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+
+/**
+ * Common protocol for JPA objects that have a context, as opposed to
+ * resource objects.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JpaContextNode
+	extends JpaNode
+{
+	/**
+	 * Return the resource type of the context node's resource.
+	 */
+	JpaResourceType getResourceType();
+	
+	/**
+	 * Return the persistence unit if the context node is within a 
+	 * persistence unit. Otherwise throw an exception.
+	 */
+	PersistenceUnit getPersistenceUnit();
+	
+	/**
+	 * Return the mapping file root if the context node is within a 
+	 * mapping file. Otherwise throw an exception.
+	 */
+	MappingFileRoot getMappingFileRoot();
+
+	SchemaContainer getContextDefaultDbSchemaContainer();
+	
+	Catalog getContextDefaultDbCatalog();
+	
+	Schema getContextDefaultDbSchema();
+
+	/**
+	 * "Post update" is called once the JPA project "update" is complete.
+	 * We use this to calculate (typically default) state that is dependent
+	 * on the entity inheritance hierarchy (e.g. discriminator column name).
+	 * Of course, if these settings change, yet another "update" will be
+	 * triggered, followed by yet another "post update"; until the JPA
+	 * project's state quiesces
+	 */
+	void postUpdate();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JpaRootContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JpaRootContextNode.java
new file mode 100644
index 0000000..f2736ca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/JpaRootContextNode.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Root of the Dali context model.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JpaRootContextNode
+	extends JpaContextNode
+{
+
+	// ********** persistence.xml **********
+
+	/**
+	 * String constant associated with changes to the persistence XML property
+	 * @see #addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	public final static String PERSISTENCE_XML_PROPERTY = "persistenceXml"; //$NON-NLS-1$
+
+	/** 
+	 * Return the content represented by the <code>persistence.xml</code>
+	 * file associated with the root context node's JPA project.
+	 * This may be null. 
+	 */
+	PersistenceXml getPersistenceXml();
+
+
+	// ********** updating **********
+
+	/**
+	 * Update the context model with the content of the JPA resource model.
+	 */
+	void update(IProgressMonitor monitor);
+
+
+	// ********** validation **********
+
+	/**
+	 * Add validation messages to the specified list.
+	 */
+	public void validate(List<IMessage> messages, IReporter reporter);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/LobConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/LobConverter.java
new file mode 100644
index 0000000..bb81cdd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/LobConverter.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface LobConverter extends Converter
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToManyMapping.java
new file mode 100644
index 0000000..1a8f7df
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToManyMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface ManyToManyMapping
+	extends MultiRelationshipMapping
+{
+	ManyToManyRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToManyRelationshipReference.java
new file mode 100644
index 0000000..7943649
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToManyRelationshipReference.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link ManyToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface ManyToManyRelationshipReference
+	extends OwnableRelationshipReference, JoinTableEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToOneMapping.java
new file mode 100644
index 0000000..ef9acb8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToOneMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface ManyToOneMapping
+	extends SingleRelationshipMapping
+{
+	ManyToOneRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToOneRelationshipReference.java
new file mode 100644
index 0000000..68393ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ManyToOneRelationshipReference.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link ManyToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface ManyToOneRelationshipReference
+	extends RelationshipReference, JoinColumnEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappedByJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappedByJoiningStrategy.java
new file mode 100644
index 0000000..46d234a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappedByJoiningStrategy.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+
+/**
+ * Joining strategy that depends on another mapping (the owning side of the 
+ * relationship) to join the two entities.  Uses "mappedBy" meta-data.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ * 
+ * @see {@link RelationshipMapping}
+ * @see {@link OwnableRelationshipReference}
+ */
+public interface MappedByJoiningStrategy
+	extends JoiningStrategy
+{
+	/**
+	 * String associated with changes to the attribute property of this object
+	 */
+	String MAPPED_BY_ATTRIBUTE_PROPERTY = "mappedByAttribute"; //$NON-NLS-1$
+	
+	/**
+	 * Return the attribute of this object.  A null indicates that the resource
+	 * element does not exist
+	 */
+	String getMappedByAttribute();
+	
+	/**
+	 * Set the attribute of this object.  A null will result in removal of the 
+	 * resource element
+	 */
+	void setMappedByAttribute(String newAttribute);
+	
+	/**
+	 * Return an iterator of possible attribute names that this object might use
+	 */
+	Iterator<String> candidateMappedByAttributeNames();
+	
+	/**
+	 * Return whether this strategy's relationship is owned by the given other
+	 * relationship mapping
+	 */
+	boolean relationshipIsOwnedBy(RelationshipMapping otherMapping);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappedSuperclass.java
new file mode 100644
index 0000000..31d5e01
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappedSuperclass.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface MappedSuperclass
+	extends TypeMapping
+{
+	IdClassReference getIdClassReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFile.java
new file mode 100644
index 0000000..4ac72e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFile.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.PersistentTypeContainer;
+
+/**
+ * JPA mapping file (typically <code>orm.xml</code>).
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.1
+ */
+public interface MappingFile
+	extends XmlFile, PersistentTypeContainer
+{
+	/**
+	 * covariant override
+	 */
+	MappingFileRef getParent();
+
+	/**
+	 * Return the mapping file's root.
+	 */
+	MappingFileRoot getRoot();
+
+	/**
+	 * Return the specified persistent type if it is listed in the mapping file;
+	 * otherwise return null.
+	 */
+	PersistentType getPersistentType(String name);
+
+	/**
+	 * Update the context mapping file to match its resource mapping file.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFilePersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFilePersistenceUnitDefaults.java
new file mode 100644
index 0000000..2453c6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFilePersistenceUnitDefaults.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface MappingFilePersistenceUnitDefaults
+{
+	AccessType getAccess();
+	
+	String getCatalog();
+	
+	String getSchema();
+	
+	boolean isCascadePersist();
+	
+	/**
+	 * Return whether the mapping file's underlying resource exists.
+	 * If there is a node in the <code>orm.xml</code> file for the
+	 * <code>persistence-unit-defaults</code> element,
+	 * return true; otherwise false.
+	 */
+	boolean resourceExists();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFileRoot.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFileRoot.java
new file mode 100644
index 0000000..d224899
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MappingFileRoot.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface MappingFileRoot
+	extends XmlContextNode, JpaStructureNode
+{
+	/**
+	 * Return the specified access if present, otherwise return the default
+	 * access.
+	 */
+	AccessType getAccess();
+	
+	/**
+	 * Return the specified catalog if present, otherwise return the default
+	 * catalog.
+	 */
+	String getCatalog();
+	
+	/**
+	 * Return the specified schema if present, otherwise return the default
+	 * schema.
+	 */
+	String getSchema();
+	
+	/**
+	 * Return the defaults defined within this mapping file *for the persistence unit*.
+	 * Return null if none exists.
+	 * @see MappingFilePersistenceUnitDefaults.resourceExists()
+	 */
+	MappingFilePersistenceUnitDefaults getPersistenceUnitDefaults();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MultiRelationshipMapping.java
new file mode 100644
index 0000000..06b09d7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/MultiRelationshipMapping.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Multi-valued (1:m, m:m) relationship mapping.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface MultiRelationshipMapping
+	extends RelationshipMapping, CollectionMapping
+{
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedColumn.java
new file mode 100644
index 0000000..67cb041
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedColumn.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface NamedColumn
+	extends JpaContextNode
+{
+	String getName();
+
+	String getDefaultName();
+		String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
+
+	String getSpecifiedName();
+	void setSpecifiedName(String value);
+		String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$
+
+	/**
+	 * Return the table name for this column.  Columns that don't have a
+	 * specified table still have a table that they belong to.
+	 */
+	String getTable();
+
+	String getColumnDefinition();
+
+	void setColumnDefinition(String value);
+		String COLUMN_DEFINITION_PROPERTY = "columnDefinition"; //$NON-NLS-1$
+
+
+	/**
+	 * Return the wrapper for the datasource column
+	 */
+	Column getDbColumn();
+
+	/**
+	 * Return the wrapper for the datasource table
+	 */
+	Table getDbTable();
+
+	/**
+	 * Return whether the column is found on the datasource.
+	 */
+	boolean isResolved();
+	
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner {
+		/**
+		 * Return the type mapping that contains the column.
+		 */
+		TypeMapping getTypeMapping();
+
+		/**
+		 * Return the name of the table which the column belongs to by default
+		 */
+		String getDefaultTableName();
+
+		/**
+		 * Return the database table for the specified table name
+		 */
+		Table getDbTable(String tableName);
+		
+		/**
+		 * Return the default column name
+		 */
+		String getDefaultColumnName();
+
+		/**
+		 * Return a validation message for the column's name not resolving on the 
+		 * table either specified or default. Use the given text range in the message
+		 */
+		IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedNativeQuery.java
new file mode 100644
index 0000000..f20d11b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedNativeQuery.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface NamedNativeQuery
+	extends Query
+{
+	String getResultClass();
+	void setResultClass(String value);
+		String RESULT_CLASS_PROPERTY = "resultClass"; //$NON-NLS-1$
+
+	String getResultSetMapping();
+	void setResultSetMapping(String value);
+		String RESULT_SET_MAPPING_PROPERTY = "resultSetMapping"; //$NON-NLS-1$
+
+	/**
+	 * Return the char to be used for browsing or creating the result class IType.
+	 * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
+	 */
+	char getResultClassEnclosingTypeSeparator();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedQuery.java
new file mode 100644
index 0000000..9b6a988
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/NamedQuery.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface NamedQuery
+	extends Query {
+	// nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Nullable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Nullable.java
new file mode 100644
index 0000000..18767e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Nullable.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * This interface is used for mappings that support the optional element.
+ * From the JPA spec:
+ * 		Whether the value of the field or property may be null. This is a hint 
+ * 		and is disregarded for primitive types; it may be used in schema generation.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Nullable
+	extends AttributeMapping
+{
+	boolean isOptional();
+	
+	boolean isDefaultOptional();
+		String DEFAULT_OPTIONAL_PROPERTY = "defaultOptional"; //$NON-NLS-1$
+		boolean DEFAULT_OPTIONAL = true;
+	
+	Boolean getSpecifiedOptional();
+	void setSpecifiedOptional(Boolean newSpecifiedOptional);
+		String SPECIFIED_OPTIONAL_PROPERTY = "specifiedOptional"; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToManyMapping.java
new file mode 100644
index 0000000..9e7e1af
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToManyMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OneToManyMapping
+	extends MultiRelationshipMapping
+{
+	OneToManyRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToManyRelationshipReference.java
new file mode 100644
index 0000000..2166851
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToManyRelationshipReference.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link OneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OneToManyRelationshipReference
+	extends OwnableRelationshipReference, 
+		JoinTableEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToOneMapping.java
new file mode 100644
index 0000000..e2c264b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToOneMapping.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * One-to-one mapping
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OneToOneMapping
+	extends SingleRelationshipMapping
+{
+	/**
+	 * covariant override
+	 */
+	OneToOneRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToOneRelationshipReference.java
new file mode 100644
index 0000000..582d1b3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OneToOneRelationshipReference.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link OneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OneToOneRelationshipReference
+	extends OwnableRelationshipReference, JoinColumnEnabledRelationshipReference,
+		PrimaryKeyJoinColumnEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Orderable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Orderable.java
new file mode 100644
index 0000000..01174c2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Orderable.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Multi-valued (1:m, m:m) relationship mappings support ordering.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Orderable
+	extends JpaContextNode
+{
+
+	String getSpecifiedOrderBy();
+	void setSpecifiedOrderBy(String orderBy);
+		String SPECIFIED_ORDER_BY_PROPERTY = "specifiedOrderBy"; //$NON-NLS-1$
+	
+	boolean isNoOrdering();
+	void setNoOrdering(boolean noOrdering);
+		String NO_ORDERING_PROPERTY = "noOrdering"; //$NON-NLS-1$
+	
+	boolean isPkOrdering();
+	void setPkOrdering(boolean pkOrdering);
+		String PK_ORDERING_PROPERTY = "pkOrdering"; //$NON-NLS-1$
+	
+	boolean isCustomOrdering();
+	void setCustomOrdering(boolean customOrdering);
+		String CUSTOM_ORDERING_PROPERTY = "customOrdering"; //$NON-NLS-1$
+
+	interface Owner {
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OverrideContainer.java
new file mode 100644
index 0000000..947346a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OverrideContainer.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OverrideContainer
+	extends JpaContextNode
+{
+	
+	interface Owner
+	{
+		/**
+		 * Return the mapping of the persistent type where the container is defined.
+		 * (For example, on an entity, this would be the entity.  On an embedded, this would
+		 *  be the type mapping where the embedded is defined.)
+		 */
+		TypeMapping getTypeMapping();
+		
+		/**
+		 * Return the type mapping that contains the attributes/associations to be overridden.
+		 * (Though the type mapping may not *directly* own them.  i.e. they may be on a supertype
+		 *  mapping.)
+		 * (For example, on an entity, this would be the supertype mapping of that entity.  On
+		 *  an embedded, this would be the target type mapping of the embedded.)
+		 */
+		TypeMapping getOverridableTypeMapping();
+		
+		/**
+		 * Return an iterator of all the names of the attributes/associations to be overridden.
+		 * This is usually just all of the overridable names of the overridable type mapping.
+		 * @see #getOverridableTypeMapping()
+		 */
+		Iterator<String> allOverridableNames();
+		
+		/**
+		 * Return the name of the table which the column belongs to by default
+		 */
+		String getDefaultTableName();
+		
+		/**
+		 * return whether the given table cannot be explicitly specified
+		 * in the column's 'table' element
+		 */
+		boolean tableNameIsInvalid(String tableName);
+		
+		/**
+		 * Return the database table for the specified table name
+		 */
+		org.eclipse.jpt.db.Table getDbTable(String tableName);
+		
+		/**
+		 * Return a list of table names that are valid for the overrides column, or join columns
+		 */
+		Iterator<String> candidateTableNames();		
+		
+		/**
+		 * Return a validation message for the column's table not being valid in the context.
+		 * Use the given text range in the message
+		 */
+		IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange);
+		
+		/**
+		 * Return a validation message for the column's name not resolving on the 
+		 * table either specified or default. Use the given text range in the message
+		 */
+		IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OwnableRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OwnableRelationshipReference.java
new file mode 100644
index 0000000..c54bebe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/OwnableRelationshipReference.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+
+/**
+ * An <code>OwnableRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may be the owned side of the relationship.
+ * (i.e. It may use a "mappedBy" joining strategy.)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * @see RelationshipReference
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OwnableRelationshipReference
+	extends RelationshipReference
+{
+	/**
+	 * Return the aggregate (never null) object used to configure the mapped by
+	 * joining strategy
+	 */
+	MappedByJoiningStrategy getMappedByJoiningStrategy();
+	
+	/**
+	 * Return whether the mapped by joining strategy is currently the predominant
+	 * joining strategy
+	 */
+	boolean usesMappedByJoiningStrategy();
+	
+	/**
+	 * Set the mapped by joining strategy as the predominant joining strategy
+	 */
+	void setMappedByJoiningStrategy();
+	
+	/**
+	 * Unset the mapped by joining strategy as the predominant joining strategy.
+	 * This will not set any other joining strategy as the predominant one, so
+	 * whichever one is also being used (is specified) or the default strategy
+	 * will apply at that point.
+	 */
+	// TODO remove this API (bug 311945)- wanted to remove it when I fixed bug 311248.
+	// API users should just call set on another strategy, this will unset all other strategies
+	void unsetMappedByJoiningStrategy();
+	
+	/**
+	 * Validates whether the given mapping may own the relationship
+	 */
+	boolean mayBeMappedBy(AttributeMapping mapping);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java
new file mode 100644
index 0000000..76dd6b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentAttribute.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+
+/**
+ * Persistent "attribute" (field or property)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface PersistentAttribute
+	extends JpaContextNode, JpaStructureNode, AccessHolder
+{
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Return the key for the attribute's mapping.
+	 * The key may be for either the "specified" mapping or, if the "specified"
+	 * mapping is missing, the "default" mapping.
+	 */
+	String getMappingKey();
+
+	/**
+	 * Return the key for the attribute's "default" mapping.
+	 */
+	String getDefaultMappingKey();
+
+	/**
+	 * Return the attribute's "specified" mapping, or if it is null
+	 * return the attribute's "default" mapping. Do not return null.
+	 */
+	AttributeMapping getMapping();
+		String DEFAULT_MAPPING_PROPERTY = "defaultMapping"; //$NON-NLS-1$
+
+	/**
+	 * Return the attribute's "specified" mapping - could be null.
+	 */
+	AttributeMapping getSpecifiedMapping();
+		String SPECIFIED_MAPPING_PROPERTY = "specifiedMapping"; //$NON-NLS-1$
+	
+	/**
+	 * Clients should call this method to set the attribute's mapping.
+	 * Passing in a null key will cause the "specified" mapping to be
+	 * cleared and the attribute's mapping to be its "default" mapping.
+	 */
+	void setSpecifiedMappingKey(String key);
+	
+	/**
+	 * Return the persistent type that owns this attribute
+	 */
+	PersistentType getOwningPersistentType();
+	
+	/**
+	 * Return the mapping of the owning persistent type
+	 */
+	TypeMapping getOwningTypeMapping();
+	
+	/**
+	 * If the attribute is mapped to a primary key column, return the
+	 * column's name, otherwise return null.
+	 */
+	String getPrimaryKeyColumnName();
+	
+	/**
+	 * Return the resolved, qualified name of the attribute's type
+	 * (e.g. "java.util.Collection" or "byte[]").
+	 * Return null if the attribute's type can not be resolved.
+	 * If the type is an array, this name will include the appropriate number
+	 * of bracket pairs.
+	 * This name will not include the type's generic type arguments
+	 * (e.g. "java.util.Collection<java.lang.String>" will only return
+	 * "java.util.Collection").
+	 */
+	String getTypeName();
+	
+	/**
+	 * Return whether this attribute actually has a textual representation
+	 * in its underlying resource (false = no).
+	 */
+	boolean isVirtual();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java
new file mode 100644
index 0000000..580b01f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PersistentType.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Context persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface PersistentType
+	extends JpaContextNode, JpaStructureNode, AccessHolder
+{
+
+	// ********** name **********
+
+	/**
+	 * Return the persistent type's [fully-qualified] name.
+	 * The enclosing type separator is '.', as opposed to '$'.
+	 * @see #getShortName()
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistent type's short name.
+	 * @see #getName()
+	 */
+	String getShortName();
+
+
+	// ********** mapping **********
+
+	/**
+	 * Return the persistent type's mapping.
+	 * Set the mapping via {@link #setMappingKey(String)}.
+	 */
+	TypeMapping getMapping();
+		String MAPPING_PROPERTY = "mapping"; //$NON-NLS-1$
+
+	String getMappingKey();
+
+	void setMappingKey(String key);
+
+	boolean isMapped();
+
+
+	// ********** attributes **********
+
+	/**
+	 * Return the persistent type's persistent attributes.
+	 */
+	<T extends PersistentAttribute> ListIterator<T> attributes();
+		String ATTRIBUTES_LIST = "attributes"; //$NON-NLS-1$
+
+	/**
+	 * Return the number of the persistent type's persistent attributes.
+	 */
+	int attributesSize();
+
+	/**
+	 * Return the names of the persistent type's persistent attributes.
+	 */
+	Iterator<String> attributeNames();
+
+	/**
+	 * Return all the persistent attributes in the persistent type's
+	 * inheritance hierarchy.
+	 */
+	Iterator<PersistentAttribute> allAttributes();
+
+	/**
+	 * Return the names of all the persistent attributes in the
+	 * persistent type's hierarchy.
+	 */
+	Iterator<String> allAttributeNames();
+
+	/**
+	 * Return the persistent attribute with the specified name,
+	 * if it exists locally on the persistent type (as opposed to in its
+	 * inheritance hierarchy).
+	 */
+	PersistentAttribute getAttributeNamed(String attributeName);
+
+	/**
+	 * Resolve and return the persistent attribute with the specified name, if it
+	 * is distinct and exists within the context of the persistent type.
+	 */
+	PersistentAttribute resolveAttribute(String attributeName);
+
+
+	// ********** inheritance **********
+
+	/**
+	 * Return the "super" {@link PersistentType} from the "persistence"
+	 * inheritance hierarchy.
+	 * If the Java inheritance parent is not a {@link PersistentType}, then continue
+	 * up the hierarchy (the JPA spec allows non-persistent types to be part of the hierarchy.)
+	 * Return <code>null</code> if the persistent type is the root persistent type.
+	 * <p>
+	 * Example:
+	 * <pre>
+	 * &#64;Entity
+	 * public abstract class Model {}
+	 * 
+	 * public abstract class Animal extends Model {}
+	 * 
+	 * &#64;Entity
+	 * public class Cat extends Animal {}
+	 * </pre>
+	 * The "super" persistent type of the <code>Cat</code> persistent type is
+	 * the <code>Model</code> persistent type. The "super" persistent type can
+	 * be either a Java annotated class or declared in the XML files.
+	 */
+	PersistentType getSuperPersistentType();
+		String SUPER_PERSISTENT_TYPE_PROPERTY = "superPersistentType"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistent type's "persistence" inheritance hierarchy,
+	 * <em>including</em> the persistent type itself.
+	 * The returned iterator will return elements infinitely if the hierarchy
+	 * has a loop.
+	 */
+	Iterator<PersistentType> inheritanceHierarchy();
+
+	/**
+	 * Return the persistent type's "persistence" inheritance hierarchy,
+	 * <em>excluding</em> the persistent type itself.
+	 * The returned iterator will return elements infinitely if the hierarchy
+	 * has a loop.
+	 */
+	Iterator<PersistentType> ancestors();
+
+
+	// ********** validation **********
+
+	/**
+	 * Add to the list of current validation messages
+	 */
+	void validate(List<IMessage> messages, IReporter reporter);
+
+
+	// ********** owner **********
+
+	/**
+	 * Return the access type that overrides the client persistent type's
+	 * access type; <code>null</code> if there is no such access override.
+	 */
+	AccessType getOwnerOverrideAccess();
+
+	/**
+	 * Return the client persistent type's default access type;
+	 * <code>null</code> if there is no such access default.
+	 */
+	AccessType getOwnerDefaultAccess();
+
+
+	// ********** owner interface **********
+
+	interface Owner
+		extends JpaContextNode
+	{
+		/**
+		 * Return the access type that overrides the client persistent type's
+		 * access type; <code>null</code> if there is no such access override
+		 */
+		AccessType getOverridePersistentTypeAccess();
+
+		/**
+		 * Return the client persistent type's default access type;
+		 * <code>null</code> if there is no such access default.
+		 */
+		AccessType getDefaultPersistentTypeAccess();
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..ea95bae
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumn.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface PrimaryKeyJoinColumn
+	extends BaseJoinColumn
+{
+	// nothing yet
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumnEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumnEnabledRelationshipReference.java
new file mode 100644
index 0000000..e25ab2d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumnEnabledRelationshipReference.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * A <code>PrimaryKeyJoinColumnEnabledRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link PrimaryKeyJoinColumnJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ * 
+ * @see RelationshipMapping
+ * @see RelationshipReference
+ * @see PrimaryKeyJoinColumn
+ */
+public interface PrimaryKeyJoinColumnEnabledRelationshipReference
+	extends RelationshipReference
+{
+	/**
+	 * Return the aggregate (never null) object used to configure the primary
+	 * key join column joining strategy
+	 */
+	PrimaryKeyJoinColumnJoiningStrategy getPrimaryKeyJoinColumnJoiningStrategy();
+	
+	/**
+	 * Return whether the primary key join column joining strategy is currently 
+	 * the predominant joining strategy
+	 */
+	boolean usesPrimaryKeyJoinColumnJoiningStrategy();
+	
+	/**
+	 * Set the primary key join column joining strategy as the predominant 
+	 * joining strategy
+	 */
+	void setPrimaryKeyJoinColumnJoiningStrategy();
+	
+	/**
+	 * Unset the primary key join column joining strategy as the predominant 
+	 * joining strategy.
+	 * This will not set any other joining strategy as the predominant one, so
+	 * whichever one is also configured (is specified) or the default strategy
+	 * will apply at that point.
+	 */
+	// TODO remove this API (bug 311945)- wanted to remove it when I fixed bug 311248.
+	// API users should just call set on another strategy, this will unset all other strategies
+	void unsetPrimaryKeyJoinColumnJoiningStrategy();
+	
+	/**
+	 * Return whether this reference may potentially have a default primary key
+	 * join column.
+	 */
+	boolean mayHaveDefaultPrimaryKeyJoinColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..11119b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/PrimaryKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+
+/**
+ * Joining strategy that uses primary key join columns
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ * 
+ * @see {@link RelationshipMapping}
+ * @see {@link PrimaryKeyJoinColumnEnabledRelationshipReference}
+ */
+public interface PrimaryKeyJoinColumnJoiningStrategy
+	extends JoiningStrategy
+{
+	/**
+	 * Change notification identifier for "primaryKeyJoinColumns" list
+	 */
+	String PRIMARY_KEY_JOIN_COLUMNS_LIST = "primaryKeyJoinColumns"; //$NON-NLS-1$
+	
+	/**
+	 * Return a list iterator of the primary key join columns.
+	 * This will not be null.
+	 */
+	<T extends PrimaryKeyJoinColumn> ListIterator<T> primaryKeyJoinColumns();
+	
+	/**
+	 * Return the number of join columns, both specified and default.
+	 */
+	int primaryKeyJoinColumnsSize();
+	
+	/**
+	 * Return whether this has any primary key join columns.
+	 * (Equivalent to {@link #primaryKeyJoinColumnsSize()} == 0)
+	 */
+	boolean hasPrimaryKeyJoinColumns();
+	
+	/**
+	 * Add a specified join column to the join table return the object 
+	 * representing it.
+	 */
+	PrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
+	
+	/**
+	 * Remove the specified join column from the join table.
+	 */
+	void removePrimaryKeyJoinColumn(int index);
+	
+	/**
+	 * Remove the specified join column at the index from the join table.
+	 */
+	void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn);
+	
+	/**
+	 * Move the specified join column from the source index to the target index.
+	 */
+	void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Query.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Query.java
new file mode 100644
index 0000000..b4e3869
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Query.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Query
+	extends JpaContextNode
+{
+	String NAMED_QUERY="namedQuery"; //$NON-NLS-1$
+	String NAMED_NATIVE_QUERY="namedNativeQuery"; //$NON-NLS-1$
+	
+	// **************** name ***************************************************
+	
+	String NAME_PROPERTY = "name"; //$NON-NLS-1$
+	
+	String getName();
+	
+	void setName(String value);
+	
+	
+	//************************ query ***********************
+	
+	String QUERY_PROPERTY = "query"; //$NON-NLS-1$
+	
+	String getQuery();
+	
+	void setQuery(String value);
+	
+	
+	//************************ hints ***********************
+	
+	String HINTS_LIST = "hints"; //$NON-NLS-1$
+	
+	/**
+	 * Return a list iterator of the hints.  This will not be null.
+	 */
+	<T extends QueryHint> ListIterator<T> hints();
+	
+	/**
+	 * Return the number of hints.
+	 */
+	int hintsSize();
+	
+	/**
+	 * Add a hint to the query and return the object representing it.
+	 */
+	QueryHint addHint(int index);
+	
+	/**
+	 * Remove the hint from the query.
+	 */
+	void removeHint(int index);
+	
+	/**
+	 * Remove the hint at the index from the query.
+	 */
+	void removeHint(QueryHint queryHint);
+	
+	/**
+	 * Move the hint from the source index to the target index.
+	 */
+	void moveHint(int targetIndex, int sourceIndex);
+	
+	
+	// **************** validation *********************************************
+	
+	/**
+	 * Return whether the query overrides the definition of the given query
+	 * (e.g. a query defined in orm.xml overrides one defined in java).
+	 */
+	boolean overrides(Query query);
+	
+	/**
+	 * Return whether the query is a duplicate of the given query.
+	 * A query is not a duplicate of another query if is the same exact query,
+	 * if it is a nameless query (which is an error condition), or if it overrides 
+	 * or is overridden by the other query. 
+	 */
+	boolean duplicates(Query query);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/QueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/QueryContainer.java
new file mode 100644
index 0000000..27f4494
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/QueryContainer.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface QueryContainer
+	extends JpaContextNode
+{
+
+	// ********** named queries **********
+
+	/**
+	 * Return a list iterator of the named queries.
+	 * This will not be null.
+	 */
+	<T extends NamedQuery> ListIterator<T> namedQueries();
+
+	/**
+	 * Return the number of named queries.
+	 */
+	int namedQueriesSize();
+
+	/**
+	 * Add a named query to the entity return the object representing it.
+	 */
+	NamedQuery addNamedQuery(int index);
+
+	/**
+	 * Remove the named query at the index from the entity.
+	 */
+	void removeNamedQuery(int index);
+
+	/**
+	 * Remove the named query at from the entity.
+	 */
+	void removeNamedQuery(NamedQuery namedQuery);
+
+	/**
+	 * Move the named query from the source index to the target index.
+	 */
+	void moveNamedQuery(int targetIndex, int sourceIndex);
+
+	String NAMED_QUERIES_LIST = "namedQueries"; //$NON-NLS-1$
+
+
+	// ********** named native queries **********
+
+	/**
+	 * Return a list iterator of the specified named native queries.
+	 * This will not be null.
+	 */
+	<T extends NamedNativeQuery> ListIterator<T> namedNativeQueries();
+
+	/**
+	 * Return the number of named native queries.
+	 */
+	int namedNativeQueriesSize();
+
+	/**
+	 * Add a named native query to the entity return the object representing it.
+	 */
+	NamedNativeQuery addNamedNativeQuery(int index);
+
+	/**
+	 * Remove the named native query at the index from the entity.
+	 */
+	void removeNamedNativeQuery(int index);
+
+	/**
+	 * Remove the named native query at from the entity.
+	 */
+	void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery);
+
+	/**
+	 * Move the named native query from the source index to the target index.
+	 */
+	void moveNamedNativeQuery(int targetIndex, int sourceIndex);
+
+	String NAMED_NATIVE_QUERIES_LIST = "namedNativeQueries"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/QueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/QueryHint.java
new file mode 100644
index 0000000..56999f1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/QueryHint.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface QueryHint
+	extends JpaContextNode
+{
+
+	String getName();
+	void setName(String value);
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	String getValue();
+	void setValue(String value);
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ReferenceTable.java
new file mode 100644
index 0000000..fa40c2c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/ReferenceTable.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * Common interface for JoinTable and CollectionTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ReferenceTable
+	extends Table
+{
+
+	PersistentAttribute getPersistentAttribute();
+	
+	// ********** join columns **********
+
+	/**
+	 * Return the join table's join columns, whether specified or default.
+	 */
+	<T extends JoinColumn> ListIterator<T> joinColumns();
+
+	/**
+	 * Return the number of join columns, whether specified or default.
+	 */
+	int joinColumnsSize();
+
+	/**
+	 * Convert the join table's default join column to a specified join column.
+	 */
+	void convertDefaultToSpecifiedJoinColumn();
+
+	/**
+	 * Return the specified join columns.
+	 */
+	<T extends JoinColumn> ListIterator<T> specifiedJoinColumns();
+		String SPECIFIED_JOIN_COLUMNS_LIST = "specifiedJoinColumns"; //$NON-NLS-1$
+
+	/**
+	 * Return the number of specified join columns.
+	 */
+	int specifiedJoinColumnsSize();
+
+	/**
+	 * Return the default join column or null. A default join column
+	 * only exists if there are no specified join columns.
+	 */
+	JoinColumn getDefaultJoinColumn();
+		String DEFAULT_JOIN_COLUMN = "defaultJoinColumn"; //$NON-NLS-1$
+
+	/**
+	 * Add a specified join column to the join table.
+	 * Return the newly-created join column.
+	 */
+	JoinColumn addSpecifiedJoinColumn(int index);
+
+	/**
+	 * Remove the join column at the specified index from the join table.
+	 */
+	void removeSpecifiedJoinColumn(int index);
+
+	/**
+	 * Remove the specified join column from the join table.
+	 */
+	void removeSpecifiedJoinColumn(JoinColumn joinColumn);
+
+	/**
+	 * Move a join column from the specified source index to the
+	 * specified target index.
+	 */
+	void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex);
+
+	/**
+	 * Return whether the join table has specified join columns.
+	 */
+	boolean hasSpecifiedJoinColumns();
+
+	/**
+	 * Remove all the join table's join columns.
+	 */
+	void clearSpecifiedJoinColumns();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/RelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/RelationshipMapping.java
new file mode 100644
index 0000000..3a011bc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/RelationshipMapping.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+
+/**
+ * Relationship (1:1, 1:m, m:1, m:m) mapping.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface RelationshipMapping
+	extends AttributeMapping, Fetchable
+{
+	/**
+	 * Return the meta-information used to populate the entities of the 
+	 * relationship
+	 */
+	RelationshipReference getRelationshipReference();
+
+	/**
+	 * Return the relationship owner or null if this is the owning side
+ 	 * or it is a unidirectional mapping.
+	 */
+	RelationshipMapping getRelationshipOwner();
+	
+	
+	// **************** target entity **************************************
+	
+	String getTargetEntity();
+	
+	String getSpecifiedTargetEntity();
+	void setSpecifiedTargetEntity(String value);
+		String SPECIFIED_TARGET_ENTITY_PROPERTY = "specifiedTargetEntity"; //$NON-NLS-1$
+	
+	String getDefaultTargetEntity();
+		String DEFAULT_TARGET_ENTITY_PROPERTY = "defaultTargetEntity"; //$NON-NLS-1$
+	
+	Entity getResolvedTargetEntity();
+		String RESOLVED_TARGET_ENTITY_PROPERTY = "resolvedTargetEntity"; //$NON-NLS-1$
+	
+	/**
+	 * Return all attribute names on the target entity, provided target entity
+	 * resolves
+	 */
+	Iterator<String> allTargetEntityAttributeNames();
+	
+	/**
+	 * Return the char to be used for browsing or creating the target entity IType.
+	 * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
+	 */
+	char getTargetEntityEnclosingTypeSeparator();
+		
+	// **************** cascade **************************************
+
+	Cascade getCascade();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/RelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/RelationshipReference.java
new file mode 100644
index 0000000..dff5bab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/RelationshipReference.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * A <code>RelationshipReference</code> represents the meta-information required 
+ * to populate the entities involved in a <code>RelationshipMapping</code>. This 
+ * might includes join table information, join column information, and/or 
+ * "mappedBy" information, to name a few.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * 
+ * @see RelationshipMapping
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface RelationshipReference
+	extends JpaContextNode
+{
+	RelationshipMapping getRelationshipMapping();
+
+	/**
+	 * Return the TypeMapping that owns this relationship reference
+	 */
+	TypeMapping getTypeMapping();
+	
+	/**
+	 * Return the entity that owns the relationship mapping. This is
+	 * just a convenience method that calls getTypeMapping() and returns
+	 * null if it is not an Entity
+	 */
+	Entity getEntity();
+	
+	/**
+	 * Return whether this is the owning side of the relationship.
+	 * @see {@link RelationshipMapping#isRelationshipOwner()}
+	 */
+	boolean isRelationshipOwner();
+	
+	/**
+	 * Returns whether the given mapping is the owning side of a relationship
+	 * with this relationship reference
+	 */
+	boolean isOwnedBy(RelationshipMapping mapping);
+	
+	/**
+	 * String associated with changes to the predominant strategy property
+	 */
+	final static String PREDOMINANT_JOINING_STRATEGY_PROPERTY = 
+		"predominantStrategy";  //$NON-NLS-1$
+	
+	/**
+	 * Return the predominant joining strategy, this should not be null
+	 */
+	JoiningStrategy getPredominantJoiningStrategy();
+	
+	/**
+	 * Return whether the mapping can be overridden with an association override
+	 */
+	boolean isOverridableAssociation();
+	
+	/**
+	 * Return whether the parent of this relationship reference is virtual
+	 * @return
+	 */
+	boolean isParentVirtual();
+
+	/**
+	 * Return whether this relationship is a target foreign key relationship.
+	 * A one-to-many mapping with a join column will have the foreign key
+	 * in the target table.
+	 */
+	boolean isTargetForeignKeyRelationship();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SecondaryTable.java
new file mode 100644
index 0000000..93364c0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SecondaryTable.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface SecondaryTable
+	extends Table
+{
+
+	public Entity getParent();
+	
+	/**
+	 * Return a list iterator of the primary key join columns whether specified or default.
+	 * This will not be null.
+	 */
+	<T extends PrimaryKeyJoinColumn> ListIterator<T> primaryKeyJoinColumns();
+		String SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST = "specifiedPrimaryKeyJoinColumns"; //$NON-NLS-1$
+
+	/**
+	 * Return the number of primary key join columns, both specified and default.
+	 */
+	int primaryKeyJoinColumnsSize();
+
+	/**
+	 * Return a list iterator of the specified primary key join columns.
+	 * This will not be null.
+	 */
+	<T extends PrimaryKeyJoinColumn> ListIterator<T> specifiedPrimaryKeyJoinColumns();
+
+	/**
+	 * Return the number of specified primary key join columns.
+	 */
+	int specifiedPrimaryKeyJoinColumnsSize();
+
+	/**
+	 * Return the default primary key join column or null.  A default primary key join column
+	 * only exists if there are no specified primary key join columns.
+	 */
+	PrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+		String DEFAULT_PRIMARY_KEY_JOIN_COLUMN = "defaultPrimaryKeyJoinColumn"; //$NON-NLS-1$
+
+	/**
+	 * Add a specified primary key join column to the secondary table return the object 
+	 * representing it.
+	 */
+	PrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+
+	/**
+	 * Remove the specified primary key join column from the secondary table.
+	 */
+	void removeSpecifiedPrimaryKeyJoinColumn(int index);
+
+	/**
+	 * Remove the specified primary key join column at the index from the secondary table.
+	 */
+	void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn pkJoinColumn);
+
+	/**
+	 * Move the specified primary key join column from the source index to the target index.
+	 */
+	void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex);
+
+	/**
+	 * Return true if the secondary table exists as specified on the owning object, 
+	 * or false if the secondary table is a result of defaults calculation
+	 */
+	boolean isVirtual();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SequenceGenerator.java
new file mode 100644
index 0000000..e6389a4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SequenceGenerator.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface SequenceGenerator
+	extends Generator
+{
+	int DEFAULT_INITIAL_VALUE = 1;
+
+
+	// ********** sequence name **********
+
+	String getSpecifiedSequenceName();
+	void setSpecifiedSequenceName(String value);
+		String SPECIFIED_SEQUENCE_NAME_PROPERTY = "specifiedSequenceName"; //$NON-NLS-1$
+	String getSequenceName();
+	String getDefaultSequenceName();
+		String DEFAULT_SEQUENCE_NAME_PROPERTY = "defaultSequenceName"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SingleRelationshipMapping.java
new file mode 100644
index 0000000..3f74c63
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/SingleRelationshipMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface SingleRelationshipMapping
+	extends RelationshipMapping, Nullable
+{
+	// **************** fetch type **************************************
+	
+	FetchType DEFAULT_FETCH_TYPE = FetchType.EAGER;
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java
new file mode 100644
index 0000000..477f188
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/Table.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface Table
+	extends JpaContextNode
+{
+
+	// ********** name **********
+
+	/**
+	 * Return the specified name if present, otherwise return the default
+	 * name.
+	 */
+	String getName();
+	String getSpecifiedName();
+	void setSpecifiedName(String value);
+		String SPECIFIED_NAME_PROPERTY = "specifiedName"; //$NON-NLS-1$
+	String getDefaultName();
+		String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
+
+
+	// ********** schema **********
+
+	/**
+	 * Return the specified schema if present, otherwise return the default
+	 * schema.
+	 */
+	String getSchema();
+	String getSpecifiedSchema();
+	void setSpecifiedSchema(String value);
+		String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
+	String getDefaultSchema();
+		String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
+
+
+	// ********** catalog **********
+
+	/**
+	 * Return the specified catalog if present, otherwise return the default
+	 * catalog.
+	 */
+	String getCatalog();
+	String getSpecifiedCatalog();
+	void setSpecifiedCatalog(String value);
+		String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
+	String getDefaultCatalog();
+		String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
+
+
+	// ********** unique constraints **********
+
+	<T extends UniqueConstraint> ListIterator<T> uniqueConstraints();
+	int uniqueConstraintsSize();
+	UniqueConstraint addUniqueConstraint(int index);
+	void removeUniqueConstraint(int index);
+	void removeUniqueConstraint(UniqueConstraint uniqueConstraint);
+	void moveUniqueConstraint(int targetIndex, int sourceIndex);
+		String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
+
+
+	// ********** database stuff **********
+
+	org.eclipse.jpt.db.Table getDbTable();
+	Schema getDbSchema();
+	Catalog getDbCatalog();
+	SchemaContainer getDbSchemaContainer();
+
+	/**
+	 * Return whether the table can be resolved to a table on the database.
+	 */
+	boolean isResolved();
+
+	/**
+	 * Return whether the table's schema can be resolved to a schema on the
+	 * database.
+	 */
+	boolean hasResolvedSchema();
+
+	/**
+	 * Return whether the table has a catalog and it can be resolved to a
+	 * catalog on the database.
+	 */
+	boolean hasResolvedCatalog();
+
+	/**
+	 * Return whether the table is specified in the resource.
+	 */
+	boolean isResourceSpecified();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java
new file mode 100644
index 0000000..0959fe6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TableGenerator.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.db.Table;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface TableGenerator
+	extends Generator
+{
+	int DEFAULT_INITIAL_VALUE = 0;
+
+
+	// ********** table **********
+
+	/**
+	 * Return the specified table if present, otherwise return the default
+	 * table.
+	 */
+	String getTable();
+	String getSpecifiedTable();
+	void setSpecifiedTable(String value);
+		String SPECIFIED_TABLE_PROPERTY = "specifiedTable"; //$NON-NLS-1$
+	String getDefaultTable();
+		String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$
+
+
+	// ********** schema **********
+
+	/**
+	 * Return the specified schema if present, otherwise return the default
+	 * schema.
+	 */
+	String getSchema();
+	String getSpecifiedSchema();
+	void setSpecifiedSchema(String value);
+		String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
+	String getDefaultSchema();
+		String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
+
+
+	// ********** catalog **********
+
+	/**
+	 * Return the specified catalog if present, otherwise return the default
+	 * catalog.
+	 */
+	String getCatalog();
+	String getSpecifiedCatalog();
+	void setSpecifiedCatalog(String value);
+		String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
+	String getDefaultCatalog();
+		String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
+
+
+	// ********** primary key column name **********
+
+	/**
+	 * Return the specified primary key colum name if present, otherwise return
+	 * the default primary key colum name.
+	 */
+	String getPkColumnName();
+	String getSpecifiedPkColumnName();
+	void setSpecifiedPkColumnName(String value);
+		String SPECIFIED_PK_COLUMN_NAME_PROPERTY = "specifiedPkColumnName"; //$NON-NLS-1$
+	String getDefaultPkColumnName();
+		String DEFAULT_PK_COLUMN_NAME_PROPERTY = "defaultPkColumnName"; //$NON-NLS-1$
+
+
+	// ********** value column name **********
+
+	/**
+	 * Return the specified value colum name if present, otherwise return
+	 * the default value colum name.
+	 */
+	String getValueColumnName();
+	String getSpecifiedValueColumnName();
+	void setSpecifiedValueColumnName(String value);
+		String SPECIFIED_VALUE_COLUMN_NAME_PROPERTY = "specifiedValueColumnName"; //$NON-NLS-1$
+	String getDefaultValueColumnName();
+		String DEFAULT_VALUE_COLUMN_NAME_PROPERTY = "defaultValueColumnName"; //$NON-NLS-1$
+
+
+	// ********** primary key column value **********
+
+	/**
+	 * Return the specified primary key colum value if present, otherwise return
+	 * the default primary key colum value.
+	 */
+	String getPkColumnValue();
+	String getSpecifiedPkColumnValue();
+	void setSpecifiedPkColumnValue(String value);
+		String SPECIFIED_PK_COLUMN_VALUE_PROPERTY = "specifiedPkColummValue"; //$NON-NLS-1$
+	String getDefaultPkColumnValue();
+		String DEFAULT_PK_COLUMN_VALUE_PROPERTY = "defaultPkColummValue"; //$NON-NLS-1$
+
+
+	// ********** unique constraints **********
+
+	<T extends UniqueConstraint> ListIterator<T> uniqueConstraints();
+	int uniqueConstraintsSize();
+	UniqueConstraint addUniqueConstraint(int index);
+	void removeUniqueConstraint(int index);
+	void removeUniqueConstraint(UniqueConstraint uniqueConstraint);
+	void moveUniqueConstraint(int targetIndex, int sourceIndex);
+		String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
+
+
+	// ********** database stuff **********
+
+	/**
+	 * Return a db Table object with the specified/default table name.
+	 * This can return null if no Table exists on the database with that name.
+	 */
+	Table getDbTable();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TemporalConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TemporalConverter.java
new file mode 100644
index 0000000..965d773
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TemporalConverter.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface TemporalConverter
+	extends Converter
+{
+	TemporalType getTemporalType();
+	void setTemporalType(TemporalType temporalType);
+		String TEMPORAL_TYPE_PROPERTY = "temporalType"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TemporalType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TemporalType.java
new file mode 100644
index 0000000..08900ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TemporalType.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * Temporal Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum TemporalType {
+
+	DATE(
+			org.eclipse.jpt.core.resource.java.TemporalType.DATE,
+			org.eclipse.jpt.core.resource.orm.TemporalType.DATE
+		),
+	TIME(
+			org.eclipse.jpt.core.resource.java.TemporalType.TIME,
+			org.eclipse.jpt.core.resource.orm.TemporalType.TIME
+		),
+	TIMESTAMP(
+			org.eclipse.jpt.core.resource.java.TemporalType.TIMESTAMP,
+			org.eclipse.jpt.core.resource.orm.TemporalType.TIMESTAMP
+		);
+
+
+	private org.eclipse.jpt.core.resource.java.TemporalType javaTemporalType;
+	private org.eclipse.jpt.core.resource.orm.TemporalType ormTemporalType;
+
+	TemporalType(org.eclipse.jpt.core.resource.java.TemporalType javaTemporalType, org.eclipse.jpt.core.resource.orm.TemporalType ormTemporalType) {
+		if (javaTemporalType == null) {
+			throw new NullPointerException();
+		}
+		if (ormTemporalType == null) {
+			throw new NullPointerException();
+		}
+		this.javaTemporalType = javaTemporalType;
+		this.ormTemporalType = ormTemporalType;
+	}
+
+	public org.eclipse.jpt.core.resource.java.TemporalType getJavaTemporalType() {
+		return this.javaTemporalType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.TemporalType getOrmTemporalType() {
+		return this.ormTemporalType;
+	}
+
+
+	// ********** static methods **********
+
+	public static TemporalType fromJavaResourceModel(org.eclipse.jpt.core.resource.java.TemporalType javaTemporalType) {
+		return (javaTemporalType == null) ? null : fromJavaResourceModel_(javaTemporalType);
+	}
+
+	private static TemporalType fromJavaResourceModel_(org.eclipse.jpt.core.resource.java.TemporalType javaTemporalType) {
+		for (TemporalType temporalType : TemporalType.values()) {
+			if (temporalType.getJavaTemporalType() == javaTemporalType) {
+				return temporalType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.java.TemporalType toJavaResourceModel(TemporalType temporalType) {
+		return (temporalType == null) ? null : temporalType.getJavaTemporalType();
+	}
+
+	public static TemporalType fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.TemporalType ormTemporalType) {
+		return (ormTemporalType == null) ? null : fromOrmResourceModel_(ormTemporalType);
+	}
+
+	private static TemporalType fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.TemporalType ormTemporalType) {
+		for (TemporalType temporalType : TemporalType.values()) {
+			if (temporalType.getOrmTemporalType() == ormTemporalType) {
+				return temporalType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.TemporalType toOrmResourceModel(TemporalType temporalType) {
+		return (temporalType == null) ? null : temporalType.getOrmTemporalType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TransientMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TransientMapping.java
new file mode 100644
index 0000000..6343f54
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TransientMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface TransientMapping
+	extends AttributeMapping
+{
+	// nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java
new file mode 100644
index 0000000..f9979cf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/TypeMapping.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.db.Schema;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still under
+ * development and expected to change significantly before reaching stability.
+ * It is available at this early stage to solicit feedback from pioneering
+ * adopters on the understanding that any code that uses this API will almost
+ * certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface TypeMapping
+	extends JpaContextNode {
+	/**
+	 * Return a unique key for the ITypeMapping. If this is defined in an
+	 * extension they should be equal.
+	 */
+	String getKey();
+
+	PersistentType getPersistentType();
+
+	boolean isMapped();
+	
+	/**
+	 * Return the resolved id class specified on this type mapping, null otherwise
+	 */
+	JavaPersistentType getIdClass();
+	
+	/**
+	 * Return the type mapping's primary table name, null if a primary table
+	 * does not apply.
+	 */
+	String getPrimaryTableName();
+
+	/**
+	 * Return the type mapping's primary database table.
+	 */
+	org.eclipse.jpt.db.Table getPrimaryDbTable();
+
+	Schema getDbSchema();
+
+	/**
+	 * Return the type mapping of this type mapping's super type.
+	 * Return null if this is the root.
+	 */
+	TypeMapping getSuperTypeMapping();
+	
+	/**
+	 * Return the type mapping's "persistence" inheritance hierarchy,
+	 * <em>including</em> the type mapping itself.
+	 * The returned iterator will return elements infinitely if the hierarchy
+	 * has a loop.
+	 */
+	Iterator<TypeMapping> inheritanceHierarchy();
+	
+	/**
+	 * Return the type mapping's "associated" tables, which includes the primary
+	 * table and the collection of secondary tables.
+	 */
+	Iterator<Table> associatedTables();
+
+	/**
+	 * Return the type mapping's "associated" tables, which includes the primary
+	 * table and the collection of secondary tables, as well as all inherited
+	 * "associated" tables.
+	 */
+	Iterator<Table> associatedTablesIncludingInherited();
+
+	/**
+	 * Return the identifiers of the type mapping's "associated" tables, which
+	 * includes the primary table and the collection of secondary tables, as
+	 * well as all the inherited "associated" tables.
+	 */
+	Iterator<String> associatedTableNamesIncludingInherited();
+
+	/**
+	 * return the resolved associated db table with the passed in name
+	 */
+	org.eclipse.jpt.db.Table getDbTable(String tableName);
+
+	/**
+	 * Return whether the specified table is invalid for any annotations
+	 * associated with the type mapping.
+	 */
+	boolean tableNameIsInvalid(String tableName);
+	
+	/**
+	 * A convenience method for getting the attribute mappings from PersistentType.attributes()
+	 */
+	<T extends AttributeMapping> Iterator<T> attributeMappings();
+	
+	/**
+	 * Return attribute mappings of a particular mapping type that are declared on this type mapping
+	 */
+	<T extends AttributeMapping> Iterable<T> getAttributeMappings(String mappingKey);
+	
+	/**
+	 * Return all the attribute mappings in the type mapping's
+	 * inheritance hierarchy.
+	 */
+	Iterator<AttributeMapping> allAttributeMappings();
+	
+	/**
+	 * Return attribute mappings of a particular mapping type that are declared anywhere on this 
+	 * type mapping's hierarchy
+	 */
+	<T extends AttributeMapping> Iterable<T> getAllAttributeMappings(String mappingKey);
+	
+	/**
+	 * Return an Iterator of attribute names that can be overridden by a 
+	 * sub type mapping.
+	 */
+	Iterator<String> overridableAttributeNames();
+
+	/**
+	 * Return an Iterator of all attribute names that can be overridden in this
+	 * type mapping.
+	 */
+	Iterator<String> allOverridableAttributeNames();
+	
+	/**
+	 * Returns the Column of the overridable attribute mapping with the given 
+	 * attribute name. In 2.0 this name could use dot-notation for nested mappings.
+	 */
+	Column resolveOverriddenColumn(String attributeName);
+
+
+	RelationshipReference resolveRelationshipReference(String associationOverrideName);
+
+	/**
+	 * Return an Iterator of associations names that can be overridden in this
+	 * type mapping.
+	 */
+	Iterator<String> overridableAssociationNames();
+	
+	/**
+	 * Return an Iterator of all associations names that can be overridden in this
+	 * type mapping.
+	 */
+	Iterator<String> allOverridableAssociationNames();
+
+	/**
+	 * Return whether the given attribute mapping key is valid for this
+	 * particular type mapping (for example, id's are not valid for an
+	 * embeddable type mapping)
+	 */
+	boolean attributeMappingKeyAllowed(String attributeMappingKey);
+	
+	/**
+	 * Return whether any database metadata specific validation should occur.
+	 * (For instance, if the connection is not active, then it should not.)
+	 */
+	boolean shouldValidateAgainstDatabase();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/UniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/UniqueConstraint.java
new file mode 100644
index 0000000..013e467
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/UniqueConstraint.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface UniqueConstraint
+	extends JpaContextNode
+{
+	
+	// **************** column names **************************************
+
+	/**
+	 * Return a list iterator of the column names.
+	 * This will not be null.
+	 */
+	ListIterator<String> columnNames();
+	
+	/**
+	 * Return the number of column names.
+	 */
+	int columnNamesSize();
+		
+	/**
+	 * Add a column name to the list at the given index
+	 */
+	void addColumnName(int index, String columnName);
+	
+	/**
+	 * Remove the column name at the given index from the unique constraint
+	 */
+	void removeColumnName(int index);
+	
+	/**
+	 * Remove the column name from the unique constraint
+	 */
+	void removeColumnName(String columnName);
+	
+	/**
+	 * Move the column name from the source index to the target index.
+	 */
+	void moveColumnName(int targetIndex, int sourceIndex);
+		String COLUMN_NAMES_LIST = "columnNames"; //$NON-NLS-1$
+		
+	/**
+	 * All containers must implement this interface.
+	 */
+	interface Owner
+	{
+		Iterator<String> candidateUniqueConstraintColumnNames();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/VersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/VersionMapping.java
new file mode 100644
index 0000000..762120b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/VersionMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface VersionMapping
+	extends AttributeMapping, ColumnMapping, ConvertibleMapping
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/XmlContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/XmlContextNode.java
new file mode 100644
index 0000000..bf85a41
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/XmlContextNode.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import java.util.List;
+
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.1
+ */
+public interface XmlContextNode
+	extends JpaContextNode
+{
+	/**
+	 * Add to the list of current validation messages
+	 */
+	void validate(List<IMessage> messages, IReporter reporter);
+
+	TextRange getValidationTextRange();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/XmlFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/XmlFile.java
new file mode 100644
index 0000000..c33eff9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/XmlFile.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+/**
+ * Context representation of any JPA XML file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface XmlFile
+	extends XmlContextNode, JpaStructureNode
+{
+	/**
+	 * Return the resource model object
+	 */
+	JpaXmlResource getXmlResource();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JarFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JarFile.java
new file mode 100644
index 0000000..7d6391f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JarFile.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.persistence.PersistentTypeContainer;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * A JAR file identified by a <code>persistence.xml</code> <code>jar-file</code> element.
+ * Holds persistent types corresponding to all the "persistable" types
+ * discovered in the JAR.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JarFile
+	extends JpaContextNode, JpaStructureNode, PersistentTypeContainer
+{
+	/**
+	 * Return the JAR file's Java persistent types.
+	 * Return only the types that are annotated with JPA annotations.
+	 */
+	Iterator<JavaPersistentType> javaPersistentTypes();
+		String JAVA_PERSISTENT_TYPES_COLLECTION = "javaPersistentTypes"; //$NON-NLS-1$
+
+	/**
+	 * Return the size of the JAR file's Java persistent types.
+	 */
+	int javaPersistentTypesSize();
+
+	/**
+	 * Return the persistent type with the specified name.
+	 * Return null if the persistent type is not found.
+	 */
+	PersistentType getPersistentType(String typeName);
+
+	/**
+	 * Synchronize the context JAR file to the specified Java package fragment
+	 * root.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(JavaResourcePackageFragmentRoot jrpfr);
+
+	/**
+	 * Add to the list of current validation messages
+	 */
+	void validate(List<IMessage> messages, IReporter reporter);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverride.java
new file mode 100644
index 0000000..bc1e8e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverride.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaAssociationOverride
+	extends AssociationOverride, JavaOverride
+{
+	JavaAssociationOverrideRelationshipReference getRelationshipReference();
+
+	JavaAssociationOverride setVirtual(boolean virtual);
+	
+	AssociationOverrideAnnotation getOverrideAnnotation();
+	
+	void initialize(AssociationOverrideAnnotation associationOverride);
+	
+	/**
+	 * Update the JavaAssociationOverride context model object to match the AssociationOverrideAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(AssociationOverrideAnnotation associationOverride);
+
+	JavaAssociationOverride.Owner getOwner();
+
+	interface Owner extends AssociationOverride.Owner, JavaOverride.Owner
+	{
+		//nothing yet
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverrideContainer.java
new file mode 100644
index 0000000..77e9593
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverrideContainer.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.AssociationOverrideContainer;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAssociationOverrideContainer
+	extends AssociationOverrideContainer, JavaOverrideContainer
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaAssociationOverride> associationOverrides();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaAssociationOverride> specifiedAssociationOverrides();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaAssociationOverride> virtualAssociationOverrides();
+	
+	JavaAssociationOverride getAssociationOverrideNamed(String name);
+
+	interface Owner extends AssociationOverrideContainer.Owner, JavaOverrideContainer.Owner
+	{
+		//nothing yet
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..43b82e9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAssociationOverrideRelationshipReference.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+
+/**
+ * An <code>AssociationOverrideRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinColumnJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAssociationOverrideRelationshipReference 
+	extends AssociationOverrideRelationshipReference, JavaJpaContextNode
+{
+	JavaAssociationOverride getAssociationOverride();
+	
+	JavaJoinColumnInAssociationOverrideJoiningStrategy getJoinColumnJoiningStrategy();
+
+	void initialize(AssociationOverrideAnnotation associationOverride);
+	
+	void update(AssociationOverrideAnnotation associationOverride);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeMapping.java
new file mode 100644
index 0000000..aee97dc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeMapping.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.resource.java.Annotation;
+
+/**
+ * Java attribute mapping
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaAttributeMapping
+	extends AttributeMapping, JavaJpaContextNode
+{
+	/**
+	 * Covariant override.
+	 */
+	JavaPersistentAttribute getPersistentAttribute();
+
+	Annotation getMappingAnnotation();
+
+	void initialize(Annotation mappingAnnotation);
+
+	/**
+	 * Update the JavaAttributeMapping context model object to match the JavaResourcePersistentAttribute 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	//TODO want to remove parameter from the update method, but we have to have
+	//it because of GenericJavaPersistentAttribute.setSpecifiedMappingKey(), it is unable
+	//to call initialize and pass the resource object in before the update is called.
+	void update(Annotation mappingAnnotation);
+	
+	String getAnnotationName();
+	
+	/**
+	 * Return all fully qualified annotation names that are supported with this mapping type.
+	 * This includes all possible annotations, not just the ones that currently exist on the attribute.
+	 */
+	Iterable<String> getSupportingAnnotationNames();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeMappingDefinition.java
new file mode 100644
index 0000000..4083181
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeMappingDefinition.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+
+/**
+ * Map a string key to an attribute mapping and its corresponding
+ * Java annotation.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAttributeMappingDefinition 
+{
+	/**
+	 * Return the attribute mapping's key.
+	 */
+	String getKey();
+	
+	/**
+	 * Return the attribute mapping's Java annotation name.
+	 */
+	String getAnnotationName();
+	
+	/**
+	 * Build a Java attribute mapping for the specified attribute. Use the specified
+	 * factory for creation so extenders can simply override the appropriate
+	 * creation method instead of building a provider for the same key.
+	 */
+	JavaAttributeMapping buildMapping(JavaPersistentAttribute attribute, JpaFactory factory);
+	
+	/**
+	 * Return whether this mapping provider should be used for the given {@link JavaPersistentAttribute} 
+	 * in the default (ignoring all mapping annotations) case.
+	 */
+	boolean testDefault(JavaPersistentAttribute persistentAttribute);
+	
+	/**
+	 * Return whether this mapping provider should be used for the given {@link JavaPersistentAttribute} 
+	 * in the specified (observing all mapping annotations) case.
+	 */
+	boolean testSpecified(JavaPersistentAttribute persistentAttribute);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeOverride.java
new file mode 100644
index 0000000..273533e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeOverride.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaAttributeOverride
+	extends AttributeOverride, JavaOverride, JavaBaseColumn.Owner
+{
+	JavaColumn getColumn();
+	
+	JavaAttributeOverride setVirtual(boolean virtual);
+	
+	AttributeOverrideAnnotation getOverrideAnnotation();
+	
+	void initialize(AttributeOverrideAnnotation attributeOverride);
+	
+	/**
+	 * Update the JavaAttributeOverride context model object to match the AttributeOverrideAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(AttributeOverrideAnnotation attributeOverride);
+	
+	interface Owner
+		extends AttributeOverride.Owner, JavaOverride.Owner
+	{
+		//nothing yet
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeOverrideContainer.java
new file mode 100644
index 0000000..6082847
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaAttributeOverrideContainer.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.AttributeOverrideContainer;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAttributeOverrideContainer
+	extends AttributeOverrideContainer, JavaOverrideContainer
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaAttributeOverride> attributeOverrides();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaAttributeOverride> specifiedAttributeOverrides();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaAttributeOverride> virtualAttributeOverrides();
+	
+	JavaAttributeOverride getAttributeOverrideNamed(String name);
+	
+	interface Owner extends AttributeOverrideContainer.Owner, JavaOverrideContainer.Owner
+	{		
+		//nothing yet
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseColumn.java
new file mode 100644
index 0000000..d07b836
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseColumn.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaBaseColumn
+	extends BaseColumn, JavaNamedColumn
+{
+
+	/**
+	 * Return the (best guess) text location of the column's table.
+	 */
+	TextRange getTableTextRange(CompilationUnit astRoot);
+	
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner extends JavaNamedColumn.Owner, BaseColumn.Owner
+	{
+		// nothing?
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseEmbeddedMapping.java
new file mode 100644
index 0000000..eaa8eea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseEmbeddedMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.BaseEmbeddedMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaBaseEmbeddedMapping
+	extends JavaAttributeMapping, BaseEmbeddedMapping
+{
+	JavaAttributeOverrideContainer getAttributeOverrideContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseJoinColumn.java
new file mode 100644
index 0000000..ef7015a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBaseJoinColumn.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaBaseJoinColumn
+	extends BaseJoinColumn, JavaNamedColumn
+{
+
+	/**
+	 * Return the (best guess) text location of the referenced column name
+	 */
+	TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * interface allowing join columns to be used in multiple places
+	 * (e.g. 1:1 mappings and join tables)
+	 */
+	interface Owner extends BaseJoinColumn.Owner, JavaNamedColumn.Owner
+	{
+		// nothing?
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBasicMapping.java
new file mode 100644
index 0000000..35d43cf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaBasicMapping.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.BasicMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaBasicMapping
+	extends JavaAttributeMapping, BasicMapping, JavaColumnMapping
+{
+	//********* covariant overrides **********
+	JavaConverter getConverter();
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaCascade.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaCascade.java
new file mode 100644
index 0000000..b04a6e3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaCascade.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.Cascade;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCascade
+	extends Cascade, JavaJpaContextNode
+{
+	void initialize();
+
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaColumn.java
new file mode 100644
index 0000000..f9371a9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaColumn.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaColumn
+	extends Column, JavaBaseColumn
+{
+	void initialize(ColumnAnnotation resourceColumn);
+	
+	/**
+	 * Update the JavaColumn context model object to match the ColumnAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(ColumnAnnotation resourceColumn);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaColumnMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaColumnMapping.java
new file mode 100644
index 0000000..5766cc9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaColumnMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.ColumnMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaColumnMapping
+	extends JavaJpaContextNode, ColumnMapping, JavaBaseColumn.Owner
+{
+	JavaColumn getColumn();
+} 
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaConverter.java
new file mode 100644
index 0000000..6d5604b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaConverter.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+ public interface JavaConverter
+ 	extends JavaJpaContextNode, Converter
+{	
+	
+	/**
+	 * Update the JavaConverter context model object to match the JavaResourcePersistentAttribute 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(JavaResourcePersistentAttribute jrpa);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaDiscriminatorColumn.java
new file mode 100644
index 0000000..1a901b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaDiscriminatorColumn.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaDiscriminatorColumn
+	extends JavaNamedColumn, DiscriminatorColumn
+{	
+	void initialize(DiscriminatorColumnAnnotation resourceColumn);
+	
+	/**
+	 * Update the JavaDiscriminatorColumn context model object to match the DiscriminatorColumnAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(DiscriminatorColumnAnnotation resourceColumn);
+		
+	/**
+	 * interface allowing columns to be used in multiple places
+	 */
+	interface Owner extends JavaNamedColumn.Owner, DiscriminatorColumn.Owner
+	{
+
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddable.java
new file mode 100644
index 0000000..871dc44
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddable.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.Embeddable;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEmbeddable
+	extends JavaTypeMapping, Embeddable
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddedIdMapping.java
new file mode 100644
index 0000000..5cf80a8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddedIdMapping.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.EmbeddedIdMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEmbeddedIdMapping
+	extends JavaBaseEmbeddedMapping, EmbeddedIdMapping
+{
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddedMapping.java
new file mode 100644
index 0000000..e1d7d55
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEmbeddedMapping.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.EmbeddedMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEmbeddedMapping 
+	extends JavaBaseEmbeddedMapping, EmbeddedMapping
+{
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEntity.java
new file mode 100644
index 0000000..acbd131
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEntity.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.Entity;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaEntity
+	extends JavaTypeMapping, Entity
+{
+	JavaTable getTable();
+	
+	JavaIdClassReference getIdClassReference();
+	
+	JavaDiscriminatorColumn getDiscriminatorColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaSecondaryTable> secondaryTables();	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaSecondaryTable> specifiedSecondaryTables();
+	JavaSecondaryTable addSpecifiedSecondaryTable(int index);
+	JavaSecondaryTable addSpecifiedSecondaryTable();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+	JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns();
+	JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+	
+
+	JavaAttributeOverrideContainer getAttributeOverrideContainer();
+	
+	JavaAssociationOverrideContainer getAssociationOverrideContainer();
+	
+	JavaQueryContainer getQueryContainer();
+	
+	JavaGeneratorContainer getGeneratorContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEnumeratedConverter.java
new file mode 100644
index 0000000..819d355
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaEnumeratedConverter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.EnumeratedConverter;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+ public interface JavaEnumeratedConverter
+ 	extends JavaConverter, EnumeratedConverter
+{	
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratedValue.java
new file mode 100644
index 0000000..8e2967f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratedValue.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.GeneratedValue;
+import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaGeneratedValue
+	extends GeneratedValue, JavaJpaContextNode
+{
+
+	/**
+	 * Return the (best guess) text location of the generator.
+	 */
+	TextRange getGeneratorTextRange(CompilationUnit astRoot);
+	
+	void initialize(GeneratedValueAnnotation generatedValueAnnotation);
+	
+	/**
+	 * Update the JavaGeneratedValue context model object to match the GeneratedValueAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(GeneratedValueAnnotation generatedValueAnnotation);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGenerator.java
new file mode 100644
index 0000000..4752f37
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGenerator.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaGenerator 
+	extends Generator, JavaJpaContextNode
+{
+	TextRange getNameTextRange(CompilationUnit astRoot);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java
new file mode 100644
index 0000000..01e98a4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.GeneratorContainer;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaGeneratorContainer
+	extends GeneratorContainer, JavaJpaContextNode
+{
+	JavaSequenceGenerator getSequenceGenerator();
+
+	JavaSequenceGenerator addSequenceGenerator();
+
+	JavaTableGenerator getTableGenerator();
+
+	JavaTableGenerator addTableGenerator();
+	
+	void initialize(JavaResourcePersistentMember jrpm);
+	
+	/**
+	 * Update the JavaGeneratorContainer context model object to match the JavaResourcePersistentMember 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(JavaResourcePersistentMember jrpm);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaIdClassReference.java
new file mode 100644
index 0000000..dcb98f5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaIdClassReference.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.IdClassReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaIdClassReference
+	extends IdClassReference, JavaJpaContextNode
+{
+	void initialize();
+	
+	void update();
+
+	/**
+	 * Return the fully qualified name of the id class, taking into consideration the default value if applicable
+	 */
+	String getFullyQualifiedIdClassName();
+		String FULLY_QUALIFIED_ID_CLASS_PROPERTY = "fullyQualifiedIdClass"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaIdMapping.java
new file mode 100644
index 0000000..aaa8e10
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaIdMapping.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.IdMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaIdMapping
+	extends JavaAttributeMapping, IdMapping, JavaColumnMapping
+{
+	//********* covariant overrides **********
+	JavaGeneratorContainer getGeneratorContainer();
+	
+	JavaConverter getConverter();
+
+	JavaGeneratedValue getGeneratedValue();
+	JavaGeneratedValue addGeneratedValue();
+} 
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumn.java
new file mode 100644
index 0000000..46ea9a1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumn.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+
+/**
+ * Java join column
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaJoinColumn
+	extends JoinColumn, JavaBaseJoinColumn, JavaBaseColumn
+{
+	/**
+	 * Initialize the join column from the specified annotation.
+	 */
+	void initialize(JoinColumnAnnotation joinColumnAnnotation);
+
+	/**
+	 * Update the join column from the specified annotation.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(JoinColumnAnnotation joinColumnAnnotation);
+	
+	interface Owner
+		extends JoinColumn.Owner, JavaBaseJoinColumn.Owner, JavaBaseColumn.Owner
+	{
+		// nothing?
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnEnabledRelationshipReference.java
new file mode 100644
index 0000000..3948078
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnEnabledRelationshipReference.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaJoinColumnEnabledRelationshipReference
+	extends JavaRelationshipReference, JoinColumnEnabledRelationshipReference
+{
+	JavaJoinColumnJoiningStrategy getJoinColumnJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnInAssociationOverrideJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnInAssociationOverrideJoiningStrategy.java
new file mode 100644
index 0000000..6844fc7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnInAssociationOverrideJoiningStrategy.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaJoinColumnInAssociationOverrideJoiningStrategy 
+	extends JavaJpaContextNode, JavaJoinColumnJoiningStrategy
+{
+
+	void initialize(AssociationOverrideAnnotation associationOverride);
+	
+	void update(AssociationOverrideAnnotation associationOverride);
+	
+	ListIterator<JavaJoinColumn> joinColumns();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..e41b6d4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinColumnJoiningStrategy.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+
+/**
+ * The java representation of a {@link JoinColumnJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaJoinColumnJoiningStrategy
+	extends JavaJoiningStrategy, JoinColumnJoiningStrategy
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaJoinColumn> joinColumns();
+	
+	JavaJoinColumn getDefaultJoinColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaJoinColumn> specifiedJoinColumns();
+	
+	JavaJoinColumn addSpecifiedJoinColumn(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTable.java
new file mode 100644
index 0000000..1159aaf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTable.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+
+/**
+ * Java join table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaJoinTable
+	extends JoinTable, JavaReferenceTable
+{
+	void initialize(JoinTableAnnotation joinTableAnnotation);
+
+	void update(JoinTableAnnotation joinTableAnnotation);
+
+
+	// ********** covariant overrides **********
+
+	ListIterator<JavaJoinColumn> joinColumns();
+
+	JavaJoinColumn getDefaultJoinColumn();
+
+	ListIterator<JavaJoinColumn> specifiedJoinColumns();
+
+	JavaJoinColumn addSpecifiedJoinColumn(int index);
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaJoinColumn> inverseJoinColumns();
+
+	JavaJoinColumn getDefaultInverseJoinColumn();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaJoinColumn> specifiedInverseJoinColumns();
+
+	JavaJoinColumn addSpecifiedInverseJoinColumn(int index);
+
+	ListIterator<JavaUniqueConstraint> uniqueConstraints();
+
+	JavaUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTableEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTableEnabledRelationshipReference.java
new file mode 100644
index 0000000..707735c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTableEnabledRelationshipReference.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaJoinTableEnabledRelationshipReference
+	extends JavaRelationshipReference, JoinTableEnabledRelationshipReference
+{
+	JavaJoinTableJoiningStrategy getJoinTableJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..ac5567a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoinTableJoiningStrategy.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+
+/**
+ * The java representation of a {@link JoinTableJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JavaJoinTableJoiningStrategy
+	extends JavaJoiningStrategy, JoinTableJoiningStrategy
+{
+	JavaJoinTable getJoinTable();
+	
+	/**
+	 * Return the join table annotation, use a null object instead of returning null
+	 * if the join table annotation does not exist.
+	 */
+	JoinTableAnnotation getAnnotation();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoiningStrategy.java
new file mode 100644
index 0000000..7fc8c57
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJoiningStrategy.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JavaJoiningStrategy
+	extends JavaJpaContextNode, JoiningStrategy
+{
+	void initialize();
+	
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJpaContextNode.java
new file mode 100644
index 0000000..cc2cb39
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaJpaContextNode.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaJpaContextNode
+	extends JpaContextNode
+{
+	
+	/**
+	 * Return the Java code-completion proposals for the specified position
+	 * in the source code.
+	 */
+	Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
+	
+
+	// ******************** validation ***************************8
+	
+	/**
+	 * Adds to the list of current validation messages
+	 */
+	void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
+
+	TextRange getValidationTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaLobConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaLobConverter.java
new file mode 100644
index 0000000..26a8b77
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaLobConverter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.LobConverter;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+ public interface JavaLobConverter
+ 	extends JavaConverter, LobConverter
+{	
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToManyMapping.java
new file mode 100644
index 0000000..26f66d2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToManyMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.ManyToManyMapping;
+import org.eclipse.jpt.core.resource.java.ManyToManyAnnotation;
+
+/**
+ * The java representation of a {@link ManyToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaManyToManyMapping
+	extends JavaMultiRelationshipMapping, ManyToManyMapping
+{
+	ManyToManyAnnotation getMappingAnnotation();
+	
+	JavaManyToManyRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToManyRelationshipReference.java
new file mode 100644
index 0000000..aba0f6b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToManyRelationshipReference.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.ManyToManyRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link JavaManyToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaManyToManyRelationshipReference
+	extends ManyToManyRelationshipReference, JavaOwnableRelationshipReference, 
+		JavaJoinTableEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToOneMapping.java
new file mode 100644
index 0000000..1323575
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToOneMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.ManyToOneMapping;
+import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+
+/**
+ * The java representation of a {@link ManyToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaManyToOneMapping
+	extends JavaSingleRelationshipMapping, ManyToOneMapping
+{
+	ManyToOneAnnotation getMappingAnnotation();
+	
+	JavaManyToOneRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToOneRelationshipReference.java
new file mode 100644
index 0000000..7a06f19
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaManyToOneRelationshipReference.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.ManyToOneRelationshipReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaManyToOneRelationshipReference
+	extends ManyToOneRelationshipReference, 
+		JavaJoinColumnEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMappedByJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMappedByJoiningStrategy.java
new file mode 100644
index 0000000..4ce7a8d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMappedByJoiningStrategy.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.MappedByJoiningStrategy;
+
+/**
+ * The java representation of a {@link MappedByJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaMappedByJoiningStrategy
+	extends JavaJoiningStrategy, MappedByJoiningStrategy
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMappedSuperclass.java
new file mode 100644
index 0000000..54e56c8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMappedSuperclass.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.MappedSuperclass;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaMappedSuperclass
+	extends JavaTypeMapping, MappedSuperclass
+{
+	JavaIdClassReference getIdClassReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMultiRelationshipMapping.java
new file mode 100644
index 0000000..3284259
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaMultiRelationshipMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.MultiRelationshipMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaMultiRelationshipMapping
+	extends JavaRelationshipMapping, MultiRelationshipMapping
+{
+	JavaOrderable getOrderable();
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedColumn.java
new file mode 100644
index 0000000..4069c4e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedColumn.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaNamedColumn
+	extends NamedColumn, JavaJpaContextNode
+{
+	
+	/**
+	 * Return the (best guess) text location of the column's name.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner extends NamedColumn.Owner
+	{
+		/**
+		 * Return the column owner's text range. This can be returned by the
+		 * column when its annotation is not present.
+		 */
+		TextRange getValidationTextRange(CompilationUnit astRoot);
+
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedNativeQuery.java
new file mode 100644
index 0000000..627d961
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedNativeQuery.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.NamedNativeQuery;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaNamedNativeQuery
+	extends NamedNativeQuery, JavaQuery
+{
+
+	ListIterator<JavaQueryHint> hints();
+
+	void initialize(NamedNativeQueryAnnotation resourceQuery);
+
+	/**
+	 * Update the JavaNamedNativeQuery context model object to match the NamedNativeQueryAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(NamedNativeQueryAnnotation resourceQuery);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedQuery.java
new file mode 100644
index 0000000..6d6bd85
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaNamedQuery.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.NamedQuery;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaNamedQuery
+	extends NamedQuery, JavaQuery
+{
+
+	ListIterator<JavaQueryHint> hints();
+
+	void initialize(NamedQueryAnnotation resourceNamedQuery);
+
+	/**
+	 * Update the JavaNamedQuery context model object to match the NamedQueryAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(NamedQueryAnnotation resourceNamedQuery);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToManyMapping.java
new file mode 100644
index 0000000..8faa6f3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToManyMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.OneToManyMapping;
+import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+
+/**
+ * The java representation of a {@link OneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaOneToManyMapping
+	extends JavaMultiRelationshipMapping, OneToManyMapping
+{
+	OneToManyAnnotation getMappingAnnotation();
+	
+	JavaOneToManyRelationshipReference getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToManyRelationshipReference.java
new file mode 100644
index 0000000..dfe6ea5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToManyRelationshipReference.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.OneToManyRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link JavaOneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaOneToManyRelationshipReference
+	extends OneToManyRelationshipReference, JavaOwnableRelationshipReference,
+		JavaJoinTableEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToOneMapping.java
new file mode 100644
index 0000000..219741f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToOneMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.OneToOneMapping;
+import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+
+/**
+ * The java representation of a {@link OneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaOneToOneMapping
+	extends JavaSingleRelationshipMapping, OneToOneMapping
+{
+	OneToOneAnnotation getMappingAnnotation();
+	
+	JavaOneToOneRelationshipReference getRelationshipReference();	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToOneRelationshipReference.java
new file mode 100644
index 0000000..2c97c14
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOneToOneRelationshipReference.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.OneToOneRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link JavaOneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaOneToOneRelationshipReference
+	extends OneToOneRelationshipReference, JavaOwnableRelationshipReference, 
+		JavaJoinColumnEnabledRelationshipReference, 
+		JavaPrimaryKeyJoinColumnEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOrderable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOrderable.java
new file mode 100644
index 0000000..b4a6202
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOrderable.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.Orderable;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOrderable 
+	extends Orderable, JavaJpaContextNode
+{
+
+	void initialize();
+
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOverride.java
new file mode 100644
index 0000000..0b27af8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOverride.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOverride
+	extends BaseOverride, JavaJpaContextNode
+{
+
+	OverrideAnnotation getOverrideAnnotation();
+	
+	interface Owner extends BaseOverride.Owner
+	{
+
+		/**
+		 * Return a prefix (ending in '.') that is allowed to be appended to the override name.
+		 * Return null if no prefix is supported.
+		 */
+		String getPossiblePrefix();
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOverrideContainer.java
new file mode 100644
index 0000000..1b039a8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOverrideContainer.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.OverrideContainer;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOverrideContainer
+	extends OverrideContainer, JavaJpaContextNode
+{
+	
+	void initialize(JavaResourcePersistentMember jrpm);
+	
+	/**
+	 * Update the JavaAttributeOverrideContainer context model object to match the JavaResourcePersistentMember 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(JavaResourcePersistentMember jrpm);
+	
+	interface Owner extends OverrideContainer.Owner
+	{		
+		TextRange getValidationTextRange(CompilationUnit astRoot);
+
+		/**
+		 * This is necessary for JPA 2.0. Return a prefix (ending in '.') that should be written
+		 * to the java source when an override is specified.
+		 */
+		String getWritePrefix();
+
+		/**
+		 * This is necessary for JPA 2.0. Return a prefix (ending in '.') that is allowed to be appended to the override name.
+		 * Return null if no prefix is supported. "map." and "key." are the prefixes supported in JPA 2.0.
+		 */
+		String getPossiblePrefix();
+
+		/**
+		 * This is necessary for JPA 2.0 where Override annotation can have a prefix that distinguishes them.
+		 * Return whether the given overrideName that might have a prefix is relevant to this particular override
+		 * container.  "map." and "key." are the prefixes supported in JPA 2.0.
+		 */
+		boolean isRelevant(String overrideName);
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOwnableRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOwnableRelationshipReference.java
new file mode 100644
index 0000000..1e03908
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaOwnableRelationshipReference.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.OwnableRelationshipReference;
+import org.eclipse.jpt.core.resource.java.OwnableRelationshipMappingAnnotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaOwnableRelationshipReference
+	extends JavaRelationshipReference, OwnableRelationshipReference
+{	
+	OwnableRelationshipMappingAnnotation getMappingAnnotation();
+	
+	JavaMappedByJoiningStrategy getMappedByJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java
new file mode 100644
index 0000000..2e7cbcb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentAttribute.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.CollectionMapping;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * Java persistent attribute (field or property)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaPersistentAttribute
+	extends PersistentAttribute, JavaJpaContextNode
+{
+	/**
+	 * covariant override
+	 */
+	JavaAttributeMapping getMapping();
+
+	/**
+	 * covariant override
+	 */
+	JavaAttributeMapping getSpecifiedMapping();
+
+	/**
+	 * Return the attribute's default mapping.
+	 */
+	JavaAttributeMapping getDefaultMapping();
+
+	/**
+	 * Update the context persistent attribute to match its
+	 * resource persistent attribute (passed in to the constructor).
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update();
+
+	/**
+	 * Return the "resource" persistent attribute.
+	 */
+	JavaResourcePersistentAttribute getResourcePersistentAttribute();
+
+	/**
+	 * Return whether the specified mapping is the attribute's default mapping.
+	 */
+	boolean mappingIsDefault(JavaAttributeMapping mapping);
+
+	/**
+	 * Return whether the attribute contains the given offset into the text file.
+	 */
+	boolean contains(int offset, CompilationUnit astRoot);
+
+	/**
+	 * Return the embeddable (type mapping) corresponding to the persistent
+	 * attribute's type. Return null if it is not found.
+	 */
+	Embeddable getEmbeddable();
+
+	/**
+	 * Return whether the attribute is a field (as opposed to a property).
+	 */
+	boolean isField();
+
+	/**
+	 * Return whether the attribute is a property (as opposed to a field).
+	 */
+	boolean isProperty();
+
+	/**
+	 * Return whether the attribute is 'public', which is problematic for fields.
+	 */
+	boolean isPublic();
+
+	/**
+	 * Return whether the attribute is 'final', which is problematic.
+	 */
+	boolean isFinal();
+
+	/**
+	 * Return whether the attribute's type is valid for a default Basic mapping.
+	 */
+	boolean typeIsBasic();
+
+	/**
+	 * Return the attribute's type name if it is valid as a target type
+	 * (i.e. the type is neither an array nor a "container").
+	 */
+	String getSingleReferenceTargetTypeName();
+
+	/**
+	 * If the attribute's type is an appropriate "container" type,
+	 * return the type parameter that can be used as a target type.
+	 * Return null if the attribute is not a container or if the type
+	 * parameter is not valid as a target type (i.e. it is either
+	 * an array or a "container").
+	 */
+	String getMultiReferenceTargetTypeName();
+
+	/**
+	 * If the attribute's type is a map type,
+	 * return the type parameter that can be used as a key type.
+	 * Return null if the attribute is not a map or if the type
+	 * parameter is not valid as a key type (i.e. it is either
+	 * an array or a "container").
+	 */
+	String getMultiReferenceMapKeyTypeName();
+
+	/**
+	 * Return the JpaContainer that corresponds to this attribute's type.
+	 * Return a null implementation if the type is not a container (map or collection)
+	 */
+	JpaContainer getJpaContainer();
+
+	/**
+	 * JPA container interface (and null implementation)
+	 */
+	interface JpaContainer {
+		String getTypeName();
+		boolean isContainer();
+		boolean isMap();
+		String getMultiReferenceTargetTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute);
+		String getMultiReferenceMapKeyTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute);
+		String getMetamodelContainerFieldTypeName();
+		String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping);
+
+		final class Null implements JpaContainer {
+			public static final JpaContainer INSTANCE = new Null();
+			public static JpaContainer instance() {
+				return INSTANCE;
+			}
+			// ensure single instance
+			private Null() {
+				super();
+			}
+			public String getTypeName() {
+				return null;
+			}
+			public boolean isContainer() {
+				return false;
+			}
+			public boolean isMap() {
+				return false;
+			}
+			public String getMultiReferenceTargetTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+				return null;
+			}
+			public String getMultiReferenceMapKeyTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+				return null;
+			}
+			public String getMetamodelContainerFieldTypeName() {
+				return JPA2_0.COLLECTION_ATTRIBUTE;
+			}
+			public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
+				return null;
+			}
+			@Override
+			public String toString() {
+				return "JpaContainer.Null";  //$NON-NLS-1$
+			}
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentType.java
new file mode 100644
index 0000000..dad99b0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPersistentType.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * Context Java persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaPersistentType
+	extends PersistentType, JavaJpaContextNode
+{
+	// ********** covariant overrides **********
+
+	JavaTypeMapping getMapping();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaPersistentAttribute> attributes();
+	
+	JavaPersistentAttribute getAttributeNamed(String attributeName);
+	
+	
+	// ********** Java **********
+	
+	/**
+	 * Return whether any attribute in this persistent type is annotated
+	 */
+	boolean hasAnyAnnotatedAttributes();
+	
+	/**
+	 * Return the Java resource persistent type.
+	 */
+	JavaResourcePersistentType getResourcePersistentType();
+
+
+	// ********** updating **********
+
+	/**
+	 * Synchronize the Java persistent type with the specified resource type.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(JavaResourcePersistentType jrpt);
+
+	/**
+	 * Re-synchronize the Java persistent type with its resource type.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..adf8b44
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumn.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaPrimaryKeyJoinColumn
+	extends PrimaryKeyJoinColumn, JavaBaseJoinColumn
+{
+	void initialize(PrimaryKeyJoinColumnAnnotation primaryKeyJoinColumn);
+	
+	/**
+	 * Update the JavaPrimaryKeyJoinColumn context model object to match the PrimaryKeyJoinColumnAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(PrimaryKeyJoinColumnAnnotation primaryKeyJoinColumn);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumnEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumnEnabledRelationshipReference.java
new file mode 100644
index 0000000..11c28c8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumnEnabledRelationshipReference.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumnEnabledRelationshipReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaPrimaryKeyJoinColumnEnabledRelationshipReference
+	extends JavaRelationshipReference,
+		PrimaryKeyJoinColumnEnabledRelationshipReference
+{
+	JavaPrimaryKeyJoinColumnJoiningStrategy getPrimaryKeyJoinColumnJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..9530c40
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaPrimaryKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumnJoiningStrategy;
+
+/**
+ * The java representation of a {@link PrimaryKeyJoinColumnJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaPrimaryKeyJoinColumnJoiningStrategy
+	extends JavaJoiningStrategy, PrimaryKeyJoinColumnJoiningStrategy
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+	
+	JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQuery.java
new file mode 100644
index 0000000..6d3d6e5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQuery.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaQuery
+	extends Query, JavaJpaContextNode
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaQueryHint> hints();
+
+	JavaQueryHint addHint(int index);
+	
+	
+	// **************** validation *********************************************
+	
+	TextRange getNameTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java
new file mode 100644
index 0000000..7aa11f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.QueryContainer;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaQueryContainer
+	extends QueryContainer, JavaJpaContextNode
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaNamedQuery> namedQueries();
+
+	JavaNamedQuery addNamedQuery(int index);
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaNamedNativeQuery> namedNativeQueries();
+
+	JavaNamedNativeQuery addNamedNativeQuery(int index);
+	
+	void initialize(JavaResourcePersistentMember jrpm);
+	
+	/**
+	 * Update the JavaGeneratorContainer context model object to match the JavaResourcePersistentMember 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(JavaResourcePersistentMember jrpm);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryHint.java
new file mode 100644
index 0000000..a9304c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryHint.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.QueryHint;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaQueryHint
+	extends QueryHint, JavaJpaContextNode
+{
+	void initialize(QueryHintAnnotation queryHintResource);
+	
+	/**
+	 * Update the JavaQueryHint context model object to match the QueryHintAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(QueryHintAnnotation queryHintResource);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaReferenceTable.java
new file mode 100644
index 0000000..ba7c1b0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaReferenceTable.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.ReferenceTable;
+
+/**
+ * Java reference table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaReferenceTable
+	extends ReferenceTable, JavaJpaContextNode
+{
+
+	// ********** covariant overrides **********
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaJoinColumn> joinColumns();
+
+	JavaJoinColumn getDefaultJoinColumn();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaJoinColumn> specifiedJoinColumns();
+
+	JavaJoinColumn addSpecifiedJoinColumn(int index);
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaUniqueConstraint> uniqueConstraints();
+
+	JavaUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaRelationshipMapping.java
new file mode 100644
index 0000000..4f35ea5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaRelationshipMapping.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.resource.java.RelationshipMappingAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaRelationshipMapping
+	extends JavaAttributeMapping, RelationshipMapping
+{
+	RelationshipMappingAnnotation getMappingAnnotation();
+	
+	JavaCascade getCascade();
+
+	/**
+	 * If the target entity is specified, this will return it fully qualified. If not
+	 * specified, it returns the default target entity, which is always fully qualified
+	 */
+	String getFullyQualifiedTargetEntity();
+		String FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY = "fullyQualifiedTargetEntity"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaRelationshipReference.java
new file mode 100644
index 0000000..862818c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaRelationshipReference.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.RelationshipReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaRelationshipReference 
+	extends JavaJpaContextNode, RelationshipReference
+{
+	JavaRelationshipMapping getRelationshipMapping();
+	
+	void initialize();
+	
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSecondaryTable.java
new file mode 100644
index 0000000..79113c3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSecondaryTable.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.SecondaryTable;
+import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaSecondaryTable
+	extends SecondaryTable, JavaJpaContextNode
+{
+
+	void initialize(SecondaryTableAnnotation secondaryTableResource);
+	
+	/**
+	 * Update the JavaSecondaryTable context model object to match the SecondaryTableAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(SecondaryTableAnnotation secondaryTableResource);
+
+
+	//****************** covariant overrides *******************
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+	
+	JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns();
+	
+	JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaUniqueConstraint> uniqueConstraints();
+	
+	JavaUniqueConstraint addUniqueConstraint(int index);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSequenceGenerator.java
new file mode 100644
index 0000000..5e58c1f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSequenceGenerator.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.SequenceGenerator;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.31
+ * @since 2.0
+ */
+public interface JavaSequenceGenerator
+	extends JavaGenerator, SequenceGenerator
+{
+
+	void initialize(SequenceGeneratorAnnotation generatorResource);
+	
+	/**
+	 * Update the JavaSequenceGenerator context model object to match the SequenceGeneratorAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(SequenceGeneratorAnnotation generatorResource);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSingleRelationshipMapping.java
new file mode 100644
index 0000000..d01f78e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaSingleRelationshipMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.SingleRelationshipMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JavaSingleRelationshipMapping
+	extends JavaRelationshipMapping, SingleRelationshipMapping
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaStructureNodes.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaStructureNodes.java
new file mode 100644
index 0000000..309b8a3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaStructureNodes.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.JptCorePlugin;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaStructureNodes 
+{
+	String COMPILATION_UNIT_ID = 
+		JptCorePlugin.PLUGIN_ID + ".java.compilationUnit"; //$NON-NLS-1$
+	
+	String PERSISTENT_TYPE_ID = 
+		JptCorePlugin.PLUGIN_ID + ".java.persistentType"; //$NON-NLS-1$
+	
+	String PERSISTENT_ATTRIBUTE_ID = 
+		JptCorePlugin.PLUGIN_ID + ".java.persistentAttribute"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTable.java
new file mode 100644
index 0000000..213ec05
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTable.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaTable
+	extends Table, JavaJpaContextNode
+{
+	void initialize(JavaResourcePersistentMember jrpm);
+	
+	/**
+	 * Update the JavaTable context model object to match the JavaResourcePersistentMember 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(JavaResourcePersistentMember jrpm);
+
+	
+	//****************** covariant overrides *******************
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaUniqueConstraint> uniqueConstraints();
+	
+	JavaUniqueConstraint addUniqueConstraint(int index);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTableGenerator.java
new file mode 100644
index 0000000..2fcbdbc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTableGenerator.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.TableGenerator;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface JavaTableGenerator
+	extends JavaGenerator, TableGenerator
+{
+	void initialize(TableGeneratorAnnotation resourceGenerator);
+	
+	/**
+	 * Update the JavaTableGenerator context model object to match the TableGeneratorAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(TableGeneratorAnnotation resourceGenerator);
+	
+	
+	//****************** covariant overrides *******************
+
+	@SuppressWarnings("unchecked")
+	ListIterator<JavaUniqueConstraint> uniqueConstraints();
+	
+	JavaUniqueConstraint addUniqueConstraint(int index);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTemporalConverter.java
new file mode 100644
index 0000000..3929363
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTemporalConverter.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.TemporalConverter;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+ public interface JavaTemporalConverter
+ 	extends JavaConverter, TemporalConverter
+{	
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTransientMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTransientMapping.java
new file mode 100644
index 0000000..fe5f0f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTransientMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.TransientMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaTransientMapping
+	extends JavaAttributeMapping, TransientMapping
+{
+	// nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java
new file mode 100644
index 0000000..0ad4045
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMapping.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import java.util.Iterator;
+
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * Java type mapping (Entity, MappedSuperclass, Embeddable).
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaTypeMapping
+	extends TypeMapping, JavaJpaContextNode
+{
+	void initialize(JavaResourcePersistentType jrpt);
+
+	/**
+	 * Update the context Java type mapping to match the resource model.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(JavaResourcePersistentType jrpt);
+
+	String getAnnotationName();
+
+	Iterable<String> getSupportingAnnotationNames();
+
+
+	// ********** covariant overrides **********
+
+	JavaPersistentType getPersistentType();
+
+	@SuppressWarnings("unchecked")
+	Iterator<JavaAttributeMapping> attributeMappings();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMappingDefinition.java
new file mode 100644
index 0000000..f2ee474
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaTypeMappingDefinition.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+
+/**
+ * Map a string key to a type mapping and its corresponding
+ * Java annotation.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaTypeMappingDefinition 
+{
+	/**
+	 * Return the type mapping's key.
+	 */
+	String getKey();
+
+	/**
+	 * Return the type mapping's Java annotation name.
+	 */
+	String getAnnotationName();
+
+	/**
+	 * Build a Java type mapping for the specified type. Use the specified
+	 * factory for creation so extenders can simply override the appropriate
+	 * creation method instead of building a provider for the same key.
+	 */
+	public JavaTypeMapping buildMapping(JavaPersistentType type, JpaFactory factory);
+	
+	/**
+	 * Return whether this mapping definition should be used for the given {@link JavaPersistentType}, 
+	 * considering all annotations.
+	 */
+	boolean test(JavaPersistentType persistentType);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaUniqueConstraint.java
new file mode 100644
index 0000000..c4b3bea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaUniqueConstraint.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface JavaUniqueConstraint
+	extends UniqueConstraint, JavaJpaContextNode
+{
+	void initialize(UniqueConstraintAnnotation uniqueConstraintAnnotation);
+	
+	/**
+	 * Update the JavaUniqueConstraint context model object to match the UniqueConstraintAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(UniqueConstraintAnnotation uniqueConstraintAnnotation);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaVersionMapping.java
new file mode 100644
index 0000000..d4f8c23
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaVersionMapping.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.context.VersionMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaVersionMapping
+	extends JavaAttributeMapping, VersionMapping, JavaColumnMapping
+{
+	//********* covariant overrides **********
+	JavaConverter getConverter();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullDefaultJavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullDefaultJavaAttributeMappingDefinition.java
new file mode 100644
index 0000000..3652abf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullDefaultJavaAttributeMappingDefinition.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+
+/**
+ * This mapping definition implementation is used to describe the default mapping for 
+ * a java attribute when no other mapping applies.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */ 
+public class NullDefaultJavaAttributeMappingDefinition
+	implements JavaAttributeMappingDefinition
+{
+	// singleton
+	private static final NullDefaultJavaAttributeMappingDefinition INSTANCE = 
+		new NullDefaultJavaAttributeMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private NullDefaultJavaAttributeMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return null;
+	}
+	
+	/**
+	 * Default mappings should never be null
+	 */
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaNullAttributeMapping(parent);
+	}
+	
+	/**
+	 * This is typically the final test, so it should always apply
+	 */
+	public boolean testDefault(JavaPersistentAttribute persistentAttribute) {
+		return true;
+	}
+	
+	/**
+	 * Obviously, always false
+	 */
+	public boolean testSpecified(JavaPersistentAttribute persistentAttribute) {
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullJavaTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullJavaTypeMappingDefinition.java
new file mode 100644
index 0000000..6a67609
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullJavaTypeMappingDefinition.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * This mapping definition implementation is used to create a JavaNullAttributeMapping.
+ * A JavaNullAttributeMapping should be used when no "mapping" annotation
+ * exists on a Java type. 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public class NullJavaTypeMappingDefinition
+	implements JavaTypeMappingDefinition
+{
+	// singleton
+	private static final NullJavaTypeMappingDefinition INSTANCE = 
+			new NullJavaTypeMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private NullJavaTypeMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return null;
+	}
+	
+	public String getAnnotationName() {
+		return null;
+	}
+	
+	public JavaTypeMapping buildMapping(JavaPersistentType parent, JpaFactory factory) {
+		return factory.buildJavaNullTypeMapping(parent);
+	}
+	
+	/**
+	 * This is typically the final test, so it should always apply
+	 */
+	public boolean test(JavaPersistentType persistentType) {
+		return true;
+	}
+	
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.getAnnotationName());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullSpecifiedJavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullSpecifiedJavaAttributeMappingDefinition.java
new file mode 100644
index 0000000..3250c31
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/NullSpecifiedJavaAttributeMappingDefinition.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+
+/**
+ * This mapping definition implementation is used to describe the specified mapping for 
+ * a java attribute when no other mapping applies.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public class NullSpecifiedJavaAttributeMappingDefinition
+	implements JavaAttributeMappingDefinition
+{
+	// singleton
+	private static final NullSpecifiedJavaAttributeMappingDefinition INSTANCE = 
+		new NullSpecifiedJavaAttributeMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private NullSpecifiedJavaAttributeMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return null;
+	}
+	
+	/**
+	 * There is no specified mapping in this case, attributes should revert to the default
+	 */
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return null;
+	}
+	
+	/**
+	 * Obviously false
+	 */
+	public boolean testDefault(JavaPersistentAttribute persistentAttribute) {
+		return false;
+	}
+	
+	/**
+	 * This is typically the final test, so it should always apply
+	 */
+	public boolean testSpecified(JavaPersistentAttribute persistentAttribute) {
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/EntityMappings.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/EntityMappings.java
new file mode 100644
index 0000000..5388264
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/EntityMappings.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.MappingFileRoot;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.persistence.PersistentTypeContainer;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.internal.iterables.ListIterable;
+
+/**
+ * Context <code>orm.xml</code> entity mappings.
+ * Context model corresponding to the
+ * XML resource model {@link XmlEntityMappings},
+ * which corresponds to the <code>entity-mappings</code> element
+ * in the <code>orm.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface EntityMappings 
+	extends MappingFileRoot, JpaStructureNode, PersistentType.Owner, PersistentTypeContainer
+{
+	XmlEntityMappings getXmlEntityMappings();
+	
+	String getVersion();
+		
+	String getDescription();
+	void setDescription(String newDescription);
+		String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$
+
+	String getPackage();
+	void setPackage(String newPackage);
+		String PACKAGE_PROPERTY = "package"; //$NON-NLS-1$
+
+	/**
+	 * Return the specified access if present, otherwise return the default
+	 * access.
+	 */
+	AccessType getAccess();
+	AccessType getSpecifiedAccess();
+	void setSpecifiedAccess(AccessType access);
+		String SPECIFIED_ACCESS_PROPERTY = "specifiedAccess"; //$NON-NLS-1$
+	AccessType getDefaultAccess();
+		String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$
+
+	/**
+	 * Return the database schema container, which can be either a catalog or,
+	 * if the database does not support catalogs, the database itself.
+	 */
+	SchemaContainer getDbSchemaContainer();
+
+	/**
+	 * Return the specified catalog if present, otherwise return the default
+	 * catalog.
+	 */
+	String getCatalog();
+	String getSpecifiedCatalog();
+	void setSpecifiedCatalog(String catalog);
+		String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
+	String getDefaultCatalog();
+		String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
+	Catalog getDbCatalog();
+
+	/**
+	 * Return the specified schema if present, otherwise return the default
+	 * schema.
+	 */
+	String getSchema();
+	String getSpecifiedSchema();
+	void setSpecifiedSchema(String schema);
+		String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
+	String getDefaultSchema();
+		String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
+	Schema getDbSchema();
+
+	PersistenceUnitMetadata getPersistenceUnitMetadata();
+	
+	ListIterable<OrmPersistentType> getPersistentTypes();
+	int getPersistentTypesSize();
+	OrmPersistentType addPersistentType(String mappingKey, String className);
+	void removePersistentType(int index);
+	void removePersistentType(OrmPersistentType persistentType);
+	//void movePersistentType(int targetIndex, int sourceIndex);
+	boolean containsPersistentType(String fullyQualifiedTypeName);
+	/**
+	 * Return the {@link OrmPersistentType) listed in this mapping file
+	 * with the given fully qualified type name. Return null if none exists.
+	 */
+	OrmPersistentType getPersistentType(String fullyQualifiedTypeName);
+		String PERSISTENT_TYPES_LIST = "persistentTypes"; //$NON-NLS-1$
+	
+	ListIterable<OrmSequenceGenerator> getSequenceGenerators();
+	int getSequenceGeneratorsSize();
+	OrmSequenceGenerator addSequenceGenerator(int index);
+	void removeSequenceGenerator(int index);
+	void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator);
+	void moveSequenceGenerator(int targetIndex, int sourceIndex);
+		String SEQUENCE_GENERATORS_LIST = "sequenceGenerators"; //$NON-NLS-1$
+
+	ListIterable<OrmTableGenerator> getTableGenerators();
+	int getTableGeneratorsSize();
+	OrmTableGenerator addTableGenerator(int index);
+	void removeTableGenerator(int index);
+	void removeTableGenerator(OrmTableGenerator tableGenerator);
+	void moveTableGenerator(int targetIndex, int sourceIndex);
+		String TABLE_GENERATORS_LIST = "tableGenerators"; //$NON-NLS-1$
+
+	OrmQueryContainer getQueryContainer();
+	
+	OrmPersistenceUnitDefaults getPersistenceUnitDefaults();
+
+	/**
+	 * Return the default package to be used for persistent types in this context
+	 */
+	String getDefaultPersistentTypePackage();
+	
+	/**
+	 * Return the default metadata complete value for persistent types in this context
+	 */
+	boolean isDefaultPersistentTypeMetadataComplete();
+	
+	void changeMapping(OrmPersistentType ormPersistentType, OrmTypeMapping oldMapping, OrmTypeMapping newMapping);
+	
+	boolean containsOffset(int textOffset);
+
+	/**
+	 * Return the JavaResourcePersistentType for the given class name found in the JPA project.
+	 * First look for one with this exact class name (since it might be fully qualified)
+	 * and then prepend the default package name and attempt to resolve.
+	 * 
+	 * @see getPackage()
+	 */
+	JavaResourcePersistentType resolveJavaResourcePersistentType(String className);
+
+	/**
+	 * Return the PersistentType for the given class name found in the persistence unit.
+	 * First look for one with this exact class name (since it might be fully qualified)
+	 * and then prepend the default package name and attempt to resolve.
+	 * 
+	 * @see getPackage()
+	 */
+	PersistentType resolvePersistentType(String className);
+
+	/**
+	 * Update the EntityMappings context model object to match the XmlEntityMappings 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/MappingFileDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/MappingFileDefinition.java
new file mode 100644
index 0000000..91a011c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/MappingFileDefinition.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.ResourceDefinition;
+
+/**
+ * A JPA platform can support multiple mapping files. Each will
+ * have a unique resource type and must be defined with a mapping file definition.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MappingFileDefinition
+	extends ResourceDefinition
+{
+	// nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/NullOrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/NullOrmAttributeMappingDefinition.java
new file mode 100644
index 0000000..5607169
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/NullOrmAttributeMappingDefinition.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public class NullOrmAttributeMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new NullOrmAttributeMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private NullOrmAttributeMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public OrmAttributeMapping buildContextMapping(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping, OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmNullAttributeMapping(parent, (XmlNullAttributeMapping) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping, OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlNullAttributeMapping(ormTypeMapping, javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverride.java
new file mode 100644
index 0000000..c882aeb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverride.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmAssociationOverride
+	extends AssociationOverride, XmlContextNode
+{
+	OrmAssociationOverrideRelationshipReference getRelationshipReference();
+	
+	OrmAssociationOverride setVirtual(boolean virtual);
+
+	/**
+	 * Update the OrmAssociationOverride context model object to match the XmlAssociationOverride 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlAssociationOverride associationOverride);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverrideContainer.java
new file mode 100644
index 0000000..0561132
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverrideContainer.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.AssociationOverrideContainer;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmAssociationOverrideContainer
+	extends AssociationOverrideContainer, OrmOverrideContainer
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmAssociationOverride> associationOverrides();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmAssociationOverride> specifiedAssociationOverrides();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmAssociationOverride> virtualAssociationOverrides();
+	
+	OrmAssociationOverride getAssociationOverrideNamed(String name);
+	
+	void update();
+	
+	interface Owner extends AssociationOverrideContainer.Owner, OrmOverrideContainer.Owner
+	{				
+		EList<XmlAssociationOverride> getResourceAssociationOverrides();
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..4647f38
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAssociationOverrideRelationshipReference.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+/**
+ * An <code>AssociationOverrideRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a {@link JoinColumnJoiningStrategy}.
+ * This cannot be an OrmRelationshipReference because referenced mapping comes
+ * from another class, the class of the attribute that the association override
+ * points to by name.
+ * <p>
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmAssociationOverrideRelationshipReference 
+	extends AssociationOverrideRelationshipReference, XmlContextNode
+{
+	OrmAssociationOverride getAssociationOverride();
+
+	OrmJoinColumnInAssociationOverrideJoiningStrategy getJoinColumnJoiningStrategy();
+	
+	void update(XmlAssociationOverride xao) ;
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeMapping.java
new file mode 100644
index 0000000..041497f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeMapping.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.3
+ */
+public interface OrmAttributeMapping
+	extends AttributeMapping, XmlContextNode
+{
+	OrmPersistentAttribute getPersistentAttribute();
+	
+	XmlAttributeMapping getResourceAttributeMapping();
+
+	String getName();
+	void setName(String newName);
+	String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Attributes are a sequence in the orm schema. We must keep
+	 * the list of attributes in the appropriate order so the wtp xml 
+	 * translators will write them to the xml in that order and they
+	 * will adhere to the schema.  
+	 * 
+	 * Each concrete subclass of XmlAttributeMapping must implement this
+	 * method and return an int that matches it's order in the schema
+	 * @return
+	 */
+	int getXmlSequence();
+
+	void addToResourceModel(Attributes resourceAttributes);
+	
+	void removeFromResourceModel(Attributes resourceAttributes);
+
+	void initializeOn(OrmAttributeMapping newMapping);
+
+	void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping);
+
+	void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping);
+
+	void initializeFromOrmIdMapping(OrmIdMapping oldMapping);
+
+	void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping);
+
+	void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping);
+
+	void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping);
+
+	void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping);
+
+	void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping);
+
+	void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping);
+
+	void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping);
+
+	void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping);
+	
+	boolean contains(int textOffset);
+
+	TextRange getSelectionTextRange();
+	
+	TextRange getNameTextRange();
+	
+	//******************* initialization/updating *******************
+
+	/**
+	 * Update the OrmAttributeMapping context model object to match the 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeMappingDefinition.java
new file mode 100644
index 0000000..18b3cb2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeMappingDefinition.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+
+/**
+ * Part of mechanism to extend the types of ORM attribute mappings.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmAttributeMappingDefinition
+{
+	/**
+	 * Return the mapping key associated with this provider
+	 * @see {@link MappingKeys}
+	 */
+	String getKey();
+	
+	/**
+	 * Build a resource mapping
+	 */
+	XmlAttributeMapping buildResourceMapping(EFactory factory);
+	
+	/**
+	 * Build a virtual resource mapping
+	 */
+	XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory);
+	
+	/**
+	 * Build a context mapping
+	 */
+	OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory);	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeOverride.java
new file mode 100644
index 0000000..d048c8c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeOverride.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmAttributeOverride
+	extends AttributeOverride, XmlContextNode
+{
+	OrmColumn getColumn();
+
+	OrmAttributeOverride setVirtual(boolean virtual);
+
+	/**
+	 * Update the OrmAttributeOverride context model object to match the XmlAttributeOverride 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlAttributeOverride attributeOverride);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeOverrideContainer.java
new file mode 100644
index 0000000..cac3ec0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmAttributeOverrideContainer.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.AttributeOverrideContainer;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmAttributeOverrideContainer
+	extends AttributeOverrideContainer, OrmOverrideContainer
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmAttributeOverride> attributeOverrides();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmAttributeOverride> specifiedAttributeOverrides();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmAttributeOverride> virtualAttributeOverrides();
+		
+	OrmAttributeOverride getAttributeOverrideNamed(String name);
+	
+	void update();
+	
+	void initializeFromAttributeOverrideContainer(OrmAttributeOverrideContainer oldContainer);
+	
+	interface Owner extends AttributeOverrideContainer.Owner, OrmOverrideContainer.Owner
+	{		
+		
+		/**
+		 * Build a virtual xml column based on the overridable column.
+		 */
+		XmlColumn buildVirtualXmlColumn(Column overridableColumn, String attributeName, boolean isMetadataComplete);
+		
+		EList<XmlAttributeOverride> getResourceAttributeOverrides();
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseColumn.java
new file mode 100644
index 0000000..6c9d885
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseColumn.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmBaseColumn
+	extends BaseColumn, OrmNamedColumn
+{
+
+	/**
+	 * Return the (best guess) text location of the column's table.
+	 */
+	TextRange getTableTextRange();
+	
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner extends OrmNamedColumn.Owner, BaseColumn.Owner
+	{
+		// nothing?
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseEmbeddedMapping.java
new file mode 100644
index 0000000..7638e26
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseEmbeddedMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.BaseEmbeddedMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmBaseEmbeddedMapping
+	extends BaseEmbeddedMapping, OrmAttributeMapping
+{
+	OrmAttributeOverrideContainer getAttributeOverrideContainer();
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseJoinColumn.java
new file mode 100644
index 0000000..f404197
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBaseJoinColumn.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmBaseJoinColumn extends BaseJoinColumn, OrmNamedColumn
+{
+
+	/**
+	 * Return the (best guess) text location of the referenced column name
+	 */
+	TextRange getReferencedColumnNameTextRange();
+
+	/**
+	 * interface allowing join columns to be used in multiple places
+	 * (e.g. 1:1 mappings and join tables)
+	 */
+	interface Owner extends BaseJoinColumn.Owner, OrmNamedColumn.Owner
+	{
+
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBasicMapping.java
new file mode 100644
index 0000000..027ace4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmBasicMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.BasicMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmBasicMapping
+	extends BasicMapping, OrmAttributeMapping, OrmColumnMapping
+{
+	
+	//********* covariant overrides **********
+	OrmConverter getConverter();
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmCascade.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmCascade.java
new file mode 100644
index 0000000..d1eb3c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmCascade.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.Cascade;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmCascade
+	extends Cascade
+{
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmColumn.java
new file mode 100644
index 0000000..353a9d2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmColumn.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmColumn
+	extends Column, OrmBaseColumn
+{
+	
+	void initializeFrom(Column oldColumn);
+	void initialize(XmlColumn column);
+	
+	/**
+	 * Update the OrmColumn context model object to match the XmlColumn 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlColumn column);
+
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner extends OrmBaseColumn.Owner
+	{
+		XmlColumn getResourceColumn();
+		
+		void addResourceColumn();
+		
+		void removeResourceColumn();
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmColumnMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmColumnMapping.java
new file mode 100644
index 0000000..f4f285f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmColumnMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.ColumnMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface OrmColumnMapping
+	extends ColumnMapping, OrmColumn.Owner
+{
+
+	OrmColumn getColumn();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmConverter.java
new file mode 100644
index 0000000..414ca19
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmConverter.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface OrmConverter
+	extends XmlContextNode, Converter
+{
+	/**
+	 * Update the OrmConverter context model object to match the XmlConvertibleMapping 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmDiscriminatorColumn.java
new file mode 100644
index 0000000..310d0f9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmDiscriminatorColumn.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrmDiscriminatorColumn
+	extends DiscriminatorColumn, OrmNamedColumn
+{
+	void initialize(XmlEntity entity);
+
+	/**
+	 * Update the OrmDiscriminatorColumn context model object to match the XmlEntity 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlEntity entity);
+	
+	XmlDiscriminatorColumn getResourceColumn();
+	
+	/**
+	 * interface allowing columns to be used in multiple places
+	 */
+	interface Owner extends OrmNamedColumn.Owner, DiscriminatorColumn.Owner
+	{
+
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddable.java
new file mode 100644
index 0000000..f09bf2a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddable.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmEmbeddable
+	extends Embeddable, OrmTypeMapping
+{
+	/**
+	 * Return the Java Embeddable this ORM Embeddable corresponds to.  
+	 * Return null if there is no java persistent type or it is not an embeddable.
+	 */
+	JavaEmbeddable getJavaEmbeddable();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddedIdMapping.java
new file mode 100644
index 0000000..61d1628
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddedIdMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.EmbeddedIdMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmEmbeddedIdMapping
+	extends EmbeddedIdMapping, OrmBaseEmbeddedMapping
+{
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddedMapping.java
new file mode 100644
index 0000000..5628568
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEmbeddedMapping.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.EmbeddedMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmEmbeddedMapping
+	extends EmbeddedMapping, OrmBaseEmbeddedMapping
+{
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEntity.java
new file mode 100644
index 0000000..a9a0238
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmEntity.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmEntity 
+	extends Entity, OrmTypeMapping
+{
+	/**
+	 * Return a list iterator of the virtual(not specified) secondary tables.
+	 * This will not be null.
+	 */
+	ListIterator<OrmSecondaryTable> virtualSecondaryTables();
+		String VIRTUAL_SECONDARY_TABLES_LIST = "virtualSecondaryTables"; //$NON-NLS-1$
+	
+	/**
+	 * Return the number of virtual secondary tables.
+	 */
+	int virtualSecondaryTablesSize();
+	
+	/**
+	 * Return whether the entity contains the given secondary table in its list of
+	 * virtual secondary tables
+	 */	
+	boolean containsVirtualSecondaryTable(OrmSecondaryTable secondaryTable);
+	
+	/**
+	 * Return true if there are no virtual secondary tables on the orm entity.
+	 * This is used to determine whether you can add specified secondary tables.
+	 * You must first make sure all virtual secondary tables have been specified
+	 * in xml before adding more.  This is because adding one secondary table to xml
+	 * will override all the secondary tables specified in the java entity
+	 */
+	boolean secondaryTablesDefinedInXml();
+	
+	/**
+	 * If true, then all virtual secondary tables are added in as specified secondary tables to the xml.
+	 * If false, then all the specified secondary tables are remvoed from the xml.
+	 */
+	void setSecondaryTablesDefinedInXml(boolean defineInXml);
+	
+	/**
+	 * Return the Java Entity this ORM Entity corresponds to.  Return null if there is no
+	 * java entity.
+	 */
+	JavaEntity getJavaEntity();	
+	
+	//************ covariant overrides *************
+	
+	OrmTable getTable();
+	
+	OrmIdClassReference getIdClassReference();
+	
+	OrmDiscriminatorColumn getDiscriminatorColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmSecondaryTable> secondaryTables();	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmSecondaryTable> specifiedSecondaryTables();
+	OrmSecondaryTable addSpecifiedSecondaryTable(int index);
+	OrmSecondaryTable addSpecifiedSecondaryTable();
+
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+	OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+	ListIterator<OrmPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns();
+		String DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST = "defaultPrimaryKeyJoinColumns"; //$NON-NLS-1$
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns();
+	OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+	
+
+	OrmAttributeOverrideContainer getAttributeOverrideContainer();
+	
+	OrmAssociationOverrideContainer getAssociationOverrideContainer();
+	
+	OrmQueryContainer getQueryContainer();
+	
+	OrmGeneratorContainer getGeneratorContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGeneratedValue.java
new file mode 100644
index 0000000..48e9d36
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGeneratedValue.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.GeneratedValue;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmGeneratedValue
+	extends GeneratedValue, XmlContextNode
+{
+	/**
+	 * Return the (best guess) text location of the generator.
+	 */
+	TextRange getGeneratorTextRange();
+
+	/**
+	 * Update the OrmGeneratedValue context model object to match the XmlGeneratedValue 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlGeneratedValue generatedValue);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGenerator.java
new file mode 100644
index 0000000..bb20a97
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGenerator.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface OrmGenerator
+	extends Generator
+{
+	// **************** validation *********************************************
+	
+	TextRange getNameTextRange();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGeneratorContainer.java
new file mode 100644
index 0000000..caf5ee6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmGeneratorContainer.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.GeneratorContainer;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmGeneratorContainer
+	extends GeneratorContainer, XmlContextNode
+{
+	OrmSequenceGenerator getSequenceGenerator();
+
+	OrmSequenceGenerator addSequenceGenerator();
+
+	OrmTableGenerator getTableGenerator();
+
+	OrmTableGenerator addTableGenerator();
+	
+	void update();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmIdClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmIdClassReference.java
new file mode 100644
index 0000000..29130b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmIdClassReference.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.IdClassReference;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmIdClassReference
+	extends IdClassReference, XmlContextNode
+{
+	void update(JavaIdClassReference javaIdClassReference);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmIdMapping.java
new file mode 100644
index 0000000..c4c8464
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmIdMapping.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.IdMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmIdMapping 
+	extends IdMapping, OrmColumnMapping, OrmAttributeMapping
+{
+	
+	//********* covariant overrides **********
+	OrmGeneratorContainer getGeneratorContainer();
+	
+	OrmConverter getConverter();
+	
+	OrmGeneratedValue getGeneratedValue();
+	OrmGeneratedValue addGeneratedValue();	
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumn.java
new file mode 100644
index 0000000..09be95b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumn.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+
+/**
+ * orm.xml join column
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmJoinColumn
+	extends JoinColumn, OrmBaseJoinColumn, OrmBaseColumn
+{
+	/**
+	 * Initialize the join column from the specified old join column.
+	 */
+	void initializeFrom(JoinColumn oldJoinColumn);
+	
+	/**
+	 * Update the join column from the specified XML.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(XmlJoinColumn xmlJoinColumn);
+
+	interface Owner
+		extends JoinColumn.Owner, OrmBaseJoinColumn.Owner, OrmBaseColumn.Owner
+	{
+		// nothing?
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnEnabledRelationshipReference.java
new file mode 100644
index 0000000..dd6828b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnEnabledRelationshipReference.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmJoinColumnEnabledRelationshipReference
+	extends OrmRelationshipReference, JoinColumnEnabledRelationshipReference
+{
+	XmlJoinColumnsMapping getResourceMapping();
+	
+	OrmJoinColumnJoiningStrategy getJoinColumnJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnInAssociationOverrideJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnInAssociationOverrideJoiningStrategy.java
new file mode 100644
index 0000000..34e7cd6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnInAssociationOverrideJoiningStrategy.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmJoinColumnInAssociationOverrideJoiningStrategy 
+	extends XmlContextNode, OrmJoinColumnJoiningStrategy
+{
+	void update(XmlAssociationOverride xao);
+
+	ListIterator<OrmJoinColumn> joinColumns();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..70be6e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinColumnJoiningStrategy.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+
+/**
+ * The orm.xml representation of a {@link JoinColumnJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmJoinColumnJoiningStrategy
+	extends OrmJoiningStrategy, JoinColumnJoiningStrategy
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmJoinColumn> joinColumns();
+	
+	OrmJoinColumn getDefaultJoinColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmJoinColumn> specifiedJoinColumns();
+	
+	OrmJoinColumn addSpecifiedJoinColumn(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTable.java
new file mode 100644
index 0000000..636afcc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTable.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.JoinTable;
+
+/**
+ * orm.xml join table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmJoinTable
+	extends JoinTable, OrmReferenceTable
+{
+	void update();
+		
+	void initializeFrom(JoinTable oldJoinTable);
+
+	
+	// ********** covariant overrides **********
+
+	ListIterator<OrmJoinColumn> joinColumns();
+
+	OrmJoinColumn getDefaultJoinColumn();
+	
+	ListIterator<OrmJoinColumn> specifiedJoinColumns();
+
+	OrmJoinColumn addSpecifiedJoinColumn(int index);
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmJoinColumn> inverseJoinColumns();
+
+	OrmJoinColumn getDefaultInverseJoinColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmJoinColumn> specifiedInverseJoinColumns();
+
+	OrmJoinColumn addSpecifiedInverseJoinColumn(int index);
+	
+	ListIterator<OrmUniqueConstraint> uniqueConstraints();
+	
+	OrmUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTableEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTableEnabledRelationshipReference.java
new file mode 100644
index 0000000..5df53d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTableEnabledRelationshipReference.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmJoinTableEnabledRelationshipReference
+	extends OrmRelationshipReference, JoinTableEnabledRelationshipReference
+{
+	XmlJoinTableMapping getResourceMapping();
+	
+	OrmJoinTableJoiningStrategy getJoinTableJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..242600a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoinTableJoiningStrategy.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+
+/**
+ * The orm.xml representation of a {@link JoinTableJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmJoinTableJoiningStrategy
+	extends OrmJoiningStrategy, JoinTableJoiningStrategy
+{
+	OrmJoinTable getJoinTable();
+	
+	OrmJoinTable addJoinTable();
+	
+	XmlJoinTable getResourceJoinTable();
+	
+	XmlJoinTable addResourceJoinTable();
+
+	void removeResourceJoinTable();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoiningStrategy.java
new file mode 100644
index 0000000..1d19ee2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmJoiningStrategy.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+
+/**
+ * The orm.xml representation of a {@link JoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmJoiningStrategy 
+	extends XmlContextNode, JoiningStrategy
+{
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToManyMapping.java
new file mode 100644
index 0000000..c915e4e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToManyMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.ManyToManyMapping;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+
+/**
+ * The orm.xml representation of a {@link ManyToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrmManyToManyMapping 
+	extends ManyToManyMapping, OrmMultiRelationshipMapping
+{
+	XmlManyToMany getResourceAttributeMapping();
+	
+	OrmManyToManyRelationshipReference getRelationshipReference();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToManyRelationshipReference.java
new file mode 100644
index 0000000..10dc202
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToManyRelationshipReference.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.ManyToManyRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+
+
+/**
+ * Represents the {@link RelationshipReference} of an {@link OrmManyToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmManyToManyRelationshipReference
+	extends ManyToManyRelationshipReference, OrmOwnableRelationshipReference,
+		OrmJoinTableEnabledRelationshipReference
+{
+	XmlManyToMany getResourceMapping();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToOneMapping.java
new file mode 100644
index 0000000..2e6eea9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToOneMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.ManyToOneMapping;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+/**
+ * The orm.xml representation of a {@link ManyToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrmManyToOneMapping
+	extends ManyToOneMapping, OrmSingleRelationshipMapping
+{
+	XmlManyToOne getResourceAttributeMapping();
+	
+	OrmManyToOneRelationshipReference getRelationshipReference();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToOneRelationshipReference.java
new file mode 100644
index 0000000..3b25b53
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmManyToOneRelationshipReference.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.ManyToOneRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+/**
+ * Represents the {@link RelationshipReference} of an {@link OrmManyToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmManyToOneRelationshipReference
+	extends ManyToOneRelationshipReference,
+		OrmJoinColumnEnabledRelationshipReference
+{
+	XmlManyToOne getResourceMapping();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMappedByJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMappedByJoiningStrategy.java
new file mode 100644
index 0000000..d58a803
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMappedByJoiningStrategy.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.MappedByJoiningStrategy;
+
+/**
+ * The orm.xml representation of a {@link MappedByJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmMappedByJoiningStrategy
+	extends OrmJoiningStrategy, MappedByJoiningStrategy
+{
+	//nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMappedSuperclass.java
new file mode 100644
index 0000000..63a6326
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMappedSuperclass.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.MappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmMappedSuperclass
+	extends MappedSuperclass, OrmTypeMapping
+{
+	/**
+	 * Return the Java Mapped Superclass this ORM MappedSuperclass corresponds to.  
+	 * Return null if there is no java persistent type or it is not a mapped superclass.
+	 */
+	JavaMappedSuperclass getJavaMappedSuperclass();
+	
+	OrmIdClassReference getIdClassReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMultiRelationshipMapping.java
new file mode 100644
index 0000000..a8aa785
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmMultiRelationshipMapping.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.MultiRelationshipMapping;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping;
+
+/**
+ * ORM multi-valued (1:m, m:m) relationship mapping.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmMultiRelationshipMapping 
+	extends OrmRelationshipMapping, MultiRelationshipMapping
+{
+	AbstractXmlMultiRelationshipMapping getResourceAttributeMapping();
+	
+	
+	// nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedColumn.java
new file mode 100644
index 0000000..7336957
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedColumn.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmNamedColumn
+	extends NamedColumn, XmlContextNode
+{
+	
+	/**
+	 * Return the (best guess) text location of the column's name.
+	 */
+	TextRange getNameTextRange();
+
+	/**
+	 * interface allowing columns to be used in multiple places
+	 * (e.g. basic mappings and attribute overrides)
+	 */
+	interface Owner extends NamedColumn.Owner
+	{
+		/**
+		 * Return the column owner's text range. This can be returned by the
+		 * column when its annotation is not present.
+		 */
+		TextRange getValidationTextRange();
+
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedNativeQuery.java
new file mode 100644
index 0000000..fc936ca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedNativeQuery.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.NamedNativeQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmNamedNativeQuery
+	extends OrmQuery, NamedNativeQuery
+{
+	ListIterator<OrmQueryHint> hints();
+
+	/**
+	 * Update the OrmNamedNativeQuery context model object to match the XmlNamedNativeQuery 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlNamedNativeQuery resourceQuery);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedQuery.java
new file mode 100644
index 0000000..76422f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmNamedQuery.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.NamedQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmNamedQuery
+	extends OrmQuery, NamedQuery
+{	
+	ListIterator<OrmQueryHint> hints();
+	
+	/**
+	 * Update the OrmNamedQuery context model object to match the XmlNamedQuery 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlNamedQuery queryResource);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToManyMapping.java
new file mode 100644
index 0000000..e1af03d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToManyMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.OneToManyMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+
+/**
+ * The orm.xml representation of a {@link OneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmOneToManyMapping
+	extends OneToManyMapping, OrmMultiRelationshipMapping
+{
+	XmlOneToMany getResourceAttributeMapping();
+	
+	OrmOneToManyRelationshipReference getRelationshipReference();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToManyRelationshipReference.java
new file mode 100644
index 0000000..f8b5b1d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToManyRelationshipReference.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.OneToManyRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+
+/**
+ * Represents the {@link RelationshipReference} of an {@link OrmOneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmOneToManyRelationshipReference
+	extends OneToManyRelationshipReference, OrmOwnableRelationshipReference,
+		OrmJoinTableEnabledRelationshipReference
+{
+	XmlOneToMany getResourceMapping();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToOneMapping.java
new file mode 100644
index 0000000..c358f85
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToOneMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.OneToOneMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+/**
+ * The orm.xml representation of a {@link OneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrmOneToOneMapping 
+	extends OneToOneMapping, OrmSingleRelationshipMapping
+{
+	XmlOneToOne getResourceAttributeMapping();
+	
+	OrmOneToOneRelationshipReference getRelationshipReference();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToOneRelationshipReference.java
new file mode 100644
index 0000000..6168db0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOneToOneRelationshipReference.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.OneToOneRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+/**
+ * Represents the {@link RelationshipReference} of an {@link OrmOneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmOneToOneRelationshipReference
+	extends OneToOneRelationshipReference, 
+		OrmOwnableRelationshipReference,
+		OrmJoinColumnEnabledRelationshipReference,
+		OrmPrimaryKeyJoinColumnEnabledRelationshipReference
+{
+	XmlOneToOne getResourceMapping();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOrderable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOrderable.java
new file mode 100644
index 0000000..e76573a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOrderable.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOrderable
+	extends Orderable, XmlContextNode
+{
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOverrideContainer.java
new file mode 100644
index 0000000..7547c33
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOverrideContainer.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.OverrideContainer;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOverrideContainer
+	extends
+		OverrideContainer,
+		XmlContextNode
+{
+	
+	void update();
+	
+	interface Owner extends OverrideContainer.Owner
+	{		
+		OrmTypeMapping getTypeMapping();
+		
+		TextRange getValidationTextRange();
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOwnableRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOwnableRelationshipReference.java
new file mode 100644
index 0000000..227a069
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmOwnableRelationshipReference.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.OwnableRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlMappedByMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmOwnableRelationshipReference
+	extends OrmRelationshipReference, OwnableRelationshipReference
+{
+	XmlMappedByMapping getResourceMapping();
+	
+	OrmMappedByJoiningStrategy getMappedByJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistenceUnitDefaults.java
new file mode 100644
index 0000000..db9401c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistenceUnitDefaults.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.MappingFilePersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+
+/**
+ * Context <code>orm.xml</code> persistence unit defaults.
+ * Context model corresponding to the
+ * XML resource model {@link XmlPersistenceUnitDefaults},
+ * which corresponds to the <code>persistence-unit-defaults</code> element
+ * in the <code>orm.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.1
+ */
+public interface OrmPersistenceUnitDefaults
+	extends XmlContextNode, MappingFilePersistenceUnitDefaults
+{	
+	AccessType getAccess();
+	void setAccess(AccessType value);
+		String ACCESS_PROPERTY = "access"; //$NON-NLS-1$
+
+	SchemaContainer getDbSchemaContainer();
+
+	/**
+	 * Return the specified catalog if present, otherwise return the default catalog.
+	 */
+	String getCatalog();
+	String getSpecifiedCatalog();
+	void setSpecifiedCatalog(String newSpecifiedCatalog);
+		String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
+	String getDefaultCatalog();
+		String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
+	Catalog getDbCatalog();
+
+	/**
+	 * Return the specified schema if present, otherwise return the default schema.
+	 */
+	String getSchema();
+	String getSpecifiedSchema();
+	void setSpecifiedSchema(String newSpecifiedSchema);
+		String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
+	String getDefaultSchema();
+		String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
+	Schema getDbSchema();
+
+	boolean isCascadePersist();
+	void setCascadePersist(boolean value);
+		String CASCADE_PERSIST_PROPERTY = "cascadePersist"; //$NON-NLS-1$
+
+	/**
+	 * Update the ORM persistence unit defaults context model to match the resource model.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java
new file mode 100644
index 0000000..6d4a9ee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentAttribute.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+
+/**
+ * ORM persistent attribute
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmPersistentAttribute
+	extends PersistentAttribute, XmlContextNode
+{
+
+	// ********** covariant overrides **********
+
+	OrmAttributeMapping getMapping();
+	
+	OrmAttributeMapping getSpecifiedMapping();
+	
+	OrmTypeMapping getOwningTypeMapping();
+	
+	OrmPersistentType getOwningPersistentType();
+
+	
+	// ********** java persistent attribute **********
+
+	JavaPersistentAttribute getJavaPersistentAttribute();
+		String JAVA_PERSISTENT_ATTRIBUTE_PROPERTY = "javaPersistentAttribute"; //$NON-NLS-1$
+
+
+	// ********** virtual <-> specified **********
+
+	/**
+	 * Make the persistent attribute virtual. The attribute will be removed
+	 * from the list of specified persistent attributes on the {@link OrmPersistentType} 
+	 * and removed from the orm.xml file.
+	 * 
+	 * If the persistent attribute is already virtual, an IllegalStateException is thrown
+	 * @see PersistentAttribute#isVirtual()
+	 */
+	void makeVirtual();
+	
+	/**
+	 * Take a virtual persistent attribute and specify it.
+	 * The attribute will be added to the list of specified persistent attributes
+	 * and added to the orm.xml file. The mappingKey will remain the same.
+	 * 
+	 * If the persistent attribute is already specified, an IllegalStateException is thrown
+	 * @see PersistentAttribute#isVirtual()
+	 */
+	void makeSpecified();
+	
+	/**
+	 * Take a virtual persistent attribute and specify it.
+	 * The attribute will be added to the list of specified persistent attributes
+	 * and added to the orm.xml file. The mappingKey will determine the type of mapping added
+	 * instead of the mappingKey already on the persistent attribute
+	 * 
+	 * If the persistent attribute is already specified, an IllegalStateException is thrown
+	 * @see PersistentAttribute#isVirtual()
+	 */
+	void makeSpecified(String mappingKey);
+	
+
+	// ********** miscellaneous **********
+
+	boolean contains(int textOffset);
+
+	void nameChanged(String oldName, String newName);
+	
+	// ********** updating **********
+	
+	/**
+	 * Update the OrmPersistentAttribute context model object to match the 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+	
+	
+	/**
+	 * interface allowing persistent attributes to be used in multiple places
+	 * (e.g. virtual and specified orm persistent attributes)
+	 */
+	interface Owner
+	{
+		/**
+	 	 * Return the java persistent attribute that corresponds (same name and access type)
+		 * to the given ormPersistentAttribute or null if none exists.
+	 	 */
+		JavaPersistentAttribute findJavaPersistentAttribute(OrmPersistentAttribute ormPersistentAttribute);
+		
+		/**
+	 	 * Update the java persistent attribute if necessary, if it is owned by this object,
+		 * it needs to be updated.
+	 	 */
+		void updateJavaPersistentAttribute();
+	}
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentType.java
new file mode 100644
index 0000000..98dd9f9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPersistentType.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+
+/**
+ * Context <code>orm.xml</code> persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmPersistentType
+	extends PersistentType, PersistentType.Owner, XmlContextNode
+{
+	// ********** covariant overrides **********
+
+	EntityMappings getParent();
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmPersistentAttribute> attributes();
+	
+	OrmPersistentAttribute getAttributeNamed(String attributeName);
+
+	OrmTypeMapping getMapping();
+	
+	
+	//***************** specified attributes ***********************************
+	
+	/**
+	 * Return a read only iterator of the specified {@link OrmPersistentAttribute}s.
+	 */
+	ListIterator<OrmPersistentAttribute> specifiedAttributes();
+	
+	/**
+	 * Return the number of specified {@link OrmPersistentAttribute}s.
+	 */
+	int specifiedAttributesSize();
+	
+	//TODO these are currently only used by tests, possibly remove them.  OrmPersistenAttributes.setVirtual(boolean) is used by the UI
+	OrmPersistentAttribute addSpecifiedAttribute(String mappingKey, String attributeName);
+
+	void removeSpecifiedAttribute(OrmPersistentAttribute specifiedAttribute);
+	
+	
+	//***************** virtual attributes *************************************
+	
+	String VIRTUAL_ATTRIBUTES_LIST = "virtualAttributes"; //$NON-NLS-1$
+
+	/**
+	 * Return a read only iterator of the virtual orm persistent attributes.  These
+	 * are attributes that exist in the underyling java class, but are not specified
+	 * in the orm.xml
+	 */
+	ListIterator<OrmPersistentAttribute> virtualAttributes();
+	
+	/**
+	 * Return the number of virtual orm persistent attributes.  These are attributes that 
+	 * exist in the underyling java class, but are not specified in the orm.xml
+	 */
+	int virtualAttributesSize();
+	
+	/**
+	 * Return whether this persistent type contains the given virtual persistent attribute.
+	 */
+	boolean containsVirtualAttribute(OrmPersistentAttribute ormPersistentAttribute);
+	
+	/**
+	 * Remove the given specified orm persistent attribute from the orm.xml. The attribute 
+	 * will be removed from the orm.xml and moved from the list of specified attributes 
+	 * to the list of virtual attributes.
+	 */
+	void makeAttributeVirtual(OrmPersistentAttribute ormPersistentAttribute);
+		
+	/**
+	 * Add the given virtual orm persistent attribute to the orm.xml. The attribute will
+	 * be added to the orm.xml and moved from the list of virtual attributes to the list
+	 * of specified attributes
+	 */
+	void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute);
+
+	/**
+	 * Add the given virtual orm persistent attribute to the orm.xml with a mapping of 
+	 * type mappingKey. The attribute will be added to the orm.xml and moved from 
+	 * the list of virtual attributes to the list of specified attributes
+	 */
+	void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute, String mappingKey);
+
+
+	//******************* mapping morphing *******************
+
+	void changeMapping(OrmPersistentAttribute ormPersistentAttribute, OrmAttributeMapping oldMapping, OrmAttributeMapping newMapping);
+	
+	
+	//******************* updating *******************
+
+	/**
+	 * Update the OrmPersistentType context model object to match the 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+	
+
+	boolean contains(int textOffset);
+	
+	/**
+	 * Return whether the persistent type applies to the
+	 * specified type.
+	 */
+	boolean isFor(String typeName);
+	
+	void classChanged(String oldClass, String newClass);
+	
+	/**
+	 * Return the Java persistent type that is referred to by this orm.xml persistent type.
+	 * If there is no underlying java persistent type, then null is returned.
+	 */
+	JavaPersistentType getJavaPersistentType();
+		String JAVA_PERSISTENT_TYPE_PROPERTY = "javaPersistentType"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistent type's default package.
+	 */
+	String getDefaultPackage();
+
+	/**
+	 * Return whether the persistent type is default metadata complete.
+	 */
+	boolean isDefaultMetadataComplete();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..e7d0fc2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumn.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmPrimaryKeyJoinColumn
+	extends PrimaryKeyJoinColumn, OrmBaseJoinColumn
+{	
+	/**
+	 * Update the OrmPrimaryKeyJoinColumn context model object to match the XmlPrimaryKeyJoinColumn 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlPrimaryKeyJoinColumn column);
+	
+	void initializeFrom(PrimaryKeyJoinColumn oldPkJoinColumn);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumnEnabledRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumnEnabledRelationshipReference.java
new file mode 100644
index 0000000..b63fbb7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumnEnabledRelationshipReference.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumnEnabledRelationshipReference;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmPrimaryKeyJoinColumnEnabledRelationshipReference
+	extends OrmRelationshipReference,
+		PrimaryKeyJoinColumnEnabledRelationshipReference
+{
+	OrmPrimaryKeyJoinColumnJoiningStrategy getPrimaryKeyJoinColumnJoiningStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..79ec847
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmPrimaryKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumnJoiningStrategy;
+
+/**
+ * The orm.xml representation of a {@link PrimaryKeyJoinColumnJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OrmPrimaryKeyJoinColumnJoiningStrategy
+	extends OrmJoiningStrategy, PrimaryKeyJoinColumnJoiningStrategy
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+	
+	OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQuery.java
new file mode 100644
index 0000000..d4b72f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQuery.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmQuery
+	extends Query, XmlContextNode
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmQueryHint> hints();
+	
+	OrmQueryHint addHint(int index);
+	
+	
+	// **************** validation *********************************************
+	
+	TextRange getNameTextRange();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQueryContainer.java
new file mode 100644
index 0000000..4b628b2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQueryContainer.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.QueryContainer;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+/**
+ * The orm.xml representation of a {@link PrimaryKeyJoinColumnJoiningStrategy}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmQueryContainer
+	extends QueryContainer, XmlContextNode
+{
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmNamedQuery> namedQueries();
+
+	OrmNamedQuery addNamedQuery(int index);
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmNamedNativeQuery> namedNativeQueries();
+
+	OrmNamedNativeQuery addNamedNativeQuery(int index);
+	
+	void update();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQueryHint.java
new file mode 100644
index 0000000..f3145d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmQueryHint.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.QueryHint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlQueryHint;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+  * 
+ * @version 2.1
+ * @since 2.0
+*/
+public interface OrmQueryHint
+	extends QueryHint, XmlContextNode
+{
+	/**
+	 * Update the OrmQueryHint context model object to match the XmlQueryHint 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlQueryHint resourceQueryHint);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmReferenceTable.java
new file mode 100644
index 0000000..424756b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmReferenceTable.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.ReferenceTable;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+/**
+ * orm.xml join table and collection table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmReferenceTable
+	extends ReferenceTable, XmlContextNode
+{
+	// ********** covariant overrides **********
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmJoinColumn> joinColumns();
+
+	OrmJoinColumn getDefaultJoinColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmJoinColumn> specifiedJoinColumns();
+
+	OrmJoinColumn addSpecifiedJoinColumn(int index);
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmUniqueConstraint> uniqueConstraints();
+	
+	OrmUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmRelationshipMapping.java
new file mode 100644
index 0000000..944f799
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmRelationshipMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCascade2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmRelationshipMapping
+	extends OrmAttributeMapping, RelationshipMapping
+{
+	OrmRelationshipReference getRelationshipReference();
+	
+	OrmCascade2_0 getCascade();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmRelationshipReference.java
new file mode 100644
index 0000000..c173b93
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmRelationshipReference.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.XmlContextNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface OrmRelationshipReference
+	extends XmlContextNode, RelationshipReference
+{
+	OrmRelationshipMapping getRelationshipMapping();
+	
+	OrmJoiningStrategy getPredominantJoiningStrategy();
+
+	void update();
+
+	void initializeOn(OrmRelationshipReference newRelationshipReference);
+	
+	void initializeFromOwnableRelationshipReference(
+		OrmOwnableRelationshipReference oldRelationshipReference);
+	
+	void initializeFromJoinColumnEnabledRelationshipReference(
+		OrmJoinColumnEnabledRelationshipReference oldRelationshipReference);
+	
+	void initializeFromJoinTableEnabledRelationshipReference(
+		OrmJoinTableEnabledRelationshipReference oldRelationshipReference);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSecondaryTable.java
new file mode 100644
index 0000000..f504c4e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSecondaryTable.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.SecondaryTable;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlSecondaryTable;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmSecondaryTable
+	extends SecondaryTable, XmlContextNode
+{
+
+	/**
+	 * Update the OrmSecondaryTable context model object to match the XmlSecondaryTable 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlSecondaryTable secondaryTable);
+
+	void initializeFrom(SecondaryTable oldSecondaryTable);
+
+	
+	//************ covariant overrides *************
+
+	OrmEntity getParent();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns();
+	
+	OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn();
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns();
+	
+	OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index);
+	
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmUniqueConstraint> uniqueConstraints();
+	
+	OrmUniqueConstraint addUniqueConstraint(int index);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSequenceGenerator.java
new file mode 100644
index 0000000..85f240c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSequenceGenerator.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.SequenceGenerator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmSequenceGenerator
+	extends SequenceGenerator, OrmGenerator, XmlContextNode
+{
+	
+	/**
+	 * Update the OrmSequenceGenerator context model object to match the XmlSequenceGenerator 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlSequenceGenerator sequenceGenerator);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSingleRelationshipMapping.java
new file mode 100644
index 0000000..7e80f57
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmSingleRelationshipMapping.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.SingleRelationshipMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrmSingleRelationshipMapping 
+	extends OrmRelationshipMapping, SingleRelationshipMapping
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmStructureNodes.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmStructureNodes.java
new file mode 100644
index 0000000..b5ae82f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmStructureNodes.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.JptCorePlugin;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface OrmStructureNodes 
+{
+	
+	String ENTITY_MAPPINGS_ID = JptCorePlugin.PLUGIN_ID + ".orm.entityMappings"; //$NON-NLS-1$
+	
+	String PERSISTENT_TYPE_ID = JptCorePlugin.PLUGIN_ID + ".orm.persistentType"; //$NON-NLS-1$
+	
+	String PERSISTENT_ATTRIBUTE_ID = JptCorePlugin.PLUGIN_ID + ".orm.persistentAttribute"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTable.java
new file mode 100644
index 0000000..818ac50
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTable.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrmTable
+	extends Table, XmlContextNode
+{
+	void initialize(XmlEntity resourceEntity);
+
+	/**
+	 * Update the OrmTable context model object to match the XmlEntity 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlEntity resourceEntity);
+
+	
+	//****************** covariant overrides *******************
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmUniqueConstraint> uniqueConstraints();
+	
+	OrmUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTableGenerator.java
new file mode 100644
index 0000000..a9854b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTableGenerator.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.TableGenerator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmTableGenerator
+	extends TableGenerator, OrmGenerator, XmlContextNode
+{
+
+	/**
+	 * Update the OrmTableGenerator context model object to match the XmlTableGenerator 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlTableGenerator tableGenerator);
+	
+	//****************** covariant overrides *******************
+
+	@SuppressWarnings("unchecked")
+	ListIterator<OrmUniqueConstraint> uniqueConstraints();
+	
+	OrmUniqueConstraint addUniqueConstraint(int index);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTransientMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTransientMapping.java
new file mode 100644
index 0000000..02f13b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTransientMapping.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.TransientMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmTransientMapping
+	extends TransientMapping, OrmAttributeMapping
+{
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java
new file mode 100644
index 0000000..dbb68f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMapping.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import java.util.Iterator;
+
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmTypeMapping
+	extends TypeMapping, XmlContextNode
+{
+	
+	String getClass_();
+	void setClass(String newClass);
+	String CLASS_PROPERTY = "class"; //$NON-NLS-1$
+
+	
+	boolean isMetadataComplete();
+	Boolean getSpecifiedMetadataComplete();
+	void setSpecifiedMetadataComplete(Boolean newSpecifiedMetadataComplete);
+		String SPECIFIED_METADATA_COMPLETE_PROPERTY = "specifiedMetadataComplete"; //$NON-NLS-1$
+
+	boolean isDefaultMetadataComplete();
+		String DEFAULT_METADATA_COMPLETE_PROPERTY = "defaultMetadataComplete"; //$NON-NLS-1$
+
+	
+	/**
+	 * type mappings are a sequence in the orm schema. We must keep
+	 * the list of type mappings in the appropriate order so the wtp xml 
+	 * translators will write them to the xml in that order and they
+	 * will adhere to the schema.  
+	 * 
+	 * Each concrete subclass of XmlTypeMapping must implement this
+	 * method and return an int that matches it's order in the schema
+	 * @return
+	 */
+	int getXmlSequence();
+	
+	void addToResourceModel(XmlEntityMappings entityMappings);
+
+	void removeFromResourceModel(XmlEntityMappings entityMappings);
+
+	void initializeFrom(OrmTypeMapping oldMapping);
+
+	XmlTypeMapping getResourceTypeMapping();
+
+	TextRange getSelectionTextRange();
+
+	TextRange getClassTextRange();
+
+	TextRange getAttributesTextRange();
+	
+	boolean containsOffset(int textOffset);
+
+	/**
+	 * Update the OrmTypeMapping context model object to match the 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+
+	// ********** covariant overrides **********
+
+	OrmPersistentType getPersistentType();
+	
+	@SuppressWarnings("unchecked")
+	Iterator<OrmAttributeMapping> attributeMappings();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMappingDefinition.java
new file mode 100644
index 0000000..5b2229e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmTypeMappingDefinition.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+
+/**
+ * Part of mechanism to extend the types of ORM type mappings.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmTypeMappingDefinition
+{
+	/**
+	 * Return the mapping key associated with this provider
+	 * @see {@link MappingKeys}
+	 */
+	String getKey();
+	
+	/**
+	 * Build a resource mapping
+	 */
+	XmlTypeMapping buildResourceMapping(EFactory factory);
+	
+	/**
+	 * Build a context mapping
+	 */
+	OrmTypeMapping buildContextMapping(
+			OrmPersistentType parent, 
+			XmlTypeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmUniqueConstraint.java
new file mode 100644
index 0000000..aa64860
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmUniqueConstraint.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface OrmUniqueConstraint
+	extends UniqueConstraint, XmlContextNode
+{
+	/**
+	 * Update the OrmUniqueConstraint context model object to match the XmlUniqueConstraint 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlUniqueConstraint uniqueConstraint);
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmVersionMapping.java
new file mode 100644
index 0000000..6450000
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmVersionMapping.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.VersionMapping;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmVersionMapping
+	extends VersionMapping, OrmColumnMapping, OrmAttributeMapping
+{
+	
+	//********* covariant overrides **********
+	OrmConverter getConverter();
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXml.java
new file mode 100644
index 0000000..89f1a24
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXml.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.MappingFile;
+
+/**
+ * JPA <code>orm.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface OrmXml
+	extends MappingFile
+{
+	// ********** entity mappings **********
+
+	/**
+	 * String constant associated with changes to the entity-mappings property
+	 */
+	public final static String ENTITY_MAPPINGS_PROPERTY = "entityMappings"; //$NON-NLS-1$
+
+	/**
+	 * Return the content represented by the root of the <code>orm.xml</code> file.
+	 * This may be null.
+	 */
+	EntityMappings getEntityMappings();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXmlContextNodeFactory.java
new file mode 100644
index 0000000..9a6c76f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXmlContextNodeFactory.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddable;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass;
+import org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlQueryContainer;
+import org.eclipse.jpt.core.resource.orm.XmlQueryHint;
+import org.eclipse.jpt.core.resource.orm.XmlSecondaryTable;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmXmlContextNodeFactory
+{
+	// ********** ORM Context Model **********
+
+	EntityMappings buildEntityMappings(OrmXml parent, XmlEntityMappings entityMappings);
+	
+	PersistenceUnitMetadata buildPersistenceUnitMetadata(EntityMappings parent);
+	
+	OrmPersistenceUnitDefaults buildPersistenceUnitDefaults(PersistenceUnitMetadata parent);
+	
+	OrmPersistentType buildOrmPersistentType(EntityMappings parent, XmlTypeMapping resourceMapping);
+	
+	OrmEntity buildOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping);
+	
+	OrmMappedSuperclass buildOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping);
+	
+	OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping);
+	
+	OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentType parent, OrmPersistentAttribute.Owner owner, XmlAttributeMapping resourceMapping);
+	
+	OrmTable buildOrmTable(OrmEntity parent);
+	
+	OrmSecondaryTable buildOrmSecondaryTable(OrmEntity parent, XmlSecondaryTable xmlSecondaryTable);
+	
+	OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePkJoinColumn);
+	
+	OrmJoinTable buildOrmJoinTable(OrmJoinTableJoiningStrategy parent, XmlJoinTable resourceJoinTable);
+	
+	OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn);
+	
+	OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner);
+
+	OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner);
+
+	OrmAttributeOverride buildOrmAttributeOverride(OrmAttributeOverrideContainer parent, AttributeOverride.Owner owner, XmlAttributeOverride xmlAttributeOverride);
+	
+	OrmAssociationOverride buildOrmAssociationOverride(OrmAssociationOverrideContainer parent, AssociationOverride.Owner owner, XmlAssociationOverride associationOverride);
+	
+	OrmAssociationOverrideRelationshipReference buildOrmAssociationOverrideRelationshipReference(OrmAssociationOverride parent, XmlAssociationOverride associationOverride);
+
+	OrmDiscriminatorColumn buildOrmDiscriminatorColumn(OrmEntity parent, OrmDiscriminatorColumn.Owner owner);
+	
+	OrmColumn buildOrmColumn(XmlContextNode parent, OrmColumn.Owner owner);
+	
+	OrmGeneratedValue buildOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue resourceGeneratedValue);
+	
+	OrmGeneratorContainer buildOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer resourceGeneratorContainer);
+
+	OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator);
+	
+	OrmTableGenerator buildOrmTableGenerator(XmlContextNode parent, XmlTableGenerator resourceTableGenerator);
+	
+	OrmQueryContainer buildOrmQueryContainer(XmlContextNode parent, XmlQueryContainer resourceQueryContainer);
+
+	OrmNamedNativeQuery buildOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery resourceNamedQuery);
+	
+	OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery);
+	
+	OrmQueryHint buildOrmQueryHint(OrmQuery parent, XmlQueryHint resourceQueryhint);
+	
+	OrmBasicMapping buildOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic resourceMapping);
+	
+	OrmManyToManyMapping buildOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany resourceMapping);
+	
+	OrmOneToManyMapping buildOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping);
+	
+	OrmManyToOneMapping buildOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping);
+	
+	OrmOneToOneMapping buildOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping);
+	
+	OrmEmbeddedIdMapping buildOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId resourceMapping);
+	
+	OrmEmbeddedMapping buildOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded resourceMapping);
+	
+	OrmIdMapping buildOrmIdMapping(OrmPersistentAttribute parent, XmlId resourceMapping);
+	
+	OrmTransientMapping buildOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient resourceMapping);
+	
+	OrmVersionMapping buildOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion resourceMapping);
+	
+	OrmAttributeMapping buildOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping);
+	
+	OrmAttributeMapping buildUnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping);
+
+	OrmUniqueConstraint buildOrmUniqueConstraint(XmlContextNode parent, UniqueConstraint.Owner owner, XmlUniqueConstraint resourceUniqueConstraint);
+	
+	OrmConverter buildOrmEnumeratedConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping);
+	
+	OrmConverter buildOrmTemporalConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping);
+	
+	OrmConverter buildOrmLobConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping);
+
+	OrmConverter buildOrmNullConverter(OrmAttributeMapping parent);
+	
+	OrmOrderable buildOrmOrderable(OrmAttributeMapping parent, Orderable.Owner owner);
+	
+	// ********** ORM Virtual Resource Model **********
+	
+	XmlAssociationOverride buildVirtualXmlAssociationOverride(String name, OrmTypeMapping parent, JoiningStrategy joiningStrategy);
+	
+	XmlBasic buildVirtualXmlBasic(OrmTypeMapping ormTypeMapping, JavaBasicMapping javaBasicMapping);
+	
+	XmlEmbeddedId buildVirtualXmlEmbeddedId(OrmTypeMapping ormTypeMapping, JavaEmbeddedIdMapping javaEmbeddedIdMapping);
+	
+	XmlEmbedded buildVirtualXmlEmbedded(OrmTypeMapping ormTypeMapping, JavaEmbeddedMapping javaEmbeddedMapping);
+	
+	XmlId buildVirtualXmlId(OrmTypeMapping ormTypeMapping, JavaIdMapping javaIdMapping);
+	
+	XmlManyToOne buildVirtualXmlManyToOne(OrmTypeMapping ormTypeMapping, JavaManyToOneMapping javaManyToOneMapping);
+	
+	XmlManyToMany buildVirtualXmlManyToMany(OrmTypeMapping ormTypeMapping, JavaManyToManyMapping javaManyToManyMapping);
+	
+	XmlOneToMany buildVirtualXmlOneToMany(OrmTypeMapping ormTypeMapping, JavaOneToManyMapping javaOneToManyMapping);
+	
+	XmlOneToOne buildVirtualXmlOneToOne(OrmTypeMapping ormTypeMapping, JavaOneToOneMapping javaOneToOneMapping);
+	
+	XmlTransient buildVirtualXmlTransient(OrmTypeMapping ormTypeMapping, JavaTransientMapping javaTransientMapping);
+	
+	XmlVersion buildVirtualXmlVersion(OrmTypeMapping ormTypeMapping, JavaVersionMapping javaVersionMapping);
+	
+	XmlNullAttributeMapping buildVirtualXmlNullAttributeMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXmlDefinition.java
new file mode 100644
index 0000000..abb7f62
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/OrmXmlDefinition.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmXmlDefinition 
+	extends MappingFileDefinition
+{
+	/**
+	 * Return the factory for building xml resource nodes
+	 */
+	EFactory getResourceNodeFactory();
+	
+	/**
+	 * Return the factory for building xml context nodes
+	 */
+	OrmXmlContextNodeFactory getContextNodeFactory();
+	
+	
+	// ********** ORM type/attribute mappings **********
+	
+	/**
+	 * Return an {@link OrmTypeMappingDefinition} for the given type mapping key.
+	 * Throws an {@link IllegalArgumentException} if the mapping key is not supported.
+	 * 
+	 * @param mappingKey The type mapping key
+	 * @return The mapping provider for the given mapping key
+	 */
+	OrmTypeMappingDefinition getOrmTypeMappingDefinition(String mappingKey);
+	
+	/**
+	 * Return an {@link OrmAttributeMappingDefinition} for the given attribute mapping key.
+	 * This must not return null.  (@see {@link NullOrmAttributeMappingDefinition})
+	 * Throws an {@link IllegalArgumentException} if the mapping key is not supported.
+	 * 
+	 * @param mappingKey The attribute mapping key
+	 * @return The mapping definition for the given mapping key
+	 */
+	OrmAttributeMappingDefinition getOrmAttributeMappingDefinition(String mappingKey);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/PersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/PersistenceUnitMetadata.java
new file mode 100644
index 0000000..4aeed8a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/PersistenceUnitMetadata.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata;
+
+/**
+ * Context <code>orm.xml</code> persistence unit metadata.
+ * Context model corresponding to the
+ * XML resource model {@link XmlPersistenceUnitMetadata},
+ * which corresponds to the <code>persistence-unit-metadata</code> element
+ * in the <code>orm.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface PersistenceUnitMetadata
+	extends XmlContextNode
+{
+	EntityMappings getParent();
+
+	XmlEntityMappings getXmlEntityMappings();
+
+	boolean isXmlMappingMetadataComplete();
+	void setXmlMappingMetadataComplete(boolean value);
+		String XML_MAPPING_METADATA_COMPLETE_PROPERTY = "xmlMappingMetadataComplete"; //$NON-NLS-1$
+
+	OrmPersistenceUnitDefaults getPersistenceUnitDefaults();
+
+	XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata();
+
+	XmlPersistenceUnitMetadata buildXmlPersistenceUnitMetadata();
+
+	/**
+	 * Update the persistence unit metadata context model to match the resource model.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java
new file mode 100644
index 0000000..243d482
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/orm/UnsupportedOrmAttributeMappingDefinition.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public class UnsupportedOrmAttributeMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new UnsupportedOrmAttributeMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private UnsupportedOrmAttributeMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public OrmAttributeMapping buildContextMapping(OrmPersistentAttribute parent, XmlAttributeMapping resourceMapping, OrmXmlContextNodeFactory factory) {
+		return factory.buildUnsupportedOrmAttributeMapping(parent, (XmlNullAttributeMapping) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping, OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlNullAttributeMapping(ormTypeMapping, javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/ClassRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/ClassRef.java
new file mode 100644
index 0000000..e7f3f4a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/ClassRef.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
+
+/**
+ * Context model corresponding to the XML resource model
+ * {@link XmlJavaClassRef}, which corresponds to the <code>class<code> element
+ * in the <code>persistence.xml</code> file.
+ * This is also used for "implied" class refs; i.e. class refs that are not
+ * explicitly listed in the <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface ClassRef
+	extends XmlContextNode, JpaStructureNode, PersistentType.Owner
+{
+	/**
+	 * Return whether the class ref is a reference to the specified type.
+	 */
+	boolean isFor(String typeName);
+	
+	/**
+	 * Return true if the mapping file ref is "virtual";
+	 * return false if the mapping file ref is represented by an entry in the
+	 * persistence.xml file.
+	 */
+	boolean isVirtual();
+	
+	XmlJavaClassRef getResourceClassRef();
+	
+	// **************** class name *********************************************
+	
+	/**
+	 * String constant associated with changes to the class name
+	 */
+	final static String CLASS_NAME_PROPERTY = "className"; //$NON-NLS-1$
+	
+	/**
+	 * Return the class name of the class ref.
+	 */
+	String getClassName();
+	
+	/**
+	 * Set the class name of the class ref.
+	 */
+	void setClassName(String className);
+	
+	
+	// **************** java persistent type ***********************************
+	
+	/**
+	 * String constant associated with changes to the java persistent type
+	 */
+	final static String JAVA_PERSISTENT_TYPE_PROPERTY = "javaPersistentType"; //$NON-NLS-1$
+	
+	/**
+	 * Return the JavaPersistentType that corresponds to this IClassRef.
+	 * This can be null.
+	 * This is not settable by users of this API.
+	 */
+	JavaPersistentType getJavaPersistentType();
+	
+	
+	// **************** update **************************************
+	
+	/**
+	 * Update the ClassRef context model object to match the XmlJavaClassRef 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update();
+	
+	/**
+	 * Update the ClassRef context model object to match the className. This is used
+	 * for impliedClassRefs in the PersistenceUnit.
+	 * see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(String className);
+	
+	
+	// *************************************************************************
+	
+	/**
+	 * Return whether the text representation of this persistence unit contains
+	 * the given text offset
+	 */
+	boolean containsOffset(int textOffset);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/JarFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/JarFileRef.java
new file mode 100644
index 0000000..4bb8fce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/JarFileRef.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JarFile;
+import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
+
+/**
+ * Context model corresponding to the 
+ * XML resource model {@link XmlJarRef},
+ * which corresponds to the <code>jar-file</code>
+ * element in the <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JarFileRef
+	extends XmlContextNode, JpaStructureNode, PersistentTypeContainer
+{
+	// **************** file name **********************************************
+	
+	/**
+	 * String constant associated with changes to the file name.
+	 */
+	String FILE_NAME_PROPERTY = "fileName"; //$NON-NLS-1$
+	
+	/**
+	 * Return the file name of the jar file ref.
+	 */
+	String getFileName();
+	
+	/**
+	 * Set the file name of the jar file ref.
+	 */
+	void setFileName(String fileName);
+	
+	
+	// **************** JAR file ***********************************************
+	
+	/**
+	 * String constant associated with changes to the JAR file.
+	 */
+	String JAR_FILE_PROPERTY = "jarFile"; //$NON-NLS-1$
+	
+	/**
+	 * Return the JAR file ref's JAR file corresponding to the file name.
+	 */
+	JarFile getJarFile();
+	
+	
+	// **************** updating ***********************************************
+	
+	/**
+	 * Update the context JAR file ref to match the specified XML JAR file ref.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(XmlJarFileRef xmlJarFileRef);
+	
+	
+	// **************** queries ************************************************
+
+	/**
+	 * Return the persistent type, as listed in the JAR file,
+	 * with the specified name. Return null if it does not exists.
+	 */
+	PersistentType getPersistentType(String typeName);
+	
+	/**
+	 * Return whether the text representation of the JAR file ref contains
+	 * the specified text offset.
+	 */
+	boolean containsOffset(int textOffset);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/MappingFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/MappingFileRef.java
new file mode 100644
index 0000000..52b0e62
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/MappingFileRef.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.MappingFile;
+import org.eclipse.jpt.core.context.MappingFilePersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
+
+/**
+ * Context model corresponding to the
+ * XML resource model {@link XmlMappingFileRef},
+ * which corresponds to the <code>mapping-file</code> element
+ * in the <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface MappingFileRef
+	extends XmlContextNode, JpaStructureNode, PersistentTypeContainer
+{
+	// ********** file name **********
+
+	/**
+	 * String constant associated with changes to the file name.
+	 */
+	String FILE_NAME_PROPERTY = "fileName"; //$NON-NLS-1$
+
+	/**
+	 * Return the file name of the mapping file ref.
+	 */
+	String getFileName();
+
+	/**
+	 * Set the file name of the mapping file ref.
+	 */
+	void setFileName(String fileName);
+
+
+	// ********** mapping file (orm.xml) **********
+
+	/**
+	 * String constant associated with changes to the mapping file.
+	 */
+	String MAPPING_FILE_PROPERTY = "mappingFile"; //$NON-NLS-1$
+
+	/**
+	 * Return mapping file corresponding to the mapping file ref's file name.
+	 */
+	MappingFile getMappingFile();
+
+
+	// ********** updating **********
+
+	/**
+	 * Update the mapping file ref context model to match the specified
+	 * resource model. The refs are ordered within the <code>persistence.xml</code>
+	 * file, so they are updated sequentially, in place, not matched up by name
+	 * (i.e. the resource model can change).
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update(XmlMappingFileRef mappingFileRef);
+
+
+	// ********** queries **********
+
+	/**
+	 * Return whether the mapping file ref is "implied" by, or explicitly
+	 * specified in, the <code>persistence.xml</code>.
+	 */
+	boolean isImplied();
+
+	/**
+	 * Return the mapping file's persistence unit defaults.
+	 */
+	MappingFilePersistenceUnitDefaults getPersistenceUnitDefaults();
+
+	/**
+	 * Return whether the mapping file's persistence unit defaults exist.
+	 */
+	boolean persistenceUnitDefaultsExists();
+
+	/**
+	 * Return the persistent type, as listed in the mapping file,
+	 * with the specified name. Return null if it does not exists.
+	 */
+	PersistentType getPersistentType(String typeName);
+
+	/**
+	 * Return whether the specified text offset is within
+	 * the text representation of the mapping file.
+	 */
+	boolean containsOffset(int textOffset);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/Persistence.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/Persistence.java
new file mode 100644
index 0000000..685e24e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/Persistence.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+
+/**
+ * The <code>persistence</code> element in the JPA <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface Persistence
+	extends XmlContextNode, JpaStructureNode
+{
+	/**
+	 * Return the resource model object associated with this context model object
+	 */
+	XmlPersistence getXmlPersistence();
+	
+	/**
+	 * Covariant override.
+	 */
+	PersistenceXml getParent();
+	
+	// **************** persistence units **************************************
+	
+	/**
+	 * String constant associated with changes to the persistence units list
+	 */
+	String PERSISTENCE_UNITS_LIST = "persistenceUnits"; //$NON-NLS-1$
+	
+	/**
+	 * Return an iterator on the list of persistence units.
+	 * This will not be null.
+	 */
+	ListIterator<PersistenceUnit> persistenceUnits();
+	
+	/**
+	 * Return the size of the persistence unit list.
+	 * @return
+	 */
+	int persistenceUnitsSize();
+	
+	/**
+	 * Add a persistence unit to the persistence node and return the object 
+	 * representing it.
+	 */
+	PersistenceUnit addPersistenceUnit();
+	
+	/**
+	 * Add a persistence unit to the persistence node at the specified index and 
+	 * return the object representing it.
+	 */
+	PersistenceUnit addPersistenceUnit(int index);
+	
+	/**
+	 * Remove the persistence unit from the persistence node.
+	 */
+	void removePersistenceUnit(PersistenceUnit persistenceUnit);
+	
+	/**
+	 * Remove the persistence unit at the specified index from the persistence node.
+	 */
+	void removePersistenceUnit(int index);
+	
+	
+	// **************** updating ***********************************************
+		
+	/**
+	 * Update the Persistence context model object to match the XmlPersistence 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlPersistence persistence);
+	
+	
+	// **************** text range *********************************************
+	
+	/**
+	 * Return whether the text representation of this persistence contains
+	 * the given text offset
+	 */
+	boolean containsOffset(int textOffset);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceStructureNodes.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceStructureNodes.java
new file mode 100644
index 0000000..5fa7928
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceStructureNodes.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.JptCorePlugin;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface PersistenceStructureNodes 
+{
+	String PREFIX = JptCorePlugin.PLUGIN_ID_ + "persistence"; //$NON-NLS-1$
+	String PREFIX_ = PREFIX + '.';
+
+	String PERSISTENCE_ID = PREFIX_ + "persistence"; //$NON-NLS-1$
+	String PERSISTENCE_UNIT_ID = PREFIX_ + "persistenceUnit"; //$NON-NLS-1$
+	String CLASS_REF_ID = PREFIX_ + "classRef"; //$NON-NLS-1$
+	String MAPPING_FILE_REF_ID = PREFIX_ + "mappingFileRef"; //$NON-NLS-1$
+	String JAR_FILE_REF_ID = PREFIX_ + "jarFileRef"; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java
new file mode 100644
index 0000000..f7e3c23
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnit.java
@@ -0,0 +1,709 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.core.resource.persistence.XmlProperty;
+
+/**
+ * Context model corresponding to the XML resource model {@link XmlPersistenceUnit},
+ * which corresponds to the <code>persistence-unit</code> element in the
+ * <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface PersistenceUnit
+	extends XmlContextNode, JpaStructureNode
+{
+	/**
+	 * Covariant override.
+	 */
+	Persistence getParent();
+
+
+	// ********** name **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's name.
+	 */
+	String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's name.
+	 */
+	String getName();
+
+	/**
+	 * Set the persistence unit's name.
+	 */
+	void setName(String name);
+
+
+	// ********** transaction type **********
+
+	/**
+	 * Return the persistence unit's transaction type,
+	 * whether specified or defaulted.
+	 */
+	PersistenceUnitTransactionType getTransactionType();
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * specified transaction type
+	 */
+	String SPECIFIED_TRANSACTION_TYPE_PROPERTY = "specifiedTransactionType"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's specified transaction type.
+	 */
+	PersistenceUnitTransactionType getSpecifiedTransactionType();
+
+	/** 
+	 * Set the persistence unit's specified transaction type.
+	 */
+	void setSpecifiedTransactionType(PersistenceUnitTransactionType transactionType);
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * default transaction type (not typically changed).
+	 */
+	String DEFAULT_TRANSACTION_TYPE_PROPERTY = "defaultTransactionType"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's default transaction type.
+	 */
+	PersistenceUnitTransactionType getDefaultTransactionType();
+
+
+	// ********** description **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's description.
+	 */
+	String DESCRIPTION_PROPERTY = "description"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's description.
+	 */
+	String getDescription();
+
+	/**
+	 * Set the persistence unit's description.
+	 */
+	void setDescription(String description);
+
+
+	// ********** provider **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's provider.
+	 */
+	String PROVIDER_PROPERTY = "provider"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's provider.
+	 */
+	String getProvider();
+
+	/**
+	 * Set the persistence unit's provider.
+	 */
+	void setProvider(String provider);
+
+
+	// ********** JTA data source **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's JTA data source
+	 */
+	String JTA_DATA_SOURCE_PROPERTY = "jtaDataSource"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's JTA data source.
+	 */
+	String getJtaDataSource();
+
+	/**
+	 * Set the persistence unit's JTA data source.
+	 */
+	void setJtaDataSource(String jtaDataSource);
+
+
+	// ********** non-JTA data source **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's non-JTA data source
+	 */
+	String NON_JTA_DATA_SOURCE_PROPERTY = "nonJtaDataSource"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's non-JTA data source.
+	 */
+	String getNonJtaDataSource();
+
+	/**
+	 * Set the persistence unit's non-JTA data source.
+	 */
+	void setNonJtaDataSource(String nonJtaDataSource);
+
+
+	// ********** mapping file refs **********
+
+	/**
+	 * Return the persistence unit's list of mapping file refs,
+	 * both specified and implied.
+	 */
+	ListIterator<MappingFileRef> mappingFileRefs();
+
+	/**
+	 * Return the size of the persistence unit's list of mapping file refs,
+	 * both specified and implied.
+	 */
+	int mappingFileRefsSize();
+
+	/**
+	 * Return all the mapping file refs, both specified and implied,
+	 * containing the specified type.
+	 */
+	Iterator<MappingFileRef> mappingFileRefsContaining(String typeName);
+
+
+	// ********** specified mapping file refs **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * specified mapping file refs.
+	 */
+	String SPECIFIED_MAPPING_FILE_REFS_LIST = "specifiedMappingFileRefs"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's list of specified mapping file refs.
+	 */
+	ListIterator<MappingFileRef> specifiedMappingFileRefs();
+
+	/**
+	 * Return the size of the persistence unit's list of specified mapping file refs.
+	 */
+	int specifiedMappingFileRefsSize();
+
+	/**
+	 * Add a new specified mapping file ref to the persistence unit;
+	 * return the newly-created mapping file ref.
+	 */
+	MappingFileRef addSpecifiedMappingFileRef();
+
+	/**
+	 * Add a new specified mapping file ref to the persistence unit at the specified index;
+	 * return the newly-created mapping file ref.
+	 */
+	MappingFileRef addSpecifiedMappingFileRef(int index);
+
+	/**
+	 * Remove the specified mapping file ref from the persistence unit.
+	 */
+	void removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef);
+
+	/**
+	 * Remove the specified mapping file ref at the specified index from the persistence unit.
+	 */
+	void removeSpecifiedMappingFileRef(int index);
+
+
+	// ********** implied mapping file ref **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * implied mapping file ref.
+	 */
+	String IMPLIED_MAPPING_FILE_REF_PROPERTY = "impliedMappingFileRef"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's implied mapping file ref.
+	 */
+	MappingFileRef getImpliedMappingFileRef();
+
+
+	// ********** jar file refs **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * JAR file refs.
+	 */
+	String JAR_FILE_REFS_LIST = "jarFileRefs"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's list of JAR file refs.
+	 */
+	ListIterator<JarFileRef> jarFileRefs();
+
+	/**
+	 * Return the size of the persistence unit's list of JAR file refs.
+	 */
+	int jarFileRefsSize();
+
+	/**
+	 * Add a new JAR file ref to the persistence unit;
+	 * return the newly-created JAR file ref.
+	 */
+	JarFileRef addJarFileRef();
+
+	/**
+	 * Add a new JAR file ref to the persistence unit at the specified index;
+	 * return the newly-created JAR file ref.
+	 */
+	JarFileRef addJarFileRef(int index);
+
+	/**
+	 * Remove the specified JAR file ref from the persistence unit.
+	 */
+	void removeJarFileRef(JarFileRef jarFileRef);
+
+	/**
+	 * Remove the JAR file ref at the specified index from the persistence unit.
+	 */
+	void removeJarFileRef(int index);
+
+
+	// ********** class refs **********
+
+	/**
+	 * Return the persistence unit's list of class refs,
+	 * both specified and implied.
+	 */
+	Iterator<ClassRef> classRefs();
+
+	/**
+	 * Return the size of the persistence unit's list of class refs,
+	 * both specified and implied.
+	 */
+	int classRefsSize();
+
+
+	// ********** specified class refs **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * specified class refs.
+	 */
+	String SPECIFIED_CLASS_REFS_LIST = "specifiedClassRefs"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's list of specified class refs.
+	 */
+	ListIterator<ClassRef> specifiedClassRefs();
+
+	/**
+	 * Return the size of the persistence unit's list of specified mapping file refs.
+	 */
+	int specifiedClassRefsSize();
+
+	/**
+	 * Add a new specified class ref to the persistence unit;
+	 * return the newly-created class ref.
+	 */
+	ClassRef addSpecifiedClassRef();
+
+	/**
+	 * Add a new specified class ref to the persistence unit at the specified index;
+	 * return the newly-created class ref.
+	 */
+	ClassRef addSpecifiedClassRef(int index);
+
+	/**
+	 * Remove the specified class ref from the persistence unit.
+	 */
+	void removeSpecifiedClassRef(ClassRef classRef);
+
+	/**
+	 * Remove the specified class ref at the specified index from the persistence unit.
+	 */
+	void removeSpecifiedClassRef(int index);
+
+
+	// ********** implied class refs **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * implied class refs.
+	 */
+	String IMPLIED_CLASS_REFS_COLLECTION = "impliedClassRefs"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's list of implied class refs.
+	 */
+	Iterator<ClassRef> impliedClassRefs();
+
+	/**
+	 * Return the size of the persistence unit's list of implied class refs.
+	 */
+	int impliedClassRefsSize();
+
+
+	// ********** exclude unlisted classes **********
+
+	/** 
+	 * Return whether the persistence unit excludes unlisted classes.
+	 */
+	boolean excludesUnlistedClasses();
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * "exclude unlisted classes" flag.
+	 */
+	String SPECIFIED_EXCLUDE_UNLISTED_CLASSES_PROPERTY = "specifiedExcludeUnlistedClasses"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's specified "exclude unlisted classes" flag.
+	 */
+	Boolean getSpecifiedExcludeUnlistedClasses();
+
+	/** 
+	 * Set the persistence unit's specified "exclude unlisted classes" flag.
+	 */
+	void setSpecifiedExcludeUnlistedClasses(Boolean excludeUnlistedClasses);
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * default "exclude unlisted classes" flag (not typically changed).
+	 */
+	String DEFAULT_EXCLUDE_UNLISTED_CLASSES_PROPERTY = "defaultExcludeUnlistedClasses"; //$NON-NLS-1$
+
+	/** 
+	 * Return whether the persistence unit excludes unlisted classes by default.
+	 */
+	boolean getDefaultExcludeUnlistedClasses();
+
+
+	// ********** properties **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * properties.
+	 */
+	String PROPERTIES_LIST = "properties"; //$NON-NLS-1$
+
+	/**
+	 * Return the persistence unit's list of properties.
+	 */
+	ListIterator<Property> properties();
+
+	/**
+	 * Return the size of the persistence unit's list of properties.
+	 */
+	int propertiesSize();
+
+	/**
+	 * Return the *first* property in the persistence unit's property list with
+	 * the specified name. Return null if the list does not contain a property
+	 * with the specified name.
+	 */
+	Property getProperty(String propertyName);
+
+	/**
+	 * Return the persistence unit's properties with names beginning with the
+	 * specified prefix.
+	 */
+	Iterator<Property> propertiesWithNamePrefix(String propertyNamePrefix);
+
+	/**
+	 * Add a new property to the persistence unit;
+	 * return the newly-created property.
+	 */
+	Property addProperty();
+
+	/**
+	 * Add a new property to the persistence unit at the specified index;
+	 * return the newly-created property.
+	 */
+	Property addProperty(int index);
+
+	/**
+	 * Set the value of the *first* property in the persistence unit's property
+	 * list with the specified name to the specified value, creating a new
+	 * property if one does not already exist. If a property exists and the
+	 * specified value is null, the existing property is removed.
+	 */
+	void setProperty(String propertyName, String value);
+
+	/**
+	 * Set the value of the property with the specified name, creating a new
+	 * property if one does not exist or if the specified flag indicates
+	 * duplicate property names are allowed. If a property exists and duplicate
+	 * values are not allowed and the specified value is null, the existing
+	 * property is removed.
+	 */
+	void setProperty(String propertyName, String value, boolean duplicatePropertyNamesAllowed);
+
+	/**
+	 * Remove the specified property from the persistence unit.
+	 */
+	void removeProperty(Property property);
+
+	/**
+	 * Remove the *first* property in the persistence unit's property list
+	 * with the specified name.
+	 */
+	void removeProperty(String propertyName);
+
+	/**
+	 * Remove the *first* property in the persistence unit's property list
+	 * with the specified name and value, allowing the removal of properties
+	 * with duplicate property names.
+	 */
+	void removeProperty(String propertyName, String value);
+
+	/**
+	 * Call back method for Property name changing. 
+	 */
+	void propertyNameChanged(String oldPropertyName, String newPropertyName, String value);	
+
+	/**
+	 * Call back method for Property value changing. 
+	 */
+	void propertyValueChanged(String propertyName, String newValue);
+	
+	/**
+	 * Simple property interface.
+	 */
+	interface Property
+		extends XmlContextNode
+	{
+		PersistenceUnit getParent();
+
+		@SuppressWarnings("hiding")
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+		String getName();
+		void setName(String name);
+
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+		void setValue(String value);
+		String getValue();
+
+		XmlProperty getXmlProperty();
+		void update();
+	}
+
+	// ********** ORM persistence unit defaults **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * default access type.
+	 */
+	String DEFAULT_ACCESS_PROPERTY = "defaultAccess"; //$NON-NLS-1$
+
+	/**
+	 * Return the default access type from the first persistence unit defaults
+	 * found in the persistence unit's list of mapping files.
+	 */
+	AccessType getDefaultAccess();
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * default database catalog.
+	 */
+	String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
+
+	/**
+	 * Return the default database catalog from the first persistence unit defaults
+	 * found in the persistence unit's list of mapping files.
+	 */
+	String getDefaultCatalog();
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * default database schema.
+	 */
+	String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
+
+	/**
+	 * Return the default database schema from the first persistence unit defaults
+	 * found in the persistence unit's list of mapping files.
+	 */
+	String getDefaultSchema();
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * default "cascade persist" flag.
+	 */
+	String DEFAULT_CASCADE_PERSIST_PROPERTY = "defaultCascadePersist"; //$NON-NLS-1$
+
+	/**
+	 * Return the default "cascade persist" flag from the first persistence unit defaults
+	 * found in the persistence unit's list of mapping files.
+	 */
+	boolean getDefaultCascadePersist();
+
+
+	// ********** generators **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * list of "global" generators.
+	 * NB: There are no granular list change notifications; only a "list changed"
+	 * notification when the list is rebuilt at the finish of the persistence
+	 * unit's "update".
+	 */
+	String GENERATORS_LIST = "generators"; //$NON-NLS-1$
+
+	/**
+	 * Return the list of generators defined within the persistence unit's scope,
+	 * including generators with duplicate names.
+	 */
+	ListIterator<Generator> generators();
+
+	/**
+	 * Return the size of the list of generators defined within the persistence unit's scope,
+	 * including generators with duplicate names.
+	 */
+	int generatorsSize();
+
+	/**
+	 * Add the specified generator (that is defined elsewhere) to the
+	 * list of generators defined within the persistence unit's scope.
+	 * NB: This is to be called by every generator during "update".
+	 * This method does not directly generate a change notification.
+	 * The change notification is fired at the end of the persistence unit's
+	 * "update", once all the generators have added themselves.
+	 */
+	void addGenerator(Generator generator);
+
+	/**
+	 * Return the names of the generators defined in the persistence
+	 * unit's scope, with duplicates removed.
+	 */
+	String[] uniqueGeneratorNames();
+
+
+	// ********** queries **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * list of "global" queries.
+	 * NB: There are no granular list change notifications; only a "list changed"
+	 * notification when the list is rebuilt at the finish of the persistence
+	 * unit's "update".
+	 */
+	String QUERIES_LIST = "queries"; //$NON-NLS-1$
+
+	/**
+	 * Return the list of queries defined within the persistence unit's scope,
+	 * including queries with duplicate names.
+	 */
+	ListIterator<Query> queries();
+
+	/**
+	 * Return the size of the list of queries defined within the persistence unit's scope,
+	 * including queries with duplicate names.
+	 */
+	int queriesSize();
+
+	/**
+	 * Add the specified query (that is defined elsewhere) to the
+	 * list of queries defined within the persistence unit's scope.
+	 * NB: This is to be called by every query during "update".
+	 * This method does not directly generate a change notification.
+	 * The change notification is fired at the end of the persistence unit's
+	 * "update", once all the queries have added themselves.
+	 */
+	void addQuery(Query query);
+
+	
+	// ********** root entities **********
+	
+	/**
+	 * The entity with the given name is a root entity that has sub entities.
+	 * This will be stored by the persistence unit so that the entity can later
+	 * call {@link #entityIsRootWithSubEntities(String)}
+	 */
+	void addRootEntityWithSubEntities(String entityName);
+	
+	/**
+	 * Return whether the entity with the given name is a root entity
+	 * that also has sub entities.
+	 * @see #addRootEntityWithSubEntities(String)
+	 */
+	boolean entityIsRootWithSubEntities(String entityName);
+
+
+	// ********** updating **********
+	 
+	/**
+	 * Update the PersistenceUnit context model object to match the XmlPersistenceUnit 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlPersistenceUnit persistenceUnit);
+
+
+	// ********** misc **********
+
+	/**
+	 * Return the persistent type specified in the persistence unit with the
+	 * specified name.
+	 */
+	PersistentType getPersistentType(String typeName);
+
+	/**
+	 * Return whether the persistence unit specifies a persistent type with the
+	 * specified name (i.e. the type is listed either in the persistence unit's
+	 * list of specified classes or in one of the persistent unit's mapping files).
+	 */
+	boolean specifiesPersistentType(String typeName);
+
+	/**
+	 * Return the entity specified in the persistence unit with the
+	 * specified name. Return null if there is no persistent type 
+	 * with the specified name or if the persistent type is not mapped as an
+	 * entity.
+	 * @see org.eclipse.jpt.core.MappingKeys#ENTITY_TYPE_MAPPING_KEY
+	 */
+	Entity getEntity(String typeName);
+	
+	
+	// **************** validation *********************************************
+	
+	/**
+	 * Return the embeddable specified in the persistence unit with the
+	 * specified name. Return null if there is no persistent type 
+	 * with the specified name or if the persistent type is not mapped as an
+	 * embeddable.
+	 * @see org.eclipse.jpt.core.MappingKeys#EMBEDDABLE_TYPE_MAPPING_KEY
+	 */
+	Embeddable getEmbeddable(String typeName);
+
+	/**
+	 * Return whether the text representation of this persistence unit contains
+	 * the given text offset
+	 */
+	boolean containsOffset(int textOffset);
+	
+	/**
+	 * Return whether any database metadata specific validation should occur.
+	 * (For instance, if the connection is not active, then it should not.)
+	 */
+	boolean shouldValidateAgainstDatabase();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnitProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnitProperties.java
new file mode 100644
index 0000000..ec987bc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnitProperties.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+* Copyright (c) 2007, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.utility.model.Model;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistenceUnitProperties extends Model
+{
+	/**
+	 * Method used for identifying the given property.
+	 */
+	boolean itemIsProperty(PersistenceUnit.Property item);
+
+	/**
+	 * Returns the property name used for change notification of the given property.
+	 */
+	String propertyIdOf(PersistenceUnit.Property property);
+	
+	/**
+	 * Return the PersistenceUnit of this Properties.
+	 */
+	PersistenceUnit getPersistenceUnit();
+	
+	/**
+	 * Return the JPA project the PersistenceUnit belongs to.
+	 */
+	JpaProject getJpaProject();
+	
+	/**
+	 * A Property with the given name had its value changed
+	 */
+	void propertyValueChanged(String propertyName, String newValue);
+	
+	/**
+	 * A Property with the given name was removed
+	 */
+	void propertyRemoved(String propertyName);
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnitTransactionType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnitTransactionType.java
new file mode 100644
index 0000000..f5f9a0e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceUnitTransactionType.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public enum PersistenceUnitTransactionType 
+{
+	/** Corresponds to JTA transaction type */
+	JTA,
+	
+	/** Corresponds to RESOURCE_LOCAL transaction type */
+	RESOURCE_LOCAL;
+	
+	public static PersistenceUnitTransactionType fromXmlResourceModel(XmlPersistenceUnitTransactionType transactionType) {
+		if (transactionType == null) {
+			return null;
+		}
+		switch (transactionType) {
+			case JTA:
+				return JTA;
+			case RESOURCE_LOCAL:
+				return RESOURCE_LOCAL;
+			default:
+				throw new IllegalArgumentException("unknown transaction type: " + transactionType); //$NON-NLS-1$
+		}
+	}
+	
+	public static XmlPersistenceUnitTransactionType toXmlResourceModel(PersistenceUnitTransactionType transactionType) {
+		if (transactionType == null) {
+			return null;
+		}
+		switch (transactionType) {
+			case JTA:
+				return XmlPersistenceUnitTransactionType.JTA;
+			case RESOURCE_LOCAL:
+				return XmlPersistenceUnitTransactionType.RESOURCE_LOCAL;
+			default:
+				throw new IllegalArgumentException("unknown transaction type: " + transactionType); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXml.java
new file mode 100644
index 0000000..bc702a4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXml.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.context.XmlFile;
+
+/**
+ * JPA <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface PersistenceXml
+	extends XmlFile
+{
+	// ********** persistence **********
+	
+	/**
+	 * String constant associated with changes to the persistence property
+	 */
+	public final static String PERSISTENCE_PROPERTY = "persistence"; //$NON-NLS-1$
+	
+	/**
+	 * Return the content represented by the root of the <code>persistence.xml</code> file.
+	 * This may be null.
+	 */
+	Persistence getPersistence();
+	
+	
+	// ********** updating **********
+	
+	/**
+	 * Update the context persistence XML model to match its resource file.
+	 * @see org.eclipse.jpt.core.JpaProject#update()
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXmlContextNodeFactory.java
new file mode 100644
index 0000000..e4882cd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXmlContextNodeFactory.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.context.java.JarFile;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
+import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.core.resource.persistence.XmlProperty;
+
+/**
+ * Interface used by persistence unit to gather up persistent types.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistenceXmlContextNodeFactory
+{	
+	Persistence buildPersistence(PersistenceXml parent, XmlPersistence resourcePersistence);
+	
+	PersistenceUnit buildPersistenceUnit(Persistence parent, XmlPersistenceUnit resourcePersistenceUnit);
+	
+	/**
+	 * Build a "specified" mapping file ref.
+	 */
+	MappingFileRef buildMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef);
+
+	/**
+	 * Build a "implied" mapping file ref.
+	 */
+	MappingFileRef buildImpliedMappingFileRef(PersistenceUnit parent);
+
+	/**
+	 * Build a "specified" class ref.
+	 */
+	ClassRef buildClassRef(PersistenceUnit parent, XmlJavaClassRef xmlClassRef);
+	
+	/**
+	 * Build an "implied" class ref.
+	 */
+	ClassRef buildClassRef(PersistenceUnit parent, String className);
+	
+	JarFileRef buildJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef);
+
+	JarFile buildJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot);
+
+	PersistenceUnit.Property buildProperty(PersistenceUnit parent, XmlProperty property);
+	
+	PersistenceUnitProperties buildConnection(PersistenceUnit parent);
+	
+	PersistenceUnitProperties buildOptions(PersistenceUnit parent);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXmlDefinition.java
new file mode 100644
index 0000000..9243e35
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistenceXmlDefinition.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.ResourceDefinition;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistenceXmlDefinition 
+	extends ResourceDefinition
+{
+	PersistenceXmlContextNodeFactory getContextNodeFactory();
+	
+	EFactory getResourceNodeFactory();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistentTypeContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistentTypeContainer.java
new file mode 100644
index 0000000..c48b80a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/persistence/PersistentTypeContainer.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.context.persistence;
+
+import org.eclipse.jpt.core.context.PersistentType;
+
+/**
+ * Interface used by persistence unit to gather up persistent types.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistentTypeContainer {
+
+	/**
+	 * Return the container's persistent types.
+	 */
+	Iterable<? extends PersistentType> getPersistentTypes();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaAnnotationDefintionProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaAnnotationDefintionProvider.java
new file mode 100644
index 0000000..90bc29d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaAnnotationDefintionProvider.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.JpaAnnotationDefinitionProvider;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.utility.internal.iterators.ArrayIterator;
+import org.eclipse.jpt.utility.internal.iterators.ArrayListIterator;
+
+public abstract class AbstractJpaAnnotationDefintionProvider
+		implements JpaAnnotationDefinitionProvider
+{
+	private AnnotationDefinition[] typeAnnotationDefinitions;
+
+	private AnnotationDefinition[] typeMappingAnnotationDefinitions;
+
+	private AnnotationDefinition[] attributeAnnotationDefinitions;
+
+
+	protected AbstractJpaAnnotationDefintionProvider() {
+		super();
+	}
+
+	// ********** type annotation definitions **********
+
+	public synchronized Iterator<AnnotationDefinition> typeAnnotationDefinitions() {
+		if (this.typeAnnotationDefinitions == null) {
+			this.typeAnnotationDefinitions = this.buildTypeAnnotationDefinitions();
+		}
+		return new ArrayIterator<AnnotationDefinition>(this.typeAnnotationDefinitions);
+	}
+
+	protected AnnotationDefinition[] buildTypeAnnotationDefinitions() {
+		ArrayList<AnnotationDefinition> definitions = new ArrayList<AnnotationDefinition>();
+		this.addTypeAnnotationDefinitionsTo(definitions);
+		return definitions.toArray(new AnnotationDefinition[definitions.size()]);
+	}
+
+	/**
+	 * Subclasses must override this to specify type annotation definitions.
+	 */
+	protected void addTypeAnnotationDefinitionsTo(@SuppressWarnings("unused") List<AnnotationDefinition> definitions) {
+		// no op
+	}
+
+	// ********** type mapping annotation definitions **********
+
+	public synchronized Iterator<AnnotationDefinition> typeMappingAnnotationDefinitions() {
+		if (this.typeMappingAnnotationDefinitions == null) {
+			this.typeMappingAnnotationDefinitions = this.buildTypeMappingAnnotationDefinitions();
+		}
+		return new ArrayIterator<AnnotationDefinition>(this.typeMappingAnnotationDefinitions);
+	}
+
+	protected AnnotationDefinition[] buildTypeMappingAnnotationDefinitions() {
+		ArrayList<AnnotationDefinition> definitions = new ArrayList<AnnotationDefinition>();
+		this.addTypeMappingAnnotationDefinitionsTo(definitions);
+		return definitions.toArray(new AnnotationDefinition[definitions.size()]);
+	}
+
+	/**
+	 * Subclasses must override this to specify type mapping annotation
+	 * definitions.
+	 */
+	protected void addTypeMappingAnnotationDefinitionsTo(@SuppressWarnings("unused") List<AnnotationDefinition> definitions) {
+		// no op
+	}
+
+	// ********** attribute annotation definitions **********
+
+	public synchronized Iterator<AnnotationDefinition> attributeAnnotationDefinitions() {
+		if (this.attributeAnnotationDefinitions == null) {
+			this.attributeAnnotationDefinitions = this.buildAttributeAnnotationDefinitions();
+		}
+		return new ArrayListIterator<AnnotationDefinition>(this.attributeAnnotationDefinitions);
+	}
+
+	protected AnnotationDefinition[] buildAttributeAnnotationDefinitions() {
+		ArrayList<AnnotationDefinition> definitions = new ArrayList<AnnotationDefinition>();
+		this.addAttributeAnnotationDefinitionsTo(definitions);
+		return definitions.toArray(new AnnotationDefinition[definitions.size()]);
+	}
+
+	/**
+	 * Subclasses must override this to specify attribute annotation
+	 * definitions.
+	 */
+	protected void addAttributeAnnotationDefinitionsTo(@SuppressWarnings("unused") List<AnnotationDefinition> definitions) {
+		// no op
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaFactory.java
new file mode 100644
index 0000000..95fba5f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaFactory.java
@@ -0,0 +1,408 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaDataSource;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaBaseJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.context.java.JavaDiscriminatorColumn;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaEnumeratedConverter;
+import org.eclipse.jpt.core.context.java.JavaGeneratedValue;
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinTable;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaLobConverter;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.context.java.JavaNamedNativeQuery;
+import org.eclipse.jpt.core.context.java.JavaNamedQuery;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaQuery;
+import org.eclipse.jpt.core.context.java.JavaQueryContainer;
+import org.eclipse.jpt.core.context.java.JavaQueryHint;
+import org.eclipse.jpt.core.context.java.JavaSecondaryTable;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.context.java.JavaTable;
+import org.eclipse.jpt.core.context.java.JavaTableGenerator;
+import org.eclipse.jpt.core.context.java.JavaTemporalConverter;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn.Owner;
+import org.eclipse.jpt.core.context.orm.OrmXml;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.internal.context.java.JavaNullTypeMapping;
+import org.eclipse.jpt.core.internal.jpa1.GenericJpaDataSource;
+import org.eclipse.jpt.core.internal.jpa1.GenericJpaFile;
+import org.eclipse.jpt.core.internal.jpa1.GenericJpaProject;
+import org.eclipse.jpt.core.internal.jpa1.context.GenericRootContextNode;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaAssociationOverride;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaAttributeOverride;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaBasicMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaDiscriminatorColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaEmbeddable;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaEmbeddedMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaEntity;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaEnumeratedConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaGeneratedValue;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaGeneratorContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaIdMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaJoinColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaJoinTable;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaLobConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaManyToManyMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaManyToOneMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaMappedSuperclass;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaNamedNativeQuery;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaNamedQuery;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaNullAttributeMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaNullConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaOneToManyMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaOneToOneMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaOrderable;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaPersistentType;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaQueryContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaQueryHint;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaSecondaryTable;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaSequenceGenerator;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaTable;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaTableGenerator;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaTemporalConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaTransientMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaUniqueConstraint;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaVersionMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.VirtualAssociationOverride1_0Annotation;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmXml;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericPersistenceXml;
+import org.eclipse.jpt.core.internal.jpa2.GenericJpaDatabaseIdentifierAdapter;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.db.DatabaseIdentifierAdapter;
+
+/**
+ * Central class that allows extenders to easily replace implementations of
+ * various Dali interfaces.
+ */
+public abstract class AbstractJpaFactory
+	implements JpaFactory2_0
+{
+	protected AbstractJpaFactory() {
+		super();
+	}
+	
+	
+	// ********** Core Model **********
+	
+	public JpaProject buildJpaProject(JpaProject.Config config) {
+		return new GenericJpaProject(config);
+	}
+	
+	public MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType sourceType) {
+		return null;
+	}
+	
+	public JpaDataSource buildJpaDataSource(JpaProject jpaProject, String connectionProfileName) {
+		return new GenericJpaDataSource(jpaProject, connectionProfileName);
+	}
+	
+	public DatabaseIdentifierAdapter buildDatabaseIdentifierAdapter(JpaDataSource dataSource) {
+		return new GenericJpaDatabaseIdentifierAdapter(dataSource);
+	}
+	
+	public JpaFile buildJpaFile(JpaProject jpaProject, IFile file, IContentType contentType, JpaResourceModel resourceModel) {
+		return new GenericJpaFile(jpaProject, file, contentType, resourceModel);
+	}
+
+
+	// ********** Context Nodes **********
+	
+	public JpaRootContextNode buildRootContextNode(JpaProject parent) {
+		return new GenericRootContextNode(parent);
+	}
+
+
+	// ********** XML Context Model **********
+
+	public PersistenceXml buildPersistenceXml(JpaRootContextNode parent, JpaXmlResource resource) {
+		return new GenericPersistenceXml(parent, resource);
+	}
+	
+	public OrmXml buildMappingFile(MappingFileRef parent, JpaXmlResource resource) {
+		return new GenericOrmXml(parent, resource);
+	}
+
+
+	// ********** Java Context Model **********
+	
+	public JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourcePersistentType jrpt) {
+		return new GenericJavaPersistentType(owner, jrpt);
+	}
+	
+	public JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent, JavaResourcePersistentAttribute jrpa) {
+		return new GenericJavaPersistentAttribute(parent, jrpa);
+	}
+	
+	public JavaTypeMapping buildJavaNullTypeMapping(JavaPersistentType parent) {
+		return new JavaNullTypeMapping(parent);
+	}
+	
+	public JavaEntity buildJavaEntity(JavaPersistentType parent) {
+		return new GenericJavaEntity(parent);
+	}
+
+	public JavaMappedSuperclass buildJavaMappedSuperclass(JavaPersistentType parent) {
+		return new GenericJavaMappedSuperclass(parent);
+	}
+
+	public JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent) {
+		return new GenericJavaEmbeddable(parent);
+	}
+	
+	public JavaTable buildJavaTable(JavaEntity parent) {
+		return new GenericJavaTable(parent);
+	}
+	
+	public JavaColumn buildJavaColumn(JavaJpaContextNode parent, JavaBaseColumn.Owner owner) {
+		return new GenericJavaColumn(parent, owner);
+	}
+	
+	public JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
+		return new GenericJavaDiscriminatorColumn(parent, owner);
+	}
+	
+	public JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaJoinColumn.Owner owner) {
+		return new GenericJavaJoinColumn(parent, owner);
+	}
+	
+	public JavaJoinTable buildJavaJoinTable(JavaJoinTableJoiningStrategy parent) {
+		return new GenericJavaJoinTable(parent);
+	}
+	
+	public JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent) {
+		return new GenericJavaSecondaryTable(parent);
+	}
+	
+	public JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaBasicMapping(parent);
+	}
+	
+	public JavaEmbeddedIdMapping buildJavaEmbeddedIdMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaEmbeddedIdMapping(parent);
+	}
+	
+	public JavaEmbeddedMapping buildJavaEmbeddedMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaEmbeddedMapping(parent);
+	}
+	
+	public JavaIdMapping buildJavaIdMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaIdMapping(parent);
+	}
+	
+	public JavaManyToManyMapping buildJavaManyToManyMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaManyToManyMapping(parent);
+	}
+	
+	public JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaManyToOneMapping(parent);
+	}
+	
+	public JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaOneToManyMapping(parent);
+	}
+	
+	public JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaOneToOneMapping(parent);
+	}
+	
+	public JavaTransientMapping buildJavaTransientMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaTransientMapping(parent);
+	}
+	
+	public JavaVersionMapping buildJavaVersionMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaVersionMapping(parent);
+	}
+	
+	public JavaAttributeMapping buildJavaNullAttributeMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaNullAttributeMapping(parent);
+	}
+	
+	public JavaGeneratorContainer buildJavaGeneratorContainer(JavaJpaContextNode parent) {
+		return new GenericJavaGeneratorContainer(parent);
+	}
+	
+	public JavaSequenceGenerator buildJavaSequenceGenerator(JavaJpaContextNode parent) {
+		return new GenericJavaSequenceGenerator(parent);
+	}
+	
+	public JavaTableGenerator buildJavaTableGenerator(JavaJpaContextNode parent) {
+		return new GenericJavaTableGenerator(parent);
+	}
+	
+	public JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent) {
+		return new GenericJavaGeneratedValue(parent);
+	}
+	
+	public JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaBaseJoinColumn.Owner owner) {
+		return new GenericJavaPrimaryKeyJoinColumn(parent, owner);
+	}
+	
+	public JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner) {
+		return new GenericJavaAttributeOverrideContainer(parent, owner);
+	}
+	
+	public JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner) {
+		return new GenericJavaAssociationOverrideContainer(parent, owner);
+	}
+	
+	public JavaAttributeOverride buildJavaAttributeOverride(JavaAttributeOverrideContainer parent, JavaAttributeOverride.Owner owner) {
+		return new GenericJavaAttributeOverride(parent, owner);
+	}
+	
+	public JavaAssociationOverride buildJavaAssociationOverride(JavaAssociationOverrideContainer parent, JavaAssociationOverride.Owner owner) {
+		return new GenericJavaAssociationOverride(parent, owner);
+	}
+	
+	public JavaAssociationOverrideRelationshipReference buildJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent) {
+		return new GenericJavaAssociationOverrideRelationshipReference(parent);
+	}
+	
+	public AssociationOverrideAnnotation buildJavaVirtualAssociationOverrideAnnotation(JavaResourcePersistentMember jrpm, String name, JoiningStrategy joiningStrategy) {
+		return new VirtualAssociationOverride1_0Annotation(jrpm, name, joiningStrategy);
+	}
+	
+	public JavaQueryContainer buildJavaQueryContainer(JavaJpaContextNode parent) {
+		return new GenericJavaQueryContainer(parent);
+	}
+	
+	public JavaNamedQuery buildJavaNamedQuery(JavaJpaContextNode parent) {
+		return new GenericJavaNamedQuery(parent);
+	}
+	
+	public JavaNamedNativeQuery buildJavaNamedNativeQuery(JavaJpaContextNode parent) {
+		return new GenericJavaNamedNativeQuery(parent);
+	}
+	
+	public JavaQueryHint buildJavaQueryHint(JavaQuery parent) {
+		return new GenericJavaQueryHint(parent);
+	}
+	
+	public JavaUniqueConstraint buildJavaUniqueConstraint(JavaJpaContextNode parent, UniqueConstraint.Owner owner) {
+		return new GenericJavaUniqueConstraint(parent, owner);
+	}
+	
+	public JavaEnumeratedConverter buildJavaEnumeratedConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa) {
+		return new GenericJavaEnumeratedConverter(parent, jrpa);
+	}
+	
+	public JavaTemporalConverter buildJavaTemporalConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa) {
+		return new GenericJavaTemporalConverter(parent, jrpa);
+	}
+	
+	public JavaLobConverter buildJavaLobConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa) {
+		return new GenericJavaLobConverter(parent, jrpa);
+	}
+	
+	public JavaConverter buildJavaNullConverter(JavaAttributeMapping parent) {
+		return new GenericJavaNullConverter(parent);
+	}
+	
+	public JavaOrderable2_0 buildJavaOrderable(JavaAttributeMapping parent, Orderable.Owner owner) {
+		return new GenericJavaOrderable(parent, owner);
+	}
+	
+	public JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaEmbeddedMapping2_0 parent, JavaAssociationOverrideContainer.Owner owner) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JavaDerivedIdentity2_0 buildJavaDerivedIdentity(JavaSingleRelationshipMapping2_0 parent) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JavaElementCollectionMapping2_0 buildJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JavaCacheable2_0 buildJavaCacheable(JavaCacheableHolder2_0 parent) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JavaOrphanRemovable2_0 buildJavaOrphanRemoval(JavaOrphanRemovalHolder2_0 parent) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JavaOrderColumn2_0 buildJavaOrderColumn(JavaOrderable2_0 parent, JavaNamedColumn.Owner owner) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JavaCollectionTable2_0 buildJavaCollectionTable(JavaElementCollectionMapping2_0 parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public JavaColumn buildJavaMapKeyColumn(JavaJpaContextNode parent, Owner owner) {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaNode.java
new file mode 100644
index 0000000..f970808
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaNode.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jpt.core.JpaDataSource;
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaNode;
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaPlatformVariation;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.utility.internal.model.AbstractModel;
+import org.eclipse.jpt.utility.internal.model.CallbackChangeSupport;
+import org.eclipse.jpt.utility.internal.model.ChangeSupport;
+
+/**
+ * Some common Dali behavior:<ul>
+ * <li>containment hierarchy
+ * <li>Eclipse adaptable
+ * <li>update triggers
+ * </ul>
+ */
+public abstract class AbstractJpaNode
+	extends AbstractModel
+	implements JpaNode
+{
+	private final JpaNode parent;
+
+
+	// ********** constructor/initialization **********
+
+	protected AbstractJpaNode(JpaNode parent) {
+		super();
+		this.checkParent(parent);
+		this.parent = parent;
+	}
+
+	protected void checkParent(JpaNode p) {
+		if (p == null) {
+			if (this.requiresParent()) {
+				throw new IllegalArgumentException("'parent' cannot be null"); //$NON-NLS-1$
+			}
+		} else {
+			if (this.forbidsParent()) {
+				throw new IllegalArgumentException("'parent' must be null"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	protected boolean requiresParent() {
+		return true;
+	}
+
+	protected boolean forbidsParent() {
+		return ! this.requiresParent();  // assume 'parent' is not optional
+	}
+
+	@Override
+	protected ChangeSupport buildChangeSupport() {
+		return new CallbackChangeSupport(this, this.buildChangeSupportListener());
+	}
+
+	protected CallbackChangeSupport.Listener buildChangeSupportListener() {
+		return new CallbackChangeSupport.Listener() {
+			public void aspectChanged(String aspectName) {
+				AbstractJpaNode.this.aspectChanged(aspectName);
+			}
+		};
+	}
+
+
+	// ********** IAdaptable implementation **********
+
+	@SuppressWarnings("rawtypes")
+	public Object getAdapter(Class adapter) {
+		return Platform.getAdapterManager().getAdapter(this, adapter);
+	}
+
+
+	// ********** JpaNode implementation **********
+
+	public JpaNode getParent() {
+		return this.parent;
+	}
+
+	public IResource getResource() {
+		return this.parent.getResource();
+	}
+
+	public JpaProject getJpaProject() {
+		return this.parent.getJpaProject();
+	}
+
+
+	// ********** convenience methods **********
+
+	protected JpaPlatform getJpaPlatform() {
+		return this.getJpaProject().getJpaPlatform();
+	}
+	
+	protected JpaPlatform.Version getJpaPlatformVersion() {
+		return this.getJpaPlatform().getJpaVersion();
+	}
+
+	protected boolean isJpa2_0Compatible() {
+		return JptCorePlugin.nodeIsJpa2_0Compatible(this);
+	}
+
+	protected JpaFactory getJpaFactory() {
+		return this.getJpaPlatform().getJpaFactory();
+	}
+
+	protected JpaPlatformVariation getJpaPlatformVariation() {
+		return this.getJpaPlatform().getJpaVariation();
+	}
+
+	protected JpaFile getJpaFile(IFile file) {
+		return this.getJpaProject().getJpaFile(file);
+	}
+
+	protected JpaDataSource getDataSource() {
+		return this.getJpaProject().getDataSource();
+	}
+
+	protected Database getDatabase() {
+		return this.getDataSource().getDatabase();
+	}
+
+	protected boolean connectionProfileIsActive() {
+		return this.getDataSource().connectionProfileIsActive();
+	}
+
+	/**
+	 * Pre-condition: specified catalog <em>identifier</em> is not null.
+	 * NB: Do not use the catalog <em>name</em>.
+	 */
+	protected Catalog getDbCatalog(String catalog) {
+		Database database = this.getDatabase();
+		return (database == null) ? null : database.getCatalogForIdentifier(catalog);
+	}
+
+
+	// ********** CallbackChangeSupport.Listener support **********
+
+	protected void aspectChanged(String aspectName) {
+		if (this.aspectTriggersUpdate(aspectName)) {
+//			String msg = Thread.currentThread() + " aspect change: " + this + ": " + aspectName;
+//			System.out.println(msg);
+//			new Exception(msg).printStackTrace(System.out);
+			this.getJpaProject().update();
+		}
+	}
+
+	private boolean aspectTriggersUpdate(String aspectName) {
+		return ! this.aspectDoesNotTriggerUpdate(aspectName);
+	}
+
+	private boolean aspectDoesNotTriggerUpdate(String aspectName) {
+		return this.nonUpdateAspectNames().contains(aspectName);
+	}
+
+	protected final Set<String> nonUpdateAspectNames() {
+		synchronized (nonUpdateAspectNameSets) {
+			HashSet<String> nonUpdateAspectNames = nonUpdateAspectNameSets.get(this.getClass());
+			if (nonUpdateAspectNames == null) {
+				nonUpdateAspectNames = new HashSet<String>();
+				this.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
+				nonUpdateAspectNameSets.put(this.getClass(), nonUpdateAspectNames);
+			}
+			return nonUpdateAspectNames;
+		}
+	}
+
+	private static final HashMap<Class<? extends AbstractJpaNode>, HashSet<String>> nonUpdateAspectNameSets = new HashMap<Class<? extends AbstractJpaNode>, HashSet<String>>();
+
+	protected void addNonUpdateAspectNamesTo(@SuppressWarnings("unused") Set<String> nonUpdateAspectNames) {
+	// when you override this method, don't forget to include:
+	//	super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaPlatformProvider.java
new file mode 100644
index 0000000..09ae889
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaPlatformProvider.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.JpaPlatformProvider;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.ResourceDefinition;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.context.java.NullDefaultJavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.NullJavaTypeMappingDefinition;
+import org.eclipse.jpt.core.context.java.NullSpecifiedJavaAttributeMappingDefinition;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.iterators.ArrayListIterator;
+
+/**
+ * All the state in the JPA platform should be "static" (i.e. unchanging once
+ * it is initialized).
+ */
+public abstract class AbstractJpaPlatformProvider
+	implements JpaPlatformProvider
+{
+	private JpaResourceModelProvider[] resourceModelProviders;
+
+	private JavaTypeMappingDefinition[] javaTypeMappingDefinitions;
+
+	private JavaAttributeMappingDefinition[] specifiedJavaAttributeMappingDefinitions;
+
+	private JavaAttributeMappingDefinition[] defaultJavaAttributeMappingDefinitions;
+
+	private ResourceDefinition[] resourceDefinitions;
+
+
+	/**
+	 * zero-argument constructor
+	 */
+	protected AbstractJpaPlatformProvider() {
+		super();
+	}
+
+
+	// ********** resource models **********
+	
+	public ListIterator<JpaResourceModelProvider> resourceModelProviders() {
+		return new ArrayListIterator<JpaResourceModelProvider>(getResourceModelProviders());
+	}
+	
+	protected synchronized JpaResourceModelProvider[] getResourceModelProviders() {
+		if (this.resourceModelProviders == null) {
+			this.resourceModelProviders = this.buildResourceModelProviders();
+		}
+		return this.resourceModelProviders;
+	}
+	
+	protected abstract JpaResourceModelProvider[] buildResourceModelProviders();
+	
+	
+	// ********** Java type mappings **********
+	
+	public ListIterator<JavaTypeMappingDefinition> javaTypeMappingDefinitions() {
+		return new ArrayListIterator<JavaTypeMappingDefinition>(getJavaTypeMappingDefinitions());
+	}
+	
+	protected synchronized JavaTypeMappingDefinition[] getJavaTypeMappingDefinitions() {
+		if (this.javaTypeMappingDefinitions == null) {
+			this.javaTypeMappingDefinitions = this.buildJavaTypeMappingDefinitions();
+		}
+		return this.javaTypeMappingDefinitions;
+	}
+	
+	/**
+	 * Return an array of mapping definitions to use for analyzing the mapping of a type given all 
+	 * annotations on it.  The order is important, as once a mapping definition tests positive for an 
+	 * attribute, all following mapping definitions are ignored.
+	 * Extenders may either overwrite this method or {@link #buildNonNullJavaTypeMappingDefinitions()}.
+	 * Doing the former places the additional requirement on the extender to provide a "null"
+	 * mapping definition (@see {@link NullJavaTypeMappingDefinition}.)
+	 */
+	protected JavaTypeMappingDefinition[] buildJavaTypeMappingDefinitions() {
+		return ArrayTools.add(
+			buildNonNullJavaTypeMappingDefinitions(), 
+			NullJavaTypeMappingDefinition.instance());
+	}
+	
+	/**
+	 * No-op implementation of this method. 
+	 * @see #buildJavaTypeMappingDefinitions()
+	 */
+	protected JavaTypeMappingDefinition[] buildNonNullJavaTypeMappingDefinitions() {
+		return new JavaTypeMappingDefinition[0];
+	}
+	
+	
+	// ********** Java attribute mappings **********
+	
+	public ListIterator<JavaAttributeMappingDefinition> defaultJavaAttributeMappingDefinitions() {
+		return new ArrayListIterator<JavaAttributeMappingDefinition>(getDefaultJavaAttributeMappingDefinitions());
+	}
+	
+	protected synchronized JavaAttributeMappingDefinition[] getDefaultJavaAttributeMappingDefinitions() {
+		if (this.defaultJavaAttributeMappingDefinitions == null) {
+			this.defaultJavaAttributeMappingDefinitions = this.buildDefaultJavaAttributeMappingDefinitions();
+		}
+		return this.defaultJavaAttributeMappingDefinitions;
+	}
+	
+	/**
+	 * Return an array of mapping definitions to use for analyzing the default mapping of an attribute
+	 * in the absence of any annotations.  The order is important, as once a mapping definition tests
+	 * positively for a given attribute, all following mapping definitions are ignored.
+	 * Extenders may either overwrite this method or 
+	 * {@link #buildNonNullDefaultJavaAttributeMappingDefinitions()}.
+	 * Doing the former places the additional requirement on the extender to provide a "null"
+	 * mapping definition (@see {@link NullDefaultJavaAttributeMappingDefinition}.)
+	 */
+	protected JavaAttributeMappingDefinition[] buildDefaultJavaAttributeMappingDefinitions() {
+		return ArrayTools.add(
+			buildNonNullDefaultJavaAttributeMappingDefinitions(), 
+			NullDefaultJavaAttributeMappingDefinition.instance());
+	}
+	
+	/**
+	 * No-op implementation of this method. 
+	 * @see #buildDefaultJavaAttributeMappingDefinitions()
+	 */
+	protected JavaAttributeMappingDefinition[] buildNonNullDefaultJavaAttributeMappingDefinitions() {
+		return new JavaAttributeMappingDefinition[0];
+	}
+	
+	public ListIterator<JavaAttributeMappingDefinition> specifiedJavaAttributeMappingDefinitions() {
+		return new ArrayListIterator<JavaAttributeMappingDefinition>(
+			getSpecifiedJavaAttributeMappingDefinitions());
+	}
+	
+	protected synchronized JavaAttributeMappingDefinition[] getSpecifiedJavaAttributeMappingDefinitions() {
+		if (this.specifiedJavaAttributeMappingDefinitions == null) {
+			this.specifiedJavaAttributeMappingDefinitions = this.buildSpecifiedJavaAttributeMappingDefinitions();
+		}
+		return this.specifiedJavaAttributeMappingDefinitions;
+	}
+	
+	/**
+	 * Return an array of mapping definitions to use for analyzing the specified mapping of an attribute
+	 * given all annotations on it.  The order is important, as once a mapping definition tests
+	 * positively for a given attribute, all following mapping definitions are ignored.
+	 * Extenders may either overwrite this method or 
+	 * {@link #buildNonNullSpecifiedJavaAttributeMappingDefinitions()}.
+	 * Doing the former places the additional requirement on the extender to provide a "null"
+	 * mapping definition (@see {@link NullSpecifiedJavaAttributeMappingDefinition}.)
+	 */
+	protected JavaAttributeMappingDefinition[] buildSpecifiedJavaAttributeMappingDefinitions() {
+		return ArrayTools.add(
+			buildNonNullSpecifiedJavaAttributeMappingDefinitions(), 
+			NullSpecifiedJavaAttributeMappingDefinition.instance());
+	}
+	
+	/**
+	 * No-op implementation of this method. 
+	 * @see #buildSpecifiedJavaAttributeMappingDefinitions()
+	 */
+	protected JavaAttributeMappingDefinition[] buildNonNullSpecifiedJavaAttributeMappingDefinitions() {
+		return new JavaAttributeMappingDefinition[0];
+	}
+	
+	
+	// ********** Mapping Files **********
+	
+	public ListIterator<ResourceDefinition> resourceDefinitions() {
+		return new ArrayListIterator<ResourceDefinition>(getResourceDefinitions());
+	}
+	
+	protected synchronized ResourceDefinition[] getResourceDefinitions() {
+		if (this.resourceDefinitions == null) {
+			this.resourceDefinitions = this.buildResourceDefinitions();
+		}
+		return this.resourceDefinitions;
+	}
+	
+	protected abstract ResourceDefinition[] buildResourceDefinitions();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaProject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaProject.java
new file mode 100644
index 0000000..dceee4e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractJpaProject.java
@@ -0,0 +1,1724 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.Vector;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaElementDelta;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JpaDataSource;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.JpaResourceModelListener;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryPersistentTypeCache;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceCompilationUnit;
+import org.eclipse.jpt.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.core.jpa2.context.JpaRootContextNode2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JavaResourcePersistentType2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentTypeCache;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.CommandExecutor;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.BitTools;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.ThreadLocalCommandExecutor;
+import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.pde.core.project.IBundleProjectDescription;
+import org.eclipse.pde.core.project.IBundleProjectService;
+import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * JPA project. Holds all the JPA stuff.
+ * 
+ * The JPA platform provides the hooks for vendor-specific stuff.
+ * 
+ * The JPA files are the "resource" model (i.e. objects that correspond directly
+ * to Eclipse resources; e.g. Java source code files, XML files, JAR files).
+ * 
+ * The root context node is the "context"model (i.e. objects that attempt to
+ * model the JPA spec, using the "resource" model as an adapter to the Eclipse
+ * resources).
+ * 
+ * The data source is an adapter to the DTP meta-data model.
+ */
+public abstract class AbstractJpaProject
+	extends AbstractJpaNode
+	implements JpaProject2_0
+{
+	/**
+	 * The Eclipse project corresponding to the JPA project.
+	 */
+	protected final IProject project;
+
+	/**
+	 * The vendor-specific JPA platform that builds the JPA project
+	 * and all its contents.
+	 */
+	protected final JpaPlatform jpaPlatform;
+
+	/**
+	 * The JPA files associated with the JPA project:
+	 *     persistence.xml
+	 *     orm.xml
+	 *     java
+	 */
+	protected final Vector<JpaFile> jpaFiles = new Vector<JpaFile>();
+
+	/**
+	 * The "external" Java resource compilation units (source). Populated upon demand.
+	 */
+	protected final Vector<JavaResourceCompilationUnit> externalJavaResourceCompilationUnits = new Vector<JavaResourceCompilationUnit>();
+
+	/**
+	 * The "external" Java resource persistent types (binary). Populated upon demand.
+	 */
+	protected final JavaResourcePersistentTypeCache externalJavaResourcePersistentTypeCache;
+
+	/**
+	 * Resource models notify this listener when they change. A project update
+	 * should occur any time a resource model changes.
+	 */
+	protected final JpaResourceModelListener resourceModelListener;
+
+	/**
+	 * The root of the model representing the collated resources associated with 
+	 * the JPA project.
+	 */
+	protected final JpaRootContextNode rootContextNode;
+
+	/**
+	 * A pluggable updater that can be used to "update" the JPA project either
+	 * synchronously or asynchronously (or not at all). A synchronous updater
+	 * is the default, allowing a newly-constructed JPA project to be "updated"
+	 * upon return from the constructor. For performance reasons, a UI should
+	 * immediately change this to an asynchronous updater. A synchronous
+	 * updater can be used when the project is being manipulated by a "batch"
+	 * (or non-UI) client (e.g. when testing the "update" behavior). A null
+	 * updater can used during tests that do not care whether "updates" occur.
+	 * Clients will need to explicitly configure the updater if they require
+	 * something other than a synchronous updater.
+	 */
+	protected Updater updater;
+
+	/**
+	 * The data source that wraps the DTP model.
+	 */
+	// TODO move to persistence unit... :-(
+	protected final JpaDataSource dataSource;
+	
+	/**
+	 * A catalog name used to override the connection's default catalog.
+	 */
+	protected String userOverrideDefaultCatalog;
+
+	/**
+	 * A schema name used to override the connection's default schema.
+	 */
+	protected String userOverrideDefaultSchema;
+
+	/**
+	 * Flag indicating whether the project should "discover" annotated
+	 * classes automatically, as opposed to requiring the classes to be
+	 * listed in persistence.xml.
+	 */
+	protected boolean discoversAnnotatedClasses;
+
+	/**
+	 * Support for modifying documents shared with the UI.
+	 */
+	protected final ThreadLocalCommandExecutor modifySharedDocumentCommandExecutor;
+
+	/**
+	 * The name of the Java project source folder that holds the generated
+	 * metamodel. If the name is <code>null</code> the metamodel is not
+	 * generated.
+	 */
+	protected String metamodelSourceFolderName;
+	
+	
+	// ********** constructor/initialization **********
+
+	protected AbstractJpaProject(JpaProject.Config config) {
+		super(null);  // JPA project is the root of the containment tree
+		if ((config.getProject() == null) || (config.getJpaPlatform() == null)) {
+			throw new NullPointerException();
+		}
+		this.project = config.getProject();
+		this.jpaPlatform = config.getJpaPlatform();
+		this.dataSource = this.getJpaFactory().buildJpaDataSource(this, config.getConnectionProfileName());
+		this.userOverrideDefaultCatalog = config.getUserOverrideDefaultCatalog();
+		this.userOverrideDefaultSchema = config.getUserOverrideDefaultSchema();
+		this.discoversAnnotatedClasses = config.discoverAnnotatedClasses();
+
+		this.modifySharedDocumentCommandExecutor = this.buildModifySharedDocumentCommandExecutor();
+
+		this.resourceModelListener = this.buildResourceModelListener();
+		// build the JPA files corresponding to the Eclipse project's files
+		InitialResourceProxyVisitor visitor = this.buildInitialResourceProxyVisitor();
+		visitor.visitProject(this.project);
+
+		this.externalJavaResourcePersistentTypeCache = this.buildExternalJavaResourcePersistentTypeCache();
+
+		if (this.isJpa2_0Compatible()) {
+			this.metamodelSourceFolderName = ((JpaProject2_0.Config) config).getMetamodelSourceFolderName();
+			if (this.metamodelSoureFolderNameIsInvalid()) {
+				this.metamodelSourceFolderName = null;
+			}
+		}
+
+		this.rootContextNode = this.buildRootContextNode();
+
+		// "update" the project before returning
+		this.setUpdater_(new SynchronousJpaProjectUpdater(this));
+
+		// start listening to this cache once the context model has been built
+		// and all the external types are faulted in
+		this.externalJavaResourcePersistentTypeCache.addResourceModelListener(this.resourceModelListener);
+	}
+
+	@Override
+	protected boolean requiresParent() {
+		return false;
+	}
+	
+	@Override
+	public IResource getResource() {
+		return this.project;
+	}
+
+	protected ThreadLocalCommandExecutor buildModifySharedDocumentCommandExecutor() {
+		return new ThreadLocalCommandExecutor();
+	}
+
+	protected JpaResourceModelListener buildResourceModelListener() {
+		return new DefaultResourceModelListener();
+	}
+
+	protected InitialResourceProxyVisitor buildInitialResourceProxyVisitor() {
+		return new InitialResourceProxyVisitor();
+	}
+
+	protected JavaResourcePersistentTypeCache buildExternalJavaResourcePersistentTypeCache() {
+		return new BinaryPersistentTypeCache(this.jpaPlatform.getAnnotationProvider());
+	}
+
+	protected JpaRootContextNode buildRootContextNode() {
+		return this.getJpaFactory().buildRootContextNode(this);
+	}
+
+	// ***** inner class
+	protected class InitialResourceProxyVisitor implements IResourceProxyVisitor {
+		protected InitialResourceProxyVisitor() {
+			super();
+		}
+		protected void visitProject(IProject p) {
+			try {
+				p.accept(this, IResource.NONE);
+			} catch (CoreException ex) {
+				// shouldn't happen - we don't throw any CoreExceptions
+				throw new RuntimeException(ex);
+			}
+		}
+		// add a JPA file for every [appropriate] file encountered by the visitor
+		public boolean visit(IResourceProxy resource) {
+			switch (resource.getType()) {
+				case IResource.ROOT :  // shouldn't happen
+					return true;  // visit children
+				case IResource.PROJECT :
+					return true;  // visit children
+				case IResource.FOLDER :
+					return true;  // visit children
+				case IResource.FILE :
+					AbstractJpaProject.this.addJpaFile_((IFile) resource.requestResource());
+					return false;  // no children
+				default :
+					return false;  // no children
+			}
+		}
+	}
+
+
+	// ********** miscellaneous **********
+
+	/**
+	 * Ignore changes to this collection. Adds can be ignored since they are triggered
+	 * by requests that will, themselves, trigger updates (typically during the
+	 * update of an object that calls a setter with the newly-created resource
+	 * type). Deletes will be accompanied by manual updates.
+	 */
+	@Override
+	protected void addNonUpdateAspectNamesTo(Set<String> nonUpdateAspectNames) {
+		super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
+		nonUpdateAspectNames.add(EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION);
+	}
+
+
+	// ********** general queries **********
+
+	@Override
+	public JpaProject getJpaProject() {
+		return this;
+	}
+
+	public String getName() {
+		return this.project.getName();
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+	public IProject getProject() {
+		return this.project;
+	}
+
+	public IJavaProject getJavaProject() {
+		return JavaCore.create(this.project);
+	}
+
+	@Override
+	public JpaPlatform getJpaPlatform() {
+		return this.jpaPlatform;
+	}
+
+	@SuppressWarnings("unchecked")
+	protected Iterable<JavaResourceCompilationUnit> getCombinedJavaResourceCompilationUnits() {
+		return new CompositeIterable<JavaResourceCompilationUnit>(
+					this.getInternalJavaResourceCompilationUnits(),
+					this.getExternalJavaResourceCompilationUnits()
+				);
+	}
+
+
+	// ********** database **********
+
+	@Override
+	public JpaDataSource getDataSource() {
+		return this.dataSource;
+	}
+
+	public ConnectionProfile getConnectionProfile() {
+		return this.dataSource.getConnectionProfile();
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDefaultDbCatalog() {
+		String catalog = this.getDefaultCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+	public String getDefaultCatalog() {
+		String catalog = this.getUserOverrideDefaultCatalog();
+		return (catalog != null) ? catalog : this.getDatabaseDefaultCatalog();
+	}
+
+	protected String getDatabaseDefaultCatalog() {
+		Database db = this.getDatabase();
+		return (db == null ) ? null : db.getDefaultCatalogIdentifier();
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDefaultDbSchemaContainer() {
+		String catalog = this.getDefaultCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+	public Schema getDefaultDbSchema() {
+		SchemaContainer sc = this.getDefaultDbSchemaContainer();
+		return (sc == null) ? null : sc.getSchemaForIdentifier(this.getDefaultSchema());
+	}
+
+	public String getDefaultSchema() {
+		String schema = this.getUserOverrideDefaultSchema();
+		if (schema != null) {
+			return schema;
+		}
+
+		String catalog = this.getDefaultCatalog();
+		if (catalog == null) {
+			// if there is no default catalog (either user-override or database-determined),
+			// the database probably does not support catalogs;
+			// return the database's default schema
+			return this.getDatabaseDefaultSchema();
+		}
+
+		Catalog dbCatalog = this.getDbCatalog(catalog);
+		if (dbCatalog != null) {
+			return dbCatalog.getDefaultSchemaIdentifier();
+		}
+
+		// if we could not find a catalog on the database that matches the default
+		// catalog name, return the database's default schema(?) - hmmm
+		return this.getDatabaseDefaultSchema();
+	}
+
+	protected String getDatabaseDefaultSchema() {
+		Database db = this.getDatabase();
+		return (db == null ) ? null : db.getDefaultSchemaIdentifier();
+	}
+
+
+	// ********** user override default catalog **********
+	
+	public String getUserOverrideDefaultCatalog() {
+		return this.userOverrideDefaultCatalog;
+	}
+	
+	public void setUserOverrideDefaultCatalog(String catalog) {
+		String old = this.userOverrideDefaultCatalog;
+		this.userOverrideDefaultCatalog = catalog;
+		JptCorePlugin.setUserOverrideDefaultCatalog(this.project, catalog);
+		this.firePropertyChanged(USER_OVERRIDE_DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+	
+	
+	// ********** user override default schema **********
+	
+	public String getUserOverrideDefaultSchema() {
+		return this.userOverrideDefaultSchema;
+	}
+	
+	public void setUserOverrideDefaultSchema(String schema) {
+		String old = this.userOverrideDefaultSchema;
+		this.userOverrideDefaultSchema = schema;
+		JptCorePlugin.setUserOverrideDefaultSchema(this.project, schema);
+		this.firePropertyChanged(USER_OVERRIDE_DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+	
+	
+	// ********** discover annotated classes **********
+	
+	public boolean discoversAnnotatedClasses() {
+		return this.discoversAnnotatedClasses;
+	}
+	
+	public void setDiscoversAnnotatedClasses(boolean discoversAnnotatedClasses) {
+		boolean old = this.discoversAnnotatedClasses;
+		this.discoversAnnotatedClasses = discoversAnnotatedClasses;
+		JptCorePlugin.setDiscoverAnnotatedClasses(this.project, discoversAnnotatedClasses);
+		this.firePropertyChanged(DISCOVERS_ANNOTATED_CLASSES_PROPERTY, old, discoversAnnotatedClasses);
+	}
+	
+	
+	// ********** JPA files **********
+
+	public Iterator<JpaFile> jpaFiles() {
+		return this.getJpaFiles().iterator();
+	}
+
+	protected Iterable<JpaFile> getJpaFiles() {
+		return new LiveCloneIterable<JpaFile>(this.jpaFiles);  // read-only
+	}
+
+	public int jpaFilesSize() {
+		return this.jpaFiles.size();
+	}
+
+	protected Iterable<JpaFile> getJpaFiles(final IContentType contentType) {
+		return new FilteringIterable<JpaFile>(this.getJpaFiles()) {
+			@Override
+			protected boolean accept(JpaFile jpaFile) {
+				return jpaFile.getContentType().isKindOf(contentType);
+			}
+		};
+	}
+
+	@Override
+	public JpaFile getJpaFile(IFile file) {
+		for (JpaFile jpaFile : this.getJpaFiles()) {
+			if (jpaFile.getFile().equals(file)) {
+				return jpaFile;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Add a JPA file for the specified file, if appropriate.
+	 * Return true if a JPA File was created and added, false otherwise
+	 */
+	protected boolean addJpaFile(IFile file) {
+		JpaFile jpaFile = this.addJpaFile_(file);
+		if (jpaFile != null) {
+			this.fireItemAdded(JPA_FILES_COLLECTION, jpaFile);
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Add a JPA file for the specified file, if appropriate, without firing
+	 * an event; useful during construction.
+	 * Return the new JPA file, null if it was not created.
+	 */
+	protected JpaFile addJpaFile_(IFile file) {
+		if (! getJavaProject().isOnClasspath(file) && ! isInBundleRoot(file)) {
+			return null; // the file must be on the Java classpath or in the bundle root
+		}
+
+		JpaFile jpaFile = null;
+		try {
+			jpaFile = this.getJpaPlatform().buildJpaFile(this, file);
+		}
+		catch (Exception e) {
+			//log any developer exceptions and don't build a JpaFile rather
+			//than completely failing to build the JpaProject
+			JptCorePlugin.log(e);
+		}
+		if (jpaFile == null) {
+			return null;
+		}
+		jpaFile.getResourceModel().addResourceModelListener(this.resourceModelListener);
+		this.jpaFiles.add(jpaFile);
+		return jpaFile;
+	}
+	
+	/**
+	 * Returns <code>true</code> if the given resource is within the PDE bundle root,
+	 * and <code>false</code> otherwise.
+	 */
+	private boolean isInBundleRoot(IResource resource) {
+		IContainer root = getBundleRoot(project);
+		if (root != null) {
+				return root.getFullPath().isPrefixOf(resource.getFullPath());
+		}
+		return false;
+	}
+	
+	/**
+	 * Returns the {@link IContainer} representing the PDE bundle root, <code>null</code> otherwise.
+	 */
+	public static IContainer getBundleRoot(IProject project) {
+		try {
+			if (JptCorePlugin.projectHasPluginNature(project)) {
+				IBundleProjectService service = getBundleProjectService();
+				if (service != null) {
+					IBundleProjectDescription description = service.getDescription(project);
+					if (description != null) {
+						IPath path = description.getBundleRoot();
+						return (path == null) ? project : project.getFolder(path);
+					}
+				}
+			}
+		} 
+		catch (CoreException ce) {
+			// ignore, no PDE bundle root
+		}
+		return null;
+	}
+	
+	private static IBundleProjectService getBundleProjectService() {
+		BundleContext context = JptCorePlugin.instance().getBundle().getBundleContext();
+		ServiceReference reference = context.getServiceReference(IBundleProjectService.class.getName());
+		if (reference == null)
+			return null;
+		IBundleProjectService service = (IBundleProjectService) context.getService(reference);
+		if (service != null)
+			context.ungetService(reference);
+		
+		return service;
+	}
+	
+	/**
+	 * Remove the JPA file corresponding to the specified IFile, if it exists.
+	 * Return true if a JPA File was removed, false otherwise
+	 */
+	protected boolean removeJpaFile(IFile file) {
+		JpaFile jpaFile = this.getJpaFile(file);
+		if (jpaFile != null) {  // a JpaFile is not added for every IFile
+			this.removeJpaFile(jpaFile);
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Stop listening to the JPA file and remove it.
+	 */
+	protected void removeJpaFile(JpaFile jpaFile) {
+		jpaFile.getResourceModel().removeResourceModelListener(this.resourceModelListener);
+		if ( ! this.removeItemFromCollection(jpaFile, this.jpaFiles, JPA_FILES_COLLECTION)) {
+			throw new IllegalArgumentException(jpaFile.toString());
+		}
+	}
+
+
+	// ********** external Java resource persistent types (source or binary) **********
+
+	protected JavaResourcePersistentType buildPersistableExternalJavaResourcePersistentType(String typeName) {
+		IType jdtType = this.findType(typeName);
+		return (jdtType == null) ? null : this.buildPersistableExternalJavaResourcePersistentType(jdtType);
+	}
+
+	protected IType findType(String typeName) {
+		try {
+			return this.getJavaProject().findType(typeName);
+		} catch (JavaModelException ex) {
+			return null;  // ignore exception?
+		}
+	}
+
+	protected JavaResourcePersistentType buildPersistableExternalJavaResourcePersistentType(IType jdtType) {
+		JavaResourcePersistentType jrpt = this.buildExternalJavaResourcePersistentType(jdtType);
+		return ((jrpt != null) && jrpt.isPersistable()) ? jrpt : null;
+	}
+
+	protected JavaResourcePersistentType buildExternalJavaResourcePersistentType(IType jdtType) {
+		return jdtType.isBinary() ?
+				this.buildBinaryExternalJavaResourcePersistentType(jdtType) :
+				this.buildSourceExternalJavaResourcePersistentType(jdtType);
+	}
+
+	protected JavaResourcePersistentType buildBinaryExternalJavaResourcePersistentType(IType jdtType) {
+		return this.externalJavaResourcePersistentTypeCache.addPersistentType(jdtType);
+	}
+
+	protected JavaResourcePersistentType buildSourceExternalJavaResourcePersistentType(IType jdtType) {
+		JavaResourceCompilationUnit jrcu = this.getExternalJavaResourceCompilationUnit(jdtType.getCompilationUnit());
+		String jdtTypeName = jdtType.getFullyQualifiedName('.');  // JDT member type names use '$'
+		for (Iterator<JavaResourcePersistentType> stream = jrcu.persistentTypes(); stream.hasNext(); ) {
+			JavaResourcePersistentType jrpt = stream.next();
+			if (jrpt.getQualifiedName().equals(jdtTypeName)) {
+				return jrpt;
+			}
+		}
+		// we can get here if the project JRE is removed;
+		// see SourceCompilationUnit#getPrimaryType(CompilationUnit)
+		// bug 225332
+		return null;
+	}
+
+
+	// ********** external Java resource persistent types (binary) **********
+
+	public JavaResourcePersistentTypeCache getExternalJavaResourcePersistentTypeCache() {
+		return this.externalJavaResourcePersistentTypeCache;
+	}
+
+
+	// ********** external Java resource compilation units (source) **********
+
+	public Iterator<JavaResourceCompilationUnit> externalJavaResourceCompilationUnits() {
+		return this.getExternalJavaResourceCompilationUnits().iterator();
+	}
+
+	protected Iterable<JavaResourceCompilationUnit> getExternalJavaResourceCompilationUnits() {
+		return new LiveCloneIterable<JavaResourceCompilationUnit>(this.externalJavaResourceCompilationUnits);  // read-only
+	}
+
+	public int externalJavaResourceCompilationUnitsSize() {
+		return this.externalJavaResourceCompilationUnits.size();
+	}
+
+	/**
+	 * Return the resource model compilation unit corresponding to the specified
+	 * JDT compilation unit. If it does not exist, build it.
+	 */
+	protected JavaResourceCompilationUnit getExternalJavaResourceCompilationUnit(ICompilationUnit jdtCompilationUnit) {
+		for (JavaResourceCompilationUnit jrcu : this.getExternalJavaResourceCompilationUnits()) {
+			if (jrcu.getCompilationUnit().equals(jdtCompilationUnit)) {
+				// we will get here if the JRCU could not build its persistent type...
+				return jrcu;
+			}
+		}
+		return this.addExternalJavaResourceCompilationUnit(jdtCompilationUnit);
+	}
+
+	/**
+	 * Add an external Java resource compilation unit.
+	 */
+	protected JavaResourceCompilationUnit addExternalJavaResourceCompilationUnit(ICompilationUnit jdtCompilationUnit) {
+		JavaResourceCompilationUnit jrcu = this.buildJavaResourceCompilationUnit(jdtCompilationUnit);
+		this.addItemToCollection(jrcu, this.externalJavaResourceCompilationUnits, EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION);
+		jrcu.addResourceModelListener(this.resourceModelListener);
+		return jrcu;
+	}
+
+	protected JavaResourceCompilationUnit buildJavaResourceCompilationUnit(ICompilationUnit jdtCompilationUnit) {
+		return new SourceCompilationUnit(
+					jdtCompilationUnit,
+					this.jpaPlatform.getAnnotationProvider(),
+					this.jpaPlatform.getAnnotationEditFormatter(),
+					this.modifySharedDocumentCommandExecutor
+				);
+	}
+
+	protected boolean removeExternalJavaResourceCompilationUnit(IFile file) {
+		for (JavaResourceCompilationUnit jrcu : this.getExternalJavaResourceCompilationUnits()) {
+			if (jrcu.getFile().equals(file)) {
+				this.removeExternalJavaResourceCompilationUnit(jrcu);
+				return true;
+			}
+		}
+		return false;
+	}
+
+	protected void removeExternalJavaResourceCompilationUnit(JavaResourceCompilationUnit jrcu) {
+		jrcu.removeResourceModelListener(this.resourceModelListener);
+		this.removeItemFromCollection(jrcu, this.externalJavaResourceCompilationUnits, EXTERNAL_JAVA_RESOURCE_COMPILATION_UNITS_COLLECTION);
+	}
+
+
+	// ********** context model **********
+
+	public JpaRootContextNode getRootContextNode() {
+		return this.rootContextNode;
+	}
+
+
+	// ********** utility **********
+
+	public IFile convertToPlatformFile(String fileName) {
+		return JptCorePlugin.getPlatformFile(this.project, fileName);
+	}
+
+
+	// ********** XML files **********
+
+	public JpaXmlResource getPersistenceXmlResource() {
+		return (JpaXmlResource) this.getResourceModel(
+				JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATH,
+				JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE
+			);
+	}
+
+	public JpaXmlResource getDefaultOrmXmlResource() {
+		return this.getMappingFileXmlResource(JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH);
+	}
+
+	public JpaXmlResource getMappingFileXmlResource(String fileName) {
+		return (JpaXmlResource) this.getResourceModel(fileName, JptCorePlugin.MAPPING_FILE_CONTENT_TYPE);
+	}
+
+	/**
+	 * If the specified file exists, is significant to the JPA project, and its
+	 * content is a "kind of" the specified content type, return the JPA
+	 * resource model corresponding to the file; otherwise, return null.
+	 */
+	protected JpaResourceModel getResourceModel(String fileName, IContentType contentType) {
+		IFile file = this.convertToPlatformFile(fileName);
+		return file.exists() ? this.getResourceModel(file, contentType) :  null;
+	}
+
+	/**
+	 * If the specified file is significant to the JPA project and its content
+	 * is a "kind of" the specified content type, return the JPA resource model
+	 * corresponding to the file; otherwise, return null.
+	 */
+	protected JpaResourceModel getResourceModel(IFile file, IContentType contentType) {
+		JpaFile jpaFile = this.getJpaFile(file);
+		return (jpaFile == null) ? null : jpaFile.getResourceModel(contentType);
+	}
+
+
+	// ********** annotated Java source classes **********
+	
+	public Iterator<String> annotatedJavaSourceClassNames() {
+		return this.getAnnotatedJavaSourceClassNames().iterator();
+	}
+	
+	protected Iterable<String> getAnnotatedJavaSourceClassNames() {
+		return new TransformationIterable<JavaResourcePersistentType, String>(this.getInternalAnnotatedSourceJavaResourcePersistentTypes()) {
+			@Override
+			protected String transform(JavaResourcePersistentType jrpType) {
+				return jrpType.getQualifiedName();
+			}
+		};
+	}
+	
+	/**
+	 * return only those valid annotated Java resource persistent types that are part of the 
+	 * JPA project, ignoring those in JARs referenced in persistence.xml
+	 * @see org.eclipse.jpt.core.internal.utility.jdt.JPTTools#typeIsPersistable(org.eclipse.jpt.core.internal.utility.jdt.JPTTools.TypeAdapter)
+	 */
+	protected Iterable<JavaResourcePersistentType> getInternalAnnotatedSourceJavaResourcePersistentTypes() {
+		return new FilteringIterable<JavaResourcePersistentType>(this.getInternalSourceJavaResourcePersistentTypes()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentType jrpType) {
+				return jrpType.isPersistable() && jrpType.isAnnotated();  // i.e. the type is valid and has a valid type annotation
+			}
+		};
+	}
+	
+	public Iterator<String> mappedJavaSourceClassNames() {
+		return this.getMappedJavaSourceClassNames().iterator();
+	}
+
+	protected Iterable<String> getMappedJavaSourceClassNames() {
+		return new TransformationIterable<JavaResourcePersistentType, String>(this.getInternalMappedSourceJavaResourcePersistentTypes()) {
+			@Override
+			protected String transform(JavaResourcePersistentType jrpType) {
+				return jrpType.getQualifiedName();
+			}
+		};
+	}
+
+	/**
+	 * return only those valid "mapped" (i.e. annotated with @Entity, @Embeddable, etc.) Java 
+	 * resource persistent types that are part of the JPA project, ignoring those in JARs 
+	 * referenced in persistence.xml
+	 */
+	protected Iterable<JavaResourcePersistentType> getInternalMappedSourceJavaResourcePersistentTypes() {
+		return new FilteringIterable<JavaResourcePersistentType>(this.getInternalAnnotatedSourceJavaResourcePersistentTypes()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentType jrpType) {
+				return jrpType.isMapped();  // i.e. the type is already persistable and annotated
+			}
+		};
+	}
+
+	/**
+	 * return only those Java resource persistent types that are
+	 * part of the JPA project, ignoring those in JARs referenced in persistence.xml
+	 */
+	protected Iterable<JavaResourcePersistentType2_0> getInternalSourceJavaResourcePersistentTypes2_0() {
+		return new SubIterableWrapper<JavaResourcePersistentType, JavaResourcePersistentType2_0>(this.getInternalSourceJavaResourcePersistentTypes());
+	}
+
+	/**
+	 * return only those Java resource persistent types that are
+	 * part of the JPA project, ignoring those in JARs referenced in persistence.xml
+	 */
+	protected Iterable<JavaResourcePersistentType> getInternalSourceJavaResourcePersistentTypes() {
+		return new CompositeIterable<JavaResourcePersistentType>(this.getInternalSourceJavaResourcePersistentTypeSets());
+	}
+
+	/**
+	 * return only those Java resource persistent types that are
+	 * part of the JPA project, ignoring those in JARs referenced in persistence.xml
+	 */
+	protected Iterable<Iterable<JavaResourcePersistentType>> getInternalSourceJavaResourcePersistentTypeSets() {
+		return new TransformationIterable<JavaResourceCompilationUnit, Iterable<JavaResourcePersistentType>>(this.getInternalJavaResourceCompilationUnits()) {
+			@Override
+			protected Iterable<JavaResourcePersistentType> transform(final JavaResourceCompilationUnit compilationUnit) {
+				return new Iterable<JavaResourcePersistentType>() {
+					public Iterator<JavaResourcePersistentType> iterator() {
+						return compilationUnit.persistentTypes();  // *all* the types in the compilation unit
+					}
+				};
+			}
+		};
+	}
+
+	protected Iterable<JavaResourceCompilationUnit> getInternalJavaResourceCompilationUnits() {
+		return new TransformationIterable<JpaFile, JavaResourceCompilationUnit>(this.getJavaSourceJpaFiles()) {
+			@Override
+			protected JavaResourceCompilationUnit transform(JpaFile jpaFile) {
+				return (JavaResourceCompilationUnit) jpaFile.getResourceModel();
+			}
+		};
+	}
+
+	/**
+	 * return JPA files with Java source "content"
+	 */
+	protected Iterable<JpaFile> getJavaSourceJpaFiles() {
+		return this.getJpaFiles(JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE);
+	}
+
+
+	// ********** Java resource persistent type look-up **********
+
+	public JavaResourcePersistentType getJavaResourcePersistentType(String typeName) {
+		for (JavaResourcePersistentType jrpType : this.getPersistableJavaResourcePersistentTypes()) {
+			if (jrpType.getQualifiedName().equals(typeName)) {
+				return jrpType;
+			}
+		}
+		// if we don't have a type already, try to build new one from the project classpath
+		return this.buildPersistableExternalJavaResourcePersistentType(typeName);
+	}
+
+	/**
+	 * return *all* the "persistable" Java resource persistent types, including those in JARs referenced in
+	 * persistence.xml
+	 * @see org.eclipse.jpt.core.internal.utility.jdt.JPTTools#typeIsPersistable(org.eclipse.jpt.core.internal.utility.jdt.JPTTools.TypeAdapter)
+	 */
+	protected Iterable<JavaResourcePersistentType> getPersistableJavaResourcePersistentTypes() {
+		return new FilteringIterable<JavaResourcePersistentType>(this.getJavaResourcePersistentTypes()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentType jrpType) {
+				return jrpType.isPersistable();
+			}
+		};
+	}
+
+	/**
+	 * return *all* the Java resource persistent types, including those in JARs referenced in
+	 * persistence.xml
+	 */
+	protected Iterable<JavaResourcePersistentType> getJavaResourcePersistentTypes() {
+		return new CompositeIterable<JavaResourcePersistentType>(this.getJavaResourcePersistentTypeSets());
+	}
+
+	/**
+	 * return *all* the Java resource persistent types, including those in JARs referenced in
+	 * persistence.xml
+	 */
+	protected Iterable<Iterable<JavaResourcePersistentType>> getJavaResourcePersistentTypeSets() {
+		return new TransformationIterable<JavaResourceNode.Root, Iterable<JavaResourcePersistentType>>(this.getJavaResourceNodeRoots()) {
+			@Override
+			protected Iterable<JavaResourcePersistentType> transform(final JavaResourceNode.Root root) {
+				return new Iterable<JavaResourcePersistentType>() {
+					public Iterator<JavaResourcePersistentType> iterator() {
+						return root.persistentTypes();  // *all* the types held by the root
+					}
+				};
+			}
+		};
+	}
+
+	@SuppressWarnings("unchecked")
+	protected Iterable<JavaResourceNode.Root> getJavaResourceNodeRoots() {
+		return new CompositeIterable<JavaResourceNode.Root>(
+					this.getInternalJavaResourceCompilationUnits(),
+					this.getInternalJavaResourcePackageFragmentRoots(),
+					this.getExternalJavaResourceCompilationUnits(),
+					Collections.singleton(this.externalJavaResourcePersistentTypeCache)
+				);
+	}
+
+
+	// ********** JARs **********
+
+	// TODO
+	public JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(String jarFileName) {
+//		return this.getJarResourcePackageFragmentRoot(this.convertToPlatformFile(jarFileName));
+		return this.getJavaResourcePackageFragmentRoot(this.getProject().getFile(jarFileName));
+	}
+
+	protected JavaResourcePackageFragmentRoot getJavaResourcePackageFragmentRoot(IFile jarFile) {
+		for (JavaResourcePackageFragmentRoot pfr : this.getInternalJavaResourcePackageFragmentRoots()) {
+			if (pfr.getFile().equals(jarFile)) {
+				return pfr;
+			}
+		}
+		return null;
+	}
+
+	protected Iterable<JavaResourcePackageFragmentRoot> getInternalJavaResourcePackageFragmentRoots() {
+		return new TransformationIterable<JpaFile, JavaResourcePackageFragmentRoot>(this.getJarJpaFiles()) {
+			@Override
+			protected JavaResourcePackageFragmentRoot transform(JpaFile jpaFile) {
+				return (JavaResourcePackageFragmentRoot) jpaFile.getResourceModel();
+			}
+		};
+	}
+
+	/**
+	 * return JPA files with JAR "content"
+	 */
+	protected Iterable<JpaFile> getJarJpaFiles() {
+		return this.getJpaFiles(JptCorePlugin.JAR_CONTENT_TYPE);
+	}
+
+
+	// ********** metamodel **********
+
+	public Iterable<JavaResourcePersistentType2_0> getGeneratedMetamodelTopLevelTypes() {
+		if (this.metamodelSourceFolderName == null) {
+			return EmptyIterable.instance();
+		}
+		final IPackageFragmentRoot genSourceFolder = this.getMetamodelPackageFragmentRoot();
+		return new FilteringIterable<JavaResourcePersistentType2_0>(this.getInternalSourceJavaResourcePersistentTypes2_0()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentType2_0 jrpt) {
+				return jrpt.isGeneratedMetamodelTopLevelType(genSourceFolder);
+			}
+		};
+	}
+
+	public JavaResourcePersistentType2_0 getGeneratedMetamodelTopLevelType(IFile file) {
+		JavaResourceCompilationUnit jrcu = this.getJavaResourceCompilationUnit(file);
+		if (jrcu == null) {
+			return null;  // hmmm...
+		}
+		// TODO add API to JRCU to get top-level persistent type
+		Iterator<JavaResourcePersistentType> types = jrcu.persistentTypes();
+		if ( ! types.hasNext()) {
+			return null;  // no types in the file
+		}
+		JavaResourcePersistentType2_0 jrpt = (JavaResourcePersistentType2_0) types.next();
+		return jrpt.isGeneratedMetamodelTopLevelType() ? jrpt : null;
+	}
+
+	protected JavaResourceCompilationUnit getJavaResourceCompilationUnit(IFile file) {
+		return (JavaResourceCompilationUnit) this.getResourceModel(file, JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE);
+	}
+
+	public String getMetamodelSourceFolderName() {
+		return this.metamodelSourceFolderName;
+	}
+
+	public void setMetamodelSourceFolderName(String metamodelSourceFolderName) {
+		String old = this.metamodelSourceFolderName;
+		this.metamodelSourceFolderName = metamodelSourceFolderName;
+		if (this.attributeValueHasChanged(old, metamodelSourceFolderName)) {
+			JptCorePlugin.setMetamodelSourceFolderName(this.project, metamodelSourceFolderName);
+			this.firePropertyChanged(METAMODEL_SOURCE_FOLDER_NAME_PROPERTY, old, metamodelSourceFolderName);
+			if (metamodelSourceFolderName == null) {
+				this.disposeMetamodel();
+			} else {
+				this.initializeMetamodel();
+			}
+		}
+	}
+
+	public void initializeMetamodel() {
+		if (this.isJpa2_0Compatible()) {
+			((JpaRootContextNode2_0) this.rootContextNode).initializeMetamodel();
+		}
+	}
+
+	/**
+	 * Synchronize the metamodel for 2.0-compatible JPA projects.
+	 */
+	public void synchronizeMetamodel() {
+		if (this.isJpa2_0Compatible()) {
+			if (this.metamodelSourceFolderName != null) {
+				((JpaRootContextNode2_0) this.rootContextNode).synchronizeMetamodel();
+			}
+		}
+	}
+
+	public void disposeMetamodel() {
+		if (this.isJpa2_0Compatible()) {
+			((JpaRootContextNode2_0) this.rootContextNode).disposeMetamodel();
+		}
+	}
+
+	public IPackageFragmentRoot getMetamodelPackageFragmentRoot() {
+		return this.getJavaProject().getPackageFragmentRoot(this.getMetaModelSourceFolder());
+	}
+
+	protected IFolder getMetaModelSourceFolder() {
+		return this.getProject().getFolder(this.metamodelSourceFolderName);
+	}
+
+	/**
+	 * If the metamodel source folder is no longer a Java project source
+	 * folder, clear it out.
+	 */
+	protected void checkMetamodelSourceFolderName() {
+		if (this.metamodelSoureFolderNameIsInvalid()) {
+			this.setMetamodelSourceFolderName(null);
+		}
+	}
+
+	protected boolean metamodelSoureFolderNameIsInvalid() {
+		return ! this.metamodelSourceFolderNameIsValid();
+	}
+
+	protected boolean metamodelSourceFolderNameIsValid() {
+		return CollectionTools.contains(this.getJavaSourceFolderNames(), this.metamodelSourceFolderName);
+	}
+
+
+	// ********** Java source folder names **********
+
+	public Iterable<String> getJavaSourceFolderNames() {
+		try {
+			return this.getJavaSourceFolderNames_();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EmptyIterable.instance();
+		}
+	}
+
+	protected Iterable<String> getJavaSourceFolderNames_() throws JavaModelException {
+		return new TransformationIterable<IPackageFragmentRoot, String>(this.getJavaSourceFolders()) {
+			@Override
+			protected String transform(IPackageFragmentRoot pfr) {
+				try {
+					return this.transform_(pfr);
+				} catch (JavaModelException ex) {
+					return "Error: " + pfr.getPath(); //$NON-NLS-1$
+				}
+			}
+			private String transform_(IPackageFragmentRoot pfr) throws JavaModelException {
+				return pfr.getUnderlyingResource().getProjectRelativePath().toString();
+			}
+		};
+	}
+
+	protected Iterable<IPackageFragmentRoot> getJavaSourceFolders() throws JavaModelException {
+		return new FilteringIterable<IPackageFragmentRoot>(
+				this.getPackageFragmentRoots(),
+				SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER
+			);
+	}
+
+	protected static final Filter<IPackageFragmentRoot> SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER =
+		new Filter<IPackageFragmentRoot>() {
+			public boolean accept(IPackageFragmentRoot pfr) {
+				try {
+					return this.accept_(pfr);
+				} catch (JavaModelException ex) {
+					return false;
+				}
+			}
+			private boolean accept_(IPackageFragmentRoot pfr) throws JavaModelException {
+				return pfr.exists() && (pfr.getKind() == IPackageFragmentRoot.K_SOURCE);
+			}
+		};
+
+	protected Iterable<IPackageFragmentRoot> getPackageFragmentRoots() throws JavaModelException {
+		return new ArrayIterable<IPackageFragmentRoot>(this.getJavaProject().getPackageFragmentRoots());
+	}
+
+
+	// ********** Java events **********
+
+	// TODO handle changes to external projects
+	public void javaElementChanged(ElementChangedEvent event) {
+		this.processJavaDelta(event.getDelta());
+	}
+
+	/**
+	 * We recurse back here from {@link #processJavaDeltaChildren(IJavaElementDelta)}.
+	 */
+	protected void processJavaDelta(IJavaElementDelta delta) {
+		switch (delta.getElement().getElementType()) {
+			case IJavaElement.JAVA_MODEL :
+				this.processJavaModelDelta(delta);
+				break;
+			case IJavaElement.JAVA_PROJECT :
+				this.processJavaProjectDelta(delta);
+				break;
+			case IJavaElement.PACKAGE_FRAGMENT_ROOT :
+				this.processJavaPackageFragmentRootDelta(delta);
+				break;
+			case IJavaElement.PACKAGE_FRAGMENT :
+				this.processJavaPackageFragmentDelta(delta);
+				break;
+			case IJavaElement.COMPILATION_UNIT :
+				this.processJavaCompilationUnitDelta(delta);
+				break;
+			default :
+				break; // ignore the elements inside a compilation unit
+		}
+	}
+
+	protected void processJavaDeltaChildren(IJavaElementDelta delta) {
+		for (IJavaElementDelta child : delta.getAffectedChildren()) {
+			this.processJavaDelta(child); // recurse
+		}
+	}
+
+	/**
+	 * Return whether the specified Java element delta is for a
+	 * {@link IJavaElementDelta#CHANGED CHANGED}
+	 * (as opposed to {@link IJavaElementDelta#ADDED ADDED} or
+	 * {@link IJavaElementDelta#REMOVED REMOVED}) Java element
+	 * and the specified flag is set.
+	 * (The delta flags are only significant if the delta
+	 * {@link IJavaElementDelta#getKind() kind} is
+	 * {@link IJavaElementDelta#CHANGED CHANGED}.)
+	 */
+	protected boolean deltaFlagIsSet(IJavaElementDelta delta, int flag) {
+		return (delta.getKind() == IJavaElementDelta.CHANGED) &&
+				BitTools.flagIsSet(delta.getFlags(), flag);
+	}
+
+	// ***** model
+	protected void processJavaModelDelta(IJavaElementDelta delta) {
+		// process the Java model's projects
+		this.processJavaDeltaChildren(delta);
+	}
+
+	// ***** project
+	protected void processJavaProjectDelta(IJavaElementDelta delta) {
+		// process the Java project's package fragment roots
+		this.processJavaDeltaChildren(delta);
+
+		// a classpath change can have pretty far-reaching effects...
+		if (this.classpathHasChanged(delta)) {
+			this.rebuild((IJavaProject) delta.getElement());
+		}
+	}
+
+	/**
+	 * The specified Java project's classpath changed. Rebuild the JPA project
+	 * as appropriate.
+	 */
+	protected void rebuild(IJavaProject javaProject) {
+		// if the classpath has changed, we need to update everything since
+		// class references could now be resolved (or not) etc.
+		if (javaProject.equals(this.getJavaProject())) {
+			this.removeDeadJpaFiles();
+			this.checkMetamodelSourceFolderName();
+			this.update(this.getInternalJavaResourceCompilationUnits());
+		} else {
+			// TODO see if changed project is on our classpath?
+			this.update(this.getExternalJavaResourceCompilationUnits());
+		}
+	}
+
+	/**
+	 * Loop through all our JPA files, remove any that are no longer on the
+	 * classpath.
+	 */
+	protected void removeDeadJpaFiles() {
+		for (JpaFile jpaFile : this.getJpaFiles()) {
+			if (this.jpaFileIsDead(jpaFile)) {
+				this.removeJpaFile(jpaFile);
+			}
+		}
+	}
+
+	protected boolean jpaFileIsDead(JpaFile jpaFile) {
+		return ! this.jpaFileIsAlive(jpaFile);
+	}
+
+	/**
+	 * Sometimes (e.g. during tests), when a project has been deleted, we get a
+	 * Java change event that indicates the Java project is CHANGED (as
+	 * opposed to REMOVED, which is what typically happens). The event's delta
+	 * indicates that everything in the Java project has been deleted and the
+	 * classpath has changed. All entries in the classpath have been removed;
+	 * but single entry for the Java project's root folder has been added. (!)
+	 * This means any file in the project is on the Java project's classpath.
+	 * This classpath change is what triggers us to rebuild the JPA project; so
+	 * we put an extra check here to make sure the JPA file's resource file is
+	 * still present.
+	 * <p>
+	 * This would not be a problem if Dali received the resource change event
+	 * <em>before</em> JDT and simply removed the JPA project; but JDT receives
+	 * the resource change event first and converts it into the problematic
+	 * Java change event.... 
+	 */
+	protected boolean jpaFileIsAlive(JpaFile jpaFile) {
+		IFile file = jpaFile.getFile();
+		return (this.getJavaProject().isOnClasspath(file) || isInBundleRoot(file)) &&
+				file.exists();
+	}
+
+	/**
+	 * pre-condition:
+	 * delta.getElement().getElementType() == IJavaElement.JAVA_PROJECT
+	 */
+	protected boolean classpathHasChanged(IJavaElementDelta delta) {
+		return this.deltaFlagIsSet(delta, IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED);
+	}
+
+	protected void update(Iterable<JavaResourceCompilationUnit> javaResourceCompilationUnits) {
+		for (JavaResourceCompilationUnit javaResourceCompilationUnit : javaResourceCompilationUnits) {
+			javaResourceCompilationUnit.synchronizeWithJavaSource();
+		}
+	}
+
+	// ***** package fragment root
+	protected void processJavaPackageFragmentRootDelta(IJavaElementDelta delta) {
+		// process the Java package fragment root's package fragments
+		this.processJavaDeltaChildren(delta);
+
+		if (this.classpathEntryHasBeenAdded(delta)) {
+			// TODO bug 277218
+		} else if (this.classpathEntryHasBeenRemoved(delta)) {  // should be mutually-exclusive w/added (?)
+			// TODO bug 277218
+		}
+	}
+
+	/**
+	 * pre-condition:
+	 * delta.getElement().getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT
+	 */
+	protected boolean classpathEntryHasBeenAdded(IJavaElementDelta delta) {
+		return this.deltaFlagIsSet(delta, IJavaElementDelta.F_ADDED_TO_CLASSPATH);
+	}
+
+	/**
+	 * pre-condition:
+	 * delta.getElement().getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT
+	 */
+	protected boolean classpathEntryHasBeenRemoved(IJavaElementDelta delta) {
+		return this.deltaFlagIsSet(delta, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH);
+	}
+
+	// ***** package fragment
+	protected void processJavaPackageFragmentDelta(IJavaElementDelta delta) {
+		// process the java package fragment's compilation units
+		this.processJavaDeltaChildren(delta);
+	}
+
+	// ***** compilation unit
+	protected void processJavaCompilationUnitDelta(IJavaElementDelta delta) {
+		if (this.javaCompilationUnitDeltaIsRelevant(delta)) {
+			ICompilationUnit compilationUnit = (ICompilationUnit) delta.getElement();
+			for (JavaResourceCompilationUnit jrcu : this.getCombinedJavaResourceCompilationUnits()) {
+				if (jrcu.getCompilationUnit().equals(compilationUnit)) {
+					jrcu.synchronizeWithJavaSource();
+					// TODO ? this.resolveJavaTypes();  // might have new member types now...
+					break;  // there *shouldn't* be any more...
+				}
+			}
+		}
+		// ignore the java compilation unit's children
+	}
+
+	protected boolean javaCompilationUnitDeltaIsRelevant(IJavaElementDelta delta) {
+		// ignore changes to/from primary working copy - no content has changed;
+		// and make sure there are no other flags set that indicate *both* a
+		// change to/from primary working copy *and* content has changed
+		if (BitTools.onlyFlagIsSet(delta.getFlags(), IJavaElementDelta.F_PRIMARY_WORKING_COPY)) {
+			return false;
+		}
+
+		// ignore java notification for ADDED or REMOVED;
+		// these are handled via resource notification
+		return delta.getKind() == IJavaElementDelta.CHANGED;
+	}
+
+
+	// ********** validation **********
+	
+	public Iterator<IMessage> validationMessages(IReporter reporter) {
+		List<IMessage> messages = new ArrayList<IMessage>();
+		this.validate(messages, reporter);
+		return messages.iterator();
+	}
+	
+	protected void validate(List<IMessage> messages, IReporter reporter) {
+		if (reporter.isCancelled()) {
+			throw new ValidationCancelledException();
+		}
+		this.validateConnection(messages);
+		this.rootContextNode.validate(messages, reporter);
+	}
+
+	protected void validateConnection(List<IMessage> messages) {
+		String cpName = this.dataSource.getConnectionProfileName();
+		if (StringTools.stringIsEmpty(cpName)) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.NORMAL_SEVERITY,
+					JpaValidationMessages.PROJECT_NO_CONNECTION,
+					this
+				)
+			);
+			return;
+		}
+		ConnectionProfile cp = this.dataSource.getConnectionProfile();
+		if (cp == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.NORMAL_SEVERITY,
+					JpaValidationMessages.PROJECT_INVALID_CONNECTION,
+					new String[] {cpName},
+					this
+				)
+			);
+			return;
+		}
+		if (cp.isInactive()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.NORMAL_SEVERITY,
+					JpaValidationMessages.PROJECT_INACTIVE_CONNECTION,
+					new String[] {cpName},
+					this
+				)
+			);
+		}
+	}
+	
+	
+	// ********** dispose **********
+
+	public void dispose() {
+		this.updater.stop();
+		this.dataSource.dispose();
+		// the XML resources are held indefinitely by the WTP translator framework,
+		// so we better remove our listener or the JPA project will not be GCed
+		for (JpaFile jpaFile : this.getJpaFiles()) {
+			jpaFile.getResourceModel().removeResourceModelListener(this.resourceModelListener);
+		}
+	}
+	
+	
+	// ********** resource model listener **********
+	
+	protected class DefaultResourceModelListener 
+		implements JpaResourceModelListener 
+	{
+		protected DefaultResourceModelListener() {
+			super();
+		}
+		
+		public void resourceModelChanged(JpaResourceModel jpaResourceModel) {
+//			String msg = Thread.currentThread() + " resource model change: " + jpaResourceModel;
+//			System.out.println(msg);
+//			new Exception(msg).printStackTrace(System.out);
+			AbstractJpaProject.this.synchronizeContextModel(jpaResourceModel);
+		}
+		
+		public void resourceModelReverted(JpaResourceModel jpaResourceModel) {
+			IFile file = WorkbenchResourceHelper.getFile((JpaXmlResource)jpaResourceModel);
+			AbstractJpaProject.this.removeJpaFile(file);
+			AbstractJpaProject.this.addJpaFile(file);
+		}
+		
+		public void resourceModelUnloaded(JpaResourceModel jpaResourceModel) {
+			IFile file = WorkbenchResourceHelper.getFile((JpaXmlResource)jpaResourceModel);
+			AbstractJpaProject.this.removeJpaFile(file);
+		}
+	}
+	
+	
+	// ********** resource events **********
+	
+	// TODO need to do the same thing for external projects and compilation units
+	public void projectChanged(IResourceDelta delta) {
+		if (delta.getResource().equals(this.getProject())) {
+			this.internalProjectChanged(delta);
+		} else {
+			this.externalProjectChanged(delta);
+		}
+	}
+
+	protected void internalProjectChanged(IResourceDelta delta) {
+		ResourceDeltaVisitor resourceDeltaVisitor = this.buildInternalResourceDeltaVisitor();
+		resourceDeltaVisitor.visitDelta(delta);
+		// at this point, if we have added and/or removed JpaFiles, an "update" will have been triggered;
+		// any changes to the resource model during the "resolve" will trigger further "updates";
+		// there should be no need to "resolve" external Java types (they can't have references to
+		// the internal Java types)
+		if (resourceDeltaVisitor.encounteredSignificantChange()) {
+			this.resolveInternalJavaTypes();
+		}
+	}
+
+	protected ResourceDeltaVisitor buildInternalResourceDeltaVisitor() {
+		return new ResourceDeltaVisitor() {
+			@Override
+			public boolean fileChangeIsSignificant(IFile file, int deltaKind) {
+				return AbstractJpaProject.this.synchronizeJpaFiles(file, deltaKind);
+			}
+		};
+	}
+
+	/**
+	 * Internal resource delta visitor callback.
+	 * Return true if a JpaFile was either added or removed.
+	 */
+	protected boolean synchronizeJpaFiles(IFile file, int deltaKind) {
+		switch (deltaKind) {
+			case IResourceDelta.ADDED :
+				return this.addJpaFile(file);
+			case IResourceDelta.REMOVED :
+				return this.removeJpaFile(file);
+			case IResourceDelta.CHANGED :
+				return this.checkForChangedFileContent(file);
+			case IResourceDelta.ADDED_PHANTOM :
+				break;  // ignore
+			case IResourceDelta.REMOVED_PHANTOM :
+				break;  // ignore
+			default :
+				break;  // only worried about added/removed/changed files
+		}
+
+		return false;
+	}
+
+	protected boolean checkForChangedFileContent(IFile file) {
+		JpaFile jpaFile = this.getJpaFile(file);
+		if (jpaFile == null) {
+			// the file might have changed its content to something that we are interested in
+			return this.addJpaFile(file);
+		}
+
+		if (jpaFile.getContentType().equals(PlatformTools.getContentType(file))) {
+			// content has not changed - ignore
+			return false;
+		}
+
+		// the content type changed, we need to build a new JPA file
+		// (e.g. the schema of an orm.xml file changed from JPA to EclipseLink)
+		this.removeJpaFile(jpaFile);
+		this.addJpaFile(file);
+		return true;  // at the least, we have removed a JPA file
+	}
+
+	protected void resolveInternalJavaTypes() {
+		for (JavaResourceCompilationUnit jrcu : this.getInternalJavaResourceCompilationUnits()) {
+			jrcu.resolveTypes();
+		}
+	}
+
+	protected void externalProjectChanged(IResourceDelta delta) {
+		if (this.getJavaProject().isOnClasspath(delta.getResource()) || isInBundleRoot(delta.getResource())) {
+			ResourceDeltaVisitor resourceDeltaVisitor = this.buildExternalResourceDeltaVisitor();
+			resourceDeltaVisitor.visitDelta(delta);
+			// force an "update" here since adding and/or removing an external Java type
+			// will only trigger an "update" if the "resolve" causes something in the resource model to change
+			if (resourceDeltaVisitor.encounteredSignificantChange()) {
+				this.update();
+				this.resolveExternalJavaTypes();
+				this.resolveInternalJavaTypes();
+			}
+		}
+	}
+
+	protected ResourceDeltaVisitor buildExternalResourceDeltaVisitor() {
+		return new ResourceDeltaVisitor() {
+			@Override
+			public boolean fileChangeIsSignificant(IFile file, int deltaKind) {
+				return AbstractJpaProject.this.synchronizeExternalFiles(file, deltaKind);
+			}
+		};
+	}
+
+	/**
+	 * external resource delta visitor callback
+	 * Return true if an "external" Java resource compilation unit
+	 * was added or removed.
+	 */
+	protected boolean synchronizeExternalFiles(IFile file, int deltaKind) {
+		switch (deltaKind) {
+			case IResourceDelta.ADDED :
+				return this.externalFileAdded(file);
+			case IResourceDelta.REMOVED :
+				return this.externalFileRemoved(file);
+			case IResourceDelta.CHANGED :
+				break;  // ignore
+			case IResourceDelta.ADDED_PHANTOM :
+				break;  // ignore
+			case IResourceDelta.REMOVED_PHANTOM :
+				break;  // ignore
+			default :
+				break;  // only worried about added/removed/changed files
+		}
+
+		return false;
+	}
+
+	protected boolean externalFileAdded(IFile file) {
+		IContentType contentType = PlatformTools.getContentType(file);
+		if (contentType == null) {
+			return false;
+		}
+		if (contentType.equals(JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
+			return true;
+		}
+		if (contentType.equals(JptCorePlugin.JAR_CONTENT_TYPE)) {
+			return true;
+		}
+		return false;
+	}
+
+	protected boolean externalFileRemoved(IFile file) {
+		IContentType contentType = PlatformTools.getContentType(file);
+		if (contentType == null) {
+			return false;
+		}
+		if (contentType.equals(JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
+			return this.removeExternalJavaResourceCompilationUnit(file);
+		}
+		if (contentType.equals(JptCorePlugin.JAR_CONTENT_TYPE)) {
+			return this.externalJavaResourcePersistentTypeCache.removePersistentTypes(file);
+		}
+		return false;
+	}
+
+	protected void resolveExternalJavaTypes() {
+		for (JavaResourceCompilationUnit jrcu : this.getExternalJavaResourceCompilationUnits()) {
+			jrcu.resolveTypes();
+		}
+	}
+
+	// ***** resource delta visitors
+	/**
+	 * add or remove a JPA file for every [appropriate] file encountered by the visitor
+	 */
+	protected abstract class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+		protected boolean encounteredSignificantChange = false;
+		
+		protected ResourceDeltaVisitor() {
+			super();
+		}
+
+		protected void visitDelta(IResourceDelta delta) {
+			try {
+				delta.accept(this);
+			} catch (CoreException ex) {
+				// shouldn't happen - we don't throw any CoreExceptions
+				throw new RuntimeException(ex);
+			}
+		}
+
+		public boolean visit(IResourceDelta delta) {
+			IResource res = delta.getResource();
+			switch (res.getType()) {
+				case IResource.ROOT :
+					return true;  // visit children
+				case IResource.PROJECT :
+					return true;  // visit children
+				case IResource.FOLDER :
+					return true;  // visit children
+				case IResource.FILE :
+					this.fileChanged((IFile) res, delta.getKind());
+					return false;  // no children
+				default :
+					return false;  // no children (probably shouldn't get here...)
+			}
+		}
+
+		protected void fileChanged(IFile file, int deltaKind) {
+			if (this.fileChangeIsSignificant(file, deltaKind)) {
+				this.encounteredSignificantChange = true;
+			}
+		}
+
+		protected abstract boolean fileChangeIsSignificant(IFile file, int deltaKind);
+
+		/**
+		 * Return whether the visitor encountered some sort of "significant"
+		 * change while traversing the IResourceDelta
+		 * (e.g. a JPA file was added or removed).
+		 */
+		protected boolean encounteredSignificantChange() {
+			return this.encounteredSignificantChange;
+		}
+
+	}
+
+
+	// ********** support for modifying documents shared with the UI **********
+
+	public void setThreadLocalModifySharedDocumentCommandExecutor(CommandExecutor commandExecutor) {
+		this.modifySharedDocumentCommandExecutor.set(commandExecutor);
+	}
+
+	public CommandExecutor getModifySharedDocumentCommandExecutor() {
+		return this.modifySharedDocumentCommandExecutor;
+	}
+
+
+	// ********** synchronize context model with resource model **********
+
+	// TODO ...
+	protected void synchronizeContextModel(@SuppressWarnings("unused") JpaResourceModel jpaResourceModel) {
+		this.synchronizeContextModel();
+	}
+
+	public void synchronizeContextModel() {
+		this.update();
+	}
+
+
+	// ********** project "update" **********
+
+	public Updater getUpdater() {
+		return this.updater;
+	}
+
+	public void setUpdater(Updater updater) {
+		if (updater == null) {
+			throw new NullPointerException();
+		}
+		this.updater.stop();
+		this.setUpdater_(updater);
+	}
+
+	protected void setUpdater_(Updater updater) {
+		this.updater = updater;
+		this.updater.start();
+	}
+
+	/**
+	 * Delegate to the updater so clients can configure how updates occur.
+	 */
+	public void update() {
+		this.updater.update();
+	}
+
+	/**
+	 * Called by the updater.
+	 */
+	public IStatus update(IProgressMonitor monitor) {
+		this.update_(monitor);
+		return Status.OK_STATUS;
+	}
+
+	protected void update_(IProgressMonitor monitor) {
+		this.rootContextNode.update(monitor);
+		this.rootContextNode.postUpdate();
+	}
+
+	/**
+	 * Also called by the updater.
+	 */
+	public void updateQuiesced() {
+		this.synchronizeMetamodel();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractSynchronizerJpaProjectUpdater.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractSynchronizerJpaProjectUpdater.java
new file mode 100644
index 0000000..462af69
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AbstractSynchronizerJpaProjectUpdater.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronizer;
+
+/**
+ * Adapt the "callback synchronizer" interface to the JPA project "updater"
+ * interface.
+ * <p>
+ * Subclasses are to build the appropriate callback synchronizer.
+ */
+public abstract class AbstractSynchronizerJpaProjectUpdater
+	implements JpaProject.Updater
+{
+	protected final JpaProject jpaProject;
+	protected final CallbackSynchronizer synchronizer;
+
+
+	protected AbstractSynchronizerJpaProjectUpdater(JpaProject jpaProject) {
+		super();
+		this.jpaProject = jpaProject;
+		this.synchronizer = this.buildSynchronizer();
+		this.synchronizer.addListener(this.buildCallbackSynchronizerListener());
+	}
+
+	protected abstract CallbackSynchronizer buildSynchronizer();
+
+	protected CallbackSynchronizer.Listener buildCallbackSynchronizerListener() {
+		return new CallbackSynchronizer.Listener() {
+			public void synchronizationQuiesced(CallbackSynchronizer s) {
+				AbstractSynchronizerJpaProjectUpdater.this.jpaProject.updateQuiesced();
+			}
+		};
+	}
+
+
+	// ********** JpaProject.Updater implementation **********
+
+	public void start() {
+		this.synchronizer.start();
+	}
+
+	// recursion: we come back here if IJpaProject#update() is called again, during the "update"
+	public void update() {
+		this.synchronizer.synchronize();
+	}
+
+	public void stop() {
+		this.synchronizer.stop();
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.synchronizer);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AsynchronousJpaProjectUpdater.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AsynchronousJpaProjectUpdater.java
new file mode 100644
index 0000000..a0f67a1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/AsynchronousJpaProjectUpdater.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.internal.utility.CallbackJobSynchronizer;
+import org.eclipse.jpt.core.internal.utility.JobCommand;
+import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronizer;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Adapt the "callback synchronizer" interface to the JPA project "updater"
+ * interface.
+ * <p>
+ * This updater will "update" the JPA project in an Eclipse job that executes
+ * in a separate thread allowing calls to {@link JpaProject.Updater#update()}
+ * to return immediately.
+ */
+public class AsynchronousJpaProjectUpdater
+	extends AbstractSynchronizerJpaProjectUpdater
+{
+	public AsynchronousJpaProjectUpdater(JpaProject jpaProject) {
+		super(jpaProject);
+	}
+
+	@Override
+	protected CallbackSynchronizer buildSynchronizer() {
+		return new CallbackJobSynchronizer(
+				this.buildJobName(),
+				this.buildJobCommand(),
+				this.buildJobSchedulingRule()
+			);
+	}
+
+	protected String buildJobName() {
+		return NLS.bind(JptCoreMessages.UPDATE_JOB_NAME, this.jpaProject.getName());
+	}
+
+	protected JobCommand buildJobCommand() {
+		return new JobCommand() {
+			public IStatus execute(IProgressMonitor monitor) {
+				return AsynchronousJpaProjectUpdater.this.jpaProject.update(monitor);
+			}
+		};
+	}
+
+	protected ISchedulingRule buildJobSchedulingRule() {
+		return this.jpaProject.getProject();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java
new file mode 100644
index 0000000..1c51869
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericEntityGeneratorDatabaseAnnotationNameBuilder.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.jpt.core.EntityGeneratorDatabaseAnnotationNameBuilder;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.ForeignKey;
+import org.eclipse.jpt.db.Table;
+
+/**
+ * Singleton that delegates to the db object passed in.
+ */
+public final class GenericEntityGeneratorDatabaseAnnotationNameBuilder
+	implements EntityGeneratorDatabaseAnnotationNameBuilder
+{
+	public static final EntityGeneratorDatabaseAnnotationNameBuilder INSTANCE
+				= new GenericEntityGeneratorDatabaseAnnotationNameBuilder();
+
+	public static EntityGeneratorDatabaseAnnotationNameBuilder instance() {
+		return INSTANCE;
+	}
+
+	// ensure single instance
+	private GenericEntityGeneratorDatabaseAnnotationNameBuilder() {
+		super();
+	}
+
+	public String buildTableAnnotationName(String entityName, Table table) {
+		return table.getIdentifier(entityName);
+	}
+
+	public String buildColumnAnnotationName(String attributeName, Column column) {
+		return column.getIdentifier(attributeName);
+	}
+
+	public String buildJoinColumnAnnotationName(String attributeName, ForeignKey foreignKey) {
+		return foreignKey.getJoinColumnAnnotationIdentifier(attributeName);
+	}
+
+	public String buildJoinColumnAnnotationName(Column column) {
+		return column.getIdentifier();
+	}
+
+	public String buildJoinTableAnnotationName(Table table) {
+		return table.getIdentifier();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaAnnotationDefinitionProvider.java
new file mode 100644
index 0000000..72d1746
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaAnnotationDefinitionProvider.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.List;
+import org.eclipse.jpt.core.JpaAnnotationDefinitionProvider;
+import org.eclipse.jpt.core.internal.resource.java.AssociationOverrideAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.AssociationOverridesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.AttributeOverrideAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.AttributeOverridesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.BasicAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.ColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.DiscriminatorColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.DiscriminatorValueAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EmbeddableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EmbeddedAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EmbeddedIdAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EntityAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EnumeratedAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.GeneratedValueAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.IdAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.IdClassAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.InheritanceAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.JoinColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.JoinColumnsAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.JoinTableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.LobAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.ManyToManyAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.ManyToOneAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.MapKeyAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.MappedSuperclassAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.NamedNativeQueriesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.NamedNativeQueryAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.NamedQueriesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.NamedQueryAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.OneToManyAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.OneToOneAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.OrderByAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.PrimaryKeyJoinColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.PrimaryKeyJoinColumnsAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.SecondaryTableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.SecondaryTablesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.SequenceGeneratorAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TableGeneratorAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TemporalAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TransientAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.VersionAnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+
+public class GenericJpaAnnotationDefinitionProvider
+	extends AbstractJpaAnnotationDefintionProvider
+{	
+	// singleton
+	private static final JpaAnnotationDefinitionProvider INSTANCE = 
+			new GenericJpaAnnotationDefinitionProvider();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JpaAnnotationDefinitionProvider instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Ensure singleton usage
+	 */
+	protected GenericJpaAnnotationDefinitionProvider() {
+		super();
+	}
+	
+	
+	@Override
+	protected void addTypeAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
+		definitions.add(AssociationOverrideAnnotationDefinition.instance());
+		definitions.add(AssociationOverridesAnnotationDefinition.instance());
+		definitions.add(AttributeOverrideAnnotationDefinition.instance());
+		definitions.add(AttributeOverridesAnnotationDefinition.instance());
+		definitions.add(DiscriminatorColumnAnnotationDefinition.instance());
+		definitions.add(DiscriminatorValueAnnotationDefinition.instance());
+		definitions.add(EmbeddableAnnotationDefinition.instance());
+		definitions.add(EntityAnnotationDefinition.instance());
+		definitions.add(IdClassAnnotationDefinition.instance());
+		definitions.add(InheritanceAnnotationDefinition.instance());
+		definitions.add(MappedSuperclassAnnotationDefinition.instance());
+		definitions.add(NamedQueryAnnotationDefinition.instance());
+		definitions.add(NamedQueriesAnnotationDefinition.instance());
+		definitions.add(NamedNativeQueryAnnotationDefinition.instance());
+		definitions.add(NamedNativeQueriesAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnsAnnotationDefinition.instance());
+		definitions.add(SecondaryTableAnnotationDefinition.instance());
+		definitions.add(SecondaryTablesAnnotationDefinition.instance());
+		definitions.add(SequenceGeneratorAnnotationDefinition.instance());
+		definitions.add(TableAnnotationDefinition.instance());
+		definitions.add(TableGeneratorAnnotationDefinition.instance());
+	}
+	
+	@Override
+	protected void addTypeMappingAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
+		definitions.add(EmbeddableAnnotationDefinition.instance());
+		definitions.add(EntityAnnotationDefinition.instance());
+		definitions.add(MappedSuperclassAnnotationDefinition.instance());
+	}
+	
+	@Override
+	protected void addAttributeAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
+		definitions.add(AssociationOverrideAnnotationDefinition.instance());
+		definitions.add(AssociationOverridesAnnotationDefinition.instance());
+		definitions.add(AttributeOverrideAnnotationDefinition.instance());
+		definitions.add(AttributeOverridesAnnotationDefinition.instance());
+		definitions.add(BasicAnnotationDefinition.instance());
+		definitions.add(ColumnAnnotationDefinition.instance());
+		definitions.add(EmbeddedAnnotationDefinition.instance());
+		definitions.add(EmbeddedIdAnnotationDefinition.instance());
+		definitions.add(EnumeratedAnnotationDefinition.instance());
+		definitions.add(GeneratedValueAnnotationDefinition.instance());
+		definitions.add(IdAnnotationDefinition.instance());
+		definitions.add(JoinColumnAnnotationDefinition.instance());
+		definitions.add(JoinColumnsAnnotationDefinition.instance());
+		definitions.add(JoinTableAnnotationDefinition.instance());
+		definitions.add(LobAnnotationDefinition.instance());
+		definitions.add(ManyToManyAnnotationDefinition.instance());
+		definitions.add(ManyToOneAnnotationDefinition.instance());
+		definitions.add(MapKeyAnnotationDefinition.instance());
+		definitions.add(OneToManyAnnotationDefinition.instance());
+		definitions.add(OneToOneAnnotationDefinition.instance());
+		definitions.add(OrderByAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnsAnnotationDefinition.instance());
+		definitions.add(SequenceGeneratorAnnotationDefinition.instance());
+		definitions.add(TableGeneratorAnnotationDefinition.instance());
+		definitions.add(TemporalAnnotationDefinition.instance());
+		definitions.add(TransientAnnotationDefinition.instance());
+		definitions.add(VersionAnnotationDefinition.instance());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaAnnotationProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaAnnotationProvider.java
new file mode 100644
index 0000000..07794ca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaAnnotationProvider.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.JpaAnnotationDefinitionProvider;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.internal.iterators.ArrayListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+
+/**
+ * Delegate to annotation definition providers.
+ * The platform factory will build an instance of this annotation provider,
+ * passing in the appropriate array of annotation definition providers necessary
+ * to build the annotations for the platform (vendor and/or version).
+ */
+public class GenericJpaAnnotationProvider
+	implements JpaAnnotationProvider
+{
+	private final JpaAnnotationDefinitionProvider[] annotationDefinitionProviders;
+	
+	public GenericJpaAnnotationProvider(JpaAnnotationDefinitionProvider... annotationDefinitionProviders) {
+		super();
+		this.annotationDefinitionProviders = annotationDefinitionProviders;
+	}
+	
+	
+	// ********** convenience methods **********
+	
+	protected Iterator<String> annotationNames(Iterator<AnnotationDefinition> annotationDefinitions) {
+		return new TransformationIterator<AnnotationDefinition, String>(annotationDefinitions) {
+			@Override
+			protected String transform(AnnotationDefinition annotationDefinition) {
+				return annotationDefinition.getAnnotationName();
+			}
+		};
+	}
+	
+	protected AnnotationDefinition selectAnnotationDefinition(Iterator<AnnotationDefinition> annotationDefinitions, String annotationName) {
+		while (annotationDefinitions.hasNext()) {
+			AnnotationDefinition annotationDefinition = annotationDefinitions.next();
+			if (annotationDefinition.getAnnotationName().equals(annotationName)) {
+				return annotationDefinition;
+			}
+		}
+		return null;
+	}
+	
+	
+	// ********** annotation definition providers **********
+
+	protected ListIterator<JpaAnnotationDefinitionProvider> annotationDefinitionProviders() {
+		return new ArrayListIterator<JpaAnnotationDefinitionProvider>(this.annotationDefinitionProviders);
+	}
+
+
+	// ********** type annotations **********
+	
+	public Iterator<String> typeAnnotationNames() {
+		return this.annotationNames(this.typeAnnotationDefinitions());
+	}
+	
+	protected Iterator<AnnotationDefinition> typeAnnotationDefinitions() {
+		return new CompositeIterator<AnnotationDefinition> ( 
+			new TransformationIterator<JpaAnnotationDefinitionProvider, Iterator<AnnotationDefinition>>(this.annotationDefinitionProviders()) {
+				@Override
+				protected Iterator<AnnotationDefinition> transform(JpaAnnotationDefinitionProvider annotationDefinitionProvider) {
+					return annotationDefinitionProvider.typeAnnotationDefinitions();
+				}
+			}
+		);
+	}
+	
+	public Iterator<String> typeMappingAnnotationNames() {
+		return this.annotationNames(typeMappingAnnotationDefinitions());
+	}
+	
+	protected Iterator<AnnotationDefinition> typeMappingAnnotationDefinitions() {
+		return new CompositeIterator<AnnotationDefinition> ( 
+			new TransformationIterator<JpaAnnotationDefinitionProvider, Iterator<AnnotationDefinition>>(this.annotationDefinitionProviders()) {
+				@Override
+				protected Iterator<AnnotationDefinition> transform(JpaAnnotationDefinitionProvider annotationDefinitionProvider) {
+					return annotationDefinitionProvider.typeMappingAnnotationDefinitions();
+				}
+			}
+		);
+	}
+	
+	public Annotation buildTypeAnnotation(JavaResourcePersistentType parent, Type type, String annotationName) {
+		return this.getTypeAnnotationDefinition(annotationName).buildAnnotation(parent, type);
+	}
+	
+	public Annotation buildTypeAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		return this.getTypeAnnotationDefinition(jdtAnnotation.getElementName()).buildAnnotation(parent, jdtAnnotation);
+	}
+	
+	protected AnnotationDefinition getTypeAnnotationDefinition(String annotationName) {
+		AnnotationDefinition annotationDefinition = this.selectAnnotationDefinition(this.typeAnnotationDefinitions(), annotationName);
+		if (annotationDefinition == null) {
+			throw new IllegalArgumentException("unsupported type annotation: " + annotationName); //$NON-NLS-1$
+		}
+		return annotationDefinition;
+	}
+	
+	public Annotation buildNullTypeAnnotation(JavaResourcePersistentType parent, String annotationName) {
+		return this.getTypeAnnotationDefinition(annotationName).buildNullAnnotation(parent);
+	}
+	
+	
+	// ********** attribute annotations **********
+	
+	public Iterator<String> attributeAnnotationNames() {
+		return this.annotationNames(attributeAnnotationDefinitions());
+	}
+	
+	protected Iterator<AnnotationDefinition> attributeAnnotationDefinitions() {
+		return new CompositeIterator<AnnotationDefinition> ( 
+			new TransformationIterator<JpaAnnotationDefinitionProvider, Iterator<AnnotationDefinition>>(this.annotationDefinitionProviders()) {
+				@Override
+				protected Iterator<AnnotationDefinition> transform(JpaAnnotationDefinitionProvider annotationDefinitionProvider) {
+					return annotationDefinitionProvider.attributeAnnotationDefinitions();
+				}
+			}
+		);
+	}
+	
+	public Annotation buildAttributeAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute, String annotationName) {
+		return this.getAttributeAnnotationDefinition(annotationName).buildAnnotation(parent, attribute);
+	}
+	
+	public Annotation buildAttributeAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		return this.getAttributeAnnotationDefinition(jdtAnnotation.getElementName()).buildAnnotation(parent, jdtAnnotation);
+	}
+	
+	public Annotation buildNullAttributeAnnotation(JavaResourcePersistentAttribute parent, String annotationName) {
+		return this.getAttributeAnnotationDefinition(annotationName).buildNullAnnotation(parent);
+	}
+	
+	protected AnnotationDefinition getAttributeAnnotationDefinition(String annotationName) {
+		AnnotationDefinition annotationDefinition = this.selectAnnotationDefinition(this.attributeAnnotationDefinitions(), annotationName);
+		if (annotationDefinition == null) {
+			throw new IllegalArgumentException("unsupported attribute annotation: " + annotationName); //$NON-NLS-1$
+		}
+		return annotationDefinition;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java
new file mode 100644
index 0000000..baa7ffb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.ListIterator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.EntityGeneratorDatabaseAnnotationNameBuilder;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JpaPlatformProvider;
+import org.eclipse.jpt.core.JpaPlatformVariation;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.ResourceDefinition;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.core.internal.utility.jdt.DefaultAnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.db.ConnectionProfileFactory;
+import org.eclipse.jpt.db.JptDbPlugin;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.Tools;
+
+/**
+ * All the state in the JPA platform should be "static" (i.e. unchanging once
+ * it is initialized).
+ */
+public class GenericJpaPlatform
+	implements JpaPlatform
+{
+	private final String id;
+	
+	private final Version jpaVersion;
+	
+	private final JpaFactory jpaFactory;
+	
+	private final JpaAnnotationProvider annotationProvider;
+	
+	private final JpaPlatformProvider platformProvider;
+	
+	private final JpaPlatformVariation jpaVariation;
+	
+	
+	public GenericJpaPlatform(String id, Version jpaVersion, JpaFactory jpaFactory, JpaAnnotationProvider jpaAnnotationProvider, JpaPlatformProvider platformProvider, JpaPlatformVariation jpaVariation) {
+		super();
+		this.id = id;
+		this.jpaVersion = jpaVersion;
+		this.jpaFactory = jpaFactory;
+		this.annotationProvider = jpaAnnotationProvider;
+		this.jpaVariation = jpaVariation;
+		this.platformProvider = platformProvider;
+	}
+	
+	
+	public String getId() {
+		return this.id;
+	}
+	
+	public Version getJpaVersion() {
+		return this.jpaVersion;
+	}
+	
+	// ********** factory **********
+
+	public JpaFactory getJpaFactory() {
+		return this.jpaFactory;
+	}
+	
+	
+	// ********** platform providers **********
+	
+	protected JpaPlatformProvider getPlatformProvider() {
+		return this.platformProvider;
+	}
+	
+	
+	// ********** JPA file/resource models **********
+
+	public JpaFile buildJpaFile(JpaProject jpaProject, IFile file) {
+		IContentType contentType = PlatformTools.getContentType(file);
+		return (contentType == null) ? null : this.buildJpaFile(jpaProject, file, contentType);
+	}
+
+	protected JpaFile buildJpaFile(JpaProject jpaProject, IFile file, IContentType contentType) {
+		JpaResourceModel resourceModel = this.buildResourceModel(jpaProject, file, contentType);
+		return (resourceModel == null) ? null : this.jpaFactory.buildJpaFile(jpaProject, file, contentType, resourceModel);
+	}
+
+	protected JpaResourceModel buildResourceModel(JpaProject jpaProject, IFile file, IContentType contentType) {
+		JpaResourceModelProvider provider = this.getResourceModelProvider(contentType);
+		return (provider == null) ? null : provider.buildResourceModel(jpaProject, file);
+	}
+
+	/**
+	 * Return null if we don't have a provider for the specified content type
+	 * (since we don't have control over the possible content types).
+	 */
+	protected JpaResourceModelProvider getResourceModelProvider(IContentType contentType) {
+		for (JpaResourceModelProvider provider : CollectionTools.iterable(resourceModelProviders())) {
+			if (contentType.equals(provider.getContentType())) {
+				return provider;
+			}
+		}
+		return null;
+	}
+
+	protected ListIterator<JpaResourceModelProvider> resourceModelProviders() {
+		return this.platformProvider.resourceModelProviders();
+	}
+	
+	
+	// ********** Java annotations **********
+
+	public JpaAnnotationProvider getAnnotationProvider() {
+		return this.annotationProvider;
+	}
+
+	public AnnotationEditFormatter getAnnotationEditFormatter() {
+		return DefaultAnnotationEditFormatter.instance();
+	}
+
+
+	// ********** Java type mappings **********
+	
+	public JavaTypeMappingDefinition getJavaTypeMappingDefinition(JavaPersistentType type) {
+		for (JavaTypeMappingDefinition definition : 
+				CollectionTools.iterable(javaTypeMappingDefinitions())) {
+			if (definition.test(type)) {
+				return definition;
+			}
+		}
+		throw new IllegalStateException("There must be a mapping definition for all types"); //$NON-NLS-1$
+	}
+	
+	public JavaTypeMappingDefinition getJavaTypeMappingDefinition(String mappingKey) {
+		for (JavaTypeMappingDefinition definition : 
+				CollectionTools.iterable(javaTypeMappingDefinitions())) {
+			if (Tools.valuesAreEqual(definition.getKey(), mappingKey)) {
+				return definition;
+			}
+		}
+		throw new IllegalArgumentException("Illegal type mapping key: " + mappingKey); //$NON-NLS-1$
+	}
+	
+	protected ListIterator<JavaTypeMappingDefinition> javaTypeMappingDefinitions() {
+		return this.platformProvider.javaTypeMappingDefinitions();
+	}
+	
+	
+	// ********** Java attribute mappings **********
+	
+	public JavaAttributeMappingDefinition getDefaultJavaAttributeMappingDefinition(
+			JavaPersistentAttribute attribute) {
+		for (JavaAttributeMappingDefinition definition : 
+				CollectionTools.iterable(defaultJavaAttributeMappingDefinitions())) {
+			if (definition.testDefault(attribute)) {
+				return definition;
+			}
+		}
+		throw new IllegalStateException("There must be a mapping definition for all attributes"); //$NON-NLS-1$
+	}
+	
+	protected ListIterator<JavaAttributeMappingDefinition> defaultJavaAttributeMappingDefinitions() {
+		return this.platformProvider.defaultJavaAttributeMappingDefinitions();
+	}
+	
+	public JavaAttributeMappingDefinition getSpecifiedJavaAttributeMappingDefinition(
+			JavaPersistentAttribute attribute) {
+		for (JavaAttributeMappingDefinition definition : 
+				CollectionTools.iterable(specifiedJavaAttributeMappingDefinitions())) {
+			if (definition.testSpecified(attribute)) {
+				return definition;
+			}
+		}
+		throw new IllegalStateException("There must be a mapping definition for all attributes"); //$NON-NLS-1$
+	}
+	
+	protected ListIterator<JavaAttributeMappingDefinition> specifiedJavaAttributeMappingDefinitions() {
+		return this.platformProvider.specifiedJavaAttributeMappingDefinitions();
+	}
+	
+	public JavaAttributeMappingDefinition getSpecifiedJavaAttributeMappingDefinition(String mappingKey) {
+		for (JavaAttributeMappingDefinition definition : 
+				CollectionTools.iterable(specifiedJavaAttributeMappingDefinitions())) {
+			if (Tools.valuesAreEqual(definition.getKey(), mappingKey)) {
+				return definition;
+			}
+		}
+		throw new IllegalArgumentException("Illegal attribute mapping key: " + mappingKey); //$NON-NLS-1$
+	}
+	
+	
+	// ********** resource types and definitions **********
+	
+	public boolean supportsResourceType(JpaResourceType resourceType) {
+		for (ResourceDefinition resourceDefinition : CollectionTools.iterable(resourceDefinitions())) {
+			if (resourceDefinition.getResourceType().equals(resourceType)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	public ResourceDefinition getResourceDefinition(JpaResourceType resourceType) {
+		for (ResourceDefinition resourceDefinition : CollectionTools.iterable(resourceDefinitions())) {
+			if (resourceDefinition.getResourceType().equals(resourceType)) {
+				return resourceDefinition;
+			}
+		}
+		throw new IllegalArgumentException("Illegal resource type: " + resourceType); //$NON-NLS-1$
+	}
+	
+	protected ListIterator<ResourceDefinition> resourceDefinitions() {
+		return this.platformProvider.resourceDefinitions();
+	}
+	
+	public JpaResourceType getMostRecentSupportedResourceType(IContentType contentType) {
+		return this.platformProvider.getMostRecentSupportedResourceType(contentType);
+	}
+	
+	
+	// ********** database **********
+
+	public ConnectionProfileFactory getConnectionProfileFactory() {
+		return JptDbPlugin.instance().getConnectionProfileFactory();
+	}
+
+	public EntityGeneratorDatabaseAnnotationNameBuilder getEntityGeneratorDatabaseAnnotationNameBuilder() {
+		return GenericEntityGeneratorDatabaseAnnotationNameBuilder.instance();
+	}
+
+	
+	// ********** validation **********
+	
+	public JpaPlatformVariation getJpaVariation() {
+		return this.jpaVariation;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatformFactory.java
new file mode 100644
index 0000000..dbd21b7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatformFactory.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.Comparator;
+
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JpaPlatformFactory;
+import org.eclipse.jpt.core.JpaPlatformVariation;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.jpa1.GenericJpaFactory;
+import org.eclipse.wst.common.project.facet.core.DefaultVersionComparator;
+
+/**
+ * All the state in the JPA platform should be "static" (i.e. unchanging once
+ * it is initialized).
+ */
+public class GenericJpaPlatformFactory
+	implements JpaPlatformFactory
+{
+	/**
+	 * zero-argument constructor
+	 */
+	public GenericJpaPlatformFactory() {
+		super();
+	}
+	
+	public JpaPlatform buildJpaPlatform(String id) {
+		return new GenericJpaPlatform(
+			id,
+			this.buildJpaVersion(),
+			new GenericJpaFactory(), 
+			new GenericJpaAnnotationProvider(GenericJpaAnnotationDefinitionProvider.instance()),
+			GenericJpaPlatformProvider.instance(), 
+			this.buildJpaPlatformVariation());
+	}
+	
+	
+	private JpaPlatform.Version buildJpaVersion() {
+		return new SimpleVersion(JptCorePlugin.JPA_FACET_VERSION_1_0);
+	}
+	
+	protected JpaPlatformVariation buildJpaPlatformVariation() {
+		return new JpaPlatformVariation() {
+			public Supported getTablePerConcreteClassInheritanceIsSupported() {
+				return Supported.MAYBE;
+			}
+			public boolean isJoinTableOverridable() {
+				return false;
+			}
+		};
+	}
+
+
+	public static class SimpleVersion implements JpaPlatform.Version {
+		protected final String jpaVersion;
+
+		public static final Comparator<String> JPA_VERSION_COMPARATOR = new DefaultVersionComparator();
+
+		public SimpleVersion(String jpaVersion) {
+			super();
+			this.jpaVersion = jpaVersion;
+		}
+
+		/**
+		 * The generic platform's version is the same as the JPA version.
+		 */
+		public String getVersion() {
+			return this.getJpaVersion();
+		}
+		
+		public String getJpaVersion() {
+			return this.jpaVersion;
+		}
+
+		/**
+		 * For now, generic platforms are backward-compatible.
+		 */
+		public boolean isCompatibleWithJpaVersion(String version) {
+			return JPA_VERSION_COMPARATOR.compare(this.jpaVersion, version) >= 0;
+		}
+		
+		@Override
+		public String toString() {
+			return "JPA version: " + this.getJpaVersion(); //$NON-NLS-1$
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatformProvider.java
new file mode 100644
index 0000000..751b62c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatformProvider.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaPlatformProvider;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.ResourceDefinition;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaBasicMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEmbeddableDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEmbeddedIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEmbeddedMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEntityDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaManyToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaManyToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaMappedSuperclassDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaOneToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaOneToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaTransientMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaVersionMappingDefinition;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmXmlDefinition;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericPersistenceXmlDefinition;
+
+/**
+ * All the state in the JPA platform should be "static" (i.e. unchanging once
+ * it is initialized).
+ */
+public class GenericJpaPlatformProvider
+	extends AbstractJpaPlatformProvider
+{
+	public static final String ID = "generic"; //$NON-NLS-1$
+	
+	// singleton
+	private static final JpaPlatformProvider INSTANCE = 
+		new GenericJpaPlatformProvider();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JpaPlatformProvider instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private GenericJpaPlatformProvider() {
+		super();
+	}
+	
+	
+	// ********** resource models **********
+	
+	public JpaResourceType getMostRecentSupportedResourceType(IContentType contentType) {
+		if (contentType.equals(JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
+			return JptCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
+		}
+		else if (contentType.equals(JptCorePlugin.JAR_CONTENT_TYPE)) {
+			return JptCorePlugin.JAR_RESOURCE_TYPE;
+		}
+		else if (contentType.equals(JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
+			return JptCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE;
+		}
+		else if (contentType.equals(JptCorePlugin.ORM_XML_CONTENT_TYPE)) {
+			return JptCorePlugin.ORM_XML_1_0_RESOURCE_TYPE;
+		}
+		else {
+			throw new IllegalArgumentException(contentType.toString());
+		}
+	}
+	
+	@Override
+	protected JpaResourceModelProvider[] buildResourceModelProviders() {
+		// order should not be important here
+		return new JpaResourceModelProvider[] {
+			JavaResourceModelProvider.instance(),
+			JarResourceModelProvider.instance(),
+			PersistenceResourceModelProvider.instance(),
+			OrmResourceModelProvider.instance()};
+	}
+	
+	
+	// ********** Java type mappings **********
+	
+	@Override
+	protected JavaTypeMappingDefinition[] buildNonNullJavaTypeMappingDefinitions() {
+		// order determined by analyzing order that reference implementation (toplink) uses
+		return new JavaTypeMappingDefinition[] {
+			JavaEntityDefinition.instance(),
+			JavaEmbeddableDefinition.instance(),
+			JavaMappedSuperclassDefinition.instance()};
+	}
+	
+	
+	// ********** Java attribute mappings **********
+	
+	@Override
+	protected JavaAttributeMappingDefinition[] buildNonNullDefaultJavaAttributeMappingDefinitions() {
+		// order determined by analyzing order that reference implementation (toplink) uses
+		return new JavaAttributeMappingDefinition[] {
+			JavaEmbeddedMappingDefinition.instance(),
+			JavaBasicMappingDefinition.instance()};
+	}
+	
+	@Override
+	protected JavaAttributeMappingDefinition[] buildNonNullSpecifiedJavaAttributeMappingDefinitions() {
+		// order determined by analyzing order that reference implementation (eclipselink) uses
+		return new JavaAttributeMappingDefinition[] {
+			JavaTransientMappingDefinition.instance(),
+			JavaIdMappingDefinition.instance(),
+			JavaVersionMappingDefinition.instance(),
+			JavaBasicMappingDefinition.instance(),
+			JavaEmbeddedMappingDefinition.instance(),
+			JavaEmbeddedIdMappingDefinition.instance(),
+			JavaManyToManyMappingDefinition.instance(),
+			JavaManyToOneMappingDefinition.instance(),
+			JavaOneToManyMappingDefinition.instance(),
+			JavaOneToOneMappingDefinition.instance()};
+	}
+	
+	
+	// ********** Mapping Files **********
+	
+	@Override
+	protected ResourceDefinition[] buildResourceDefinitions() {
+		return new ResourceDefinition[] {
+			GenericPersistenceXmlDefinition.instance(),
+			GenericOrmXmlDefinition.instance()};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JarResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JarResourceModelProvider.java
new file mode 100644
index 0000000..1347db8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JarResourceModelProvider.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryPackageFragmentRoot;
+
+/**
+ * JAR files
+ */
+public class JarResourceModelProvider
+	implements JpaResourceModelProvider
+{
+	// singleton
+	private static final JpaResourceModelProvider INSTANCE = new JarResourceModelProvider();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static JpaResourceModelProvider instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private JarResourceModelProvider() {
+		super();
+	}
+
+	public IContentType getContentType() {
+		return JptCorePlugin.JAR_CONTENT_TYPE;
+	}
+
+	/**
+	 * NB: Despite the check in GenericJpaProject.addJpaFile_(IFile),
+	 * we can get here and
+	 * the PFR will be null if the JAR is underneath a directory on the
+	 * classpath but the JAR itself is not on the classpath.
+	 * Returning null should be OK.
+	 */
+	public JpaResourceModel buildResourceModel(JpaProject jpaProject, IFile file) {
+		IPackageFragmentRoot pfr = JavaCore.createJarPackageFragmentRootFrom(file);
+		return (pfr ==null) ? null : new BinaryPackageFragmentRoot(pfr, jpaProject.getJpaPlatform().getAnnotationProvider());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JavaResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JavaResourceModelProvider.java
new file mode 100644
index 0000000..5d87c03
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JavaResourceModelProvider.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+
+/**
+ * Java source code
+ */
+public class JavaResourceModelProvider
+	implements JpaResourceModelProvider
+{
+	// singleton
+	private static final JpaResourceModelProvider INSTANCE = new JavaResourceModelProvider();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static JpaResourceModelProvider instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private JavaResourceModelProvider() {
+		super();
+	}
+
+	public IContentType getContentType() {
+		return JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE;
+	}
+
+	public JavaResourceCompilationUnit buildResourceModel(JpaProject jpaProject, IFile file) {
+		return new SourceCompilationUnit(
+					JavaCore.createCompilationUnitFrom(file),
+					jpaProject.getJpaPlatform().getAnnotationProvider(),
+					jpaProject.getJpaPlatform().getAnnotationEditFormatter(),
+					jpaProject.getModifySharedDocumentCommandExecutor()
+				);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java
new file mode 100644
index 0000000..40081ca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformRegistry.java
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JpaPlatformFactory;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Singleton registry for storing all the registered JPA platform configuration
+ * elements and instantiating JPA platforms from them.
+ */
+public class JpaPlatformRegistry {
+
+	private final HashMap<String, IConfigurationElement> jpaPlatformConfigurationElements;
+
+
+	// singleton
+	private static final JpaPlatformRegistry INSTANCE = new JpaPlatformRegistry();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static JpaPlatformRegistry instance() {
+		return INSTANCE;
+	}
+
+	private static final String EXTENSION_ID = "jpaPlatforms"; //$NON-NLS-1$
+	private static final String PLATFORM_ELEMENT_NAME = "jpaPlatform"; //$NON-NLS-1$
+	private static final String ID_ATTRIBUTE_NAME = "id"; //$NON-NLS-1$
+	private static final String LABEL_ATTRIBUTE_NAME = "label"; //$NON-NLS-1$
+	private static final String FACTORY_CLASS_ATTRIBUTE_NAME = "factoryClass"; //$NON-NLS-1$
+	private static final String JPA_FACET_VERSION_ATTRIBUTE_NAME = "jpaFacetVersion"; //$NON-NLS-1$
+	private static final String DEFAULT_ATTRIBUTE_NAME = "default"; //$NON-NLS-1$
+
+
+	// ********** constructor/initialization **********
+
+	/**
+	 * ensure single instance
+	 */
+	private JpaPlatformRegistry() {
+		super();
+		this.jpaPlatformConfigurationElements = this.buildJpaPlatformConfigurationElements();
+	}
+
+
+	private HashMap<String, IConfigurationElement> buildJpaPlatformConfigurationElements() {
+		HashMap<String, IConfigurationElement> configElements = new HashMap<String, IConfigurationElement>();
+		for (IConfigurationElement configElement : this.getConfigElements()) {
+			this.addConfigElementTo(configElement, configElements);
+		}
+		return configElements;
+	}
+
+	/**
+	 * Return the configuration elements from the Eclipse platform extension
+	 * registry.
+	 */
+	private Iterable<IConfigurationElement> getConfigElements() {
+		return new CompositeIterable<IConfigurationElement>(
+				new TransformationIterable<IExtension, Iterable<IConfigurationElement>>(this.getExtensions()) {
+					@Override
+					protected Iterable<IConfigurationElement> transform(IExtension extension) {
+						return CollectionTools.iterable(extension.getConfigurationElements());
+					}
+				}
+		);
+	}
+
+	private Iterable<IExtension> getExtensions() {
+		return CollectionTools.iterable(this.getExtensionPoint().getExtensions());
+	}
+
+	private IExtensionPoint getExtensionPoint() {
+		return Platform.getExtensionRegistry().getExtensionPoint(JptCorePlugin.PLUGIN_ID, EXTENSION_ID);
+	}
+
+	private void addConfigElementTo(IConfigurationElement configElement, HashMap<String, IConfigurationElement> configElements) {
+		if ( ! configElement.getName().equals(PLATFORM_ELEMENT_NAME)) {
+			return;
+		}
+		if ( ! this.configElementIsValid(configElement)) {
+			return;
+		}
+
+		String id = configElement.getAttribute(ID_ATTRIBUTE_NAME);
+		IConfigurationElement prev = configElements.put(id, configElement);
+		if (prev != null) {
+			configElements.put(id, prev);  // replace previous(?)
+			this.logDuplicatePlatform(prev, configElement, id);
+		}
+	}
+
+	/**
+	 * check *all* attributes before returning
+	 */
+	private boolean configElementIsValid(IConfigurationElement configElement) {
+		boolean valid = true;
+		if (configElement.getAttribute(ID_ATTRIBUTE_NAME) == null) {
+			this.logMissingAttribute(configElement, ID_ATTRIBUTE_NAME);
+			valid = false;
+		}
+		if (configElement.getAttribute(LABEL_ATTRIBUTE_NAME) == null) {
+			this.logMissingAttribute(configElement, LABEL_ATTRIBUTE_NAME);
+			valid = false;
+		}
+		if (configElement.getAttribute(FACTORY_CLASS_ATTRIBUTE_NAME) == null) {
+			this.logMissingAttribute(configElement, FACTORY_CLASS_ATTRIBUTE_NAME);
+			valid = false;
+		}
+		return valid;
+	}
+
+
+	// ********** public methods **********
+
+	/**
+	 * Return the IDs for the registered JPA platforms.
+	 * This does not activate any of the JPA platforms' plug-ins.
+	 */
+	public Iterable<String> getJpaPlatformIds() {
+		return this.jpaPlatformConfigurationElements.keySet();
+	}
+
+	/**
+	 * Return whether the platform id is registered
+	 */
+	public boolean containsPlatform(String platformId) {
+		return this.jpaPlatformConfigurationElements.containsKey(platformId);
+	}
+
+	/**
+	 * Return the label for the JPA platform with the specified ID.
+	 * This does not activate the JPA platform's plug-in.
+	 */
+	public String getJpaPlatformLabel(String id) {
+		return this.jpaPlatformConfigurationElements.get(id).getAttribute(LABEL_ATTRIBUTE_NAME);
+	}
+	
+	/**
+	 * Return whether the platform represented by the given id supports the specified JPA facet version.
+	 * This does not active the JPA platform's plug-in.
+	 */
+	public boolean platformSupportsJpaFacetVersion(String platformId, String jpaFacetVersion) {
+		IConfigurationElement configElement = this.jpaPlatformConfigurationElements.get(platformId);
+		return configElementSupportsJpaFacetVersion(configElement, jpaFacetVersion);
+	}
+	
+	boolean configElementSupportsJpaFacetVersion(IConfigurationElement configElement, String jpaFacetVersion) {
+		
+		// config element supports version if it explicitly sets it to that version
+		// or if it specifies no version at all
+		String ver = configElement.getAttribute(JPA_FACET_VERSION_ATTRIBUTE_NAME);
+		return (ver == null) || ver.equals(jpaFacetVersion);
+	}
+	
+	/**
+	 * Return the IDs for the registered JPA platforms that support the
+	 * specified JPA facet version.
+	 * This does not activate the JPA platforms' plug-in.
+	 */
+	public Iterable<String> getJpaPlatformIdsForJpaFacetVersion(final String jpaFacetVersion) {
+		return new TransformationIterable<IConfigurationElement, String>(this.getConfigurationElementsForJpaFacetVersion(jpaFacetVersion)) {
+				@Override
+				protected String transform(IConfigurationElement configElement) {
+					return configElement.getAttribute(ID_ATTRIBUTE_NAME);
+				}
+			};
+	}
+	
+	private Iterable<IConfigurationElement> getConfigurationElementsForJpaFacetVersion(final String jpaFacetVersion) {
+		return new FilteringIterable<IConfigurationElement>(this.jpaPlatformConfigurationElements.values()) {
+				@Override
+				protected boolean accept(IConfigurationElement configElement) {
+					return configElementSupportsJpaFacetVersion(configElement, jpaFacetVersion);
+				}
+			};
+	}
+	
+	/**
+	 * Return the ID for a JPA platform registered as a default platform.
+	 * Returns null if there are no such registered platforms.
+	 * Returns the first platform ID if there are multiple such registered platforms.
+	 */
+	public String getDefaultJpaPlatformId(String jpaFacetVersion) {
+		for (Map.Entry<String, IConfigurationElement> entry: this.jpaPlatformConfigurationElements.entrySet()) {
+			String defaultFlag = entry.getValue().getAttribute(DEFAULT_ATTRIBUTE_NAME);
+			String platformId = entry.getKey();
+			if ((defaultFlag != null) && defaultFlag.equals("true")
+					&& platformSupportsJpaFacetVersion(platformId, jpaFacetVersion)) { //$NON-NLS-1$
+				return platformId;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Return a new JPA platform for the specified ID.
+	 * NB: This should only be called when instantiating a JPA platform
+	 * when building a new JPA project.
+	 * Unlike other registry methods, invoking this method may activate 
+	 * the plug-in.
+	 */
+	public JpaPlatform getJpaPlatform(IProject project) {
+		String id = JptCorePlugin.getJpaPlatformId(project);
+		IConfigurationElement configElement = this.jpaPlatformConfigurationElements.get(id);
+		if (configElement == null) {
+			this.log(JptCoreMessages.PLATFORM_ID_DOES_NOT_EXIST, id, project.getName());
+			return null;
+		}
+		JpaPlatformFactory platformFactory;
+		try {
+			platformFactory = (JpaPlatformFactory) configElement.createExecutableExtension(FACTORY_CLASS_ATTRIBUTE_NAME);
+		} catch (CoreException ex) {
+			this.logFailedInstantiation(configElement, ex);
+			throw new IllegalArgumentException(id);
+		}
+		return platformFactory.buildJpaPlatform(id);
+	}
+
+
+	// ********** errors **********
+
+	private void logMissingAttribute(IConfigurationElement configElement, String attributeName) {
+		this.log(JptCoreMessages.REGISTRY_MISSING_ATTRIBUTE,
+						configElement.getName(),
+						configElement.getContributor().getName(),
+						attributeName
+					);
+	}
+
+	private void logDuplicatePlatform(IConfigurationElement prevConfigElement, IConfigurationElement newConfigElement, String id) {
+		this.log(JptCoreMessages.REGISTRY_DUPLICATE,
+						prevConfigElement.getContributor().getName(),
+						newConfigElement.getContributor().getName(),
+						ID_ATTRIBUTE_NAME,
+						PLATFORM_ELEMENT_NAME,
+						id
+					);
+	}
+
+	private void logFailedInstantiation(IConfigurationElement configElement, CoreException ex) {
+		this.log(JptCoreMessages.REGISTRY_FAILED_INSTANTIATION,
+						configElement.getAttribute(FACTORY_CLASS_ATTRIBUTE_NAME),
+						configElement.getName(),
+						configElement.getContributor().getName()
+					);
+		JptCorePlugin.log(ex);
+	}
+
+	private void log(String msg, Object... bindings) {
+		JptCorePlugin.log(NLS.bind(msg, bindings));
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformTester.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformTester.java
new file mode 100644
index 0000000..cf4f51e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaPlatformTester.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Oracle. - initial API and implementation
+ ******************************************************************************/        
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jpt.core.JptCorePlugin;
+
+public class JpaPlatformTester extends PropertyTester {
+	
+	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+		if (! property.equals("jpaPlatform")) { //$NON-NLS-1$
+			return false;
+		}
+		
+		String platformId = null;
+		
+		if (receiver instanceof IResource) {
+			platformId = platformId(((IResource) receiver).getProject());
+		} 
+		else if (receiver instanceof IJavaElement) {
+			platformId = platformId(((IJavaElement) receiver).getResource().getProject());
+		} 
+		
+		
+		return platformId == null ? false : platformId.equals(expectedValue);
+	}
+	
+	private String platformId(IProject project) {
+		return (project == null) ? null : JptCorePlugin.getJpaPlatformId(project);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaTester.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaTester.java
new file mode 100644
index 0000000..cb32a95
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JpaTester.java
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * Copyright (c) 2008 BEA Systems, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Konstantin Komissarchik - initial implementation and ongoing maintenance
+ *    Oracle - copied and modified from org.eclipse.wst.common.project.facet.core.internal.FacetedProjectPropertyTester
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+
+public class JpaTester extends PropertyTester {
+	
+	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+		if (!property.equals("projectFacet")) { //$NON-NLS-1$
+			return false;
+		}
+        if (receiver instanceof IJavaElement) {
+        	IProject project = ((IJavaElement) receiver).getResource().getProject();        	
+            if (project != null) {
+
+                String val = (String) expectedValue;
+                int colon = val.indexOf( ':' );                
+                String facetID;
+                String facetVer;
+                if( colon == -1 || colon == val.length() - 1 )  {
+                    facetID = val;
+                    facetVer = null;
+                } else {
+                    facetID = val.substring( 0, colon );
+                    facetVer = val.substring( colon + 1 );
+                }            	
+            	try {            		
+            		return FacetedProjectFramework.hasProjectFacet( project, facetID, facetVer );            		
+				} catch (CoreException e) {
+					JptCorePlugin.log(e.getStatus());
+					return false;
+				}
+            }
+        }     
+        return false;
+	}		
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JptCoreMessages.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JptCoreMessages.java
new file mode 100644
index 0000000..3f2de58
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/JptCoreMessages.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Localized messages used by Dali core.
+ */
+public class JptCoreMessages {
+
+	public static String NONE;
+	public static String VALIDATE_JOB;
+	public static String VALIDATE_PROJECT_NOT_SPECIFIED;
+	public static String VALIDATE_SOURCE_FOLDER_NOT_SPECIFIED;
+	public static String VALIDATE_SOURCE_FOLDER_ILLEGAL;
+	public static String VALIDATE_SOURCE_FOLDER_DOES_NOT_EXIST;
+	public static String VALIDATE_SOURCE_FOLDER_NOT_IN_PROJECT;
+	public static String VALIDATE_FILE_PATH_NOT_SPECIFIED;
+	public static String VALIDATE_FILE_ALREADY_EXISTS;
+	public static String VALIDATE_FILE_VERSION_NOT_SUPPORTED;
+	public static String VALIDATE_FILE_VERSION_NOT_SUPPORTED_FOR_FACET_VERSION;
+	public static String VALIDATE_PERSISTENCE_UNIT_DOES_NOT_SPECIFIED;
+	public static String VALIDATE_PERSISTENCE_UNIT_NOT_IN_PROJECT;
+	public static String VALIDATE_PLATFORM_NOT_SPECIFIED;
+	public static String VALIDATE_PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION;
+	public static String VALIDATE_CONNECTION_NOT_SPECIFIED;
+	public static String VALIDATE_CONNECTION_INVALID;
+	public static String VALIDATE_CONNECTION_NOT_CONNECTED;
+	public static String VALIDATE_DEFAULT_CATALOG_NOT_SPECIFIED;
+	public static String VALIDATE_CONNECTION_DOESNT_CONTAIN_CATALOG;
+	public static String VALIDATE_DEFAULT_SCHEMA_NOT_SPECIFIED;
+	public static String VALIDATE_CONNECTION_DOESNT_CONTAIN_SCHEMA;
+	public static String VALIDATE_RUNTIME_NOT_SPECIFIED;
+	public static String VALIDATE_RUNTIME_DOES_NOT_SUPPORT_EJB_30;
+	public static String VALIDATE_LIBRARY_NOT_SPECIFIED;
+	public static String SYNCHRONIZE_CLASSES_JOB;
+	public static String SYNCHRONIZING_CLASSES_TASK;
+	public static String INVALID_PERSISTENCE_XML_CONTENT;
+	public static String ERROR_SYNCHRONIZING_CLASSES_COULD_NOT_VALIDATE;
+	public static String ERROR_WRITING_FILE;
+	public static String REGISTRY_MISSING_ATTRIBUTE;
+	public static String REGISTRY_DUPLICATE;
+	public static String REGISTRY_FAILED_INSTANTIATION;
+	public static String UPDATE_JOB_NAME;
+	public static String PLATFORM_ID_DOES_NOT_EXIST;
+	public static String DALI_EVENT_HANDLER_THREAD_NAME;
+	public static String PREFERENCES_FLUSH_JOB_NAME;
+	public static String KEY_CLASSES_VALIDATOR__CLASS_NOT_FOUND;
+	
+	
+	private static final String BUNDLE_NAME = "jpa_core"; //$NON-NLS-1$
+	private static final Class<?> BUNDLE_CLASS = JptCoreMessages.class;
+	static {
+		NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
+	}
+	
+	private JptCoreMessages() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/OrmResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/OrmResourceModelProvider.java
new file mode 100644
index 0000000..037784f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/OrmResourceModelProvider.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.resource.orm.OrmXmlResourceProvider;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+/**
+ * orm.xml
+ */
+public class OrmResourceModelProvider
+	implements JpaResourceModelProvider
+{
+	// singleton
+	private static final JpaResourceModelProvider INSTANCE = new OrmResourceModelProvider();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static JpaResourceModelProvider instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private OrmResourceModelProvider() {
+		super();
+	}
+
+	public IContentType getContentType() {
+		return JptCorePlugin.ORM_XML_CONTENT_TYPE;
+	}
+
+	public JpaXmlResource buildResourceModel(JpaProject jpaProject, IFile file) {
+		return OrmXmlResourceProvider.getXmlResourceProvider(file).getXmlResource();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/PersistenceResourceModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/PersistenceResourceModelProvider.java
new file mode 100644
index 0000000..1e12878
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/PersistenceResourceModelProvider.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.resource.persistence.PersistenceXmlResourceProvider;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+/**
+ * persistence.xml
+ */
+public class PersistenceResourceModelProvider
+	implements JpaResourceModelProvider
+{
+	// singleton
+	private static final JpaResourceModelProvider INSTANCE = new PersistenceResourceModelProvider();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static JpaResourceModelProvider instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private PersistenceResourceModelProvider() {
+		super();
+	}
+
+	public IContentType getContentType() {
+		return JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE;
+	}
+
+	public JpaXmlResource buildResourceModel(JpaProject jpaProject, IFile file) {
+		return PersistenceXmlResourceProvider.getXmlResourceProvider(file).getXmlResource();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/ProjectAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/ProjectAdapterFactory.java
new file mode 100644
index 0000000..fa80271
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/ProjectAdapterFactory.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+
+/**
+ * [Double-duty] factory to build adapters for either standard projects or
+ * Java projects:
+ *   - JPA project
+ * 
+ * See org.eclipse.jpt.core plugin.xml.
+ */
+public class ProjectAdapterFactory
+	implements IAdapterFactory
+{
+	private static final Class<?>[] ADAPTER_LIST = new Class[] { JpaProject.class };
+
+	public Class<?>[] getAdapterList() {
+		return ADAPTER_LIST;
+	}
+	
+	public Object getAdapter(Object adaptableObject, @SuppressWarnings("unchecked") Class adapterType) {
+		if (adaptableObject instanceof IProject) {
+			return this.getAdapter((IProject) adaptableObject, adapterType);
+		}
+		if (adaptableObject instanceof IJavaProject) {
+			return this.getAdapter((IJavaProject) adaptableObject, adapterType);
+		}
+		return null;
+	}	
+
+	private Object getAdapter(IProject project, Class <?>adapterType) {
+		if (adapterType == JpaProject.class) {
+			return this.getJpaProject(project);
+		}
+		return null;
+	}
+
+	private Object getAdapter(IJavaProject javaProject, Class <?>adapterType) {
+		if (adapterType == JpaProject.class) {
+			return this.getJpaProject(javaProject.getProject());
+		}
+		return null;
+	}
+
+	private JpaProject getJpaProject(IProject project) {
+		return JptCorePlugin.getJpaProject(project);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/ResourceAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/ResourceAdapterFactory.java
new file mode 100644
index 0000000..45fa245
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/ResourceAdapterFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.jpt.core.IResourcePart;
+
+/**
+ * Factory to build adapters for Eclipse resources:
+ *   - resource part
+ * 
+ * See org.eclipse.jpt.core plugin.xml.
+ */
+public class ResourceAdapterFactory
+	implements IAdapterFactory
+{
+	private static final Class<?>[] ADAPTER_LIST = new Class[] { IResourcePart.class };
+
+	public Class<?>[] getAdapterList() {
+		return ADAPTER_LIST;
+	}
+
+	public Object getAdapter(Object adaptableObject, @SuppressWarnings("unchecked") Class adapterType) {
+		if (adaptableObject instanceof IResource) {
+			return this.getAdapter((IResource) adaptableObject, adapterType);
+		}
+		return null;
+	}
+
+	private Object getAdapter(final IResource resource, Class <?>adapterType) {
+		if (adapterType == IResourcePart.class) {
+			return new IResourcePart() {
+				public IResource getResource() {
+					return resource;
+				}
+			};
+		}
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SimpleJpaProjectConfig.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SimpleJpaProjectConfig.java
new file mode 100644
index 0000000..2433fa2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SimpleJpaProjectConfig.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Straightforward implementation of the JPA project config.
+ */
+public class SimpleJpaProjectConfig implements JpaProject2_0.Config {
+	protected IProject project;
+	protected JpaPlatform jpaPlatform;
+	protected String connectionProfileName;
+	protected String userOverrideDefaultCatalog;
+	protected String userOverrideDefaultSchema;
+	protected boolean discoverAnnotatedClasses;
+	protected String metamodelSourceFolderName;
+
+	public SimpleJpaProjectConfig() {
+		super();
+	}
+
+	public IProject getProject() {
+		return this.project;
+	}
+
+	public void setProject(IProject project) {
+		this.project = project;
+	}
+
+	public JpaPlatform getJpaPlatform() {
+		return this.jpaPlatform;
+	}
+
+	public void setJpaPlatform(JpaPlatform jpaPlatform) {
+		this.jpaPlatform = jpaPlatform;
+	}
+
+	public String getConnectionProfileName() {
+		return this.connectionProfileName;
+	}
+
+	public void setConnectionProfileName(String connectionProfileName) {
+		this.connectionProfileName = connectionProfileName;
+	}
+	
+	public String getUserOverrideDefaultSchema() {
+		return this.userOverrideDefaultSchema;
+	}
+	
+	public void setUserOverrideDefaultSchema(String userOverrideDefaultSchema) {
+		this.userOverrideDefaultSchema = userOverrideDefaultSchema;
+	}
+	
+	public String getUserOverrideDefaultCatalog() {
+		return this.userOverrideDefaultCatalog;
+	}
+	
+	public void setUserOverrideDefaultCatalog(String userOverrideDefaultCatalog) {
+		this.userOverrideDefaultCatalog = userOverrideDefaultCatalog;
+	}
+	
+	public boolean discoverAnnotatedClasses() {
+		return this.discoverAnnotatedClasses;
+	}
+
+	public void setDiscoverAnnotatedClasses(boolean discoverAnnotatedClasses) {
+		this.discoverAnnotatedClasses = discoverAnnotatedClasses;
+	}
+
+	public String getMetamodelSourceFolderName() {
+		return this.metamodelSourceFolderName;
+	}
+
+	public void setMetamodelSourceFolderName(String metamodelSourceFolderName) {
+		this.metamodelSourceFolderName = metamodelSourceFolderName;
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.project.getName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java
new file mode 100644
index 0000000..314b92e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/SynchronousJpaProjectUpdater.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.utility.Command;
+import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronizer;
+import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronousSynchronizer;
+
+/**
+ * Adapt the "callback synchronizer" interface to the JPA project "updater"
+ * interface.
+ * <p>
+ * This updater will "update" the JPA project immediately and not return until
+ * the "update" and all resulting "updates" are complete. This implementation
+ * should be used sparingly and for as short a time as possible, as it increases
+ * the probability of deadlocks. A deadlock can occur when a JPA project is
+ * updated from multiple threads and various resources are locked in varying
+ * orders.
+ */
+public class SynchronousJpaProjectUpdater
+	extends AbstractSynchronizerJpaProjectUpdater
+{
+	public SynchronousJpaProjectUpdater(JpaProject jpaProject) {
+		super(jpaProject);
+	}
+
+	@Override
+	protected CallbackSynchronizer buildSynchronizer() {
+		return new CallbackSynchronousSynchronizer(this.buildCommand());
+	}
+
+	protected Command buildCommand() {
+		return new Command() {
+			public void execute() {
+				SynchronousJpaProjectUpdater.this.jpaProject.update(new NullProgressMonitor());
+			}
+		};
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/AbstractJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/AbstractJpaContextNode.java
new file mode 100644
index 0000000..5ee3fc9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/AbstractJpaContextNode.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.JpaNode;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.context.MappingFileRoot;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.AbstractJpaNode;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+
+public abstract class AbstractJpaContextNode
+	extends AbstractJpaNode
+	implements JpaContextNode
+{
+
+	// ********** constructor **********
+
+	protected AbstractJpaContextNode(JpaNode parent) {
+		super(parent);
+	}
+
+
+	// ********** JpaNode implentation **********
+
+	/**
+	 * covariant override
+	 */
+	@Override
+	public JpaContextNode getParent() {
+		return (JpaContextNode) super.getParent();
+	}
+
+
+	// ********** JpaContextNode implementation **********
+	
+	public JpaResourceType getResourceType() {
+		return getParent().getResourceType();
+	}
+	
+	/**
+	 * Overridden in {@link org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnit}
+	 * to return itself.
+	 * Overridden in {@link org.eclipse.jpt.core.internal.jpa1.context.GenericRootContextNode}
+	 * to return null.
+	 */
+	public PersistenceUnit getPersistenceUnit() {
+		return this.getParent().getPersistenceUnit();
+	}
+
+	/**
+	 * Overridden in {@link org.eclipse.jpt.core.internal.context.orm.AbstractEntityMappings}
+	 * to return itself.
+	 * Overridden in {@link org.eclipse.jpt.core.internal.jpa1.context.GenericRootContextNode}
+	 * to return null.
+	 */
+	public MappingFileRoot getMappingFileRoot() {
+		return this.getParent().getMappingFileRoot();
+	}
+
+	public Schema getContextDefaultDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getContextDefaultDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getContextDefaultSchema());
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getContextDefaultDbSchemaContainer() {
+		String catalog = this.getContextDefaultCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+	protected String getContextDefaultSchema() {
+		MappingFileRoot mfr = this.getMappingFileRoot();
+		return (mfr != null) ? mfr.getSchema() : this.getPersistenceUnit().getDefaultSchema();
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getContextDefaultDbCatalog() {
+		String catalog = this.getContextDefaultCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+	protected String getContextDefaultCatalog() {
+		MappingFileRoot mfr = this.getMappingFileRoot();
+		return (mfr != null) ? mfr.getCatalog() : this.getPersistenceUnit().getDefaultCatalog();
+	}
+	
+	public void postUpdate() {
+		// do nothing
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/AbstractXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/AbstractXmlContextNode.java
new file mode 100644
index 0000000..66eec94
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/AbstractXmlContextNode.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+import java.util.List;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractXmlContextNode
+	extends AbstractJpaContextNode
+	implements XmlContextNode
+{
+
+	// ********** constructor **********
+
+	protected AbstractXmlContextNode(JpaContextNode parent) {
+		super(parent);
+	}
+
+
+	// ********** validation **********
+
+	/**
+	 * All subclass implementations {@link #validate(List<IMessage>)} 
+	 * should be preceded by a "super" call to this method
+	 */
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		if (reporter.isCancelled()) {
+			throw new ValidationCancelledException();
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/EntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/EntityTextRangeResolver.java
new file mode 100644
index 0000000..694feef
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/EntityTextRangeResolver.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+
+public interface EntityTextRangeResolver
+	extends PrimaryKeyTextRangeResolver
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
new file mode 100644
index 0000000..106fc8d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
@@ -0,0 +1,288 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.ColumnMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.ReferenceTable;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.jpa2.context.AttributeMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.CollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.ElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * Gather some of the behavior common to the Java and XML models. :-(
+ */
+public class MappingTools {
+
+	/**
+	 * Default join table name from the JPA spec:<br>
+	 * 	"The concatenated names of the two associated primary
+	 * 	entity tables, separated by a underscore."
+	 * <pre>
+	 * [owning table name]_[target table name]
+	 * </pre>
+	 * <strong>NB:</strong> The <em>names</em> are concatenated,
+	 * <em>not</em> the <em>identifiers</em>.
+	 * E.g. the join table for <code>"Foo"</code> and <code>"baR"</code>
+	 * (where the "delimited" identifier is required) is:
+	 * <pre>
+	 *     "Foo_baR"
+	 * </pre>
+	 * not
+	 * <pre>
+	 *     "Foo"_"baR"
+	 * </pre>
+	 * As a result, we cannot honestly calculate the default name without a
+	 * database connection. We need the database to convert the resulting name
+	 * to an identifier appropriate to the current database.
+	 */
+	public static String buildJoinTableDefaultName(RelationshipReference relationshipReference) {
+		if (relationshipReference.getJpaProject().getDataSource().connectionProfileIsActive()) {
+			return buildDbJoinTableDefaultName(relationshipReference);
+		}
+		// continue with a "best effort":
+		String owningTableName = relationshipReference.getTypeMapping().getPrimaryTableName();
+		if (owningTableName == null) {
+			return null;
+		}
+		RelationshipMapping relationshipMapping = relationshipReference.getRelationshipMapping();
+		if (relationshipMapping == null) {
+			return null;
+		}
+		Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
+		if (targetEntity == null) {
+			return null;
+		}
+		String targetTableName = targetEntity.getPrimaryTableName();
+		if (targetTableName == null) {
+			return null;
+		}
+		return owningTableName + '_' + targetTableName;
+	}
+
+	/**
+	 * Use the database to build a more accurate default name.
+	 */
+	protected static String buildDbJoinTableDefaultName(RelationshipReference relationshipReference) {
+		Table owningTable = relationshipReference.getTypeMapping().getPrimaryDbTable();
+		if (owningTable == null) {
+			return null;
+		}
+		RelationshipMapping relationshipMapping = relationshipReference.getRelationshipMapping();
+		if (relationshipMapping == null) {
+			return null;
+		}
+		Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
+		if (targetEntity == null) {
+			return null;
+		}
+		Table targetTable = targetEntity.getPrimaryDbTable();
+		if (targetTable == null) {
+			return null;
+		}
+		String name = owningTable.getName() + '_' + targetTable.getName();
+		return owningTable.getDatabase().convertNameToIdentifier(name);
+	}
+	
+	/**
+	 * Default collection table name from the JPA spec:<br>
+	 * 	"The concatenation of the name of the containing entity and 
+	 *  the name of the collection attribute, separated by an underscore."
+	 * <pre>
+	 * [owning entity name]_[attribute name]
+	 * </pre>
+	 */
+	public static String buildCollectionTableDefaultName(ElementCollectionMapping2_0 mapping) {
+		Entity entity = mapping.getEntity();
+		if (entity == null) {
+			return null;
+		}
+		String owningEntityName = entity.getName();
+		String attributeName = mapping.getName();
+		return owningEntityName + '_' + attributeName;
+	}
+
+	/**
+	 * Return the join column's default name;
+	 * which is typically
+	 *     [attribute name]_[referenced column name]
+	 * But, if we don't have an attribute name (e.g. in a unidirectional
+	 * OneToMany or ManyToMany) is
+	 *     [target entity name]_[referenced column name]
+	 * 
+	 * @see #buildJoinTableDefaultName(RelationshipMapping)
+	 */
+	public static String buildJoinColumnDefaultName(JoinColumn joinColumn, JoinColumn.Owner owner) {
+		if (owner.joinColumnsSize() != 1) {
+			return null;
+		}
+		String prefix = owner.getAttributeName();
+		if (prefix == null) {
+			Entity targetEntity = owner.getRelationshipTarget();
+			if (targetEntity == null) {
+				return null;
+			}
+			prefix = targetEntity.getName();
+		}
+		// not sure which of these is correct...
+		// (the spec implies that the referenced column is always the
+		// primary key column of the target entity)
+		// Column targetColumn = joinColumn.getTargetPrimaryKeyDbColumn();
+		String targetColumnName = joinColumn.getReferencedColumnName();
+		if (targetColumnName == null) {
+			return null;
+		}
+		String name = prefix + '_' + targetColumnName;
+		// not sure which of these is correct...
+		// converting the name to an identifier will result in the identifier
+		// being delimited nearly every time (at least on non-Sybase/MS
+		// databases); but that probably is not the intent of the spec...
+		// return targetColumn.getDatabase().convertNameToIdentifier(name);
+		return name;
+	}
+
+	/**
+	 * If appropriate, return the name of the single primary key column of the
+	 * relationship target.
+	 * Spec states:<br>
+	 *     "The same name as the primary key column of the referenced table."<br>
+	 * We are assuming that the primary key column is defined by the mappings instead of the database.
+	 */
+	public static String buildJoinColumnDefaultReferencedColumnName(JoinColumn.Owner joinColumnOwner) {
+		if (joinColumnOwner.joinColumnsSize() != 1) {
+			return null;
+		}
+		Entity targetEntity = joinColumnOwner.getRelationshipTarget();
+		if (targetEntity == null) {
+			return null;
+		}
+		return targetEntity.getPrimaryKeyColumnName();
+	}
+
+	public static ColumnMapping getColumnMapping(String attributeName, PersistentType persistentType) {
+		if (attributeName == null || persistentType == null) {
+			return null;
+		}
+		for (Iterator<PersistentAttribute> stream = persistentType.allAttributes(); stream.hasNext(); ) {
+			PersistentAttribute persAttribute = stream.next();
+			if (attributeName.equals(persAttribute.getName())) {
+				if (persAttribute.getMapping() instanceof ColumnMapping) {
+					return (ColumnMapping) persAttribute.getMapping();
+				}
+				// keep looking or return null???
+			}
+		}
+		return null;		
+	}
+	
+	public static RelationshipMapping getRelationshipMapping(String attributeName, TypeMapping typeMapping) {
+		if (attributeName == null || typeMapping == null) {
+			return null;
+		}
+		for (Iterator<AttributeMapping> stream = typeMapping.allAttributeMappings(); stream.hasNext(); ) {
+			AttributeMapping attributeMapping = stream.next();
+			if (attributeName.equals(attributeMapping.getName())) {
+				if (attributeMapping instanceof RelationshipMapping) {
+					return (RelationshipMapping) attributeMapping;
+				}
+				// keep looking or return null???
+			}
+		}
+		return null;		
+	}
+
+	public static void convertReferenceTableDefaultToSpecifiedJoinColumn(ReferenceTable referenceTable) {
+		JoinColumn defaultJoinColumn = referenceTable.getDefaultJoinColumn();
+		if (defaultJoinColumn != null) {
+			String columnName = defaultJoinColumn.getDefaultName();
+			String referencedColumnName = defaultJoinColumn.getDefaultReferencedColumnName();
+			JoinColumn joinColumn = referenceTable.addSpecifiedJoinColumn(0);
+			joinColumn.setSpecifiedName(columnName);
+			joinColumn.setSpecifiedReferencedColumnName(referencedColumnName);
+		}
+	}
+
+	public static void convertJoinTableDefaultToSpecifiedInverseJoinColumn(JoinTable joinTable) {
+		JoinColumn defaultInverseJoinColumn = joinTable.getDefaultInverseJoinColumn();
+		if (defaultInverseJoinColumn != null) {
+			String columnName = defaultInverseJoinColumn.getDefaultName();
+			String referencedColumnName = defaultInverseJoinColumn.getDefaultReferencedColumnName();
+			JoinColumn joinColumn = joinTable.addSpecifiedInverseJoinColumn(0);
+			joinColumn.setSpecifiedName(columnName);
+			joinColumn.setSpecifiedReferencedColumnName(referencedColumnName);
+		}
+	}
+
+	public static String getMetamodelFieldMapKeyTypeName(CollectionMapping2_0 mapping) {
+		PersistentType targetType = mapping.getResolvedTargetType();
+		String mapKey = mapping.getMapKey();
+		if (mapKey == null || targetType == null) {
+			String mapKeyClass = mapping.getMapKeyClass();
+			return mapKeyClass != null ? mapKeyClass : MetamodelField.DEFAULT_TYPE_NAME;
+		}
+		PersistentAttribute mapKeyAttribute = targetType.resolveAttribute(mapKey);
+		if (mapKeyAttribute == null) {
+			return MetamodelField.DEFAULT_TYPE_NAME;
+		}
+		AttributeMapping2_0 mapKeyMapping = (AttributeMapping2_0) mapKeyAttribute.getMapping();
+		if (mapKeyMapping == null) {
+			return MetamodelField.DEFAULT_TYPE_NAME;
+		}
+		return mapKeyMapping.getMetamodelTypeName();
+	}
+
+	public static Column resolveOverridenColumn(TypeMapping overridableTypeMapping, String attributeOverrideName) {
+		if (overridableTypeMapping != null) {
+			for (TypeMapping typeMapping : CollectionTools.iterable(overridableTypeMapping.inheritanceHierarchy())) {
+				Column column = typeMapping.resolveOverriddenColumn(attributeOverrideName);
+				if (column != null) {
+					return column;
+				}
+			}
+		}
+		return null;		
+	}
+
+	public static RelationshipReference resolveRelationshipReference(TypeMapping overridableTypeMapping, String associationOverrideName) {
+		if (overridableTypeMapping != null) {
+			for (TypeMapping typeMapping : CollectionTools.iterable(overridableTypeMapping.inheritanceHierarchy())) {
+				RelationshipReference relationshipReference = typeMapping.resolveRelationshipReference(associationOverrideName);
+				if (relationshipReference != null) {
+					return relationshipReference;
+				}
+			}
+		}
+		return null;
+	}
+
+	// ********** constructor **********
+
+	/**
+	 * Suppress default constructor, ensuring non-instantiability.
+	 */
+	private MappingTools() {
+		super();
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PersistentAttributePropertyTester.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PersistentAttributePropertyTester.java
new file mode 100644
index 0000000..80ee5ff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PersistentAttributePropertyTester.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+
+public class PersistentAttributePropertyTester extends PropertyTester 
+{
+	public static final String IS_MAPPED = "isMapped";
+	
+	public static final String IS_VIRTUAL = "isVirtual";
+	
+	
+	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+		if (IS_MAPPED.equals(property)) {
+			Boolean expectedIsMapped;
+			
+			try {
+				expectedIsMapped = (Boolean) expectedValue;
+			}
+			catch (ClassCastException cce) {
+				return false;
+			}
+			
+			Boolean actualIsMapped = ((PersistentAttribute) receiver).getMappingKey() != MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
+			
+			return actualIsMapped == expectedIsMapped;
+		}
+		else if (IS_VIRTUAL.equals(property)) {
+			Boolean expectedIsVirtual;
+			
+			try {
+				expectedIsVirtual = (Boolean) expectedValue;
+			}
+			catch (ClassCastException cce) {
+				return false;
+			}
+			
+			Boolean actualIsVirtual = false;
+			if (receiver instanceof OrmPersistentAttribute) {
+				actualIsVirtual = ((OrmPersistentAttribute) receiver).isVirtual();
+			}
+			
+			return actualIsVirtual == expectedIsVirtual;
+		}
+		
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PrimaryKeyTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PrimaryKeyTextRangeResolver.java
new file mode 100644
index 0000000..b49f38b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PrimaryKeyTextRangeResolver.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Interface to resolve text ranges on persistent type mappings that can define primary keys
+ */
+public interface PrimaryKeyTextRangeResolver
+{
+	TextRange getTypeMappingTextRange();
+	
+	TextRange getIdClassTextRange();
+	
+	TextRange getAttributeMappingTextRange(String attributeName);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PrimaryKeyValidator.java
new file mode 100644
index 0000000..c4e0a6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/PrimaryKeyValidator.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context;
+
+import java.util.List;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public interface PrimaryKeyValidator
+{
+	void validate(List<IMessage> messages, IReporter reporter);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..50b0229
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAssociationOverrideRelationshipReference.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnInAssociationOverrideJoiningStrategy;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaAssociationOverrideRelationshipReference extends AbstractJavaJpaContextNode
+	implements JavaAssociationOverrideRelationshipReference
+{
+
+	// cache the strategy for property change notification
+	protected JoiningStrategy cachedPredominantJoiningStrategy;
+
+	protected final JavaJoinColumnInAssociationOverrideJoiningStrategy joinColumnJoiningStrategy;
+
+	protected AbstractJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent) {
+		super(parent);
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();
+	}
+	
+	protected JavaJoinColumnInAssociationOverrideJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericJavaJoinColumnInAssociationOverrideJoiningStrategy(this);
+	}
+	
+	@Override
+	public JavaAssociationOverride getParent() {
+		return (JavaAssociationOverride) super.getParent();
+	}
+	
+	public JavaAssociationOverride getAssociationOverride() {
+		return getParent();
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	public TypeMapping getTypeMapping() {
+		return getAssociationOverride().getOwner().getTypeMapping();
+	}
+
+	public Entity getEntity() {
+		TypeMapping typeMapping = getTypeMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+
+	// **************** RelationshipMapping implementation *******************************
+	
+	public boolean isParentVirtual() {
+		return getAssociationOverride().isVirtual();
+	}
+	
+	// **************** predominant joining strategy ***************************
+	
+	public JoiningStrategy getPredominantJoiningStrategy() {
+		return this.cachedPredominantJoiningStrategy;
+	}
+	
+	protected void setPredominantJoiningStrategy(JoiningStrategy newJoiningStrategy) {
+		JoiningStrategy oldJoiningStrategy = this.cachedPredominantJoiningStrategy;
+		this.cachedPredominantJoiningStrategy = newJoiningStrategy;
+		firePropertyChanged(PREDOMINANT_JOINING_STRATEGY_PROPERTY, oldJoiningStrategy, newJoiningStrategy);
+	}
+
+	public void initialize(AssociationOverrideAnnotation associationOverride) {
+		initializeJoiningStrategies(associationOverride);
+		this.cachedPredominantJoiningStrategy = calculatePredominantJoiningStrategy();
+	}		
+	
+	protected void initializeJoiningStrategies(AssociationOverrideAnnotation associationOverride) {
+		this.joinColumnJoiningStrategy.initialize(associationOverride);		
+	}
+
+	public void update(AssociationOverrideAnnotation associationOverride) {
+		updateJoiningStrategies(associationOverride);
+		setPredominantJoiningStrategy(calculatePredominantJoiningStrategy());
+	}	
+		
+	protected void updateJoiningStrategies(AssociationOverrideAnnotation associationOverride) {
+		this.joinColumnJoiningStrategy.update(associationOverride);
+	}
+	
+	protected abstract JoiningStrategy calculatePredominantJoiningStrategy();
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.joinColumnJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+	
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.joinColumnJoiningStrategy.validate(messages, reporter, astRoot);
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return getAssociationOverride().getValidationTextRange(astRoot);
+	}
+
+	// **************** join columns *******************************************
+	
+
+	public JavaJoinColumnInAssociationOverrideJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+	
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+	
+	public void setJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.addStrategy();
+	}
+	
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinColumn() {
+		return false;
+	}
+
+	public RelationshipMapping getRelationshipMapping() {
+		return getAssociationOverride().getOwner().getRelationshipMapping(getAssociationOverride().getName());
+	}
+
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return getRelationshipMapping().isOwnedBy(mapping);
+	}
+
+	public boolean isRelationshipOwner() {
+		return getRelationshipMapping().isRelationshipOwner();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java
new file mode 100644
index 0000000..fe0ab53
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMapping.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.ColumnMapping;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.jpa2.context.SimpleMetamodelField;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.AttributeMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java attribute mapping
+ */
+public abstract class AbstractJavaAttributeMapping<T extends Annotation>
+	extends AbstractJavaJpaContextNode
+	implements JavaAttributeMapping, AttributeMapping2_0
+{
+	protected T mappingAnnotation;
+	
+	protected Vector<String> supportingAnnotationNames;
+	
+
+	protected AbstractJavaAttributeMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+	
+	@SuppressWarnings("unchecked")
+	public void initialize(Annotation annotation) {
+		this.mappingAnnotation = (T) annotation;
+		this.initialize();
+	}
+
+	protected void initialize() {	
+		// do nothing by default
+	}
+
+	@SuppressWarnings("unchecked")
+	public void update(Annotation annotation) {
+		this.mappingAnnotation = (T) annotation;
+		this.update();
+	}
+	
+	protected void update() {
+		// do nothing by default
+	}
+
+	@Override
+	public JavaPersistentAttribute getParent() {
+		return (JavaPersistentAttribute) super.getParent();
+	}
+	
+	public JavaPersistentAttribute getPersistentAttribute() {
+		return this.getParent();
+	}
+
+	protected JavaResourcePersistentAttribute getResourcePersistentAttribute() {
+		return this.getParent().getResourcePersistentAttribute();
+	}
+	
+	public T getMappingAnnotation() {
+		return this.mappingAnnotation;
+	}
+		
+	/**
+	 * the persistent attribute can tell whether there is a "specified" mapping
+	 * or a "default" one
+	 */
+	public boolean isDefault() {
+		return this.getPersistentAttribute().mappingIsDefault(this);
+	}
+
+	public boolean shouldValidateAgainstDatabase() {
+		return this.getTypeMapping().shouldValidateAgainstDatabase();
+	}
+	
+	public TypeMapping getTypeMapping() {
+		return this.getPersistentAttribute().getOwningTypeMapping();
+	}
+
+	public String getName() {
+		return this.getPersistentAttribute().getName();
+	}
+	
+	public Table getDbTable(String tableName) {
+		return this.getTypeMapping().getDbTable(tableName);
+	}
+
+	public String getPrimaryKeyColumnName() {
+		return null;
+	}
+
+	public boolean isOverridableAttributeMapping() {
+		return false;
+	}
+
+	public boolean isOverridableAssociationMapping() {
+		return false;
+	}
+
+	public boolean isRelationshipOwner() {
+		return false;
+	}
+
+	public boolean isOwnedBy(AttributeMapping mapping) {
+		return false;
+	}
+	
+	public Iterator<String> allMappingNames() {
+		return new SingleElementIterator<String>(getName());
+	}
+	
+	public AttributeMapping resolveAttributeMapping(String name) {
+		if (getName().equals(name)) {
+			return this;
+		}
+		return null;
+	}
+	
+	public Iterator<String> allOverrideableAttributeMappingNames() {
+		if (isOverridableAttributeMapping()) {
+			return new SingleElementIterator<String>(getName());
+		}
+		return EmptyIterator.<String> instance();
+	}
+	
+	public Iterator<String> allOverrideableAssociationMappingNames() {
+		if (isOverridableAssociationMapping()) {
+			return new SingleElementIterator<String>(getName());
+		}
+		return EmptyIterator.<String> instance();
+	}
+	
+	public Column resolveOverriddenColumn(String attributeName) {
+		ColumnMapping columnMapping = this.resolveColumnMapping(attributeName);
+		return columnMapping == null ? null : columnMapping.getColumn();
+	}
+	
+	protected ColumnMapping resolveColumnMapping(String name) {
+		AttributeMapping attributeMapping = resolveAttributeMapping(name);
+		if (attributeMapping != null && attributeMapping.isOverridableAttributeMapping()) {
+			return (ColumnMapping) attributeMapping;
+		}
+		return null;
+	}
+	
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		RelationshipMapping relationshipMapping = this.resolveRelationshipMapping(attributeName);
+		return relationshipMapping == null ? null : relationshipMapping.getRelationshipReference();
+	}
+	
+	protected RelationshipMapping resolveRelationshipMapping(String name) {
+		AttributeMapping attributeMapping = resolveAttributeMapping(name);
+		if (attributeMapping != null && attributeMapping.isOverridableAssociationMapping()) {
+			return (RelationshipMapping) attributeMapping;
+		}
+		return null;
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ********** supporting annotation names **********
+
+	public Iterable<String> getSupportingAnnotationNames() {
+		if (this.supportingAnnotationNames == null) {
+			this.supportingAnnotationNames = this.buildSupportingAnnotationNames();
+		}
+		return this.supportingAnnotationNames;
+	}
+
+	protected Vector<String> buildSupportingAnnotationNames() {
+		Vector<String> names = new Vector<String>();
+		this.addSupportingAnnotationNamesTo(names);
+		return names;
+	}
+
+	protected void addSupportingAnnotationNamesTo(@SuppressWarnings("unused") Vector<String> names) {
+		// the default is none
+	}
+
+
+	// ********** metamodel **********
+
+	public MetamodelField getMetamodelField() {
+		return new SimpleMetamodelField(
+				this.getMetamodelFieldModifiers(),
+				this.getMetamodelFieldTypeName(),
+				this.getMetamodelFieldTypeArgumentNames(),
+				this.getMetamodelFieldName()
+			);
+	}
+
+	protected Iterable<String> getMetamodelFieldModifiers() {
+		return STANDARD_METAMODEL_FIELD_MODIFIERS;
+	}
+
+	/**
+	 * most mappings are "singular"
+	 */
+	protected String getMetamodelFieldTypeName() {
+		return JPA2_0.SINGULAR_ATTRIBUTE;
+	}
+
+	protected final Iterable<String> getMetamodelFieldTypeArgumentNames() {
+		ArrayList<String> typeArgumentNames = new ArrayList<String>(3);
+		typeArgumentNames.add(this.getTypeMapping().getPersistentType().getName());
+		this.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
+		return typeArgumentNames;
+	}
+
+	/**
+	 * by default, we add only the mapping's attribute type name;
+	 * but collection relationship mappings will also need to add the key type
+	 * name if the "collection" is of type java.util.Map
+	 */
+	protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
+		typeArgumentNames.add(this.getMetamodelTypeName());
+	}
+
+	public String getMetamodelTypeName() {
+		return ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelTypeName();
+	}
+
+	protected String getMetamodelFieldName() {
+		return this.getName();
+	}
+
+
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateMappingType(messages, astRoot);
+	}
+	
+	protected void validateMappingType(List<IMessage> messages, CompilationUnit astRoot) {
+		if ( ! this.getTypeMapping().attributeMappingKeyAllowed(this.getKey())) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_MAPPING,
+					new String[] {this.getName()},
+					this,
+					this.getValidationTextRange(astRoot)
+				)
+			);
+		}
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.getMappingAnnotationTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+	}
+	
+	protected TextRange getMappingAnnotationTextRange(CompilationUnit astRoot) {
+		return (this.mappingAnnotation == null) ? null : this.mappingAnnotation.getTextRange(astRoot);
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMappingDefinition.java
new file mode 100644
index 0000000..46bbad8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaAttributeMappingDefinition.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+
+public abstract class AbstractJavaAttributeMappingDefinition
+	implements JavaAttributeMappingDefinition
+{
+	protected AbstractJavaAttributeMappingDefinition() {
+		super();
+	}
+	
+	
+	/**
+	 * Default implementation.  Override if the mapping definition applies in the annotationless case.
+	 */
+	public boolean testDefault(JavaPersistentAttribute persistentAttribute) {
+		return false;
+	}
+	
+	/**
+	 * Default implementation.  Override if the mapping definition needs to do more analysis.
+	 */
+	public boolean testSpecified(JavaPersistentAttribute persistentAttribute) {
+		return persistentAttribute.getResourcePersistentAttribute().getAnnotation(getAnnotationName()) 
+			!= null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseColumn.java
new file mode 100644
index 0000000..4557566
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseColumn.java
@@ -0,0 +1,328 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.BaseColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaBaseColumn<T extends BaseColumnAnnotation> extends AbstractJavaNamedColumn<T>
+	implements JavaBaseColumn
+{
+
+	protected String specifiedTable;
+	
+	protected String defaultTable;
+
+	protected Boolean specifiedUnique;
+	
+	protected Boolean specifiedNullable;
+	
+	protected Boolean specifiedInsertable;
+	
+	protected Boolean specifiedUpdatable;
+
+	protected AbstractJavaBaseColumn(JavaJpaContextNode parent, JavaBaseColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	@Override
+	protected void initialize(T column) {
+		super.initialize(column);
+		this.defaultTable = this.buildDefaultTableName();
+		this.specifiedTable = this.getResourceTable();
+		this.specifiedUnique = this.getResourceUnique();
+		this.specifiedNullable = this.getResourceNullable();
+		this.specifiedInsertable = this.getResourceInsertable();
+		this.specifiedUpdatable = this.getResourceUpdatable();
+	}
+	
+	@Override
+	protected void update(T column) {
+		super.update(column);
+		this.setDefaultTable(this.buildDefaultTableName());
+		this.setSpecifiedTable_(this.getResourceTable());
+		this.setSpecifiedUnique_(this.getResourceUnique());
+		this.setSpecifiedNullable_(this.getResourceNullable());
+		this.setSpecifiedInsertable_(this.getResourceInsertable());
+		this.setSpecifiedUpdatable_(this.getResourceUpdatable());
+	}
+	
+	@Override
+	public JavaBaseColumn.Owner getOwner() {
+		return (JavaBaseColumn.Owner) super.getOwner();
+	}
+
+	//************** BaseColumn implementation *******************
+	
+	//************** table *******************
+
+	@Override
+	public String getTable() {
+		return (this.getSpecifiedTable() == null) ? getDefaultTable() : this.getSpecifiedTable();
+	}
+
+	public String getSpecifiedTable() {
+		return this.specifiedTable;
+	}
+
+	public void setSpecifiedTable(String newSpecifiedTable) {
+		String oldSpecifiedTable = this.specifiedTable;
+		this.specifiedTable = newSpecifiedTable;
+		getResourceColumn().setTable(newSpecifiedTable);
+		firePropertyChanged(BaseColumn.SPECIFIED_TABLE_PROPERTY, oldSpecifiedTable, newSpecifiedTable);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedTable_(String newSpecifiedTable) {
+		String oldSpecifiedTable = this.specifiedTable;
+		this.specifiedTable = newSpecifiedTable;
+		firePropertyChanged(BaseColumn.SPECIFIED_TABLE_PROPERTY, oldSpecifiedTable, newSpecifiedTable);
+	}
+
+	public String getDefaultTable() {
+		return this.defaultTable;
+	}
+
+	protected void setDefaultTable(String newDefaultTable) {
+		String oldDefaultTable = this.defaultTable;
+		this.defaultTable = newDefaultTable;
+		firePropertyChanged(BaseColumn.DEFAULT_TABLE_PROPERTY, oldDefaultTable, newDefaultTable);
+	}
+	
+	protected String getResourceTable() {
+		return getResourceColumn().getTable();
+	}
+	
+	public boolean tableNameIsInvalid() {
+		return getOwner().tableNameIsInvalid(getTable());
+	}
+
+	//************** unique *******************
+
+	public boolean isUnique() {
+		return (this.getSpecifiedUnique() == null) ? this.isDefaultUnique() : this.getSpecifiedUnique().booleanValue();
+	}
+	
+	public boolean isDefaultUnique() {
+		return BaseColumn.DEFAULT_UNIQUE;
+	}
+	
+	public Boolean getSpecifiedUnique() {
+		return this.specifiedUnique;
+	}
+	
+	public void setSpecifiedUnique(Boolean newSpecifiedUnique) {
+		Boolean oldSpecifiedUnique = this.specifiedUnique;
+		this.specifiedUnique = newSpecifiedUnique;
+		this.getResourceColumn().setUnique(newSpecifiedUnique);
+		firePropertyChanged(BaseColumn.SPECIFIED_UNIQUE_PROPERTY, oldSpecifiedUnique, newSpecifiedUnique);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedUnique_(Boolean newSpecifiedUnique) {
+		Boolean oldSpecifiedUnique = this.specifiedUnique;
+		this.specifiedUnique = newSpecifiedUnique;
+		firePropertyChanged(BaseColumn.SPECIFIED_UNIQUE_PROPERTY, oldSpecifiedUnique, newSpecifiedUnique);
+	}
+	
+	protected Boolean getResourceUnique() {
+		return getResourceColumn().getUnique();
+	}
+	
+	//************** nullable *******************
+	
+	public boolean isNullable() {
+		return (this.getSpecifiedNullable() == null) ? this.isDefaultNullable() : this.getSpecifiedNullable().booleanValue();
+	}
+	
+	public boolean isDefaultNullable() {
+		return BaseColumn.DEFAULT_NULLABLE;
+	}
+	
+	public Boolean getSpecifiedNullable() {
+		return this.specifiedNullable;
+	}
+	
+	public void setSpecifiedNullable(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		this.getResourceColumn().setNullable(newSpecifiedNullable);
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedNullable_(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+	
+	protected Boolean getResourceNullable() {
+		return getResourceColumn().getNullable();
+	}
+	
+	//************** insertable *******************
+	
+	public boolean isInsertable() {
+		return (this.getSpecifiedInsertable() == null) ? this.isDefaultInsertable() : this.getSpecifiedInsertable().booleanValue();
+	}
+	
+	public boolean isDefaultInsertable() {
+		return BaseColumn.DEFAULT_INSERTABLE;
+	}
+	
+	public Boolean getSpecifiedInsertable() {
+		return this.specifiedInsertable;
+	}
+	
+	public void setSpecifiedInsertable(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		this.getResourceColumn().setInsertable(newSpecifiedInsertable);
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedInsertable_(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+	
+	protected Boolean getResourceInsertable() {
+		return getResourceColumn().getInsertable();
+	}
+	
+	//************** updatable *******************
+
+	public boolean isUpdatable() {
+		return (this.getSpecifiedUpdatable() == null) ? this.isDefaultUpdatable() : this.getSpecifiedUpdatable().booleanValue();
+	}
+	
+	public boolean isDefaultUpdatable() {
+		return BaseColumn.DEFAULT_UPDATABLE;
+	}
+	
+	public Boolean getSpecifiedUpdatable() {
+		return this.specifiedUpdatable;
+	}
+	
+	public void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		this.getResourceColumn().setUpdatable(newSpecifiedUpdatable);
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedUpdatable_(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+	
+	protected Boolean getResourceUpdatable() {
+		return getResourceColumn().getUpdatable();
+	}
+
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.getResourceColumn().getTableTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getOwner().getValidationTextRange(astRoot);
+	}
+
+	public boolean tableTouches(int pos, CompilationUnit astRoot) {
+		return getResourceColumn().tableTouches(pos, astRoot);
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return getOwner().candidateTableNames();
+	}
+
+	private Iterator<String> candidateTableNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateTableNames(), filter);
+	}
+
+	private Iterator<String> javaCandidateTableNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateTableNames(filter));
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.tableTouches(pos, astRoot)) {
+			return this.javaCandidateTableNames(filter);
+		}
+		return null;
+	}
+
+	protected String buildDefaultTableName() {
+		return this.getOwner().getDefaultTableName();
+	}
+
+
+	// ****************** validation ****************
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (this.validateTable(messages, astRoot)) {
+			super.validate(messages, reporter, astRoot);
+		}
+	}
+
+	/**
+	 * Return true if the table is valid and no messages are logged
+	 */
+	protected boolean validateTable(List<IMessage> messages, CompilationUnit astRoot) {
+		if (this.tableNameIsInvalid()) {
+			messages.add(this.getOwner().buildTableNotValidMessage(this, this.getTableTextRange(astRoot)));
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
new file mode 100644
index 0000000..e50c6e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
@@ -0,0 +1,344 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaBaseEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaBaseEmbeddedMapping<T extends Annotation>
+	extends AbstractJavaAttributeMapping<T>
+	implements JavaBaseEmbeddedMapping
+{
+	protected final JavaAttributeOverrideContainer attributeOverrideContainer;
+	
+	private Embeddable targetEmbeddable;
+	
+	
+	protected AbstractJavaBaseEmbeddedMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.attributeOverrideContainer = 
+				this.getJpaFactory().buildJavaAttributeOverrideContainer(
+					this, 
+					buildAttributeOverrideContainerOwner());
+	}
+	
+	
+	protected JavaAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
+		return new AttributeOverrideContainerOwner();
+	}
+	
+	public JavaAttributeOverrideContainer getAttributeOverrideContainer() {
+		return this.attributeOverrideContainer;
+	}
+
+	public TypeMapping getOverridableTypeMapping() {
+		return this.targetEmbeddable;
+	}
+	
+	
+	//****************** JavaAttributeMapping implementation *******************
+
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.ATTRIBUTE_OVERRIDE);
+		names.add(JPA.ATTRIBUTE_OVERRIDES);
+	}
+
+	public Embeddable getTargetEmbeddable() {
+		return this.targetEmbeddable;
+	}
+	
+	protected void setTargetEmbeddable_(Embeddable newTargetEmbeddable) {
+		Embeddable oldTargetEmbeddable = this.targetEmbeddable;
+		this.targetEmbeddable = newTargetEmbeddable;
+		firePropertyChanged(TARGET_EMBEDDABLE_PROPERTY, oldTargetEmbeddable, newTargetEmbeddable);
+	}
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.attributeOverrideContainer.initialize(this.getResourcePersistentAttribute());
+		this.targetEmbeddable = this.getPersistentAttribute().getEmbeddable();
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		setTargetEmbeddable_(this.getPersistentAttribute().getEmbeddable());
+		this.attributeOverrideContainer.update(this.getResourcePersistentAttribute());
+	}
+
+	protected Iterator<AttributeMapping> embeddableAttributeMappings() {
+		Embeddable targetEmbeddable = getTargetEmbeddable();
+		if (targetEmbeddable != null && targetEmbeddable != getPersistentAttribute().getOwningTypeMapping()) {
+			return targetEmbeddable.attributeMappings();
+		}
+		return EmptyIterator.instance();
+	}
+	
+	@Override
+	public Iterator<String> allOverrideableAttributeMappingNames() {
+		return this.isJpa2_0Compatible() ?
+				this.embeddableOverrideableAttributeMappingNames() :
+				super.allOverrideableAttributeMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAttributeMappingNames();
+				}
+			}
+		);
+	}
+	
+	@Override
+	public Iterator<String> allOverrideableAssociationMappingNames() {
+		return this.isJpa2_0Compatible() ?
+				this.embeddableOverrideableAssociationMappingNames() :
+				super.allOverrideableAssociationMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAssociationMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAssociationMappingNames();
+				}
+			}
+		);
+	}
+	
+	protected Iterator<String> embeddableOverrideableMappingNames(Transformer<AttributeMapping, Iterator<String>> transformer) {
+		return new TransformationIterator<String, String>(
+			new CompositeIterator<String>(
+				new TransformationIterator<AttributeMapping, Iterator<String>>(this.embeddableAttributeMappings(), transformer))) 
+		{
+			@Override
+			protected String transform(String next) {
+				return getName() + '.' + next;
+			}
+		};
+	}
+
+	@Override
+	public Column resolveOverriddenColumn(String attributeName) {
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = attributeName.indexOf('.');
+			if (dotIndex != -1) {
+				if (getName().equals(attributeName.substring(0, dotIndex))) {
+					attributeName = attributeName.substring(dotIndex + 1);
+					AttributeOverride override = getAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+					if (override != null && !override.isVirtual()) {
+						return override.getColumn();
+					}
+					if (this.getTargetEmbeddable() == null) {
+						return null;
+					}
+					return this.getTargetEmbeddable().resolveOverriddenColumn(attributeName);
+				}
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		
+		result = getAttributeOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+	//******** Validation ******************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		if (validateTargetEmbeddable(messages, reporter, astRoot)) {
+			validateOverrides(messages, reporter, astRoot);
+		}
+	}
+
+	protected boolean validateTargetEmbeddable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (getTargetEmbeddable() == null) {
+			String targetEmbeddableTypeName = getPersistentAttribute().getTypeName();
+			// if the type isn't resolveable, there'll already be a java error
+			if (targetEmbeddableTypeName != null) {
+				messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.TARGET_NOT_AN_EMBEDDABLE,
+							new String[] {targetEmbeddableTypeName}, 
+							this, 
+							this.getValidationTextRange(astRoot)));
+			}
+			return false;
+		}
+		return true;
+	}
+
+	protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		getAttributeOverrideContainer().validate(messages, reporter, astRoot);
+	}
+
+	//********** AttributeOverrideContainer.Owner implementation *********	
+	
+	protected class AttributeOverrideContainerOwner
+		implements JavaAttributeOverrideContainer.Owner
+	{
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaBaseEmbeddedMapping.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaBaseEmbeddedMapping.this.getOverridableTypeMapping();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ?
+				EmptyIterator.<String>instance()
+				: allOverridableAttributeNames_(typeMapping);
+		}
+		
+		/* assumes the type mapping is not null */
+		protected Iterator<String> allOverridableAttributeNames_(TypeMapping typeMapping) {
+			return typeMapping.allOverridableAttributeNames();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return getTypeMapping().tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return getTypeMapping().associatedTableNamesIncludingInherited();
+		}
+		
+		public Table getDbTable(String tableName) {
+			return getTypeMapping().getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return getTypeMapping().getPrimaryTableName();
+		}
+		
+		public String getPossiblePrefix() {
+			return null;
+		}
+		
+		public String getWritePrefix() {
+			return null;
+		}
+		
+		public boolean isRelevant(String overrideName) {
+			//no prefix, so always true
+			return true;
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaBaseEmbeddedMapping.this.getValidationTextRange(astRoot);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBasicMapping.java
new file mode 100644
index 0000000..a0d62b6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaBasicMapping.java
@@ -0,0 +1,311 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.Fetchable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.Nullable;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.LobAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaBasicMapping
+	extends AbstractJavaAttributeMapping<BasicAnnotation>
+	implements JavaBasicMapping
+{
+	protected FetchType specifiedFetch;
+
+	protected Boolean specifiedOptional;
+	
+	protected final JavaColumn column;
+	
+	protected JavaConverter converter;
+	
+	protected final JavaConverter nullConverter;
+	
+	protected AbstractJavaBasicMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.column = getJpaFactory().buildJavaColumn(this, this);
+		this.nullConverter = getJpaFactory().buildJavaNullConverter(this);
+		this.converter = this.nullConverter;
+	}
+
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.column.initialize(this.getResourceColumn());
+		this.converter = this.buildConverter(this.getResourceConverterType());
+		this.specifiedFetch = this.getResourceFetch();
+		this.specifiedOptional = this.getResourceOptional();
+	}
+	
+	public ColumnAnnotation getResourceColumn() {
+		return (ColumnAnnotation) getResourcePersistentAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
+	}
+	
+	//************** AttributeMapping implementation ***************
+	public String getKey() {
+		return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	//************** JavaAttributeMapping implementation ***************
+	public String getAnnotationName() {
+		return BasicAnnotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.COLUMN);
+		names.add(JPA.LOB);
+		names.add(JPA.TEMPORAL);
+		names.add(JPA.ENUMERATED);
+	}
+	
+	public String getDefaultColumnName() {
+		return getName();
+	}
+
+	public String getDefaultTableName() {
+		return getTypeMapping().getPrimaryTableName();
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return getTypeMapping().associatedTableNamesIncludingInherited();
+	}
+	
+	//************** BasicMapping implementation ***************
+
+	public JavaColumn getColumn() {
+		return this.column;
+	}
+	
+	public FetchType getFetch() {
+		return (this.getSpecifiedFetch() == null) ? this.getDefaultFetch() : this.getSpecifiedFetch();
+	}
+
+	public FetchType getDefaultFetch() {
+		return DEFAULT_FETCH_TYPE;
+	}
+		
+	public FetchType getSpecifiedFetch() {
+		return this.specifiedFetch;
+	}
+	
+	public void setSpecifiedFetch(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		this.mappingAnnotation.setFetch(FetchType.toJavaResourceModel(newSpecifiedFetch));
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedFetch_(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+
+	public boolean isOptional() {
+		return (this.getSpecifiedOptional() == null) ? this.isDefaultOptional() : this.getSpecifiedOptional().booleanValue();
+	}
+	
+	public boolean isDefaultOptional() {
+		return Nullable.DEFAULT_OPTIONAL;
+	}
+	
+	public Boolean getSpecifiedOptional() {
+		return this.specifiedOptional;
+	}
+	
+	public void setSpecifiedOptional(Boolean newSpecifiedOptional) {
+		Boolean oldOptional = this.specifiedOptional;
+		this.specifiedOptional = newSpecifiedOptional;
+		this.mappingAnnotation.setOptional(newSpecifiedOptional);
+		firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, oldOptional, newSpecifiedOptional);
+	}
+
+	protected void setSpecifiedOptional_(Boolean newSpecifiedOptional) {
+		Boolean oldOptional = this.specifiedOptional;
+		this.specifiedOptional = newSpecifiedOptional;
+		firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, oldOptional, newSpecifiedOptional);
+	}
+	
+	public JavaConverter getConverter() {
+		return this.converter;
+	}
+	
+	protected String getConverterType() {
+		return this.converter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		JavaConverter oldConverter = this.converter;
+		JavaConverter newConverter = buildConverter(converterType);
+		this.converter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.converter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(JavaConverter newConverter) {
+		JavaConverter oldConverter = this.converter;
+		this.converter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+
+	@Override
+	protected void update() {
+		super.update();
+		this.column.update(this.getResourceColumn());
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update(this.getResourcePersistentAttribute());
+		}
+		else {
+			JavaConverter javaConverter = buildConverter(getResourceConverterType());
+			setConverter(javaConverter);
+		}
+		this.setSpecifiedFetch_(this.getResourceFetch());
+		this.setSpecifiedOptional_(this.getResourceOptional());
+	}
+	
+	protected FetchType getResourceFetch() {
+		return FetchType.fromJavaResourceModel(this.mappingAnnotation.getFetch());
+	}
+	
+	protected Boolean getResourceOptional() {
+		return this.mappingAnnotation.getOptional();
+	}
+	
+	protected JavaConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;		
+		}
+		if (this.valuesAreEqual(converterType, Converter.ENUMERATED_CONVERTER)) {
+			return getJpaFactory().buildJavaEnumeratedConverter(this, this.getResourcePersistentAttribute());
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getJpaFactory().buildJavaTemporalConverter(this, this.getResourcePersistentAttribute());
+		}
+		if (this.valuesAreEqual(converterType, Converter.LOB_CONVERTER)) {
+			return getJpaFactory().buildJavaLobConverter(this, this.getResourcePersistentAttribute());
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.getResourcePersistentAttribute().getAnnotation(EnumeratedAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.ENUMERATED_CONVERTER;
+		}
+		if (this.getResourcePersistentAttribute().getAnnotation(TemporalAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		if (this.getResourcePersistentAttribute().getAnnotation(LobAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.LOB_CONVERTER;
+		}
+		return Converter.NO_CONVERTER;
+	}
+
+	@Override
+	public boolean isOverridableAttributeMapping() {
+		return true;
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = getConverter().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.getColumn().validate(messages, reporter, astRoot);
+		this.getConverter().validate(messages, reporter, astRoot);
+	}
+
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+			column,
+			textRange
+		);
+	}
+
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+			new String[] {column.getName(), column.getDbTable().getName()}, 
+			column,
+			textRange
+		);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaEmbeddable.java
new file mode 100644
index 0000000..0bcff08
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaEmbeddable.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.resource.java.EmbeddableAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+
+
+public abstract class AbstractJavaEmbeddable
+	extends AbstractJavaTypeMapping
+	implements JavaEmbeddable
+{
+	protected AbstractJavaEmbeddable(JavaPersistentType parent) {
+		super(parent);
+	}
+
+	public String getKey() {
+		return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
+	}
+
+	public String getAnnotationName() {
+		return EmbeddableAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<String> getSupportingAnnotationNames() {
+		return EmptyIterable.instance();
+	}
+	
+	public boolean isMapped() {
+		return true;
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return false;
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaEntity.java
new file mode 100644
index 0000000..0e0f414
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaEntity.java
@@ -0,0 +1,1882 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.JpaPlatformVariation.Supported;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.core.context.DiscriminatorType;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.InheritanceType;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.SecondaryTable;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaBaseJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaDiscriminatorColumn;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaQueryContainer;
+import org.eclipse.jpt.core.context.java.JavaSecondaryTable;
+import org.eclipse.jpt.core.context.java.JavaTable;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.jpa1.context.GenericEntityPrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.resource.java.NullPrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheableHolder2_0;
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.resource.java.EntityAnnotation;
+import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTablesAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaEntity
+	extends AbstractJavaTypeMapping
+	implements JavaEntity, JavaCacheableHolder2_0
+{
+	protected String specifiedName;
+	
+	protected String defaultName;
+	
+	protected final JavaIdClassReference idClassReference;
+	
+	protected final JavaTable table;
+	
+	protected boolean specifiedTableIsAllowed;
+	
+	protected boolean tableIsUndefined;
+	
+	protected final List<JavaSecondaryTable> specifiedSecondaryTables;
+	
+	protected final List<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns;
+	
+	protected JavaPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
+	
+	protected InheritanceType specifiedInheritanceStrategy;
+	
+	protected InheritanceType defaultInheritanceStrategy;
+	
+	protected String defaultDiscriminatorValue;
+	
+	protected String specifiedDiscriminatorValue;
+	
+	protected boolean specifiedDiscriminatorValueIsAllowed;
+	
+	protected boolean discriminatorValueIsUndefined;
+		
+	protected final JavaDiscriminatorColumn discriminatorColumn;
+	
+	protected boolean specifiedDiscriminatorColumnIsAllowed;
+	
+	protected boolean discriminatorColumnIsUndefined;
+	
+	protected final JavaAttributeOverrideContainer attributeOverrideContainer;
+	
+	protected final JavaAssociationOverrideContainer associationOverrideContainer;
+	
+	protected final JavaQueryContainer queryContainer;
+	
+	protected final JavaGeneratorContainer generatorContainer;
+	
+	protected Entity rootEntity;
+	
+	
+	protected AbstractJavaEntity(JavaPersistentType parent) {
+		super(parent);
+		this.idClassReference = buildIdClassReference();
+		this.table = this.getJpaFactory().buildJavaTable(this);
+		this.discriminatorColumn = buildJavaDiscriminatorColumn();
+		this.specifiedSecondaryTables = new ArrayList<JavaSecondaryTable>();
+		this.specifiedPrimaryKeyJoinColumns = new ArrayList<JavaPrimaryKeyJoinColumn>();
+		this.attributeOverrideContainer = 
+				getJpaFactory().buildJavaAttributeOverrideContainer(this, new AttributeOverrideContainerOwner());
+		this.associationOverrideContainer = 
+				getJpaFactory().buildJavaAssociationOverrideContainer(this, new AssociationOverrideContainerOwner());
+		this.queryContainer = getJpaFactory().buildJavaQueryContainer(this);
+		this.generatorContainer = getJpaFactory().buildJavaGeneratorContainer(this);
+	}
+	
+	protected JavaIdClassReference buildIdClassReference() {
+		return new GenericJavaIdClassReference(this);
+	}
+	
+	protected JavaBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+		return new PrimaryKeyJoinColumnOwner();
+	}
+	
+	protected JavaDiscriminatorColumn buildJavaDiscriminatorColumn() {
+		return this.getJpaFactory().buildJavaDiscriminatorColumn(this, buildDiscriminatorColumnOwner());
+	}
+	
+	protected JavaDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
+		return new JavaDiscriminatorColumn.Owner(){
+			public String getDefaultTableName() {
+				return AbstractJavaEntity.this.getPrimaryTableName();
+			}
+
+			public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+				return AbstractJavaEntity.this.getDbTable(tableName);
+			}
+
+			public TextRange getValidationTextRange(CompilationUnit astRoot) {
+				return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+			}
+
+			public TypeMapping getTypeMapping() {
+				return AbstractJavaEntity.this;
+			}
+			
+			public String getDefaultColumnName() {
+				return isDescendant() ?
+						getRootEntity().getDiscriminatorColumn().getName()
+					:
+						discriminatorColumnIsUndefined()? 
+							null
+						:
+							DiscriminatorColumn.DEFAULT_NAME;
+			}
+			
+			public int getDefaultLength() {
+				return isDescendant() ?
+					getRootEntity().getDiscriminatorColumn().getLength()
+				:
+					discriminatorColumnIsUndefined()? 
+						0//TODO think i want to return null here
+					:
+						DiscriminatorColumn.DEFAULT_LENGTH;
+			}
+			
+			public DiscriminatorType getDefaultDiscriminatorType() {
+				return isDescendant() ?
+					getRootEntity().getDiscriminatorColumn().getDiscriminatorType()
+				:
+					discriminatorColumnIsUndefined()? 
+						null
+					:
+						DiscriminatorColumn.DEFAULT_DISCRIMINATOR_TYPE;
+			}
+
+			public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.DISCRIMINATOR_COLUMN_UNRESOLVED_NAME,
+					new String[] {column.getName(), column.getDbTable().getName()}, 
+					column, 
+					textRange
+				);
+			}
+		};
+	}
+	
+	@Override
+	public void initialize(JavaResourcePersistentType resourcePersistentType) {
+		super.initialize(resourcePersistentType);
+		
+		this.specifiedName = this.getResourceName();
+		this.defaultName = this.getResourceDefaultName();
+		this.idClassReference.initialize();
+		this.rootEntity = calculateRootEntity();
+		this.defaultInheritanceStrategy = this.buildDefaultInheritanceStrategy();
+		this.specifiedInheritanceStrategy = this.getResourceInheritanceStrategy(getResourceInheritance());
+		this.specifiedDiscriminatorValueIsAllowed = this.buildSpecifiedDiscriminatorValueIsAllowed();
+		this.discriminatorValueIsUndefined = this.buildDiscriminatorValueIsUndefined();
+		this.specifiedDiscriminatorValue = this.getResourceDiscriminatorValue().getValue();
+		this.defaultDiscriminatorValue = this.buildDefaultDiscriminatorValue();
+		this.specifiedDiscriminatorColumnIsAllowed = this.buildSpecifiedDiscriminatorColumnIsAllowed();
+		this.discriminatorColumnIsUndefined = this.buildDiscriminatorColumnIsUndefined();
+		this.discriminatorColumn.initialize(this.getResourceDiscriminatorColumn());
+		this.specifiedTableIsAllowed = this.buildSpecifiedTableIsAllowed();
+		this.tableIsUndefined = this.buildTableIsUndefined();
+		this.table.initialize(resourcePersistentType);
+		this.initializeSecondaryTables();
+		this.generatorContainer.initialize(resourcePersistentType);
+		this.queryContainer.initialize(resourcePersistentType);
+		this.initializePrimaryKeyJoinColumns();
+		this.initializeDefaultPrimaryKeyJoinColumn();
+		this.attributeOverrideContainer.initialize(resourcePersistentType);
+		this.associationOverrideContainer.initialize(resourcePersistentType);
+	}
+	
+	protected void initializeSecondaryTables() {
+		for (Iterator<NestableAnnotation> stream = 
+				this.javaResourcePersistentType.annotations(
+					SecondaryTableAnnotation.ANNOTATION_NAME, 
+					SecondaryTablesAnnotation.ANNOTATION_NAME); 
+				stream.hasNext(); ) {
+			this.specifiedSecondaryTables.add(
+					buildSecondaryTable((SecondaryTableAnnotation) stream.next()));
+		}
+	}
+	
+	protected void initializePrimaryKeyJoinColumns() {
+		for (Iterator<NestableAnnotation> stream = 
+				this.javaResourcePersistentType.annotations(
+					PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+					PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME); 
+				stream.hasNext(); ) {
+			this.specifiedPrimaryKeyJoinColumns.add(
+					buildPrimaryKeyJoinColumn((PrimaryKeyJoinColumnAnnotation) stream.next()));
+		}
+	}
+	
+	protected boolean shouldBuildDefaultPrimaryKeyJoinColumn() {
+		return !containsSpecifiedPrimaryKeyJoinColumns();
+	}
+
+	protected void initializeDefaultPrimaryKeyJoinColumn() {
+		if (!shouldBuildDefaultPrimaryKeyJoinColumn()) {
+			return;
+		}
+		this.defaultPrimaryKeyJoinColumn = buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(this.javaResourcePersistentType));
+	}	
+
+	//query for the inheritance resource every time on setters.
+	//call one setter and the inheritanceResource could change. 
+	//You could call more than one setter before this object has received any notification
+	//from the java resource model
+	protected InheritanceAnnotation getResourceInheritance() {
+		return (InheritanceAnnotation) this.javaResourcePersistentType.
+				getNonNullAnnotation(InheritanceAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected DiscriminatorValueAnnotation getResourceDiscriminatorValue() {
+		return (DiscriminatorValueAnnotation) this.javaResourcePersistentType.
+				getNonNullAnnotation(DiscriminatorValueAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected DiscriminatorColumnAnnotation getResourceDiscriminatorColumn() {
+		return (DiscriminatorColumnAnnotation) this.javaResourcePersistentType.
+				getNonNullAnnotation(DiscriminatorColumnAnnotation.ANNOTATION_NAME);
+	}
+	
+	@Override
+	protected EntityAnnotation getResourceMappingAnnotation() {
+		return (EntityAnnotation) super.getResourceMappingAnnotation();
+	}
+	
+	// **************** AttributeOverrideContainer.Owner impl *****************
+
+	public TypeMapping getTypeMapping() {
+		return this;
+	}
+	
+	public TypeMapping getOverridableTypeMapping() {
+		PersistentType superPersistentType = getPersistentType().getSuperPersistentType();
+		return superPersistentType == null ? null : superPersistentType.getMapping();
+	}
+	
+	
+	// **************** TypeMapping implementation ****************************
+	
+	public String getKey() {
+		return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
+	}
+
+	public boolean isMapped() {
+		return true;
+	}
+	
+	@Override
+	public JavaPersistentType getIdClass() {
+		return this.idClassReference.getIdClass();
+	}
+
+	@Override
+	public String getPrimaryTableName() {
+		return this.getTable().getName();
+	}
+
+	@Override
+	public org.eclipse.jpt.db.Table getPrimaryDbTable() {
+		return getTable().getDbTable();
+	}
+
+	@Override
+	public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+		// matching database objects and identifiers is database platform-specific
+		return this.getDataSource().selectDatabaseObjectForIdentifier(this.getAssociatedDbTablesIncludingInherited(), tableName);
+	}
+
+	protected Iterable<org.eclipse.jpt.db.Table> getAssociatedDbTablesIncludingInherited() {
+		return new FilteringIterable<org.eclipse.jpt.db.Table>(this.getAssociatedDbTablesIncludingInherited_()) {
+			@Override
+			protected boolean accept(org.eclipse.jpt.db.Table t) {
+				return t != null;
+			}
+		};
+	}
+
+	protected Iterable<org.eclipse.jpt.db.Table> getAssociatedDbTablesIncludingInherited_() {
+		return new TransformationIterable<Table, org.eclipse.jpt.db.Table>(this.getAssociatedTablesIncludingInherited()) {
+			@Override
+			protected org.eclipse.jpt.db.Table transform(Table t) {
+				return t.getDbTable();
+			}
+		};
+	}
+
+	@Override
+	public Schema getDbSchema() {
+		return getTable().getDbSchema();
+	}
+
+
+	//****************** JavaTypeMapping implementation *******************
+
+	public String getAnnotationName() {
+		return EntityAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<String> getSupportingAnnotationNames() {
+		return SUPPORTING_ANNOTATION_NAMES;
+	}
+	protected static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
+			JPA.TABLE,
+			JPA.SECONDARY_TABLE,
+			JPA.SECONDARY_TABLES,
+			JPA.PRIMARY_KEY_JOIN_COLUMN,
+			JPA.PRIMARY_KEY_JOIN_COLUMNS,
+			JPA.ID_CLASS,
+			JPA.INHERITANCE,
+			JPA.DISCRIMINATOR_VALUE,
+			JPA.DISCRIMINATOR_COLUMN,
+			JPA.SEQUENCE_GENERATOR,
+			JPA.TABLE_GENERATOR,
+			JPA.NAMED_QUERY,
+			JPA.NAMED_QUERIES,
+			JPA.NAMED_NATIVE_QUERY,
+			JPA.NAMED_NATIVE_QUERIES,
+			JPA.SQL_RESULT_SET_MAPPING,
+			JPA.EXCLUDE_DEFAULT_LISTENERS,
+			JPA.EXCLUDE_SUPERCLASS_LISTENERS,
+			JPA.ENTITY_LISTENERS,
+			JPA.PRE_PERSIST,
+			JPA.POST_PERSIST,
+			JPA.PRE_REMOVE,
+			JPA.POST_REMOVE,
+			JPA.PRE_UPDATE,
+			JPA.POST_UPDATE,
+			JPA.POST_LOAD,
+			JPA.ATTRIBUTE_OVERRIDE,
+			JPA.ATTRIBUTE_OVERRIDES,
+			JPA.ASSOCIATION_OVERRIDE,
+			JPA.ASSOCIATION_OVERRIDES
+	};
+	protected static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
+	
+	
+	// **************** name **************************************************
+	
+	public String getName() {
+		return (this.getSpecifiedName() == null) ? this.getDefaultName() : this.getSpecifiedName();
+	}
+	
+	public String getSpecifiedName() {
+		return this.specifiedName;
+	}
+	
+	public void setSpecifiedName(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		this.getResourceMappingAnnotation().setName(newSpecifiedName);
+		firePropertyChanged(SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+	
+	protected void setSpecifiedName_(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		firePropertyChanged(SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+	
+	public String getDefaultName() {
+		return this.defaultName;
+	}
+	
+	protected/*private-protected*/ void setDefaultName(String newDefaultName) {
+		String oldDefaultName = this.defaultName;
+		this.defaultName = newDefaultName;
+		firePropertyChanged(DEFAULT_NAME_PROPERTY, oldDefaultName, newDefaultName);
+	}
+	
+	
+	// **************** id class **********************************************
+	
+	public JavaIdClassReference getIdClassReference() {
+		return this.idClassReference;
+	}
+	
+	
+	// **************** table *************************************************
+	
+	public JavaTable getTable() {
+		return this.table;
+	}
+
+	public ListIterator<JavaSecondaryTable> specifiedSecondaryTables() {
+		return new CloneListIterator<JavaSecondaryTable>(this.specifiedSecondaryTables);
+	}
+	
+	public int specifiedSecondaryTablesSize() {
+		return this.specifiedSecondaryTables.size();
+	}
+	
+	public JavaSecondaryTable addSpecifiedSecondaryTable(int index) {
+		JavaSecondaryTable secondaryTable = getJpaFactory().buildJavaSecondaryTable(this);
+		this.specifiedSecondaryTables.add(index, secondaryTable);
+		SecondaryTableAnnotation secondaryTableResource = 
+				(SecondaryTableAnnotation) this.javaResourcePersistentType.
+					addAnnotation(
+						index, SecondaryTableAnnotation.ANNOTATION_NAME, 
+						SecondaryTablesAnnotation.ANNOTATION_NAME);
+		secondaryTable.initialize(secondaryTableResource);
+		fireItemAdded(SPECIFIED_SECONDARY_TABLES_LIST, index, secondaryTable);
+		return secondaryTable;
+	}
+
+	public JavaSecondaryTable addSpecifiedSecondaryTable() {
+		return this.addSpecifiedSecondaryTable(this.specifiedSecondaryTables.size());
+	}
+	
+	protected void addSpecifiedSecondaryTable(int index, JavaSecondaryTable secondaryTable) {
+		addItemToList(index, secondaryTable, this.specifiedSecondaryTables, SPECIFIED_SECONDARY_TABLES_LIST);
+	}
+	
+	protected void addSpecifiedSecondaryTable(JavaSecondaryTable secondaryTable) {
+		this.addSpecifiedSecondaryTable(this.specifiedSecondaryTables.size(), secondaryTable);
+	}
+	
+	public void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable) {
+		this.removeSpecifiedSecondaryTable(this.specifiedSecondaryTables.indexOf(secondaryTable));
+	}
+	
+	public void removeSpecifiedSecondaryTable(int index) {
+		JavaSecondaryTable removedSecondaryTable = this.specifiedSecondaryTables.remove(index);
+		this.javaResourcePersistentType.removeAnnotation(
+				index, SecondaryTableAnnotation.ANNOTATION_NAME, SecondaryTablesAnnotation.ANNOTATION_NAME);
+		fireItemRemoved(SPECIFIED_SECONDARY_TABLES_LIST, index, removedSecondaryTable);
+	}
+	
+	protected void removeSpecifiedSecondaryTable_(JavaSecondaryTable secondaryTable) {
+		removeItemFromList(secondaryTable, this.specifiedSecondaryTables, SPECIFIED_SECONDARY_TABLES_LIST);
+	}
+	
+	public void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedSecondaryTables, targetIndex, sourceIndex);
+		this.javaResourcePersistentType.moveAnnotation(
+				targetIndex, sourceIndex, SecondaryTablesAnnotation.ANNOTATION_NAME);
+		fireItemMoved(SPECIFIED_SECONDARY_TABLES_LIST, targetIndex, sourceIndex);		
+	}
+	
+	public ListIterator<JavaSecondaryTable> secondaryTables() {
+		return specifiedSecondaryTables();
+	}
+
+	public int secondaryTablesSize() {
+		return specifiedSecondaryTablesSize();
+	}
+
+	public InheritanceType getInheritanceStrategy() {
+		return (this.getSpecifiedInheritanceStrategy() == null) ? this.getDefaultInheritanceStrategy() : this.getSpecifiedInheritanceStrategy();
+	}
+	
+	public InheritanceType getDefaultInheritanceStrategy() {
+		return this.defaultInheritanceStrategy;
+	}
+	
+	protected void setDefaultInheritanceStrategy(InheritanceType newInheritanceType) {
+		InheritanceType oldInheritanceType = this.defaultInheritanceStrategy;
+		this.defaultInheritanceStrategy = newInheritanceType;
+		firePropertyChanged(DEFAULT_INHERITANCE_STRATEGY_PROPERTY, oldInheritanceType, newInheritanceType);
+	}
+	
+	public InheritanceType getSpecifiedInheritanceStrategy() {
+		return this.specifiedInheritanceStrategy;
+	}
+	
+	public void setSpecifiedInheritanceStrategy(InheritanceType newInheritanceType) {
+		InheritanceType oldInheritanceType = this.specifiedInheritanceStrategy;
+		this.specifiedInheritanceStrategy = newInheritanceType;
+		getResourceInheritance().setStrategy(InheritanceType.toJavaResourceModel(newInheritanceType));
+		firePropertyChanged(SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, oldInheritanceType, newInheritanceType);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedInheritanceStrategy_(InheritanceType newInheritanceType) {
+		InheritanceType oldInheritanceType = this.specifiedInheritanceStrategy;
+		this.specifiedInheritanceStrategy = newInheritanceType;
+		firePropertyChanged(SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, oldInheritanceType, newInheritanceType);
+	}
+
+	public JavaDiscriminatorColumn getDiscriminatorColumn() {
+		return this.discriminatorColumn;
+	}
+
+	public String getDefaultDiscriminatorValue() {
+		return this.defaultDiscriminatorValue;
+	}
+
+	protected void setDefaultDiscriminatorValue(String newDefaultDiscriminatorValue) {
+		String oldDefaultDiscriminatorValue = this.defaultDiscriminatorValue;
+		this.defaultDiscriminatorValue = newDefaultDiscriminatorValue;
+		firePropertyChanged(DEFAULT_DISCRIMINATOR_VALUE_PROPERTY, oldDefaultDiscriminatorValue, newDefaultDiscriminatorValue);
+	}
+
+	public String getSpecifiedDiscriminatorValue() {
+		return this.specifiedDiscriminatorValue;
+	}
+
+	public void setSpecifiedDiscriminatorValue(String newSpecifiedDiscriminatorValue) {
+		String oldSpecifiedDiscriminatorValue = this.specifiedDiscriminatorValue;
+		this.specifiedDiscriminatorValue = newSpecifiedDiscriminatorValue;
+		getResourceDiscriminatorValue().setValue(newSpecifiedDiscriminatorValue);
+		firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, oldSpecifiedDiscriminatorValue, newSpecifiedDiscriminatorValue);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedDiscriminatorValue_(String newSpecifiedDiscriminatorValue) {
+		String oldSpecifiedDiscriminatorValue = this.specifiedDiscriminatorValue;
+		this.specifiedDiscriminatorValue = newSpecifiedDiscriminatorValue;
+		firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, oldSpecifiedDiscriminatorValue, newSpecifiedDiscriminatorValue);
+	}
+
+	public String getDiscriminatorValue() {
+		return (this.getSpecifiedDiscriminatorValue() == null) ? getDefaultDiscriminatorValue() : this.getSpecifiedDiscriminatorValue();
+	}
+	
+	public boolean specifiedDiscriminatorValueIsAllowed() {
+		return this.specifiedDiscriminatorValueIsAllowed;
+	}
+	
+	protected void setSpecifiedDiscriminatorValueIsAllowed(boolean specifiedDiscriminatorValueIsAllowed) {
+		boolean old = this.specifiedDiscriminatorValueIsAllowed;
+		this.specifiedDiscriminatorValueIsAllowed = specifiedDiscriminatorValueIsAllowed;
+		firePropertyChanged(Entity.SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY, old, specifiedDiscriminatorValueIsAllowed);
+	}
+
+	public boolean discriminatorValueIsUndefined() {
+		return this.discriminatorValueIsUndefined;
+	}
+	
+	protected void setDiscriminatorValueIsUndefined(boolean discriminatorValueIsUndefined) {
+		boolean old = this.discriminatorValueIsUndefined;
+		this.discriminatorValueIsUndefined = discriminatorValueIsUndefined;
+		firePropertyChanged(DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY, old, discriminatorValueIsUndefined);
+	}
+	
+	public boolean specifiedDiscriminatorColumnIsAllowed() {
+		return this.specifiedDiscriminatorColumnIsAllowed;
+	}
+	
+	protected void setSpecifiedDiscriminatorColumnIsAllowed(boolean specifiedDiscriminatorColumnIsAllowed) {
+		boolean old = this.specifiedDiscriminatorColumnIsAllowed;
+		this.specifiedDiscriminatorColumnIsAllowed = specifiedDiscriminatorColumnIsAllowed;
+		firePropertyChanged(SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY, old, specifiedDiscriminatorColumnIsAllowed);
+	}
+	
+	public boolean discriminatorColumnIsUndefined() {
+		return this.discriminatorColumnIsUndefined;
+	}
+	
+	protected void setDiscriminatorColumnIsUndefined(boolean discriminatorColumnIsUndefined) {
+		boolean old = this.discriminatorColumnIsUndefined;
+		this.discriminatorColumnIsUndefined = discriminatorColumnIsUndefined;
+		firePropertyChanged(DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY, old, discriminatorColumnIsUndefined);
+	}
+
+	public boolean specifiedTableIsAllowed() {
+		return this.specifiedTableIsAllowed;
+	}
+	
+	protected void setSpecifiedTableIsAllowed(boolean specifiedTableIsAllowed) {
+		boolean old = this.specifiedTableIsAllowed;
+		this.specifiedTableIsAllowed = specifiedTableIsAllowed;
+		firePropertyChanged(SPECIFIED_TABLE_IS_ALLOWED_PROPERTY, old, specifiedTableIsAllowed);
+	}
+	
+	public boolean tableIsUndefined() {
+		return this.tableIsUndefined;
+	}
+	
+	protected void setTableIsUndefined(boolean tableIsUndefined) {
+		boolean old = this.tableIsUndefined;
+		this.tableIsUndefined = tableIsUndefined;
+		firePropertyChanged(TABLE_IS_UNDEFINED_PROPERTY, old, tableIsUndefined);
+	}
+	
+	public JavaGeneratorContainer getGeneratorContainer() {
+		return this.generatorContainer;
+	}
+	
+	public ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns() {
+		return this.containsSpecifiedPrimaryKeyJoinColumns() ? this.specifiedPrimaryKeyJoinColumns() : this.defaultPrimaryKeyJoinColumns();
+	}
+	
+	public int primaryKeyJoinColumnsSize() {
+		return this.containsSpecifiedPrimaryKeyJoinColumns() ? this.specifiedPrimaryKeyJoinColumnsSize() : this.defaultPrimaryKeyJoinColumnsSize();
+	}
+	
+	public ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns() {
+		return new CloneListIterator<JavaPrimaryKeyJoinColumn>(this.specifiedPrimaryKeyJoinColumns);
+	}
+	
+	public int specifiedPrimaryKeyJoinColumnsSize() {
+		return this.specifiedPrimaryKeyJoinColumns.size();
+	}
+	
+	public boolean containsSpecifiedPrimaryKeyJoinColumns() {
+		return !this.specifiedPrimaryKeyJoinColumns.isEmpty();
+	}	
+	
+	public JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
+		return this.defaultPrimaryKeyJoinColumn;
+	}
+	
+	protected void setDefaultPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn newPkJoinColumn) {
+		JavaPrimaryKeyJoinColumn oldPkJoinColumn = this.defaultPrimaryKeyJoinColumn;
+		this.defaultPrimaryKeyJoinColumn = newPkJoinColumn;
+		firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, oldPkJoinColumn, newPkJoinColumn);
+	}
+
+	protected ListIterator<JavaPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns() {
+		if (this.defaultPrimaryKeyJoinColumn != null) {
+			return new SingleElementListIterator<JavaPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+	
+	protected int defaultPrimaryKeyJoinColumnsSize() {
+		return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
+	}
+
+	public JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
+		JavaPrimaryKeyJoinColumn oldDefaultPkJoinColumn = this.getDefaultPrimaryKeyJoinColumn();
+		if (oldDefaultPkJoinColumn != null) {
+			//null the default join column now if one already exists.
+			//if one does not exist, there is already a specified join column.
+			//Remove it now so that it doesn't get removed during an update and
+			//cause change notifications to be sent to the UI in the wrong order
+			this.defaultPrimaryKeyJoinColumn = null;
+		}
+		JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, buildPrimaryKeyJoinColumnOwner());
+		this.specifiedPrimaryKeyJoinColumns.add(index, primaryKeyJoinColumn);
+		PrimaryKeyJoinColumnAnnotation pkJoinColumnResource = 
+				(PrimaryKeyJoinColumnAnnotation) this.javaResourcePersistentType.
+					addAnnotation(
+						index, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+						PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+		primaryKeyJoinColumn.initialize(pkJoinColumnResource);
+		this.fireItemAdded(SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, primaryKeyJoinColumn);
+		if (oldDefaultPkJoinColumn != null) {
+			this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, oldDefaultPkJoinColumn, null);
+		}
+		return primaryKeyJoinColumn;
+	}
+
+	protected void addSpecifiedPrimaryKeyJoinColumn(int index, JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		addItemToList(index, primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+		
+	protected void addSpecifiedPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		this.addSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.size(), primaryKeyJoinColumn);
+	}
+		
+	public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.indexOf(primaryKeyJoinColumn));
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
+		JavaPrimaryKeyJoinColumn removedPrimaryKeyJoinColumn = this.specifiedPrimaryKeyJoinColumns.remove(index);
+		if (!containsSpecifiedPrimaryKeyJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultPrimaryKeyJoinColumn = buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(this.javaResourcePersistentType));
+		}
+		this.javaResourcePersistentType.removeAnnotation(
+				index, PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+				PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+		fireItemRemoved(SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, removedPrimaryKeyJoinColumn);
+		if (this.defaultPrimaryKeyJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, null, this.defaultPrimaryKeyJoinColumn);
+		}
+	}
+
+	protected void removeSpecifiedPrimaryKeyJoinColumn_(JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		removeItemFromList(primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
+		this.javaResourcePersistentType.moveAnnotation(
+				targetIndex, sourceIndex, PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+		moveItemInList(targetIndex, sourceIndex, this.specifiedPrimaryKeyJoinColumns, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);		
+	}
+	
+	public JavaAttributeOverrideContainer getAttributeOverrideContainer() {
+		return this.attributeOverrideContainer;
+	}
+	
+	public JavaAssociationOverrideContainer getAssociationOverrideContainer() {
+		return this.associationOverrideContainer;
+	}
+	
+	public JavaQueryContainer getQueryContainer() {
+		return this.queryContainer;
+	}
+	
+	public Entity getParentEntity() {
+		for (Iterator<PersistentType> stream = getPersistentType().ancestors(); stream.hasNext();) {
+			TypeMapping typeMapping = stream.next().getMapping();
+			if (typeMapping instanceof Entity) {
+				return (Entity) typeMapping;
+			}
+		}
+		return null;
+	}
+	
+	public Entity getRootEntity() {
+		return this.rootEntity;
+	}
+
+	public boolean isRoot() {
+		return this == this.getRootEntity();
+	}
+
+	/**
+	 * Return whether the entity is a descendant in (as opposed to the root of)
+	 * an inheritance hierarchy.
+	 */
+	protected boolean isDescendant() {
+		return ! this.isRoot();
+	}
+	
+	/**
+	 * Table name defaults to the entity name.
+	 * If the entity is part of a single table inheritance hierarchy, table
+	 * name defaults to the root entity's table name.
+	 * If the entity is abstract and part of a table per class
+	 * inheritance hierarchy, the table name defaults to null, no table applies
+	 */
+	public String getDefaultTableName() {
+		return this.isSingleTableDescendant() ?
+						this.getRootEntity().getTable().getName()
+					:
+						this.isAbstractTablePerClass() ?
+								null
+							:
+								this.getName();
+	}
+
+	public String getDefaultSchema() {
+		return this.isSingleTableDescendant() ?
+						this.getRootEntity().getTable().getSchema()
+					:
+						this.isAbstractTablePerClass() ?
+							null
+						:
+							this.getContextDefaultSchema();
+	}
+
+	public String getDefaultCatalog() {
+		return this.isSingleTableDescendant() ?
+						this.getRootEntity().getTable().getCatalog()
+					:
+						this.isAbstractTablePerClass() ?
+							null
+						:
+							this.getContextDefaultCatalog();
+	}
+
+	/**
+	 * Return whether the entity is a descendant of the root entity
+	 * of a "single table" inheritance hierarchy.
+	 */
+	protected boolean isSingleTableDescendant() {
+		return (this.getInheritanceStrategy() == InheritanceType.SINGLE_TABLE)
+					&& this.isDescendant();
+	}
+	
+	/**
+	 * Return whether the entity is the top of an inheritance hierarchy
+	 * and has no descendants and no specified inheritance strategy has been defined.
+	 */
+	protected boolean isRootNoDescendantsNoStrategyDefined() {
+		return isRoot() && !getPersistenceUnit().entityIsRootWithSubEntities(this.getName()) && getSpecifiedInheritanceStrategy() == null;
+	}
+
+	/**
+	 * Return whether the entity is abstract and is a part of a 
+	 * "table per class" inheritance hierarchy.
+	 */
+	protected boolean isAbstractTablePerClass() {
+		return isAbstract() && isTablePerClass();
+	}
+	
+	/**
+	 * Return whether the entity is a part of a "table per class" 
+	 * inheritance hierarchy.
+	 */
+	protected boolean isTablePerClass() {
+		return (this.getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS);
+	}
+	
+	/**
+	 * Return whether the entity is a part of a "table per class" 
+	 * inheritance hierarchy.
+	 */
+	protected boolean isTablePerClassDescendant() {
+		return isTablePerClass() && isDescendant();
+	}
+	
+	/**
+	 * Return whether the type is abstract.
+	 */
+	protected boolean isAbstract() {
+		return this.javaResourcePersistentType.isAbstract();
+	}
+	
+	public String getPrimaryKeyColumnName() {
+		return getPrimaryKeyColumnName(this);
+	}
+	
+	/**
+	 * Convenience implementation that is shared with ORM.
+	 */
+	public static String getPrimaryKeyColumnName(Entity entity) {
+		String pkColumnName = null;
+		for (Iterator<PersistentAttribute> stream = entity.getPersistentType().allAttributes(); stream.hasNext(); ) {
+			PersistentAttribute attribute = stream.next();
+			String current = attribute.getPrimaryKeyColumnName();
+			if (current != null) {
+				// 229423 - if the attribute is a primary key, but it has an attribute override,
+				// use the override column instead
+				AttributeOverride attributeOverride = entity.getAttributeOverrideContainer().getAttributeOverrideNamed(attribute.getName());
+				if (attributeOverride != null) {
+					current = attributeOverride.getColumn().getName();
+				}
+			}
+			if (pkColumnName == null) {
+				pkColumnName = current;
+			}
+			else if (current != null) {
+				// if we encounter a composite primary key, return null
+				return null;
+			}
+		}
+		// if we encounter only a single primary key column name, return it
+		return pkColumnName;
+	}
+
+	public PersistentAttribute getIdAttribute() {
+		Iterable<AttributeMapping> idAttributeMappings = getAllAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY);
+		if (CollectionTools.size(idAttributeMappings) != 1) {
+			return null;
+		}
+		return idAttributeMappings.iterator().next().getPersistentAttribute();
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		if (tableIsUndefined()) {
+			return false;
+		}
+		return ! CollectionTools.contains(this.associatedTableNamesIncludingInherited(), tableName);
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return super.shouldValidateAgainstDatabase() && ! isAbstractTablePerClass();
+	}
+	
+	@Override
+	public Iterator<Table> associatedTables() {
+		return new CompositeIterator<Table>(this.getTable(), this.secondaryTables());
+	}
+
+	@Override
+	public Iterator<Table> associatedTablesIncludingInherited() {
+		return this.getAssociatedTablesIncludingInherited().iterator();
+	}
+
+	protected Iterable<Table> getAssociatedTablesIncludingInherited() {
+		return new CompositeIterable<Table>(new TransformationIterable<TypeMapping, Iterable<Table>>(this.getInheritanceHierarchy()) {
+			@Override
+			protected Iterable<Table> transform(TypeMapping mapping) {
+				return new FilteringIterable<Table>(CollectionTools.iterable(mapping.associatedTables())) {
+					@Override
+					protected boolean accept(Table o) {
+						return true;
+						//TODO
+						//filtering these out so as to avoid the duplicate table, root and children share the same table
+						//return !(o instanceof SingleTableInheritanceChildTableImpl);
+					}
+				};
+			}
+		});
+	}
+
+	@Override
+	public Iterator<String> associatedTableNamesIncludingInherited() {
+		return this.nonNullTableNames(this.associatedTablesIncludingInherited());
+	}
+
+	protected Iterator<String> nonNullTableNames(Iterator<Table> tables) {
+		return new FilteringIterator<String>(this.tableNames(tables)) {
+			@Override
+			protected boolean accept(String o) {
+				return o != null;
+			}
+		};
+	}
+
+	protected Iterator<String> tableNames(Iterator<Table> tables) {
+		return new TransformationIterator<Table, String>(tables) {
+			@Override
+			protected String transform(Table t) {
+				return t.getName();
+			}
+		};
+	}
+	
+	/**
+	 * Return an iterator of Entities, each which inherits from the one before,
+	 * and terminates at the root entity (or at the point of cyclicity).
+	 */
+	protected Iterator<TypeMapping> ancestors() {
+		return new TransformationIterator<PersistentType, TypeMapping>(getPersistentType().ancestors()) {
+			@Override
+			protected TypeMapping transform(PersistentType type) {
+				return type.getMapping();
+			}
+		};
+	}
+	
+	@Override
+	public Iterator<String> overridableAttributeNames() {
+		if (!isTablePerClass()) {
+			return EmptyIterator.instance();
+		}
+		return super.overridableAttributeNames();
+	}
+	
+	@Override
+	public Column resolveOverriddenColumn(String attributeName) {
+		AttributeOverride override = getAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+		if (override != null && !override.isVirtual()) {
+			return override.getColumn();
+		}
+		return super.resolveOverriddenColumn(attributeName);
+	}
+	
+	@Override
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		AssociationOverride override = getAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+		if (override != null && !override.isVirtual()) {
+			return override.getRelationshipReference();
+		}
+		return super.resolveRelationshipReference(attributeName);
+	}
+	
+	@Override
+	public Iterator<String> overridableAssociationNames() {
+		if (!isTablePerClass()) {
+			return EmptyIterator.instance();
+		}
+		return super.overridableAssociationNames();
+	}
+	
+	public AttributeMapping resolveAttributeMapping(String name) {
+		for (AttributeMapping attributeMapping : CollectionTools.iterable(this.allAttributeMappings())) {
+			AttributeMapping resolvedMapping = attributeMapping.resolveAttributeMapping(name);
+			if (resolvedMapping != null) {
+				return resolvedMapping;
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public void update(JavaResourcePersistentType resourcePersistentType) {
+		super.update(resourcePersistentType);
+		setSpecifiedName_(getResourceName());
+		setDefaultName(getResourceDefaultName());
+		this.idClassReference.update();
+		updateRootEntity();
+		updateInheritance(getResourceInheritance());
+		updateDiscriminatorColumn();
+		updateDiscriminatorValue(getResourceDiscriminatorValue());
+		setSpecifiedTableIsAllowed(buildSpecifiedTableIsAllowed());
+		setTableIsUndefined(buildTableIsUndefined());
+		updateTable();
+		updateSecondaryTables();
+		this.generatorContainer.update(resourcePersistentType);
+		this.queryContainer.update(resourcePersistentType);
+		updateSpecifiedPrimaryKeyJoinColumns();
+		updateDefaultPrimaryKeyJoinColumn();
+		this.attributeOverrideContainer.update(resourcePersistentType);
+		this.associationOverrideContainer.update(resourcePersistentType);
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		postUpdateDiscriminatorColumn();
+		postUpdateDiscriminatorValue();
+		this.associationOverrideContainer.postUpdate();
+	}
+	
+	protected String getResourceName() {
+		return this.getResourceMappingAnnotation().getName();
+	}
+	
+	protected String getResourceDefaultName() {
+		return this.javaResourcePersistentType.getName();
+	}
+
+	protected void updateTable() {
+		getTable().update(this.javaResourcePersistentType);
+	}
+	
+	protected void updateInheritance(InheritanceAnnotation inheritanceResource) {
+		this.setSpecifiedInheritanceStrategy_(this.getResourceInheritanceStrategy(inheritanceResource));
+		this.setDefaultInheritanceStrategy(this.buildDefaultInheritanceStrategy());
+	}
+	
+	protected InheritanceType getResourceInheritanceStrategy(InheritanceAnnotation inheritanceResource) {
+		return InheritanceType.fromJavaResourceModel(inheritanceResource.getStrategy());
+	}
+	
+	protected InheritanceType buildDefaultInheritanceStrategy() {
+		return this.isRoot() ? InheritanceType.SINGLE_TABLE : this.getRootEntity().getInheritanceStrategy();
+	}
+	
+	protected void updateRootEntity() {
+		//I am making an assumption here that we don't need property change notification for rootEntity, this might be wrong
+		this.rootEntity = calculateRootEntity();
+		if (this.rootEntity != this) {
+			this.rootEntity.addSubEntity(this);
+		}
+	}
+	
+	protected Entity calculateRootEntity() {
+		Entity root = this;
+		for (Iterator<TypeMapping> stream = inheritanceHierarchy(); stream.hasNext();) {
+			TypeMapping typeMapping = stream.next();
+			if (typeMapping instanceof Entity) {
+				root = (Entity) typeMapping;
+			}
+		}
+		return root;
+	}
+	
+	public void addSubEntity(Entity subEntity) {
+		getPersistenceUnit().addRootEntityWithSubEntities(getName());
+	}
+	
+	protected void updateDiscriminatorColumn() {
+		this.setSpecifiedDiscriminatorColumnIsAllowed(this.buildSpecifiedDiscriminatorColumnIsAllowed());
+		getDiscriminatorColumn().update(this.getResourceDiscriminatorColumn());
+	}
+	
+	protected void postUpdateDiscriminatorColumn() {
+		this.setDiscriminatorColumnIsUndefined(this.buildDiscriminatorColumnIsUndefined());
+		this.getDiscriminatorColumn().postUpdate();
+	}
+	
+	protected void updateDiscriminatorValue(DiscriminatorValueAnnotation discriminatorValueResource) {
+		this.setSpecifiedDiscriminatorValueIsAllowed(this.buildSpecifiedDiscriminatorValueIsAllowed());
+		this.setSpecifiedDiscriminatorValue_(discriminatorValueResource.getValue());
+	}
+	
+	protected void postUpdateDiscriminatorValue() {
+		this.setDiscriminatorValueIsUndefined(this.buildDiscriminatorValueIsUndefined());
+		this.setDefaultDiscriminatorValue(this.buildDefaultDiscriminatorValue());
+	}
+	
+	/**
+	 * From the Spec:
+	 * If the DiscriminatorValue annotation is not specified, a
+	 * provider-specific function to generate a value representing
+	 * the entity type is used for the value of the discriminator
+	 * column. If the DiscriminatorType is STRING, the discriminator
+	 * value default is the entity name.
+	 * 
+	 * TODO extension point for provider-specific function?
+	 */
+	protected String buildDefaultDiscriminatorValue() {
+		if (discriminatorValueIsUndefined()) {
+			return null;
+		}
+		if (this.getDiscriminatorType() != DiscriminatorType.STRING) {
+			return null;
+		}
+		return this.getName();
+	}
+
+	protected DiscriminatorType getDiscriminatorType() {
+		return this.getDiscriminatorColumn().getDiscriminatorType();
+	}
+	
+	protected boolean buildSpecifiedDiscriminatorValueIsAllowed() {
+		return !isTablePerClass() && !isAbstract();
+	}
+	
+	protected boolean buildDiscriminatorValueIsUndefined() {
+		return isTablePerClass() || isAbstract() || isRootNoDescendantsNoStrategyDefined();
+	}
+	
+	protected boolean buildSpecifiedDiscriminatorColumnIsAllowed() {
+		return !isTablePerClass() && isRoot();
+	}
+	
+	protected boolean buildDiscriminatorColumnIsUndefined() {
+		return isTablePerClass() || isRootNoDescendantsNoStrategyDefined();
+	}
+	
+	protected boolean buildSpecifiedTableIsAllowed() {
+		return !isAbstractTablePerClass() && !isSingleTableDescendant();
+	}
+	
+	protected boolean buildTableIsUndefined() {
+		return isAbstractTablePerClass();
+	}
+	
+	protected void updateSecondaryTables() {
+		ListIterator<JavaSecondaryTable> secondaryTables = specifiedSecondaryTables();
+		Iterator<NestableAnnotation> resourceSecondaryTables = 
+				this.javaResourcePersistentType.annotations(
+					SecondaryTableAnnotation.ANNOTATION_NAME, SecondaryTablesAnnotation.ANNOTATION_NAME);
+		
+		while (secondaryTables.hasNext()) {
+			JavaSecondaryTable secondaryTable = secondaryTables.next();
+			if (resourceSecondaryTables.hasNext()) {
+				secondaryTable.update((SecondaryTableAnnotation) resourceSecondaryTables.next());
+			}
+			else {
+				removeSpecifiedSecondaryTable_(secondaryTable);
+			}
+		}
+		
+		while (resourceSecondaryTables.hasNext()) {
+			addSpecifiedSecondaryTable(buildSecondaryTable((SecondaryTableAnnotation) resourceSecondaryTables.next()));
+		}
+	}
+
+	protected JavaSecondaryTable buildSecondaryTable(SecondaryTableAnnotation secondaryTableResource) {
+		JavaSecondaryTable secondaryTable = getJpaFactory().buildJavaSecondaryTable(this);
+		secondaryTable.initialize(secondaryTableResource);
+		return secondaryTable;
+	}
+	
+	protected void updateSpecifiedPrimaryKeyJoinColumns() {
+		ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns = specifiedPrimaryKeyJoinColumns();
+		Iterator<NestableAnnotation> resourcePrimaryKeyJoinColumns = 
+				this.javaResourcePersistentType.annotations(
+					PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+					PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+		
+		while (primaryKeyJoinColumns.hasNext()) {
+			JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = primaryKeyJoinColumns.next();
+			if (resourcePrimaryKeyJoinColumns.hasNext()) {
+				primaryKeyJoinColumn.update((PrimaryKeyJoinColumnAnnotation) resourcePrimaryKeyJoinColumns.next());
+			}
+			else {
+				removeSpecifiedPrimaryKeyJoinColumn_(primaryKeyJoinColumn);
+			}
+		}
+		
+		while (resourcePrimaryKeyJoinColumns.hasNext()) {
+			addSpecifiedPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn((PrimaryKeyJoinColumnAnnotation) resourcePrimaryKeyJoinColumns.next()));
+		}
+	}
+	
+	protected JavaPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(PrimaryKeyJoinColumnAnnotation primaryKeyJoinColumnResource) {
+		JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, buildPrimaryKeyJoinColumnOwner());
+		primaryKeyJoinColumn.initialize(primaryKeyJoinColumnResource);
+		return primaryKeyJoinColumn;
+	}
+
+	protected void updateDefaultPrimaryKeyJoinColumn() {
+		if (!shouldBuildDefaultPrimaryKeyJoinColumn()) {
+			setDefaultPrimaryKeyJoinColumn(null);
+			return;
+		}
+		if (getDefaultPrimaryKeyJoinColumn() == null) {
+			this.setDefaultPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(this.javaResourcePersistentType)));
+		}
+		else {
+			this.defaultPrimaryKeyJoinColumn.update(new NullPrimaryKeyJoinColumnAnnotation(this.javaResourcePersistentType));
+		}
+	}
+	
+	
+	//******************** Code Completion *************************
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getTable().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaSecondaryTable sTable : CollectionTools.iterable(this.secondaryTables())) {
+			result = sTable.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		for (JavaPrimaryKeyJoinColumn column : CollectionTools.iterable(this.primaryKeyJoinColumns())) {
+			result = column.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		result = this.getAttributeOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getAssociationOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getDiscriminatorColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getGeneratorContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+	
+	
+	//********** Validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		
+		validatePrimaryKey(messages, reporter, astRoot);
+		validateTable(messages, reporter, astRoot);
+		for (Iterator<JavaSecondaryTable> stream = this.specifiedSecondaryTables(); stream.hasNext();) {
+			stream.next().validate(messages, reporter, astRoot);
+		}
+		validateInheritance(messages, reporter, astRoot);
+		getGeneratorContainer().validate(messages, reporter, astRoot);
+		getQueryContainer().validate(messages, reporter, astRoot);
+		getAttributeOverrideContainer().validate(messages, reporter, astRoot);
+		getAssociationOverrideContainer().validate(messages, reporter, astRoot);
+	}
+	
+	protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
+	}
+	
+	protected PrimaryKeyValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
+		return new GenericEntityPrimaryKeyValidator(this, buildTextRangeResolver(astRoot));
+	}
+	
+	protected PrimaryKeyTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
+		return new JavaEntityTextRangeResolver(this, astRoot);
+	}
+	
+	protected void validateTable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (isAbstractTablePerClass()) {
+			if (this.table.isResourceSpecified()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
+						new String[] {this.getName()},
+						this,
+						this.getTable().getValidationTextRange(astRoot)
+					)
+				);
+			}			
+			return;
+		}
+		if (isSingleTableDescendant()) {
+			if (this.table.isResourceSpecified()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE,
+						new String[] {this.getName()},
+						this,
+						this.getTable().getValidationTextRange(astRoot)
+					)
+				);
+			}
+			return;
+		}
+		this.table.validate(messages, reporter, astRoot);
+	}
+	
+	protected void validateInheritance(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		validateInheritanceStrategy(messages, astRoot);
+		validateDiscriminatorColumn(messages, reporter, astRoot);
+		validateDiscriminatorValue(messages, astRoot);
+	}
+	
+	protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (specifiedDiscriminatorColumnIsAllowed() && !discriminatorColumnIsUndefined()) {
+			getDiscriminatorColumn().validate(messages, reporter, astRoot);
+		}
+		else if (getDiscriminatorColumn().isResourceSpecified()) {
+			if (!isRoot()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorColumnTextRange(astRoot)
+					)
+				);
+			}
+			else if (isTablePerClass()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorColumnTextRange(astRoot)
+					)
+				);
+			}
+		}
+	}
+	
+	protected void validateDiscriminatorValue(List<IMessage> messages, CompilationUnit astRoot) {
+		if (discriminatorValueIsUndefined() && getSpecifiedDiscriminatorValue() != null) {
+			if (isAbstract()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorValueTextRange(astRoot)
+					)
+				);
+			}
+			else if (isTablePerClass()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorValueTextRange(astRoot)
+					)
+				);				
+			}
+		}
+	}
+	
+	protected void validateInheritanceStrategy(List<IMessage> messages, CompilationUnit astRoot) {
+		Supported tablePerConcreteClassInheritanceIsSupported = getJpaPlatformVariation().getTablePerConcreteClassInheritanceIsSupported();
+		if (tablePerConcreteClassInheritanceIsSupported == Supported.YES) {
+			return;
+		}
+		if ((getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS) && isRoot()) {
+			if (tablePerConcreteClassInheritanceIsSupported == Supported.NO) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
+						new String[] {this.getName()},
+						this,
+						this.getInheritanceStrategyTextRange(astRoot)
+					)
+				);
+			}
+			else {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM,
+						new String[] {this.getName()},
+						this,
+						this.getInheritanceStrategyTextRange(astRoot)
+					)
+				);
+			}
+		}
+	}
+	
+	protected TextRange getDiscriminatorValueTextRange(CompilationUnit astRoot) {
+		return getResourceDiscriminatorValue().getTextRange(astRoot);
+	}
+	
+	protected TextRange getDiscriminatorColumnTextRange(CompilationUnit astRoot) {
+		return getDiscriminatorColumn().getValidationTextRange(astRoot);
+	}
+	
+	protected TextRange getInheritanceStrategyTextRange(CompilationUnit astRoot) {
+		return getResourceInheritance().getStrategyTextRange(astRoot);
+	}
+	
+	
+	// ********** association override container owner **********
+
+	protected class AssociationOverrideContainerOwner
+		implements JavaAssociationOverrideContainer.Owner
+	{	
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaEntity.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaEntity.this.getOverridableTypeMapping();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAssociationNames();
+		}
+		
+		public RelationshipReference resolveRelationshipReference(String associationOverrideName) {
+			return MappingTools.resolveRelationshipReference(getOverridableTypeMapping(), associationOverrideName);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return AbstractJavaEntity.this.tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return AbstractJavaEntity.this.associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractJavaEntity.this.getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return AbstractJavaEntity.this.getPrimaryTableName();
+		}
+		
+		public String getPossiblePrefix() {
+			return null;
+		}
+		
+		public String getWritePrefix() {
+			return null;
+		}
+		
+		public boolean isRelevant(String overrideName) {
+			//no prefix, so always true
+			return true;
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {overrideName, column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0], 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0], 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+	}
+	
+	//********** AttributeOverrideContainer.Owner implementation *********	
+	
+	protected class AttributeOverrideContainerOwner
+		implements JavaAttributeOverrideContainer.Owner 
+	{
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaEntity.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaEntity.this.getOverridableTypeMapping();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+				: allOverridableAttributeNames_(typeMapping);
+		}
+		
+		/* assumes the type mapping is not null */
+		protected Iterator allOverridableAttributeNames_(TypeMapping typeMapping) {
+			final Collection mappedByRelationshipAttributes = CollectionTools.collection(
+					new TransformationIterator<SingleRelationshipMapping2_0, String>(getMapsIdRelationships()) {
+						@Override
+						protected String transform(SingleRelationshipMapping2_0 next) {
+							return next.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue();
+						}
+					});
+			return new FilteringIterator<String>(typeMapping.allOverridableAttributeNames()) {
+				@Override
+				protected boolean accept(String o) {
+					if (mappedByRelationshipAttributes.isEmpty()) {
+						return true;
+					}
+					// overrideable names are (usually?) qualified with a container mapping, 
+					// which may also be the one mapped by a relationship
+					String qualifier = 
+							(o.indexOf('.') > 0) ?
+								o.substring(0, o.indexOf('.'))
+								: o;
+					return ! mappedByRelationshipAttributes.contains(qualifier);
+				}
+			};
+		}
+		
+		protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+			return new FilteringIterable<SingleRelationshipMapping2_0>(
+					new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+						new CompositeIterable<AttributeMapping>(
+							getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+							getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+				@Override
+				protected boolean accept(SingleRelationshipMapping2_0 o) {
+					return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+				}
+			};
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return AbstractJavaEntity.this.tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return AbstractJavaEntity.this.associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractJavaEntity.this.getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return AbstractJavaEntity.this.getPrimaryTableName();
+		}
+		
+		public String getPossiblePrefix() {
+			return null;
+		}
+		
+		public String getWritePrefix() {
+			return null;
+		}
+		
+		public boolean isRelevant(String overrideName) {
+			//no prefix, so always true
+			return true;
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+	}
+	
+	
+	// ********** pk join column owner **********
+
+	protected class PrimaryKeyJoinColumnOwner implements JavaBaseJoinColumn.Owner
+	{
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+		}
+
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaEntity.this;
+		}
+
+		public String getDefaultTableName() {
+			return AbstractJavaEntity.this.getPrimaryTableName();
+		}
+
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractJavaEntity.this.getDbTable(tableName);
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			Entity parentEntity = AbstractJavaEntity.this.getParentEntity();
+			return (parentEntity == null) ? null : parentEntity.getPrimaryDbTable();
+		}
+
+		public int joinColumnsSize() {
+			return AbstractJavaEntity.this.primaryKeyJoinColumnsSize();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return AbstractJavaEntity.this.defaultPrimaryKeyJoinColumn == joinColumn;
+		}
+		
+		public String getDefaultColumnName() {
+			if (joinColumnsSize() != 1) {
+				return null;
+			}
+			Entity parentEntity = AbstractJavaEntity.this.getParentEntity();
+			return (parentEntity == null) ? getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaGenerator.java
new file mode 100644
index 0000000..1b7acb4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaGenerator.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.java.JavaGenerator;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.GeneratorAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * 
+ */
+public abstract class AbstractJavaGenerator
+	extends AbstractJavaJpaContextNode 
+	implements JavaGenerator
+{
+	protected String name;
+
+	protected Integer specifiedInitialValue;
+	
+	protected Integer specifiedAllocationSize;
+
+	protected GeneratorAnnotation resourceGenerator;
+	
+
+	protected AbstractJavaGenerator(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	protected GeneratorAnnotation getResourceGenerator() {
+		return this.resourceGenerator;
+	}
+
+
+	// ********** name **********
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.resourceGenerator.setName(name);
+		this.firePropertyChanged(Generator.NAME_PROPERTY, old, name);
+	}
+
+	protected void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(Generator.NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** initial value **********
+
+	public int getInitialValue() {
+		return (this.specifiedInitialValue != null) ? this.specifiedInitialValue.intValue() : this.getDefaultInitialValue();
+	}
+
+	public Integer getSpecifiedInitialValue() {
+		return this.specifiedInitialValue;
+	}
+
+	public void setSpecifiedInitialValue(Integer specifiedInitialValue) {
+		Integer old = this.specifiedInitialValue;
+		this.specifiedInitialValue = specifiedInitialValue;
+		this.resourceGenerator.setInitialValue(specifiedInitialValue);
+		this.firePropertyChanged(Generator.SPECIFIED_INITIAL_VALUE_PROPERTY, old, specifiedInitialValue);
+	}
+
+	protected void setSpecifiedInitialValue_(Integer specifiedInitialValue) {
+		Integer old = this.specifiedInitialValue;
+		this.specifiedInitialValue = specifiedInitialValue;
+		this.firePropertyChanged(Generator.SPECIFIED_INITIAL_VALUE_PROPERTY, old, specifiedInitialValue);
+	}
+
+
+	// ********** allocation size **********
+
+	public int getAllocationSize() {
+		return (this.specifiedAllocationSize != null) ? this.specifiedAllocationSize.intValue() : this.getDefaultAllocationSize();
+	}
+
+	public Integer getSpecifiedAllocationSize() {
+		return this.specifiedAllocationSize;
+	}
+
+	public void setSpecifiedAllocationSize(Integer specifiedAllocationSize) {
+		Integer old = this.specifiedAllocationSize;
+		this.specifiedAllocationSize = specifiedAllocationSize;
+		this.resourceGenerator.setAllocationSize(specifiedAllocationSize);
+		this.firePropertyChanged(Generator.SPECIFIED_ALLOCATION_SIZE_PROPERTY, old, specifiedAllocationSize);
+	}
+
+	protected void setSpecifiedAllocationSize_(Integer specifiedAllocationSize) {
+		Integer old = this.specifiedAllocationSize;
+		this.specifiedAllocationSize = specifiedAllocationSize;
+		this.firePropertyChanged(Generator.SPECIFIED_ALLOCATION_SIZE_PROPERTY, old, specifiedAllocationSize);
+	}
+
+	public int getDefaultAllocationSize() {
+		return Generator.DEFAULT_ALLOCATION_SIZE;
+	}
+
+
+	// ********** text ranges **********
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getSelectionTextRange(astRoot);
+	}
+
+	public TextRange getSelectionTextRange(CompilationUnit astRoot) {
+		return this.resourceGenerator.getTextRange(astRoot);
+	}
+	
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.resourceGenerator.getNameTextRange(astRoot);
+	}
+
+
+	// ********** resource => context **********
+
+	protected void initialize(GeneratorAnnotation generatorAnnotation) {
+		this.resourceGenerator = generatorAnnotation;
+		this.name = generatorAnnotation.getName();
+		this.specifiedInitialValue =  generatorAnnotation.getInitialValue();
+		this.specifiedAllocationSize = generatorAnnotation.getAllocationSize();
+	}
+	
+	protected void update(GeneratorAnnotation generatorAnnotation) {
+		this.resourceGenerator = generatorAnnotation;
+		this.setName_(generatorAnnotation.getName());
+		this.setSpecifiedInitialValue_(generatorAnnotation.getInitialValue());
+		this.setSpecifiedAllocationSize_(generatorAnnotation.getAllocationSize());
+		getPersistenceUnit().addGenerator(this);
+	}
+	
+
+	// ********** database stuff **********
+
+	public Schema getDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDbSchemaContainer() {
+		String catalog = this.getCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+	protected abstract String getSchema();
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDbCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+	protected abstract String getCatalog();
+
+
+	// ********** misc **********
+
+	public boolean isVirtual() {
+		return false;
+	}
+	
+	public boolean overrides(Generator generator) {
+		// java is at the base of the tree
+		return false;
+	}
+	
+	public boolean duplicates(Generator other) {
+		return (this != other)
+				&& ! StringTools.stringIsEmpty(this.name)
+				&& this.name.equals(other.getName())
+				&& ! this.overrides(other)
+				&& ! other.overrides(this);
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.name);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaIdMapping.java
new file mode 100644
index 0000000..68f52fe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaIdMapping.java
@@ -0,0 +1,472 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.context.java.JavaGeneratedValue;
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.IdMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.resource.java.IdAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaIdMapping
+	extends AbstractJavaAttributeMapping<IdAnnotation>
+	implements JavaIdMapping, IdMapping2_0
+{
+	protected final JavaColumn column;
+	
+	/* 2.0 feature - a relationship may map this id */
+	protected boolean mappedByRelationship;
+	
+	protected JavaGeneratedValue generatedValue;
+	
+	protected final JavaGeneratorContainer generatorContainer;
+	
+	protected JavaConverter converter;
+	
+	protected final JavaConverter nullConverter;
+	
+	
+	protected AbstractJavaIdMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.column = this.getJpaFactory().buildJavaColumn(this, this);
+		this.generatorContainer = this.buildGeneratorContainer();
+		this.nullConverter = getJpaFactory().buildJavaNullConverter(this);
+		this.converter = this.nullConverter;
+	}
+	
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.column.initialize(this.getResourceColumn());
+		this.mappedByRelationship = calculateMappedByRelationship();
+		this.generatorContainer.initialize(this.getResourcePersistentAttribute());
+		this.initializeGeneratedValue();
+		this.converter = this.buildConverter(this.getResourceConverterType());
+	}
+	
+	protected void initializeGeneratedValue() {
+		GeneratedValueAnnotation resourceGeneratedValue = this.getResourceGeneratedValue();
+		if (resourceGeneratedValue != null) {
+			this.generatedValue = this.buildGeneratedValue(resourceGeneratedValue);
+		}
+	}
+	
+	public ColumnAnnotation getResourceColumn() {
+		return (ColumnAnnotation) this.getResourcePersistentAttribute().
+				getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected boolean isColumnSpecified() {
+		return getResourcePersistentAttribute().getAnnotation(ColumnAnnotation.ANNOTATION_NAME) != null;
+	}
+	
+	private JavaGeneratorContainer buildGeneratorContainer() {
+		return this.getJpaFactory().buildJavaGeneratorContainer(this);
+	}
+	
+	
+	//************** JavaAttributeMapping implementation ***************
+	
+	public String getKey() {
+		return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return IdAnnotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.COLUMN);
+		names.add(JPA.GENERATED_VALUE);
+		names.add(JPA.TEMPORAL);
+		names.add(JPA.TABLE_GENERATOR);
+		names.add(JPA.SEQUENCE_GENERATOR);
+	}
+	
+	
+	//************** NamedColumn.Owner implementation ***************
+	
+	public String getDefaultColumnName() {
+		return (isMappedByRelationship() && ! isColumnSpecified()) ? null : getName();
+	}
+	
+	
+	//************** BaseColumn.Owner implementation ***************
+	
+	public String getDefaultTableName() {
+		return (isMappedByRelationship() && ! isColumnSpecified()) ? null : getTypeMapping().getPrimaryTableName();
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+	
+	public Iterator<String> candidateTableNames() {
+		return getTypeMapping().associatedTableNamesIncludingInherited();
+	}
+	
+	
+	//************** IdMapping implementation ***************
+	
+	public JavaColumn getColumn() {
+		return this.column;
+	}
+	
+	public JavaGeneratedValue addGeneratedValue() {
+		if (getGeneratedValue() != null) {
+			throw new IllegalStateException("gemeratedValue already exists"); //$NON-NLS-1$
+		}
+		this.generatedValue = getJpaFactory().buildJavaGeneratedValue(this);
+		GeneratedValueAnnotation generatedValueResource = 
+				(GeneratedValueAnnotation) getResourcePersistentAttribute().
+					addAnnotation(GeneratedValueAnnotation.ANNOTATION_NAME);
+		this.generatedValue.initialize(generatedValueResource);
+		firePropertyChanged(GENERATED_VALUE_PROPERTY, null, this.generatedValue);
+		return this.generatedValue;
+	}
+	
+	public void removeGeneratedValue() {
+		if (getGeneratedValue() == null) {
+			throw new IllegalStateException("gemeratedValue does not exist, cannot be removed"); //$NON-NLS-1$
+		}
+		JavaGeneratedValue oldGeneratedValue = this.generatedValue;
+		this.generatedValue = null;
+		getResourcePersistentAttribute().removeAnnotation(GeneratedValueAnnotation.ANNOTATION_NAME);
+		firePropertyChanged(GENERATED_VALUE_PROPERTY, oldGeneratedValue, null);
+	}
+	
+	public JavaGeneratedValue getGeneratedValue() {
+		return this.generatedValue;
+	}
+	
+	protected void setGeneratedValue(JavaGeneratedValue newGeneratedValue) {
+		JavaGeneratedValue oldGeneratedValue = this.generatedValue;
+		this.generatedValue = newGeneratedValue;
+		firePropertyChanged(GENERATED_VALUE_PROPERTY, oldGeneratedValue, newGeneratedValue);
+	}
+	
+	public JavaGeneratorContainer getGeneratorContainer() {
+		return this.generatorContainer;
+	}
+	
+	public JavaConverter getConverter() {
+		return this.converter;
+	}
+	
+	protected String getConverterType() {
+		return this.converter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		JavaConverter oldConverter = this.converter;
+		JavaConverter newConverter = buildConverter(converterType);
+		this.converter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.converter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(JavaConverter newConverter) {
+		JavaConverter oldConverter = this.converter;
+		this.converter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.column.update(this.getResourceColumn());
+		setMappedByRelationship(calculateMappedByRelationship());
+		this.generatorContainer.update(this.getResourcePersistentAttribute());
+		this.updateGeneratedValue();
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update(this.getResourcePersistentAttribute());
+		}
+		else {
+			JavaConverter javaConverter = buildConverter(getResourceConverterType());
+			setConverter(javaConverter);
+		}
+	}
+	
+	protected void updateGeneratedValue() {
+		GeneratedValueAnnotation resourceGeneratedValue = getResourceGeneratedValue();
+		if (resourceGeneratedValue == null) {
+			if (getGeneratedValue() != null) {
+				setGeneratedValue(null);
+			}
+		}
+		else {
+			if (getGeneratedValue() == null) {
+				setGeneratedValue(buildGeneratedValue(resourceGeneratedValue));
+			}
+			else {
+				getGeneratedValue().update(resourceGeneratedValue);
+			}
+		}
+	}
+	
+	protected JavaGeneratedValue buildGeneratedValue(GeneratedValueAnnotation resourceGeneratedValue) {
+		JavaGeneratedValue gv = getJpaFactory().buildJavaGeneratedValue(this);
+		gv.initialize(resourceGeneratedValue);
+		return gv;
+	}
+	
+	protected TableGeneratorAnnotation getResourceTableGenerator() {
+		return (TableGeneratorAnnotation) this.getResourcePersistentAttribute().
+				getAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected SequenceGeneratorAnnotation getResourceSequenceGenerator() {
+		return (SequenceGeneratorAnnotation) this.getResourcePersistentAttribute().
+				getAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected GeneratedValueAnnotation getResourceGeneratedValue() {
+		return (GeneratedValueAnnotation) this.getResourcePersistentAttribute().
+				getAnnotation(GeneratedValueAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected JavaConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;		
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getJpaFactory().buildJavaTemporalConverter(this, this.getResourcePersistentAttribute());
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.getResourcePersistentAttribute().getAnnotation(TemporalAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		return Converter.NO_CONVERTER;
+	}
+	
+	
+	// **************** IdMapping2_0 impl *************************************
+	
+	public boolean isMappedByRelationship() {
+		return this.mappedByRelationship;
+	}
+	
+	protected void setMappedByRelationship(boolean newValue) {
+		boolean oldValue = this.mappedByRelationship;
+		this.mappedByRelationship = newValue;
+		firePropertyChanged(MAPPED_BY_RELATIONSHIP_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean calculateMappedByRelationship() {
+		for (SingleRelationshipMapping2_0 each : getMapsIdRelationships()) {
+			if (getName().equals(each.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue())) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	// ********** code assist **********
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.generatorTouches(pos, astRoot)) {
+			result = this.persistenceGeneratorNames(filter);
+			if (result != null) {
+				return result;
+			}
+		}
+		result = this.getGeneratorContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = getConverter().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+	
+	
+	// ********** code assist: generator 
+	
+	protected boolean generatorTouches(int pos, CompilationUnit astRoot) {
+		if (getResourceGeneratedValue() != null) {
+			return this.getResourceGeneratedValue().generatorTouches(pos, astRoot);
+		}
+		return false;
+	}
+	
+	protected Iterator<String> persistenceGeneratorNames() {
+		if(this.getPersistenceUnit().generatorsSize() == 0) {
+			return EmptyIterator.<String> instance();
+		}
+		return CollectionTools.iterator(this.getPersistenceUnit().uniqueGeneratorNames());
+	}
+	
+	private Iterator<String> generatorNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.persistenceGeneratorNames(), filter);
+	}
+	
+	protected Iterator<String> persistenceGeneratorNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.generatorNames(filter));
+	}
+	
+	
+	// *************************************************************************
+	
+	@Override
+	public String getPrimaryKeyColumnName() {
+		return this.getColumn().getName();
+	}
+	
+	@Override
+	public boolean isOverridableAttributeMapping() {
+		return true;
+	}
+	
+	
+	//*********** Validation ************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		
+		// [JPA 2.0] if the column is specified, or if the id is not mapped by a relationship,
+		// then the column is validated.
+		// (In JPA 1.0, the column will always be validated, since the id is never mapped by a
+		//  relationship)
+		if (isColumnSpecified() || ! isMappedByRelationship()) {
+			this.getColumn().validate(messages, reporter, astRoot);
+		}
+		
+		// [JPA 2.0] if the column is specified and the id is mapped by a relationship, 
+		// then that is an error
+		// (In JPA 1.0, this will never be the case, since the id is never mapped by a relationship)
+		if (isColumnSpecified() && isMappedByRelationship()) {
+			messages.add(
+					buildMessage(
+						JpaValidationMessages.ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED,
+						new String[] {},
+						getColumn().getValidationTextRange(astRoot)));
+		}
+		
+		if (this.getGeneratedValue() != null) {
+			this.getGeneratedValue().validate(messages, reporter, astRoot);
+		}
+		this.getGeneratorContainer().validate(messages, reporter, astRoot);
+		this.getConverter().validate(messages, reporter, astRoot);
+	}
+	
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+			column,
+			textRange
+		);
+	}
+	
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+			new String[] {column.getName(), column.getDbTable().getName()}, 
+			column,
+			textRange
+		);
+	}
+	
+	/* TODO - move to AbstractOrmAttributeMapping? */
+	protected IMessage buildMessage(String msgID, String[] params, TextRange textRange) {
+		PersistentAttribute attribute = getPersistentAttribute();
+		String attributeDesc = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
+		
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				msgID,
+				ArrayTools.add(params, 0, attributeDesc),
+				this,
+				textRange);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaIdMappingDefinition.java
new file mode 100644
index 0000000..06fce4b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaIdMappingDefinition.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.IdAnnotation;
+
+public abstract class AbstractJavaIdMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	protected AbstractJavaIdMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return IdAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaIdMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.java
new file mode 100644
index 0000000..2b5c4f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaRelationshipMapping;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinColumnsAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public abstract class AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy 
+	extends AbstractJavaJoinColumnJoiningStrategy
+{
+
+	protected AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy(JavaJoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	@Override
+	public JavaJoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return (JavaJoinColumnEnabledRelationshipReference) super.getRelationshipReference();
+	}
+
+	@Override
+	public JavaRelationshipMapping getRelationshipMapping() {
+		return getRelationshipReference().getRelationshipMapping();
+	}
+
+	protected abstract Entity getRelationshipTargetEntity();
+
+	public String getColumnTableNotValidDescription() {
+		return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
+	}
+
+	public boolean isOverridableAssociation() {
+		return true;
+	}
+
+	protected JavaResourcePersistentAttribute getResourcePersistentAttribute() {
+		return getRelationshipMapping().getPersistentAttribute().getResourcePersistentAttribute();
+	}
+
+	@Override
+	protected Iterator<JoinColumnAnnotation> joinColumnAnnotations() {
+		return new TransformationIterator<NestableAnnotation, JoinColumnAnnotation>(
+			this.getResourcePersistentAttribute().annotations(
+					JoinColumnAnnotation.ANNOTATION_NAME, JoinColumnsAnnotation.ANNOTATION_NAME)) {
+				@Override
+				protected JoinColumnAnnotation transform(NestableAnnotation next) {
+					return (JoinColumnAnnotation) next;
+				}
+			};
+	}
+
+	@Override
+	protected JoinColumnAnnotation buildNullJoinColumnAnnotation() {
+		return new NullJoinColumnAnnotation(this.getResourcePersistentAttribute());
+	}
+
+	@Override
+	protected JoinColumnAnnotation addAnnotation(int index) {
+		return (JoinColumnAnnotation) this.getResourcePersistentAttribute().
+			addAnnotation(
+				index, 
+				JoinColumnAnnotation.ANNOTATION_NAME, 
+				JoinColumnsAnnotation.ANNOTATION_NAME);
+	}
+
+	@Override
+	protected void removeAnnotation(int index) {
+		this.getResourcePersistentAttribute().
+			removeAnnotation(
+				index, 
+				JoinColumnAnnotation.ANNOTATION_NAME, 
+				JoinColumnsAnnotation.ANNOTATION_NAME);
+	}
+
+	@Override
+	protected void moveAnnotation(int targetIndex, int sourceIndex) {
+		this.getResourcePersistentAttribute().
+			moveAnnotation(
+				targetIndex, 
+				sourceIndex, 
+				JoinColumnsAnnotation.ANNOTATION_NAME);
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getRelationshipReference().getValidationTextRange(astRoot);
+	}
+
+
+	protected class JoinColumnOwner 
+		implements JavaJoinColumn.Owner 
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+
+
+		/**
+		 * by default, the join column is in the type mapping's primary table
+		 */
+		public String getDefaultTableName() {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.getTableName();
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public String getAttributeName() {
+			return getRelationshipMapping().getName();
+		}
+
+		public PersistentAttribute getPersistentAttribute() {
+			return getRelationshipMapping().getPersistentAttribute();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.getRelationshipSource();
+		}
+
+		public Entity getRelationshipTarget() {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.getRelationshipTargetEntity();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.tableNameIsInvalid(tableName);
+		}
+
+		/**
+		 * the join column can be on a secondary table
+		 */
+		public Iterator<String> candidateTableNames() {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.candidateTableNames();
+		}
+
+		public Table getDbTable(String tableName) {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.getDbTable(tableName);
+		}
+
+		public Table getReferencedColumnDbTable() {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.getReferencedColumnDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.defaultJoinColumn == joinColumn;
+		}
+
+		public int joinColumnsSize() {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.joinColumnsSize();
+		}
+
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy.this.getValidationTextRange(astRoot);
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column,
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..cdc4596
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinColumnJoiningStrategy.java
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaJoinColumnJoiningStrategy 
+	extends AbstractJavaJpaContextNode
+	implements JavaJoinColumnJoiningStrategy
+{
+	protected JavaJoinColumn defaultJoinColumn;
+	
+	protected final Vector<JavaJoinColumn> specifiedJoinColumns = new Vector<JavaJoinColumn>();
+	protected final JavaJoinColumn.Owner joinColumnOwner;
+	
+	
+	protected AbstractJavaJoinColumnJoiningStrategy(JoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+	}
+	
+	protected abstract JavaJoinColumn.Owner buildJoinColumnOwner();
+	
+	public void initializeFrom(JoinColumnJoiningStrategy oldStrategy) {
+		for (JoinColumn joinColumn : CollectionTools.iterable(oldStrategy.joinColumns())) {
+			JoinColumn newJoinColumn = this.addSpecifiedJoinColumn(this.specifiedJoinColumnsSize());
+			newJoinColumn.setSpecifiedName(joinColumn.getName());
+			newJoinColumn.setSpecifiedReferencedColumnName(joinColumn.getReferencedColumnName());			
+		}
+	}
+
+	@Override
+	public JoinColumnEnabledRelationshipReference getParent() {
+		return (JoinColumnEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public String getTableName() {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? null : typeMapping.getPrimaryTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? null : typeMapping.getDbTable(tableName);
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? false : typeMapping.tableNameIsInvalid(tableName);
+	}
+
+	protected Iterator<String> candidateTableNames() {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? EmptyIterator.<String> instance() : typeMapping.associatedTableNamesIncludingInherited();
+	}
+	
+	public void addStrategy() {
+		if (specifiedJoinColumnsSize() == 0) {
+			addSpecifiedJoinColumn(0);
+		}
+	}
+	
+	public void removeStrategy() {
+		for (JoinColumn each : CollectionTools.iterable(specifiedJoinColumns())) {
+			removeSpecifiedJoinColumn(each);
+		}
+	}
+
+	public Table getReferencedColumnDbTable() {
+		TypeMapping relationshipTarget = getRelationshipTarget();
+		return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
+	}
+	
+	// **************** join columns *******************************************
+	
+	public ListIterator<JavaJoinColumn> joinColumns() {
+		return this.hasSpecifiedJoinColumns() ? 
+			this.specifiedJoinColumns() : this.defaultJoinColumns();
+	}
+	
+	public int joinColumnsSize() {
+		return this.hasSpecifiedJoinColumns() ? 
+			this.specifiedJoinColumnsSize() : this.defaultJoinColumnsSize();
+	}
+	
+	
+	// **************** default join column ************************************
+	
+	public JavaJoinColumn getDefaultJoinColumn() {
+		return this.defaultJoinColumn;
+	}
+	
+	protected void setDefaultJoinColumn(JavaJoinColumn column) {
+		JavaJoinColumn old = this.defaultJoinColumn;
+		this.defaultJoinColumn = column;
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, column);
+	}
+
+	protected ListIterator<JavaJoinColumn> defaultJoinColumns() {
+		if (this.defaultJoinColumn != null) {
+			return new SingleElementListIterator<JavaJoinColumn>(this.defaultJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+	
+	protected int defaultJoinColumnsSize() {
+		return (this.defaultJoinColumn == null) ? 0 : 1;
+	}
+	
+	
+	// **************** specified join columns *********************************
+	
+	public ListIterator<JavaJoinColumn> specifiedJoinColumns() {
+		return new CloneListIterator<JavaJoinColumn>(this.specifiedJoinColumns);
+	}
+	
+	public int specifiedJoinColumnsSize() {
+		return this.specifiedJoinColumns.size();
+	}
+	
+	public boolean hasSpecifiedJoinColumns() {
+		return ! this.specifiedJoinColumns.isEmpty();
+	}
+	
+	public JavaJoinColumn addSpecifiedJoinColumn(int index) {
+		// Clear out the default now so it doesn't get removed during an update and
+		// cause change notifications to be sent to the UI in the wrong order.
+		JavaJoinColumn oldDefault = this.defaultJoinColumn;
+		this.defaultJoinColumn = null;
+
+		JavaJoinColumn joinColumn = this.getJpaFactory().buildJavaJoinColumn(this, this.joinColumnOwner);
+		this.specifiedJoinColumns.add(index, joinColumn);
+		JoinColumnAnnotation joinColumnAnnotation = this.addAnnotation(index);
+		joinColumn.initialize(joinColumnAnnotation);
+		this.fireItemAdded(SPECIFIED_JOIN_COLUMNS_LIST, index, joinColumn);
+
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, oldDefault, null);
+		return joinColumn;
+	}
+
+	protected void addSpecifiedJoinColumn(int index, JavaJoinColumn joinColumn) {
+		addItemToList(index, joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+
+	protected void addSpecifiedJoinColumn(JavaJoinColumn joinColumn) {
+		addSpecifiedJoinColumn(this.specifiedJoinColumns.size(), joinColumn);
+	}
+
+	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
+		removeSpecifiedJoinColumn(this.specifiedJoinColumns.indexOf(joinColumn));
+	}
+	
+	public void removeSpecifiedJoinColumn(int index) {
+		JavaJoinColumn removedJoinColumn = this.specifiedJoinColumns.remove(index);
+		if (this.specifiedJoinColumns.isEmpty()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultJoinColumn = buildJoinColumn(buildNullJoinColumnAnnotation());
+		}
+		removeAnnotation(index);
+		fireItemRemoved(SPECIFIED_JOIN_COLUMNS_LIST, index, removedJoinColumn);
+		if (this.defaultJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, null, this.defaultJoinColumn);		
+		}
+	}
+
+	protected void removeSpecifiedJoinColumn_(JavaJoinColumn joinColumn) {
+		removeItemFromList(joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+	
+	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedJoinColumns, targetIndex, sourceIndex);
+		moveAnnotation(targetIndex, sourceIndex);
+		fireItemMoved(SPECIFIED_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	protected abstract JoinColumnAnnotation addAnnotation(int index);
+	
+	protected abstract void removeAnnotation(int index);
+	
+	protected abstract void moveAnnotation(int targetIndex, int sourceIndex);
+	
+	protected abstract Iterator<JoinColumnAnnotation> joinColumnAnnotations();
+	
+	protected abstract JoinColumnAnnotation buildNullJoinColumnAnnotation();
+	
+	
+	// **************** resource => context ************************************
+
+	public void initialize() {
+		initializeSpecifiedJoinColumns();
+		initializeDefaultJoinColumn();
+	}
+	
+	protected void initializeSpecifiedJoinColumns() {
+		Iterator<JoinColumnAnnotation> annotations = joinColumnAnnotations();
+		while (annotations.hasNext()) {
+			this.specifiedJoinColumns.add(buildJoinColumn(annotations.next()));
+		}
+	}
+	
+	public void initializeDefaultJoinColumn() {
+		if (mayHaveDefaultJoinColumn()) {
+			this.defaultJoinColumn = 
+				buildJoinColumn(buildNullJoinColumnAnnotation());
+		}
+	}
+	
+	public void update() {
+		updateSpecifiedJoinColumns();
+		updateDefaultJoinColumn();
+	}
+	
+	protected void updateSpecifiedJoinColumns() {
+		ListIterator<JavaJoinColumn> joinColumns = specifiedJoinColumns();
+		Iterator<JoinColumnAnnotation> resourceJoinColumns = joinColumnAnnotations();
+		
+		while (joinColumns.hasNext()) {
+			JavaJoinColumn joinColumn = joinColumns.next();
+			if (resourceJoinColumns.hasNext()) {
+				joinColumn.update(resourceJoinColumns.next());
+			}
+			else {
+				removeSpecifiedJoinColumn_(joinColumn);
+			}
+		}
+		
+		while (resourceJoinColumns.hasNext()) {
+			addSpecifiedJoinColumn(buildJoinColumn(resourceJoinColumns.next()));
+		}
+	}
+	
+	protected void updateDefaultJoinColumn() {
+		if (mayHaveDefaultJoinColumn()) {
+			JoinColumnAnnotation nullAnnotation = buildNullJoinColumnAnnotation();
+			if (this.defaultJoinColumn == null) {
+				setDefaultJoinColumn(this.buildJoinColumn(nullAnnotation));
+			}
+			this.defaultJoinColumn.update(nullAnnotation);
+		}
+		else {
+			if (this.defaultJoinColumn != null) {
+				setDefaultJoinColumn(null);
+			}
+		}
+	}
+	
+	protected boolean mayHaveDefaultJoinColumn() {
+		return getRelationshipReference().mayHaveDefaultJoinColumn()
+			&& ! hasSpecifiedJoinColumns();
+	}
+
+	protected JavaJoinColumn buildJoinColumn(JoinColumnAnnotation joinColumnResource) {
+		JavaJoinColumn joinColumn = getJpaFactory().buildJavaJoinColumn(this, this.joinColumnOwner);
+		joinColumn.initialize(joinColumnResource);
+		return joinColumn;
+	}
+	
+	
+	// **************** Java completion proposals ******************************
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaJoinColumn column : CollectionTools.iterable(this.joinColumns())) {
+			result = column.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		for (Iterator<JavaJoinColumn> stream = this.joinColumns(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter, astRoot);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..b0a729d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJoinTableJoiningStrategy.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinTable;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaJoinTableJoiningStrategy 
+	extends AbstractJavaJpaContextNode
+	implements JavaJoinTableJoiningStrategy
+{
+	protected JavaJoinTable joinTable;
+	
+	
+	protected AbstractJavaJoinTableJoiningStrategy(JoinTableEnabledRelationshipReference parent) {
+		super(parent);
+	}
+	
+	
+	@Override
+	public JoinTableEnabledRelationshipReference getParent() {
+		return (JoinTableEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JoinTableEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public String getTableName() {
+		return getJoinTable().getName();
+	}
+
+	public Table getDbTable(String tableName) {
+		return getJoinTable().getDbTable();
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return !StringTools.stringsAreEqual(getTableName(), tableName);
+	}
+
+	public String getColumnTableNotValidDescription() {
+		return JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE;
+	}
+
+	public String getJoinTableDefaultName() {
+		return MappingTools.buildJoinTableDefaultName(this.getRelationshipReference());
+	}
+
+	public void addStrategy() {
+		if (this.joinTable == null) {
+			this.joinTable = getJpaFactory().buildJavaJoinTable(this);
+			addAnnotation();
+			this.firePropertyChanged(JOIN_TABLE_PROPERTY, null, this.joinTable);
+		}
+	}
+	
+	public void removeStrategy() {
+		if (this.joinTable != null) {
+			JavaJoinTable oldJoinTable = this.joinTable;
+			this.joinTable = null;
+			removeAnnotation();
+			this.firePropertyChanged(JOIN_TABLE_PROPERTY, oldJoinTable, null);
+		}
+	}
+			
+	public void initializeFrom(JoinTableJoiningStrategy oldStrategy) {
+		JoinTable oldJoinTable = oldStrategy.getJoinTable();
+		if (oldJoinTable != null) {
+			this.addStrategy();
+			this.getJoinTable().setSpecifiedCatalog(oldJoinTable.getSpecifiedCatalog());
+			this.getJoinTable().setSpecifiedSchema(oldJoinTable.getSpecifiedSchema());
+			this.getJoinTable().setSpecifiedName(oldJoinTable.getSpecifiedName());
+		}
+	}
+	
+	
+	// **************** join table *********************************************
+	
+	public JavaJoinTable getJoinTable() {
+		return this.joinTable;
+	}
+	
+	protected void setJoinTable_(JavaJoinTable newJoinTable) {
+		JavaJoinTable oldJoinTable = this.joinTable;
+		this.joinTable = newJoinTable;
+		this.firePropertyChanged(JOIN_TABLE_PROPERTY, oldJoinTable, newJoinTable);
+	}
+	
+	protected abstract JoinTableAnnotation addAnnotation();
+	
+	protected abstract void removeAnnotation();
+	
+	protected boolean mayHaveJoinTable() {
+		return getAnnotation().isSpecified() 
+			|| getRelationshipReference().mayHaveDefaultJoinTable();
+	}
+
+
+	// **************** resource => context ************************************
+
+	public void initialize() {
+		JoinTableAnnotation annotation = getAnnotation();
+		if (mayHaveJoinTable()) {
+			this.joinTable = getJpaFactory().buildJavaJoinTable(this);
+			this.joinTable.initialize(annotation);
+		}
+	}
+	
+	public void update() {
+		JoinTableAnnotation annotation = getAnnotation();
+		if (mayHaveJoinTable()) {
+			if (this.joinTable == null) {
+				setJoinTable_(getJpaFactory().buildJavaJoinTable(this));
+			}
+			this.joinTable.update(annotation);
+		}
+		else {
+			if (this.joinTable != null) {
+				// no annotation, so no clean up
+				setJoinTable_(null);
+			}
+		}
+	}
+	
+	// **************** Java completion proposals ******************************
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null && this.joinTable != null) {
+			result = this.joinTable.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		if (this.joinTable != null) {
+			this.joinTable.validate(messages, reporter, astRoot);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJpaContextNode.java
new file mode 100644
index 0000000..8a55d4a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaJpaContextNode.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.AbstractJpaContextNode;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaJpaContextNode
+	extends AbstractJpaContextNode
+	implements JavaJpaContextNode
+{
+	// ********** constructor **********
+
+	protected AbstractJavaJpaContextNode(JpaContextNode parent) {
+		super(parent);
+	}
+	
+	@Override
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
+	}
+	
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		if (this.connectionProfileIsActive()) {
+			Iterator<String> result = this.connectedJavaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * This method is called if the database is connected, allowing us to
+	 * get candidates from the various database tables etc.
+	 * This method should NOT be cascaded to "child" objects; it should
+	 * only return candidates for the current object. The cascading is
+	 * handled by #javaCompletionProposals(int, Filter, CompilationUnit).
+	 */
+	@SuppressWarnings("unused")
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		return null;
+	}
+	
+	// ********** validation **********
+	
+	/**
+	 * All subclass implementations {@link #validate(List, CompilationUnit))} 
+	 * should be preceded by a "super" call to this method
+	 */
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (reporter.isCancelled()) {
+			throw new ValidationCancelledException();
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToManyMapping.java
new file mode 100644
index 0000000..87f4be9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToManyMapping.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaManyToManyRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.ManyToManyAnnotation;
+
+
+public abstract class AbstractJavaManyToManyMapping
+	extends AbstractJavaMultiRelationshipMapping<ManyToMany2_0Annotation>
+	implements JavaManyToManyMapping2_0
+{
+	protected AbstractJavaManyToManyMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+	
+	@Override
+	protected JavaRelationshipReference buildRelationshipReference() {
+		return new GenericJavaManyToManyRelationshipReference(this);
+	}
+		
+	public String getAnnotationName() {
+		return ManyToManyAnnotation.ANNOTATION_NAME;
+	}
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	@Override
+	public JavaManyToManyRelationshipReference getRelationshipReference() {
+		return (JavaManyToManyRelationshipReference) super.getRelationshipReference();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToOneMapping.java
new file mode 100644
index 0000000..38b7e7d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToOneMapping.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+
+
+public abstract class AbstractJavaManyToOneMapping
+	extends AbstractJavaSingleRelationshipMapping<ManyToOne2_0Annotation>
+	implements JavaManyToOneMapping2_0
+{
+	protected AbstractJavaManyToOneMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+	
+	public String getAnnotationName() {
+		return ManyToOneAnnotation.ANNOTATION_NAME;
+	}
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	@Override
+	public JavaManyToOneRelationshipReference2_0 getRelationshipReference() {
+		return (JavaManyToOneRelationshipReference2_0) super.getRelationshipReference();
+	}
+		
+	@Override
+	protected Boolean getResourceOptional() {
+		return this.mappingAnnotation.getOptional();
+	}
+	
+	@Override
+	protected void setResourceOptional(Boolean newOptional) {
+		this.mappingAnnotation.setOptional(newOptional);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToOneRelationshipReference.java
new file mode 100644
index 0000000..3146348
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaManyToOneRelationshipReference.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneRelationshipReference2_0;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaManyToOneRelationshipReference
+	extends AbstractJavaRelationshipReference
+	implements JavaManyToOneRelationshipReference2_0
+{
+	protected final JavaJoinColumnJoiningStrategy joinColumnJoiningStrategy;
+
+	protected final JavaJoinTableJoiningStrategy joinTableJoiningStrategy;
+
+
+	protected AbstractJavaManyToOneRelationshipReference(JavaManyToOneMapping parent) {
+		super(parent);
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+	}
+	
+	
+	protected JavaJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericJavaJoinColumnJoiningStrategy(this);
+	}
+
+	protected abstract JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy();
+	
+	@Override
+	public JavaManyToOneMapping getRelationshipMapping() {
+		return (JavaManyToOneMapping) getParent();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return true;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return false;
+	}
+		
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null) {
+			result = this.joinColumnJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.joinTableJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	
+	// **************** join columns *******************************************
+	
+	public JavaJoinColumnJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+	
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+	
+	public void setJoinColumnJoiningStrategy() {
+		// join columns are default (and only, so far) strategy, so no need
+		// to add to resource model
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinColumn() {
+		return this.getJoinTableJoiningStrategy().getJoinTable() == null;
+	}
+
+	
+	// **************** join table *********************************************
+	
+	public JavaJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public final void setJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.addStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public final void unsetJoinTableJoiningStrategy() {
+		unsetJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetJoinTableJoiningStrategy_() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return false;
+	}	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.joinTableJoiningStrategy.initialize();
+		// initialize join column strategy last, as the existence of a default 
+		// join column is dependent on the other mechanisms (join table) not 
+		// being specified
+		this.joinColumnJoiningStrategy.initialize();
+	}
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.joinTableJoiningStrategy.update();
+		// update join column strategy last, as the existence of a default join 
+		// column is dependent on the other mechanisms (join table) not being 
+		// specified
+		this.joinColumnJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.joinColumnJoiningStrategy.validate(messages, reporter, astRoot);
+		this.joinTableJoiningStrategy.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMappedSuperclass.java
new file mode 100644
index 0000000..1896ae1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMappedSuperclass.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.MappedSuperclassAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaMappedSuperclass extends AbstractJavaTypeMapping
+	implements JavaMappedSuperclass
+{
+	protected final JavaIdClassReference idClassReference;
+	
+	
+	protected AbstractJavaMappedSuperclass(JavaPersistentType parent) {
+		super(parent);
+		this.idClassReference = buildIdClassReference();
+	}
+	
+	
+	protected GenericJavaIdClassReference buildIdClassReference() {
+		return new GenericJavaIdClassReference(this);
+	}
+	
+	public JavaIdClassReference getIdClassReference() {
+		return this.idClassReference;
+	}
+	
+	public boolean isMapped() {
+		return true;
+	}
+	
+	@Override
+	public JavaPersistentType getIdClass() {
+		return this.idClassReference.getIdClass();
+	}
+
+	public String getKey() {
+		return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
+	}
+
+	public String getAnnotationName() {
+		return MappedSuperclassAnnotation.ANNOTATION_NAME;
+	}
+	
+	public Iterable<String> getSupportingAnnotationNames() {
+		return SUPPORTING_ANNOTATION_NAMES;
+	}
+	
+	protected static final String[] SUPPORTING_ANNOTATION_NAMES_ARRAY = new String[] {
+			JPA.ID_CLASS,
+			JPA.EXCLUDE_DEFAULT_LISTENERS,
+			JPA.EXCLUDE_SUPERCLASS_LISTENERS,
+			JPA.ENTITY_LISTENERS,
+			JPA.PRE_PERSIST,
+			JPA.POST_PERSIST,
+			JPA.PRE_REMOVE,
+			JPA.POST_REMOVE,
+			JPA.PRE_UPDATE,
+			JPA.POST_UPDATE,
+			JPA.POST_LOAD
+	};
+	
+	protected static final Iterable<String> SUPPORTING_ANNOTATION_NAMES = new ArrayIterable<String>(SUPPORTING_ANNOTATION_NAMES_ARRAY);
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return false;
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+	
+	@Override
+	public void initialize(JavaResourcePersistentType persistentTypeResource) {
+		super.initialize(persistentTypeResource);
+		this.idClassReference.initialize();
+	}
+	
+	@Override
+	public void update(JavaResourcePersistentType persistentTypeResource) {
+		super.update(persistentTypeResource);
+		this.idClassReference.update();
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		validatePrimaryKey(messages, reporter, astRoot);
+	}
+	
+	protected void validatePrimaryKey(
+			List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		
+		buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
+	}
+	
+	protected PrimaryKeyValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
+		return new GenericMappedSuperclassPrimaryKeyValidator(this, buildTextRangeResolver(astRoot));
+		// TODO - JPA 2.0 validation
+	}
+	
+	protected PrimaryKeyTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
+		return new JavaMappedSuperclassTextRangeResolver(this, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
new file mode 100644
index 0000000..9715f81
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
@@ -0,0 +1,860 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaMultiRelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaOrderable;
+import org.eclipse.jpt.core.context.java.JavaOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.jpa2.context.java.NullJavaMapKeyColumn2_0;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java multi-relationship (m:m, 1:m) mapping
+ */
+public abstract class AbstractJavaMultiRelationshipMapping<T extends RelationshipMapping2_0Annotation>
+	extends AbstractJavaRelationshipMapping<T> 
+	implements JavaMultiRelationshipMapping, JavaCollectionMapping2_0
+{
+	protected final JavaOrderable orderable;
+
+	protected Embeddable resolvedTargetEmbeddable;
+
+	protected Type valueType;
+	protected Type keyType;
+
+	protected String specifiedMapKey;
+	protected boolean noMapKey = false;
+	protected boolean pkMapKey = false;
+	protected boolean customMapKey = false;
+
+	protected String specifiedMapKeyClass;
+	protected String defaultMapKeyClass;
+	protected String fullyQualifiedMapKeyClass;
+	protected PersistentType resolvedMapKeyType;
+	protected Embeddable resolvedMapKeyEmbeddable;
+	protected Entity resolvedMapKeyEntity;
+
+	protected final JavaColumn mapKeyColumn;
+
+	protected final JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer;
+
+	protected AbstractJavaMultiRelationshipMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.orderable = this.buildOrderable();
+		this.mapKeyColumn = this.buildMapKeyColumn();
+		this.mapKeyAttributeOverrideContainer = this.getJpaFactory().buildJavaAttributeOverrideContainer(this, new MapKeyAttributeOverrideContainerOwner());
+	}
+
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.orderable.initialize();
+		this.resolvedTargetType = this.resolveTargetType();
+		this.resolvedTargetEmbeddable = this.resolveTargetEmbeddable();
+		this.initializeValueType();
+		this.defaultMapKeyClass = this.buildDefaultMapKeyClass();
+		this.specifiedMapKeyClass = this.getResourceMapKeyClass();
+		this.fullyQualifiedMapKeyClass = this.buildFullyQualifiedMapKeyClass();
+		this.resolvedMapKeyType = this.resolveMapKeyType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.resolvedMapKeyEmbeddable = this.resolveMapKeyEmbeddable();
+		this.resolvedMapKeyEntity = this.resolveMapKeyEntity();
+		this.initializeKeyType();
+		this.initializeMapKey();
+		this.initializeMapKeyColumn();
+		this.mapKeyAttributeOverrideContainer.initialize(getResourcePersistentAttribute());
+	}
+
+	@Override
+	protected void update() {
+		super.update();
+		this.orderable.update();
+		this.resolvedTargetType = this.resolveTargetType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.resolvedTargetEmbeddable = this.resolveTargetEmbeddable();
+		this.updateValueType();
+		this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
+		this.setSpecifiedMapKeyClass_(this.getResourceMapKeyClass());
+		this.setFullyQualifiedMapKeyClass(this.buildFullyQualifiedMapKeyClass());
+		this.resolvedMapKeyType = this.resolveMapKeyType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.setResolvedMapKeyEmbeddable(this.resolveMapKeyEmbeddable());
+		this.setResolvedMapKeyEntity(this.resolveMapKeyEntity());
+		this.updateKeyType();
+		this.updateMapKey();
+		this.updateMapKeyColumn();
+		this.mapKeyAttributeOverrideContainer.update(getResourcePersistentAttribute());
+	}
+
+	// ********** AbstractJavaAttributeMapping implementation **********  
+
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.JOIN_TABLE);
+		names.add(JPA.MAP_KEY);
+		names.add(JPA.ORDER_BY);
+		if (this.isJpa2_0Compatible()) {
+			names.add(JPA.ATTRIBUTE_OVERRIDE);
+			names.add(JPA.ATTRIBUTE_OVERRIDES);
+			names.add(JPA2_0.MAP_KEY_CLASS);
+			names.add(JPA2_0.MAP_KEY_COLUMN);
+			names.add(JPA2_0.MAP_KEY_ENUMERATED);
+			names.add(JPA2_0.MAP_KEY_JOIN_COLUMN);
+			names.add(JPA2_0.MAP_KEY_JOIN_COLUMNS);
+			names.add(JPA2_0.MAP_KEY_TEMPORAL);
+			names.add(JPA2_0.ORDER_COLUMN);
+		}
+	}
+
+	// ********** AbstractJavaRelationshipMapping implementation **********  
+
+	@Override
+	protected String buildDefaultTargetEntity() {
+		return this.getPersistentAttribute().getMultiReferenceTargetTypeName();
+	}
+
+
+	// ********** ordering **********  
+	
+	protected JavaOrderable buildOrderable() {
+		return this.isJpa2_0Compatible() ? 
+			this.getJpaFactory().buildJavaOrderable(this, this.buildOrderableOwner()) : 
+			this.getJpaFactory().buildJavaOrderable(this, new Orderable.Owner() {/*nothing*/});
+	}
+
+	public JavaOrderable getOrderable() {
+		return this.orderable;
+	}
+
+	protected Orderable2_0.Owner buildOrderableOwner() {
+		return new Orderable2_0.Owner() {
+			public String getTableName() {
+				return getRelationshipReference().getPredominantJoiningStrategy().getTableName();
+			}
+			public Table getDbTable(String tableName) {
+				return getRelationshipReference().getPredominantJoiningStrategy().getDbTable(tableName);
+			}
+		};
+	}
+	
+	// ********** Fetchable implementation **********  
+
+	public FetchType getDefaultFetch() {
+		return DEFAULT_FETCH_TYPE;
+	}
+
+
+	// ********** CollectionMapping implementation **********  
+
+	protected Embeddable resolveTargetEmbeddable() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	public Type getValueType() {
+		return this.valueType;
+	}
+
+	protected void setValueType(Type newValueType) {
+		Type old = this.valueType;
+		this.valueType = newValueType;
+		firePropertyChanged(VALUE_TYPE_PROPERTY, old, newValueType);
+	}
+
+	protected void initializeValueType() {
+		this.valueType = this.buildValueType();
+	}
+
+	protected void updateValueType() {
+		this.setValueType(this.buildValueType()); 
+	}
+
+	protected Type buildValueType() {
+		if (this.getResolvedTargetEntity() != null) {
+			return Type.ENTITY_TYPE;
+		}
+		else if (this.resolvedTargetEmbeddable != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		else if (getTargetEntity() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	public Type getKeyType() {
+		return this.keyType;
+	}
+
+	protected void setKeyType(Type newKeyType) {
+		Type old = this.keyType;
+		this.keyType = newKeyType;
+		firePropertyChanged(KEY_TYPE_PROPERTY, old, newKeyType);
+	}
+
+	protected void initializeKeyType() {
+		this.keyType = this.buildKeyType();
+	}
+
+	protected void updateKeyType() {
+		this.setKeyType(this.buildKeyType());
+	}
+
+	protected Type buildKeyType() {
+		if (getResolvedMapKeyEmbeddable() != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		if (getResolvedMapKeyEntity() != null) {
+			return Type.ENTITY_TYPE; 
+		}
+		else if (getMapKeyClass() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	public Embeddable getResolvedMapKeyEmbeddable() {
+		return this.resolvedMapKeyEmbeddable;
+	}
+
+	protected void setResolvedMapKeyEmbeddable(Embeddable embeddable) {
+		Embeddable old = this.resolvedMapKeyEmbeddable;
+		this.resolvedMapKeyEmbeddable = embeddable;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_EMBEDDABLE_PROPERTY, old, embeddable);
+	}
+
+	public Entity getResolvedMapKeyEntity() {
+		return this.resolvedMapKeyEntity;
+	}
+
+	protected void setResolvedMapKeyEntity(Entity entity) {
+		Entity old = this.resolvedMapKeyEntity;
+		this.resolvedMapKeyEntity = entity;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_ENTITY_PROPERTY, old, entity);
+	}
+
+	public PersistentType getResolvedMapKeyType() {
+		return getResolvedMapKeyEmbeddable() == null ? null : getResolvedMapKeyEmbeddable().getPersistentType();
+	}
+
+	protected PersistentType resolveMapKeyType() {
+		return (this.fullyQualifiedMapKeyClass == null) ? null : this.getPersistenceUnit().getPersistentType(this.fullyQualifiedMapKeyClass);
+	}
+
+	protected Embeddable resolveMapKeyEmbeddable() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	protected Entity resolveMapKeyEntity() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+	// ********** map key **********  
+
+	public String getMapKey() {
+		if (this.noMapKey) {
+			return null;
+		}
+		if (this.pkMapKey) {
+			return this.getTargetEntityIdAttributeName();
+		}
+		if (this.customMapKey) {
+			return this.specifiedMapKey;
+		}
+		throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
+	}
+
+	public String getSpecifiedMapKey() {
+		return this.specifiedMapKey;
+	}
+
+	public void setSpecifiedMapKey(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (mapKey == null) {
+			if (mapKeyAnnotation != null) {
+				this.removeMapKeyAnnotation();
+			}
+		} else {
+			if (mapKeyAnnotation == null) {
+				mapKeyAnnotation = this.addMapKeyAnnotation();
+			}
+			mapKeyAnnotation.setName(mapKey);
+		}
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+
+	protected void setSpecifiedMapKey_(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+
+	protected void initializeMapKey() {
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (mapKeyAnnotation == null) {
+			this.noMapKey = true;
+		} else {
+			this.specifiedMapKey = mapKeyAnnotation.getName();
+			if (this.specifiedMapKey == null) {
+				this.pkMapKey = true;
+			} else {
+				this.customMapKey = true;
+			}
+		}
+	}
+
+	protected void updateMapKey() {
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (mapKeyAnnotation == null) {
+			this.setSpecifiedMapKey_(null);
+			this.setNoMapKey_(true);
+			this.setPkMapKey_(false);
+			this.setCustomMapKey_(false);
+		} else {
+			String mk = mapKeyAnnotation.getName();
+			this.setSpecifiedMapKey_(mk);
+			this.setNoMapKey_(false);
+			this.setPkMapKey_(mk == null);
+			this.setCustomMapKey_(mk != null);
+		}
+	}
+
+	protected MapKeyAnnotation getMapKeyAnnotation() {
+		return (MapKeyAnnotation) this.getResourcePersistentAttribute().getAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+	protected MapKeyAnnotation addMapKeyAnnotation() {
+		return (MapKeyAnnotation) this.getResourcePersistentAttribute().addAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+	protected void removeMapKeyAnnotation() {
+		this.getResourcePersistentAttribute().removeAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+	protected boolean mapKeyNameTouches(int pos, CompilationUnit astRoot) {
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		return (mapKeyAnnotation != null) && mapKeyAnnotation.nameTouches(pos, astRoot);
+	}
+
+
+	// ********** no map key **********  
+
+	public boolean isNoMapKey() {
+		return this.noMapKey;
+	}
+
+	public void setNoMapKey(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		if (noMapKey) {
+			if (this.getMapKeyAnnotation() != null) {
+				this.removeMapKeyAnnotation();
+			}
+		} else {
+			// the 'noMapKey' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setNoMapKey_(boolean)
+		}
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);
+	}
+
+	protected void setNoMapKey_(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);	
+	}
+
+
+	// ********** pk map key **********  
+
+	public boolean isPkMapKey() {
+		return this.pkMapKey;
+	}
+
+	public void setPkMapKey(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (pkMapKey) {
+			if (mapKeyAnnotation == null) {
+				this.addMapKeyAnnotation();
+			} else {
+				mapKeyAnnotation.setName(null);
+			}
+		} else {
+			// the 'pkMapKey' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setPkMapKey_(boolean)
+		}
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
+	}
+
+	protected void setPkMapKey_(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
+	}
+
+
+	// ********** custom map key **********  
+
+	public boolean isCustomMapKey() {
+		return this.customMapKey;
+	}
+
+	public void setCustomMapKey(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		if (customMapKey) {
+			this.setSpecifiedMapKey(""); //$NON-NLS-1$
+		} else {
+			// the 'customMapKey' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setCustomMapKey_(boolean)
+		}
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+
+	protected void setCustomMapKey_(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+
+
+	// *************** map key class *************
+
+	public String getMapKeyClass() {
+		return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
+	}
+
+	public String getSpecifiedMapKeyClass() {
+		return this.specifiedMapKeyClass;
+	}
+
+	public void setSpecifiedMapKeyClass(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		MapKeyClass2_0Annotation mapKeyClassAnnotation = this.getMapKeyClassAnnotation();
+		if (mapKeyClass == null) {
+			if (mapKeyClassAnnotation != null) {
+				this.removeMapKeyClassAnnotation();
+			}
+		} else {
+			if (mapKeyClassAnnotation == null) {
+				mapKeyClassAnnotation = this.addMapKeyClassAnnotation();
+			}
+			mapKeyClassAnnotation.setValue(mapKeyClass);
+		}
+
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected void setSpecifiedMapKeyClass_(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String getResourceMapKeyClass() {
+		MapKeyClass2_0Annotation annotation = getMapKeyClassAnnotation();
+		return annotation == null ? null : annotation.getValue();
+	}
+
+	public String getDefaultMapKeyClass() {
+		return this.defaultMapKeyClass;
+	}
+
+	protected void setDefaultMapKeyClass(String mapKeyClass) {
+		String old = this.defaultMapKeyClass;
+		this.defaultMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String buildDefaultMapKeyClass() {
+		return this.getPersistentAttribute().getMultiReferenceMapKeyTypeName();
+	}
+
+	public String getFullyQualifiedMapKeyClass() {
+		return this.fullyQualifiedMapKeyClass;
+	}
+
+	protected void setFullyQualifiedMapKeyClass(String mapKeyClass) {
+		String old = this.fullyQualifiedMapKeyClass;
+		this.fullyQualifiedMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String buildFullyQualifiedMapKeyClass() {
+		return (this.specifiedMapKeyClass == null) ?
+			this.defaultMapKeyClass :
+			this.getMapKeyClassAnnotation().getFullyQualifiedClassName();
+	}
+
+	public char getMapKeyClassEnclosingTypeSeparator() {
+		return '.';
+	}
+
+	protected MapKeyClass2_0Annotation getMapKeyClassAnnotation() {
+		return (MapKeyClass2_0Annotation) this.getResourcePersistentAttribute().getAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected MapKeyClass2_0Annotation addMapKeyClassAnnotation() {
+		return (MapKeyClass2_0Annotation) this.getResourcePersistentAttribute().addAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected void removeMapKeyClassAnnotation() {
+		this.getResourcePersistentAttribute().removeAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
+	}
+
+	// ********** map key column - JPA 2.0 **********
+	
+	protected JavaColumn buildMapKeyColumn() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) this.getJpaFactory()).buildJavaMapKeyColumn(this, this.buildMapKeyColumnOwner()) : 
+			new NullJavaMapKeyColumn2_0(this);
+	}
+
+	public JavaColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+
+	protected void initializeMapKeyColumn() {
+		this.mapKeyColumn.initialize(getMapKeyColumnAnnotation());
+	}
+
+	protected void updateMapKeyColumn() {
+		getMapKeyColumn().update(getMapKeyColumnAnnotation());
+	}
+
+	public MapKeyColumn2_0Annotation getMapKeyColumnAnnotation() {
+		if (!isJpa2_0Compatible()) {
+			return null;
+		}
+		return (MapKeyColumn2_0Annotation) this.getResourcePersistentAttribute().getNonNullAnnotation(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected JavaBaseColumn.Owner buildMapKeyColumnOwner() {
+		return new MapKeyColumnOwner();
+	}
+
+	public JavaAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
+		return this.mapKeyAttributeOverrideContainer;
+	}
+
+	// ********** Java completion proposals **********  
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getOrderable().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.mapKeyNameTouches(pos, astRoot)) {
+			return this.javaCandidateMapKeyNames(filter);
+		}
+		result = this.getMapKeyColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getMapKeyAttributeOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+	protected Iterator<String> javaCandidateMapKeyNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateMapKeyNames(filter));
+	}
+
+	protected Iterator<String> candidateMapKeyNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateMapKeyNames(), filter);
+	}
+
+	public Iterator<String> candidateMapKeyNames() {
+		return this.allTargetEntityAttributeNames();
+	}
+
+
+	// ********** metamodel **********  
+
+	@Override
+	protected String getMetamodelFieldTypeName() {
+		return ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldTypeName();
+	}
+
+	@Override
+	protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
+		this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
+		super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
+	}
+
+	protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
+		String keyTypeName = ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldMapKeyTypeName();
+		if (keyTypeName != null) {
+			typeArgumentNames.add(keyTypeName);
+		}
+	}
+
+	public String getMetamodelFieldMapKeyTypeName() {
+		return MappingTools.getMetamodelFieldMapKeyTypeName(this);
+	}
+	
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.orderable.validate(messages, reporter, astRoot);
+		this.validateMapKey(messages, reporter, astRoot);
+	}
+
+	protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (getMapKeyAnnotation() != null) {//If MapKey annotation specified, no other MapKey* annotations can be specified, don't validate them
+			//TODO validate that the map key refers to an existing attribute
+			return;
+		}
+		if (getKeyType() == Type.BASIC_TYPE) {
+			this.getMapKeyColumn().validate(messages, reporter, astRoot);
+			//validate map key converter
+		}
+		else if (getKeyType() == Type.ENTITY_TYPE) {
+			//validate map key join columns
+		}
+		else if (getKeyType() == Type.EMBEDDABLE_TYPE) {
+			getMapKeyAttributeOverrideContainer().validate(messages, reporter, astRoot);
+			//validate map key association overrides - for eclipselink
+		}
+	}
+
+
+	protected class MapKeyColumnOwner implements JavaBaseColumn.Owner {		
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaMultiRelationshipMapping.this.getTypeMapping();
+		}
+
+		protected JoiningStrategy getPredominantJoiningStrategy() {
+			return getRelationshipReference().getPredominantJoiningStrategy();
+		}
+
+		public String getDefaultTableName() {
+			return getPredominantJoiningStrategy().getTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getPredominantJoiningStrategy().getDbTable(tableName);
+		}
+
+		public String getDefaultColumnName() {
+			return AbstractJavaMultiRelationshipMapping.this.getName() + "_KEY"; //$NON-NLS-1$
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return getPredominantJoiningStrategy().tableNameIsInvalid(tableName);
+		}
+
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {			
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.MAP_KEY_COLUMN_TABLE_NOT_VALID,
+				new String[] {column.getTable(), column.getName(), getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+				column,
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.MAP_KEY_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+	}
+
+	protected abstract class OverrideContainerOwner implements JavaOverrideContainer.Owner {
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaMultiRelationshipMapping.this.getTypeMapping();
+		}
+
+		protected JoiningStrategy getPredominantJoiningStrategy() {
+			return getRelationshipReference().getPredominantJoiningStrategy();
+		}
+
+		public String getDefaultTableName() {
+			return getPredominantJoiningStrategy().getTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getPredominantJoiningStrategy().getDbTable(tableName);
+		}
+
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+		
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the collection table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
+		}
+	}
+
+	protected class MapKeyAttributeOverrideContainerOwner
+		extends OverrideContainerOwner
+		implements JavaAttributeOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaMultiRelationshipMapping.this.getResolvedMapKeyEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAttributeNames();
+		}
+		
+		public String getPossiblePrefix() {
+			return "key."; //$NON-NLS-1$
+		}
+		
+		public String getWritePrefix() {
+			return this.getPossiblePrefix();
+		}
+		
+		//since only the key can be an embeddable on a 1-m or m-m, all overrides are relevant
+		public boolean isRelevant(String overrideName) {
+			return true;
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+				new String[] {column.getTable(), column.getName(), getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {overrideName, column.getTable(), column.getName(), getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaNamedColumn.java
new file mode 100644
index 0000000..b3e9604
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaNamedColumn.java
@@ -0,0 +1,223 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaNamedColumn<T extends NamedColumnAnnotation>
+	extends AbstractJavaJpaContextNode
+	implements JavaNamedColumn
+{
+
+	protected Owner owner;
+	
+	protected String specifiedName;
+
+	protected String defaultName;
+
+	protected String columnDefinition;
+
+	protected T resourceColumn;
+
+	protected AbstractJavaNamedColumn(JavaJpaContextNode parent, Owner owner) {
+		super(parent);
+		this.owner = owner;
+	}
+
+	// ******************* initialization from java resource model ********************
+	
+	protected void initialize(T column) {
+		this.resourceColumn = column;
+		this.specifiedName = column.getName();
+		this.defaultName = this.buildDefaultName();
+		this.columnDefinition = column.getColumnDefinition();	
+	}
+
+	protected void update(T column) {
+		this.resourceColumn = column;
+		this.setSpecifiedName_(column.getName());
+		this.setDefaultName(this.buildDefaultName());
+		this.setColumnDefinition_(column.getColumnDefinition());
+	}	
+
+	protected T getResourceColumn() {
+		return this.resourceColumn;
+	}
+
+	
+	//************** NamedColumn implementation *****************
+	public String getName() {
+		return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
+	}
+
+	public String getSpecifiedName() {
+		return this.specifiedName;
+	}
+
+	public void setSpecifiedName(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		getResourceColumn().setName(newSpecifiedName);
+		firePropertyChanged(NamedColumn.SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedName_(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		firePropertyChanged(NamedColumn.SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+
+	public String getDefaultName() {
+		return this.defaultName;
+	}
+
+	protected void setDefaultName(String newDefaultName) {
+		String oldDefaultName = this.defaultName;
+		this.defaultName = newDefaultName;
+		firePropertyChanged(NamedColumn.DEFAULT_NAME_PROPERTY, oldDefaultName, newDefaultName);
+	}
+	
+	/**
+	 * Return the default column name.
+	 */
+	protected String buildDefaultName() {
+		return this.getOwner().getDefaultColumnName();
+	}
+
+	public String getColumnDefinition() {
+		return this.columnDefinition;
+	}
+	
+	public void setColumnDefinition(String newColumnDefinition) {
+		String oldColumnDefinition = this.columnDefinition;
+		this.columnDefinition = newColumnDefinition;
+		getResourceColumn().setColumnDefinition(newColumnDefinition);
+		firePropertyChanged(NamedColumn.COLUMN_DEFINITION_PROPERTY, oldColumnDefinition, newColumnDefinition);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setColumnDefinition_(String newColumnDefinition) {
+		String oldColumnDefinition = this.columnDefinition;
+		this.columnDefinition = newColumnDefinition;
+		firePropertyChanged(NamedColumn.COLUMN_DEFINITION_PROPERTY, oldColumnDefinition, newColumnDefinition);
+	}
+
+	public Owner getOwner() {
+		return this.owner;
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.getResourceColumn().getNameTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getOwner().getValidationTextRange(astRoot);
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceColumn().nameTouches(pos, astRoot);
+	}
+	
+	public Column getDbColumn() {
+		Table table = this.getDbTable();
+		return (table == null) ? null : table.getColumnForIdentifier(this.getName());
+	}
+
+	public Table getDbTable() {
+		return getOwner().getDbTable(this.getTable());
+	}
+
+	/**
+	 * Return the name of the column's table. This is overridden
+	 * in AbstractJavaBaseColumn where a table can be defined.
+	 */
+	public String getTable() {
+		return this.getOwner().getTypeMapping().getPrimaryTableName();
+	}
+
+	public boolean isResolved() {
+		return this.getDbColumn() != null;
+	}
+
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.nameTouches(pos, astRoot)) {
+			return this.getJavaCandidateNames(filter).iterator();
+		}
+		return null;
+	}
+
+	private Iterable<String> getJavaCandidateNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateNames(filter));
+	}
+
+	private Iterable<String> getCandidateNames(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateNames(), filter);
+	}
+
+	private Iterable<String> getCandidateNames() {
+		Table dbTable = this.getDbTable();
+		return (dbTable != null) ? dbTable.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ****************** validation ****************
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		TextRange textRange = getResourceColumn().getTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getOwner().getValidationTextRange(astRoot);	
+	}
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateName(messages, astRoot);
+	}
+
+	protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
+		Table dbTable = this.getDbTable();
+		if (dbTable != null && !this.isResolved()) {
+			messages.add(this.getOwner().buildUnresolvedNameMessage(this, this.getNameTextRange(astRoot)));
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToManyMapping.java
new file mode 100644
index 0000000..44b8016
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToManyMapping.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Vector;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.jpa2.context.java.NullJavaOrphanRemoval2_0;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToManyRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+
+
+public abstract class AbstractJavaOneToManyMapping<T extends OneToMany2_0Annotation>
+	extends AbstractJavaMultiRelationshipMapping<T>
+	implements JavaOneToManyMapping2_0, JavaOrphanRemovalHolder2_0
+{
+	protected final JavaOrphanRemovable2_0 orphanRemoval;
+	
+	protected AbstractJavaOneToManyMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		
+		this.orphanRemoval = this.buildOrphanRemoval();
+	}
+
+	// ********** initialize/update **********
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.orphanRemoval.initialize(this.getResourcePersistentAttribute());
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.orphanRemoval.update(this.getResourcePersistentAttribute());
+	}
+	
+	
+	public String getAnnotationName() {
+		return OneToManyAnnotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.JOIN_COLUMN);
+		names.add(JPA.JOIN_COLUMNS);
+	}
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	// ********** JavaOneToManyMapping implementation **********
+
+	@Override
+	public JavaOneToManyRelationshipReference2_0 getRelationshipReference() {
+		return (JavaOneToManyRelationshipReference2_0) super.getRelationshipReference();
+	}
+
+	// ********** JavaOrphanRemovalHolder2_0 implementation **********
+
+	protected JavaOrphanRemovable2_0 buildOrphanRemoval() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) this.getJpaFactory()).buildJavaOrphanRemoval(this) : 
+			new NullJavaOrphanRemoval2_0(this);
+	}
+
+	public JavaOrphanRemovable2_0 getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToManyRelationshipReference.java
new file mode 100644
index 0000000..a0f4029
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToManyRelationshipReference.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToManyRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaOneToManyRelationshipReference
+	extends AbstractJavaRelationshipReference
+	implements JavaOneToManyRelationshipReference2_0
+{
+	protected final JavaMappedByJoiningStrategy mappedByJoiningStrategy;
+	
+	protected final JavaJoinTableJoiningStrategy joinTableJoiningStrategy;
+
+	protected final JavaJoinColumnJoiningStrategy joinColumnJoiningStrategy;
+	
+	
+	protected AbstractJavaOneToManyRelationshipReference(JavaOneToManyMapping parent) {
+		super(parent);
+		this.mappedByJoiningStrategy = buildMappedByJoiningStrategy();
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();
+	}
+	
+	protected JavaMappedByJoiningStrategy buildMappedByJoiningStrategy() {
+		return new GenericJavaMappedByJoiningStrategy(this);
+	}
+	
+	protected JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new GenericJavaJoinTableJoiningStrategy(this);
+	}
+
+	protected abstract JavaJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy();
+	
+	@Override
+	public JavaOneToManyMapping getRelationshipMapping() {
+		return (JavaOneToManyMapping) getParent();
+	}
+	
+	public OneToManyAnnotation getMappingAnnotation() {
+		return getRelationshipMapping().getMappingAnnotation();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return this.getMappedByJoiningStrategy().getMappedByAttribute() == null;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return this.mappedByJoiningStrategy.relationshipIsOwnedBy(mapping);
+	}
+
+	@Override
+	public boolean isTargetForeignKeyRelationship() {
+		return getJoinColumnJoiningStrategy().isTargetForeignKeyRelationship();
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null) {
+			result = this.mappedByJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.joinTableJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.joinColumnJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	
+	// **************** mapped by **********************************************
+	
+	public JavaMappedByJoiningStrategy getMappedByJoiningStrategy() {
+		return this.mappedByJoiningStrategy;
+	}
+	
+	public final void setMappedByJoiningStrategy() {
+		setMappedByJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void setMappedByJoiningStrategy_() {
+		this.mappedByJoiningStrategy.addStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public final void unsetMappedByJoiningStrategy() {
+		unsetMappedByJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetMappedByJoiningStrategy_() {
+		this.mappedByJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean usesMappedByJoiningStrategy() {
+		return this.getPredominantJoiningStrategy() == this.mappedByJoiningStrategy;
+	}
+	
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return mappedByMapping.getKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** join table *********************************************
+	
+	public JavaJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public final void setJoinTableJoiningStrategy() {
+		setJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void setJoinTableJoiningStrategy_() {
+		// join table is default, so no need to add annotation
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public final void unsetJoinTableJoiningStrategy() {
+		unsetJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetJoinTableJoiningStrategy_() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return this.mappedByJoiningStrategy.getMappedByAttribute() == null
+			&& ! this.joinColumnJoiningStrategy.hasSpecifiedJoinColumns();
+	}
+
+
+	// **************** join columns *******************************************
+
+	public JavaJoinColumnJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+
+	public void setJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.addStrategy();
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+
+	public boolean mayHaveDefaultJoinColumn() {
+		return false;
+	}
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.mappedByJoiningStrategy.initialize();
+		this.joinColumnJoiningStrategy.initialize();
+		this.joinTableJoiningStrategy.initialize();
+	}
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.mappedByJoiningStrategy.update();
+		this.joinColumnJoiningStrategy.update();
+		this.joinTableJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.mappedByJoiningStrategy.validate(messages, reporter, astRoot);
+		this.joinTableJoiningStrategy.validate(messages, reporter, astRoot);
+		this.joinColumnJoiningStrategy.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToOneMapping.java
new file mode 100644
index 0000000..71e4a42
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToOneMapping.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Vector;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.jpa2.context.java.NullJavaOrphanRemoval2_0;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+
+
+public abstract class AbstractJavaOneToOneMapping
+	extends AbstractJavaSingleRelationshipMapping<OneToOne2_0Annotation>
+	implements JavaOneToOneMapping2_0, JavaOrphanRemovalHolder2_0
+{
+	protected final JavaOrphanRemovable2_0 orphanRemoval;
+	
+	// ********** constructor **********
+	protected AbstractJavaOneToOneMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.orphanRemoval = this.buildOrphanRemoval();
+	}
+
+	// ********** initialize/update **********
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.orphanRemoval.initialize(this.getResourcePersistentAttribute());
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.orphanRemoval.update(this.getResourcePersistentAttribute());
+	}
+	
+	public String getAnnotationName() {
+		return OneToOneAnnotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.PRIMARY_KEY_JOIN_COLUMN);
+		names.add(JPA.PRIMARY_KEY_JOIN_COLUMNS);
+	}
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	@Override
+	protected Boolean getResourceOptional() {
+		return this.mappingAnnotation.getOptional();
+	}
+	
+	@Override
+	protected void setResourceOptional(Boolean newOptional) {
+		this.mappingAnnotation.setOptional(newOptional);
+	}
+
+	// ********** JavaOneToOneMapping implementation **********
+	
+	@Override
+	public JavaOneToOneRelationshipReference2_0 getRelationshipReference() {
+		return (JavaOneToOneRelationshipReference2_0) super.getRelationshipReference();
+	}
+
+	// ********** JavaOrphanRemovalHolder2_0 implementation **********
+
+	protected JavaOrphanRemovable2_0 buildOrphanRemoval() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) this.getJpaFactory()).buildJavaOrphanRemoval(this) : 
+			new NullJavaOrphanRemoval2_0(this);
+	}
+
+	public JavaOrphanRemovable2_0 getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToOneRelationshipReference.java
new file mode 100644
index 0000000..971f184
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOneToOneRelationshipReference.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.java.OwnableRelationshipMappingAnnotation;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractJavaOneToOneRelationshipReference
+	extends AbstractJavaRelationshipReference
+	implements JavaOneToOneRelationshipReference2_0
+{
+	protected final JavaMappedByJoiningStrategy mappedByJoiningStrategy;
+	
+	protected final JavaJoinColumnJoiningStrategy joinColumnJoiningStrategy;
+	
+	protected final JavaPrimaryKeyJoinColumnJoiningStrategy primaryKeyJoinColumnJoiningStrategy;
+	
+	protected final JavaJoinTableJoiningStrategy joinTableJoiningStrategy;
+	
+	protected AbstractJavaOneToOneRelationshipReference(JavaOneToOneMapping parent) {
+		super(parent);
+		this.mappedByJoiningStrategy = buildMappedByJoiningStrategy();
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy = buildPrimaryKeyJoinColumnJoiningStrategy();
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+	}
+	
+	
+	protected JavaMappedByJoiningStrategy buildMappedByJoiningStrategy() {
+		return new GenericJavaMappedByJoiningStrategy(this);
+	}
+	
+	protected JavaJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericJavaJoinColumnJoiningStrategy(this);
+	}
+	
+	protected JavaPrimaryKeyJoinColumnJoiningStrategy buildPrimaryKeyJoinColumnJoiningStrategy() {
+		return new GenericJavaPrimaryKeyJoinColumnJoiningStrategy(this);
+	}
+	
+	protected abstract JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy();
+	
+	@Override
+	public JavaOneToOneMapping getRelationshipMapping() {
+		return (JavaOneToOneMapping) getParent();
+	}
+	
+	public OwnableRelationshipMappingAnnotation getMappingAnnotation() {
+		return getRelationshipMapping().getMappingAnnotation();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return this.mappedByJoiningStrategy.getMappedByAttribute() == null;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return this.mappedByJoiningStrategy.relationshipIsOwnedBy(mapping);
+	}
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null) {
+			result = this.mappedByJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.joinColumnJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.primaryKeyJoinColumnJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.joinTableJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	
+	// **************** mapped by **********************************************
+	
+	public JavaMappedByJoiningStrategy getMappedByJoiningStrategy() {
+		return this.mappedByJoiningStrategy;
+	}
+	
+	public boolean usesMappedByJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.mappedByJoiningStrategy;
+	}
+	
+	public void setMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.addStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return mappedByMapping.getKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** join columns *******************************************
+	
+	public JavaJoinColumnJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+	
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+	
+	public void setJoinColumnJoiningStrategy() {
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		// join columns are default, so no need to add annotations
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinColumn() {
+		return this.getMappedByJoiningStrategy().getMappedByAttribute() == null 
+			&& this.getPrimaryKeyJoinColumnJoiningStrategy().primaryKeyJoinColumnsSize() == 0
+			&& this.getJoinTableJoiningStrategy().getJoinTable() == null;
+	}
+	
+	
+	// **************** primary key join columns *******************************
+	
+	public JavaPrimaryKeyJoinColumnJoiningStrategy getPrimaryKeyJoinColumnJoiningStrategy() {
+		return this.primaryKeyJoinColumnJoiningStrategy;
+	}
+	
+	public boolean usesPrimaryKeyJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.primaryKeyJoinColumnJoiningStrategy;
+	}
+	
+	public void setPrimaryKeyJoinColumnJoiningStrategy() {
+		this.primaryKeyJoinColumnJoiningStrategy.addStrategy();
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetPrimaryKeyJoinColumnJoiningStrategy() {
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultPrimaryKeyJoinColumn() {
+		return false;
+	}
+
+
+	// **************** join table *********************************************
+	
+	public JavaJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public final void setJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.addStrategy();
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public final void unsetJoinTableJoiningStrategy() {
+		unsetJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetJoinTableJoiningStrategy_() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return false;
+	}	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.mappedByJoiningStrategy.initialize();
+		this.primaryKeyJoinColumnJoiningStrategy.initialize();
+		this.joinTableJoiningStrategy.initialize();
+		
+		// initialize join columns last, as the existence of a default join 
+		// column is dependent on the other mechanisms (mappedBy, join table)
+		// not being specified
+		this.joinColumnJoiningStrategy.initialize();
+	}
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.mappedByJoiningStrategy.update();
+		this.primaryKeyJoinColumnJoiningStrategy.update();
+		this.joinTableJoiningStrategy.update();
+		
+		// update join columns last, as the existence of a default join 
+		// column is dependent on the other mechanisms (mappedBy, join table)
+		// not being specified
+		this.joinColumnJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.mappedByJoiningStrategy.validate(messages, reporter, astRoot);
+		this.primaryKeyJoinColumnJoiningStrategy.validate(messages, reporter, astRoot);
+		this.joinColumnJoiningStrategy.validate(messages, reporter, astRoot);
+		this.joinTableJoiningStrategy.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOverride.java
new file mode 100644
index 0000000..edc6319
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaOverride.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaOverride;
+import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+
+
+public abstract class AbstractJavaOverride
+	extends AbstractJavaJpaContextNode
+	implements JavaOverride
+{
+
+	protected String name;
+
+	protected final Owner owner;
+
+	protected OverrideAnnotation overrideAnnotation;
+	
+	public AbstractJavaOverride(JavaJpaContextNode parent, Owner owner) {
+		super(parent);
+		this.owner = owner;
+	}
+	
+	protected void initialize(OverrideAnnotation overrideAnnotation) {
+		this.overrideAnnotation = overrideAnnotation;
+		this.initializeName();
+	}
+
+	protected void update(OverrideAnnotation overrideResource) {
+		this.overrideAnnotation = overrideResource;
+		this.updateName();
+	}
+
+	public OverrideAnnotation getOverrideAnnotation() {
+		return this.overrideAnnotation;
+	}
+	
+	// ********************* name ****************
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String newName) {
+		String prefix = getOwner().getPossiblePrefix();
+		String unprefixedName = newName;
+		if (newName != null && prefix != null && newName.startsWith(prefix)) {
+			unprefixedName = newName.substring(newName.indexOf('.') + 1);
+		}
+		String oldName = this.name;
+		this.name = unprefixedName; //set the name without the prefix in the context model
+		this.overrideAnnotation.setName(newName); // set the name with the prefix in the resource model
+		firePropertyChanged(NAME_PROPERTY, oldName, unprefixedName);
+	}
+	
+	protected void setName_(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		firePropertyChanged(NAME_PROPERTY, oldName, newName);
+	}
+
+	protected void initializeName() {
+		String name = this.getResourceName();
+		String prefix = getOwner().getPossiblePrefix();
+		if (name != null && prefix != null && name.startsWith(prefix)) {
+			name = name.substring(name.indexOf('.') + 1);
+		}
+		this.name = name;
+	}
+
+	protected void updateName() {
+		String name = this.getResourceName();
+		String prefix = getOwner().getPossiblePrefix();
+		if (name != null && prefix != null && name.startsWith(prefix)) {
+			name = name.substring(name.indexOf('.') + 1);
+		}
+		this.setName_(name);
+	}
+
+	protected String getResourceName() {
+		return this.overrideAnnotation.getName();
+	}
+
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+
+	public BaseOverride setVirtual(boolean virtual) {
+		return getOwner().setVirtual(virtual, this);
+	}
+	
+	public Owner getOwner() {
+		return this.owner;
+	}
+	
+	@Override
+	public JavaJpaContextNode getParent() {
+		return (JavaJpaContextNode) super.getParent();
+	}
+
+	protected abstract Iterator<String> candidateNames();
+
+	private Iterator<String> candidateNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateNames(), filter);
+	}
+
+	private Iterator<String> javaCandidateNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateNames(filter));
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.nameTouches(pos, astRoot)) {
+			return this.javaCandidateNames(filter);
+		}
+		return null;
+	}
+	
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.overrideAnnotation.nameTouches(pos, astRoot);
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.overrideAnnotation.getTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(getName());
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaPersistentAttribute.java
new file mode 100644
index 0000000..a4dbea2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaPersistentAttribute.java
@@ -0,0 +1,716 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.CollectionMapping;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaStructureNodes;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.ReflectionTools;
+import org.eclipse.jpt.utility.internal.Tools;
+import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * common state/behavior between Generic and EclipseLink persistent attributes
+ */
+public abstract class AbstractJavaPersistentAttribute
+	extends AbstractJavaJpaContextNode
+	implements JavaPersistentAttribute2_0
+{
+	protected String name;
+
+	protected JavaAttributeMapping defaultMapping;
+
+	protected JavaAttributeMapping specifiedMapping;
+
+	protected AccessType defaultAccess;
+
+	protected JavaResourcePersistentAttribute resourcePersistentAttribute;
+
+
+	protected AbstractJavaPersistentAttribute(PersistentType parent, JavaResourcePersistentAttribute resourcePersistentAttribute) {
+		super(parent);
+		this.resourcePersistentAttribute = resourcePersistentAttribute;
+		this.name = buildName();
+		this.defaultMapping = buildDefaultMapping();
+		this.specifiedMapping = buildSpecifiedMapping();
+		this.defaultAccess = buildDefaultAccess();
+	}
+
+	public void update() {
+		this.setName(this.buildName());
+		this.updateDefaultMapping();
+		this.updateSpecifiedMapping();
+		this.setDefaultAccess(this.buildDefaultAccess());
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		getMapping().postUpdate();
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return JavaStructureNodes.PERSISTENT_ATTRIBUTE_ID;
+	}
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		return this;
+	}
+
+	public TextRange getSelectionTextRange() {
+		return this.getSelectionTextRange(this.buildASTRoot());
+	}
+
+	protected TextRange getSelectionTextRange(CompilationUnit astRoot) {
+		return this.resourcePersistentAttribute.getNameTextRange(astRoot);
+	}
+
+	protected CompilationUnit buildASTRoot() {
+		return this.resourcePersistentAttribute.getJavaResourceCompilationUnit().buildASTRoot();
+	}
+
+	public void dispose() {
+		//nothing to dispose
+	}
+
+
+	// ********** AccessHolder implementation **********
+
+	public AccessType getAccess() {
+		AccessType access = this.getSpecifiedAccess();
+		return (access != null) ? access : this.getDefaultAccess();
+	}
+
+	public AccessType getDefaultAccess() {
+		return this.defaultAccess;
+	}
+	
+	protected void setDefaultAccess(AccessType defaultAccess) {
+		AccessType old = this.defaultAccess;
+		this.defaultAccess = defaultAccess;
+		this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, defaultAccess);
+	}
+
+	protected AccessType buildDefaultAccess() {
+		return this.resourcePersistentAttribute.isField() ? AccessType.FIELD : AccessType.PROPERTY;
+	}
+
+
+	// ********** [Java]PersistentAttribute implementation **********
+
+	public JavaResourcePersistentAttribute getResourcePersistentAttribute() {
+		return this.resourcePersistentAttribute;
+	}
+
+	public PersistentType getOwningPersistentType() {
+		return this.getParent();
+	}
+
+	public TypeMapping getOwningTypeMapping() {
+		return this.getOwningPersistentType().getMapping();
+	}
+
+	public String getPrimaryKeyColumnName() {
+		return this.getMapping().getPrimaryKeyColumnName();
+	}
+	
+	public String getTypeName() {
+		return this.resourcePersistentAttribute.getTypeName();
+	}
+
+	public boolean isVirtual() {
+		return false;
+	}
+
+	public boolean contains(int offset, CompilationUnit astRoot) {
+		TextRange fullTextRange = this.getFullTextRange(astRoot);
+		// 'fullTextRange' will be null if the attribute no longer exists in the java;
+		// the context model can be out of synch with the resource model
+		// when a selection event occurs before the context model has a
+		// chance to synch with the resource model via the update thread
+		return (fullTextRange == null) ? false : fullTextRange.includes(offset);
+	}
+
+	protected TextRange getFullTextRange(CompilationUnit astRoot) {
+		return this.resourcePersistentAttribute.getTextRange(astRoot);
+	}
+
+	public Embeddable getEmbeddable() {
+		return (getTypeName() == null) ? 
+				null : this.getPersistenceUnit().getEmbeddable(getTypeName());
+	}
+
+	public boolean isField() {
+		return this.resourcePersistentAttribute.isField();
+	}
+
+	public boolean isProperty() {
+		return this.resourcePersistentAttribute.isProperty();
+	}
+
+	public boolean isPublic() {
+		return Modifier.isPublic(this.resourcePersistentAttribute.getModifiers());
+	}
+
+	public boolean isFinal() {
+		return Modifier.isFinal(this.resourcePersistentAttribute.getModifiers());
+	}
+
+	// ***** Basic defaults
+	/**
+	 * From the JPA spec, when the basic mapping applies:
+	 * If the type of the attribute (field or property) is one of the following
+	 * it must be mapped as @Basic:
+	 *     byte[]
+	 *     java.lang.Byte[]
+	 *     char[]
+	 *     java.lang.Character[]
+	 *     primitive types (except 'void')
+	 *     primitive wrappers (except 'java.lang.Void')
+	 *     java.lang.String
+	 *     java.math.BigInteger
+	 *     java.math.BigDecimal
+	 *     java.util.Date
+	 *     java.util.Calendar
+	 *     java.sql.Date
+	 *     java.sql.Time
+	 *     java.sql.Timestamp
+	 *     enums
+	 *     any other type that implements java.io.Serializable
+	 */
+	public boolean typeIsBasic() {
+		// 'typeName' may include array brackets but not generic type arguments
+		String typeName = getTypeName();
+		if (typeName == null) {
+			return false;
+		}
+
+		int arrayDepth = ReflectionTools.getArrayDepthForTypeDeclaration(typeName);
+		if (arrayDepth > 1) {
+			return false;  // multi-dimensional arrays are not supported
+		}
+
+		if (arrayDepth == 1) {
+			String elementTypeName = ReflectionTools.getElementTypeNameForTypeDeclaration(typeName, 1);
+			return this.elementTypeIsValidForBasicArray(elementTypeName);
+		}
+
+		// arrayDepth == 0
+		if (ClassName.isVariablePrimitive(typeName)) {
+			return true;  // any primitive but 'void'
+		}
+		if (ClassName.isVariablePrimitiveWrapper(typeName)) {
+			return true;  // any primitive wrapper but 'java.lang.Void'
+		}
+		if (this.typeIsOtherValidBasicType(typeName)) {
+			return true;
+		}
+		if (this.resourcePersistentAttribute.typeIsEnum()) {
+			return true;
+		}
+		if (this.resourcePersistentAttribute.typeIsSubTypeOf(SERIALIZABLE_TYPE_NAME)) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Return whether the specified type is a valid element type for
+	 * a one-dimensional array that can default to a Basic mapping:
+	 *     byte
+	 *     char
+	 *     java.lang.Byte
+	 *     java.lang.Character
+	 */
+	protected boolean elementTypeIsValidForBasicArray(String elementTypeName) {
+		return ArrayTools.contains(VALID_BASIC_ARRAY_ELEMENT_TYPE_NAMES, elementTypeName);
+	}
+
+	protected static final String[] VALID_BASIC_ARRAY_ELEMENT_TYPE_NAMES = {
+		byte.class.getName(),
+		char.class.getName(),
+		java.lang.Byte.class.getName(),
+		java.lang.Character.class.getName()
+	};
+
+	/**
+	 * Return whether the specified type is among the various "other" types
+	 * that can default to a Basic mapping.
+	 */
+	protected boolean typeIsOtherValidBasicType(String typeName) {
+		return ArrayTools.contains(OTHER_VALID_BASIC_TYPE_NAMES, typeName);
+	}
+
+	protected static final String[] OTHER_VALID_BASIC_TYPE_NAMES = {
+		java.lang.String.class.getName(),
+		java.math.BigInteger.class.getName(),
+		java.math.BigDecimal.class.getName(),
+		java.util.Date.class.getName(),
+		java.util.Calendar.class.getName(),
+		java.sql.Date.class.getName(),
+		java.sql.Time.class.getName(),
+		java.sql.Timestamp.class.getName(),
+	};
+
+	protected static final String SERIALIZABLE_TYPE_NAME = java.io.Serializable.class.getName();
+
+	// ***** reference entities
+	public String getSingleReferenceTargetTypeName() {
+		// 'typeName' may include array brackets ("[]")
+		// but not generic type arguments (e.g. "<java.lang.String>")
+		String typeName = getTypeName();
+		if (typeName == null) {
+			return null;
+		}
+		if (ReflectionTools.getArrayDepthForTypeDeclaration(typeName) != 0) {
+			return null;  // arrays cannot be entities
+		}
+		if (this.typeIsContainer(typeName)) {
+			return null;  // "containers" cannot be entities
+		}
+		return typeName;
+	}
+
+	public String getMultiReferenceTargetTypeName() {
+		return this.getJpaContainer().getMultiReferenceTargetTypeName(this.resourcePersistentAttribute);
+	}
+
+	public String getMultiReferenceMapKeyTypeName() {
+		return this.getJpaContainer().getMultiReferenceMapKeyTypeName(this.resourcePersistentAttribute);
+	}
+	
+	/**
+	 * return whether the specified type is one of the container
+	 * types allowed by the JPA spec
+	 */
+	protected boolean typeIsContainer(String typeName) {
+		return this.getJpaContainer(typeName).isContainer();
+	}
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	protected void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	protected String buildName() {
+		return this.resourcePersistentAttribute.getName();
+	}
+
+	// ***** mapping
+	public JavaAttributeMapping getMapping() {
+		return (this.specifiedMapping != null) ? this.specifiedMapping : this.defaultMapping;
+	}
+
+	public String getMappingKey() {
+		return this.getMapping().getKey();
+	}
+
+
+	// ***** default mapping
+	public JavaAttributeMapping getDefaultMapping() {
+		return this.defaultMapping;
+	}
+
+	/**
+	 * clients do not set the "default" mapping
+	 */
+	protected void setDefaultMapping(JavaAttributeMapping defaultMapping) {
+		JavaAttributeMapping old = this.defaultMapping;
+		this.defaultMapping = defaultMapping;
+		this.firePropertyChanged(DEFAULT_MAPPING_PROPERTY, old, defaultMapping);
+	}
+
+	protected JavaAttributeMapping buildDefaultMapping() {
+		JavaAttributeMappingDefinition mappingDefinition = 
+			getJpaPlatform().getDefaultJavaAttributeMappingDefinition(this);
+		return buildDefaultMapping(mappingDefinition);
+	}
+	
+	protected JavaAttributeMapping buildDefaultMapping(JavaAttributeMappingDefinition mappingDefinition) {
+		Annotation annotation = this.resourcePersistentAttribute.
+				buildNullAnnotation(mappingDefinition.getAnnotationName());
+		JavaAttributeMapping mapping = mappingDefinition.buildMapping(this, getJpaFactory());
+		mapping.initialize(annotation);
+		return mapping;
+	}
+	
+	/**
+	 * return null if there is no "default" mapping for the attribute
+	 */
+	public String getDefaultMappingKey() {
+		return this.defaultMapping.getKey();
+	}
+
+	/**
+	 * the mapping might be "default", but it still might be a "null" mapping...
+	 */
+	public boolean mappingIsDefault(JavaAttributeMapping mapping) {
+		return this.defaultMapping == mapping;
+	}
+
+	protected void updateDefaultMapping() {
+		// There will always be a mapping definition, even if it is a "null" mapping definition ...
+		JavaAttributeMappingDefinition mappingDefinition = 
+				getJpaPlatform().getDefaultJavaAttributeMappingDefinition(this);
+		String mappingKey = mappingDefinition.getKey();
+		if (this.valuesAreEqual(this.defaultMapping.getKey(), mappingKey)) {
+			this.defaultMapping.update(this.resourcePersistentAttribute.
+					buildNullAnnotation(mappingDefinition.getAnnotationName()));
+		} 
+		else {
+			setDefaultMapping(buildDefaultMapping(mappingDefinition));
+		}
+	}
+
+	// ***** specified mapping
+	public JavaAttributeMapping getSpecifiedMapping() {
+		return this.specifiedMapping;
+	}
+
+	/**
+	 * clients do not set the "specified" mapping;
+	 * @see #setSpecifiedMappingKey(String)
+	 */
+	protected void setSpecifiedMapping(JavaAttributeMapping specifiedMapping) {
+		JavaAttributeMapping old = this.specifiedMapping;
+		this.specifiedMapping = specifiedMapping;
+		this.firePropertyChanged(SPECIFIED_MAPPING_PROPERTY, old, specifiedMapping);
+	}
+
+	protected JavaAttributeMapping buildSpecifiedMapping() {
+		JavaAttributeMappingDefinition mappingDefinition = 
+				getJpaPlatform().getSpecifiedJavaAttributeMappingDefinition(this);
+		return buildSpecifiedMapping(mappingDefinition);
+	}
+	
+	protected JavaAttributeMapping buildSpecifiedMapping(JavaAttributeMappingDefinition mappingDefinition) {
+		Annotation annotation = this.resourcePersistentAttribute.
+				getAnnotation(mappingDefinition.getAnnotationName());
+		JavaAttributeMapping mapping = mappingDefinition.buildMapping(this, getJpaFactory());
+		// specified mappings may be null
+		if (mapping != null) {
+			mapping.initialize(annotation);
+		}
+		return mapping;
+	}
+	
+	/**
+	 * return the key of the currently specified mapping or null 
+	 * if there is no specified mapping for the attribute
+	 */
+	protected String getSpecifiedMappingKey() {
+		return (this.specifiedMapping == null) ? null : this.specifiedMapping.getKey();
+	}
+
+	// TODO support morphing mappings, i.e. copying common settings over
+	// to the new mapping; this can't be done in the same was as XmlAttributeMapping
+	// since we don't know all the possible mapping types
+	public void setSpecifiedMappingKey(String key) {
+		if (Tools.valuesAreEqual(key, this.getSpecifiedMappingKey())) {
+			return;
+		}
+		JavaAttributeMapping old = this.specifiedMapping;
+		JavaAttributeMapping newMapping = this.buildMappingFromMappingKey(key);
+		
+		this.specifiedMapping = newMapping;
+		
+		String newAnnotation = (newMapping == null) ? null : newMapping.getAnnotationName();
+		JavaAttributeMapping mapping = (newMapping == null) ? this.defaultMapping : newMapping;
+		this.resourcePersistentAttribute.setPrimaryAnnotation(newAnnotation, mapping.getSupportingAnnotationNames());
+		this.firePropertyChanged(SPECIFIED_MAPPING_PROPERTY, old, newMapping);
+	}
+	protected static final String[] EMPTY_STRING_ARRAY = new String[0];
+	
+	/**
+	 * return the annotation name of the currently specified mapping or null 
+	 * if there is no specified mapping for the attribute
+	 */
+	protected String getSpecifiedMappingAnnotationName() {
+		return (this.specifiedMapping == null) ? null : this.specifiedMapping.getAnnotationName();
+	}
+	
+	protected JavaAttributeMapping buildMappingFromMappingKey(String key) {
+		JavaAttributeMappingDefinition mappingDefinition = getJpaPlatform().getSpecifiedJavaAttributeMappingDefinition(key);
+		JavaAttributeMapping mapping = mappingDefinition.buildMapping(this, getJpaFactory());
+		//no mapping.initialize(JavaResourcePersistentAttribute) call here
+		//we do not yet have a mapping annotation so we can't call initialize
+		return mapping;
+	}
+
+	protected Iterable<String> getSupportingAnnotationNames() {
+		JavaAttributeMapping mapping = this.getMapping();
+		return (mapping != null) ? mapping.getSupportingAnnotationNames() : EmptyIterable.<String>instance();
+	}
+
+	protected void updateSpecifiedMapping() {
+		// There will always be a mapping definition, even if it is a "null" mapping provider ...
+		JavaAttributeMappingDefinition mappingDefinition = 
+				getJpaPlatform().getSpecifiedJavaAttributeMappingDefinition(this);
+		String mappingKey = mappingDefinition.getKey();
+		if (this.specifiedMapping != null
+				&& this.specifiedMapping.getKey().equals(mappingKey)) {
+			this.specifiedMapping.update(this.resourcePersistentAttribute.
+					getAnnotation(mappingDefinition.getAnnotationName()));
+		} 
+		else {
+			setSpecifiedMapping(buildSpecifiedMapping(mappingDefinition));
+		}
+	}
+
+
+	// ********** misc overrides **********
+
+	@Override
+	public PersistentType getParent() {
+		return (PersistentType) super.getParent();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.name);
+	}
+
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getSelectionTextRange(astRoot);
+	}
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+
+		this.validateModifiers(messages, astRoot);
+
+		if (this.specifiedMapping != null) {
+			this.specifiedMapping.validate(messages, reporter, astRoot);
+		}
+		else if (this.defaultMapping != null) {
+			this.defaultMapping.validate(messages, reporter, astRoot);
+		}
+	}
+
+
+	protected void validateModifiers(List<IMessage> messages, CompilationUnit astRoot) {
+		if (this.getMappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) {
+			return;
+		}
+
+		if (this.isField()) {
+			if (this.isFinal()) {
+				messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_FINAL_FIELD, astRoot));
+			}
+			if (this.isPublic()) {
+				messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_PUBLIC_FIELD, astRoot));
+			}
+		}
+	}
+
+	protected IMessage buildAttributeMessage(String msgID, CompilationUnit astRoot) {
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				msgID,
+				new String[] {getName()},
+				this,
+				this.getValidationTextRange(astRoot)
+			);
+	}
+
+
+	// ********** Java completion proposals **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return this.getMapping().javaCompletionProposals(pos, filter, astRoot);
+	}
+
+	// ********** metamodel **********
+
+	public String getMetamodelContainerFieldTypeName() {
+		return this.getJpaContainer().getMetamodelContainerFieldTypeName();
+	}
+
+	public String getMetamodelContainerFieldMapKeyTypeName() {
+		return this.getJpaContainer().getMetamodelContainerFieldMapKeyTypeName((CollectionMapping) this.getMapping());
+	}
+
+	public String getMetamodelTypeName() {
+		String typeName = getTypeName();
+		if (typeName == null) {
+			return MetamodelField.DEFAULT_TYPE_NAME;
+		}
+		if (ClassName.isPrimitive(typeName)) {
+			return ClassName.getWrapperClassName(typeName);  // ???
+		}
+		return typeName;
+	}
+	
+	
+	// ********** JPA containers **********
+
+	public JpaContainer getJpaContainer() {
+		// 'typeName' may include array brackets ("[]")
+		// but not generic type arguments (e.g. "<java.lang.String>")
+		return getJpaContainer(this.resourcePersistentAttribute.getTypeName());
+	}
+	/**
+	 * Return the JPA container corresponding to the specified type;
+	 * return a "null" JPA container if the specified type is not one of the
+	 * container types allowed by the JPA spec.
+	 */
+	protected JpaContainer getJpaContainer(String typeName) {
+		for (JpaContainer jpaContainer : JPA_CONTAINERS) {
+			if (jpaContainer.getTypeName().equals(typeName)) {
+				return jpaContainer;
+			}
+		}
+		return JpaContainer.Null.instance();
+	}
+
+	protected static final Iterable<JpaContainer> JPA_CONTAINERS =
+		new ArrayIterable<JpaContainer>(new JpaContainer[] {
+			new CollectionJpaContainer(java.util.Collection.class, JPA2_0.COLLECTION_ATTRIBUTE),
+			new CollectionJpaContainer(java.util.Set.class, JPA2_0.SET_ATTRIBUTE),
+			new CollectionJpaContainer(java.util.List.class, JPA2_0.LIST_ATTRIBUTE),
+			new MapJpaContainer(java.util.Map.class, JPA2_0.MAP_ATTRIBUTE)
+		});
+
+
+	/**
+	 * Abstract JPA container
+	 */
+	protected abstract static class AbstractJpaContainer implements JpaContainer {
+		protected final String typeName;
+		protected final String metamodelContainerFieldTypeName;
+
+		protected AbstractJpaContainer(Class<?> containerClass, String metamodelContainerFieldTypeName) {
+			this(containerClass.getName(), metamodelContainerFieldTypeName);
+		}
+
+		protected AbstractJpaContainer(String typeName, String metamodelContainerFieldTypeName) {
+			super();
+			if ((typeName == null) || (metamodelContainerFieldTypeName == null)) {
+				throw new NullPointerException();
+			}
+			this.typeName = typeName;
+			this.metamodelContainerFieldTypeName = metamodelContainerFieldTypeName;
+		}
+
+		public String getTypeName() {
+			return this.typeName;
+		}
+
+		public boolean isContainer() {
+			return true;
+		}
+
+		public String getMetamodelContainerFieldTypeName() {
+			return this.metamodelContainerFieldTypeName;
+		}
+
+	}
+
+	/**
+	 * Collection JPA container
+	 */
+	protected static class CollectionJpaContainer extends AbstractJpaContainer {
+		protected CollectionJpaContainer(Class<?> collectionClass, String staticMetamodelTypeDeclarationTypeName) {
+			super(collectionClass, staticMetamodelTypeDeclarationTypeName);
+		}
+
+		public String getMultiReferenceTargetTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+			return (resourcePersistentAttribute.typeTypeArgumentNamesSize() == 1) ?
+						resourcePersistentAttribute.getTypeTypeArgumentName(0) :
+						null;
+		}
+
+		public String getMultiReferenceMapKeyTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+			return null;
+		}
+
+		public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
+			return null;
+		}
+
+		public boolean isMap() {
+			return false;
+		}
+	}
+
+	/**
+	 * Map JPA container
+	 */
+	protected static class MapJpaContainer extends AbstractJpaContainer {
+		protected MapJpaContainer(Class<?> mapClass, String staticMetamodelTypeDeclarationTypeName) {
+			super(mapClass, staticMetamodelTypeDeclarationTypeName);
+		}
+
+		public String getMultiReferenceTargetTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+			return (resourcePersistentAttribute.typeTypeArgumentNamesSize() == 2) ?
+						resourcePersistentAttribute.getTypeTypeArgumentName(1) :
+						null;
+		}
+
+		public String getMultiReferenceMapKeyTypeName(JavaResourcePersistentAttribute resourcePersistentAttribute) {
+			return (resourcePersistentAttribute.typeTypeArgumentNamesSize() == 2) ?
+				resourcePersistentAttribute.getTypeTypeArgumentName(0) :
+				null;
+		}
+
+		public String getMetamodelContainerFieldMapKeyTypeName(CollectionMapping mapping) {
+			return mapping.getMetamodelFieldMapKeyTypeName();
+		}
+
+		public boolean isMap() {
+			return true;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaPersistentType.java
new file mode 100644
index 0000000..c3be5d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaPersistentType.java
@@ -0,0 +1,661 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaStructureNodes;
+import org.eclipse.jpt.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.HashBag;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.ChainIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java persistent type:<ul>
+ * <li>name
+ * <li>access
+ * <li>mapping
+ * <li>attributes
+ * <li>super persistent type
+ * </ul>
+ */
+public abstract class AbstractJavaPersistentType
+	extends AbstractJavaJpaContextNode
+	implements JavaPersistentType
+{
+	protected JavaResourcePersistentType resourcePersistentType;
+
+	protected String name;
+
+	protected AccessType defaultAccess;
+
+	protected AccessType specifiedAccess;
+
+	protected JavaTypeMapping mapping;
+
+	protected final Vector<JavaPersistentAttribute> attributes = new Vector<JavaPersistentAttribute>();
+
+	protected PersistentType superPersistentType;
+
+
+	protected AbstractJavaPersistentType(PersistentType.Owner parent, JavaResourcePersistentType jrpt) {
+		super(parent);
+		this.initialize(jrpt);
+	}
+
+	protected void initialize(JavaResourcePersistentType jrpt) {
+		this.resourcePersistentType = jrpt;
+		this.superPersistentType = this.buildSuperPersistentType();
+		this.name = this.buildName();
+		this.defaultAccess = buildDefaultAccess();
+		this.specifiedAccess = buildSpecifiedAccess();
+		this.mapping = buildMapping();
+		this.initializeAttributes();
+	}
+
+
+	// ********** update **********
+
+	public void update(JavaResourcePersistentType jrpt) {
+		this.resourcePersistentType = jrpt;
+		this.update();
+	}
+
+	public void update() {
+		JpaFile jpaFile = this.getJpaFile();
+		if (jpaFile != null) {
+			// the JPA file can be null if the resource type is "external"
+			jpaFile.addRootStructureNode(this.resourcePersistentType.getQualifiedName(), this);
+		}
+		this.setSuperPersistentType(this.buildSuperPersistentType());
+		this.setName(this.buildName());
+		this.updateAccess();
+		this.updateMapping();
+		this.updateAttributes();
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		this.mapping.postUpdate();
+		for (PersistentAttribute attribute : this.getAttributes()) {
+			attribute.postUpdate();
+		}
+	}
+
+
+	// ********** AbstractJpaNode overrides **********
+
+	@Override
+	public PersistentType.Owner getParent() {
+		return (PersistentType.Owner) super.getParent();
+	}
+
+	@Override
+	public IResource getResource() {
+		return this.resourcePersistentType.getFile();
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return JavaStructureNodes.PERSISTENT_TYPE_ID;
+	}
+
+	// it would be nice if the we passed in an astRoot here, but then we
+	// would need to pass it to the XML structure nodes too...
+	public JpaStructureNode getStructureNode(int offset) {
+		CompilationUnit astRoot = this.buildASTRoot(); 
+
+		if (this.contains(offset, astRoot)) {
+			for (JavaPersistentAttribute persistentAttribute : this.getAttributes()) {
+				if (persistentAttribute.contains(offset, astRoot)) {
+					return persistentAttribute;
+				}
+			}
+			return this;
+		}
+		return null;
+	}
+
+	protected boolean contains(int offset, CompilationUnit astRoot) {
+		TextRange fullTextRange = this.getFullTextRange(astRoot);
+		// 'fullTextRange' will be null if the type no longer exists in the java;
+		// the context model can be out of synch with the resource model
+		// when a selection event occurs before the context model has a
+		// chance to synch with the resource model via the update thread
+		return (fullTextRange == null) ? false : fullTextRange.includes(offset);
+	}
+
+	protected TextRange getFullTextRange(CompilationUnit astRoot) {
+		return this.resourcePersistentType.getTextRange(astRoot);
+	}
+
+	public TextRange getSelectionTextRange() {
+		return this.getSelectionTextRange(this.buildASTRoot());
+	}
+
+	protected TextRange getSelectionTextRange(CompilationUnit astRoot) {
+		return this.resourcePersistentType.getNameTextRange(astRoot);
+	}
+
+	public void dispose() {
+		JpaFile jpaFile = this.getJpaFile();
+		if (jpaFile != null) {
+			// the JPA file can be null if the .java file was deleted
+			// or the resource type is "external"
+			jpaFile.removeRootStructureNode(this.resourcePersistentType.getQualifiedName());
+		}
+	}
+
+
+	// ********** PersistentType implementation **********
+
+	public JavaResourcePersistentType getResourcePersistentType() {
+		return this.resourcePersistentType;
+	}
+
+
+	// ********** name **********
+
+	public String getName() {
+		return this.name;
+	}
+
+	public String getShortName(){
+		return this.name.substring(this.name.lastIndexOf('.') + 1);
+	}
+
+	protected void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	protected String buildName() {
+		return this.resourcePersistentType.getQualifiedName();
+	}
+
+
+	// ********** access **********
+
+	public AccessType getAccess() {
+		return (this.specifiedAccess != null) ? this.specifiedAccess : this.defaultAccess;
+	}
+
+	public AccessType getDefaultAccess() {
+		return this.defaultAccess;
+	}
+
+	protected void setDefaultAccess(AccessType defaultAccess) {
+		AccessType old = this.defaultAccess;
+		this.defaultAccess = defaultAccess;
+		this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, defaultAccess);
+	}
+
+	public AccessType getSpecifiedAccess() {
+		return this.specifiedAccess;
+	}
+
+	/**
+	 * Check the access "specified" by the Java resource model:<ul>
+	 * <li>Check Java annotations first
+	 * <li>If <code>null</code>, check XML mapping specified access
+	 *	<li>If still <code>null</code>, check {@link #superPersistentType} access
+	 * <li>If still <code>null</code>, check <code>entity-mappings</code>
+	 *     specified access setting if the corresponding <code>persistent-type</code>
+	 *     is listed in a mapping (<code>orm.xml</code>) file
+	 * <li>If still <code>null</code>, check the <code>persistence-unit</code>
+	 *     default Access
+	 * <li>Default to <code>FIELD</code> if all else fails.
+	 * </ul>
+	 */
+	protected AccessType buildDefaultAccess() {
+		AccessType accessType = AccessType.fromJavaResourceModel(this.resourcePersistentType.getAccess());
+		if (accessType != null) {
+			return accessType;
+		}
+		accessType = this.getOwnerOverrideAccess();
+		if (accessType != null) {
+			return accessType;
+		}
+
+		if (this.superPersistentType != null) {
+			accessType = this.superPersistentType.getAccess();
+			if (accessType != null) {
+				return accessType;
+			}
+		}
+
+		accessType = this.getOwnerDefaultAccess();
+		if (accessType != null) {
+			return accessType;
+		}
+
+		// last ditch attempt to allow the user to annotate *something*
+		return AccessType.FIELD;
+	}
+
+	protected void updateAccess() {
+		this.setDefaultAccess(this.buildDefaultAccess());
+	}
+
+	/**
+	 * Build an access type based on annotations from the resource model.
+	 * (This is JPA platform-dependent.)
+	 */
+	protected abstract AccessType buildSpecifiedAccess();
+
+
+	// ********** mapping **********
+
+	public JavaTypeMapping getMapping() {
+		return this.mapping;
+	}
+
+	public String getMappingKey() {
+		return this.mapping.getKey();
+	}
+
+	public void setMappingKey(String key) {
+		if (this.valuesAreEqual(key, this.mapping.getKey())) {
+			return;
+		}
+		JavaTypeMapping oldMapping = this.mapping;
+		JavaTypeMapping newMapping = this.buildMappingFromMappingKey(key);
+
+		this.mapping = newMapping;
+		this.resourcePersistentType.setPrimaryAnnotation(newMapping.getAnnotationName(), newMapping.getSupportingAnnotationNames());
+		this.firePropertyChanged(MAPPING_PROPERTY, oldMapping, newMapping);
+	}
+
+	protected void setMapping(JavaTypeMapping mapping) {
+		JavaTypeMapping old = this.mapping;
+		this.mapping = mapping;
+		this.firePropertyChanged(MAPPING_PROPERTY, old, mapping);
+	}
+
+	protected JavaTypeMapping buildMapping() {
+		JavaTypeMappingDefinition mappingDefinition = this.getJpaPlatform().getJavaTypeMappingDefinition(this);
+		return this.buildMapping(mappingDefinition);
+	}
+
+	protected JavaTypeMapping buildMapping(JavaTypeMappingDefinition mappingDefinition) {
+		JavaTypeMapping jtMapping = mappingDefinition.buildMapping(this, this.getJpaFactory());
+		// mapping may be null
+		if (jtMapping != null) {
+			jtMapping.initialize(this.resourcePersistentType);
+		}
+		return jtMapping;
+	}
+
+	protected JavaTypeMapping buildMappingFromMappingKey(String key) {
+		JavaTypeMappingDefinition mappingDefinition = this.getJpaPlatform().getJavaTypeMappingDefinition(key);
+		JavaTypeMapping jtMapping = mappingDefinition.buildMapping(this, this.getJpaFactory());
+		//no mapping.initialize(JavaResourcePersistentType) call here
+		//we do not yet have a mapping annotation so we can't call initialize
+		return jtMapping;
+	}
+
+	protected void updateMapping() {
+		// There will always be a mapping definition, even if it is a "null" mapping definition ...
+		JavaTypeMappingDefinition mappingDefinition = this.getJpaPlatform().getJavaTypeMappingDefinition(this);
+		if ((this.mapping != null) && this.valuesAreEqual(this.mapping.getKey(), mappingDefinition.getKey())) {
+			this.mapping.update(this.resourcePersistentType);
+		}  else {
+			this.setMapping(this.buildMapping(mappingDefinition));
+		}
+	}
+
+
+	// ********** attributes **********
+
+	public ListIterator<JavaPersistentAttribute> attributes() {
+		return new CloneListIterator<JavaPersistentAttribute>(this.attributes);
+	}
+
+	protected Iterable<JavaPersistentAttribute> getAttributes() {
+		return new LiveCloneIterable<JavaPersistentAttribute>(this.attributes);
+	}
+
+	public int attributesSize() {
+		return this.attributes.size();
+	}
+
+	private void addAttribute(int index, JavaPersistentAttribute attribute) {
+		this.addItemToList(index, attribute, this.attributes, ATTRIBUTES_LIST);
+	}
+
+	private void removeAttribute(JavaPersistentAttribute attribute) {
+		this.removeItemFromList(attribute, this.attributes, ATTRIBUTES_LIST);
+	}
+
+	private void moveAttribute(int index, JavaPersistentAttribute attribute) {
+		this.moveItemInList(index, this.attributes.indexOf(attribute), this.attributes, ATTRIBUTES_LIST);
+	}
+
+	public Iterator<String> attributeNames() {
+		return this.attributeNames(this.attributes());
+	}
+
+	protected Iterator<String> attributeNames(Iterator<? extends PersistentAttribute> attrs) {
+		return new TransformationIterator<PersistentAttribute, String>(attrs) {
+			@Override
+			protected String transform(PersistentAttribute attribute) {
+				return attribute.getName();
+			}
+		};
+	}
+
+	public JavaPersistentAttribute getAttributeNamed(String attributeName) {
+		Iterator<JavaPersistentAttribute> stream = this.attributesNamed(attributeName);
+		return stream.hasNext() ? stream.next() : null;
+	}
+
+	public PersistentAttribute resolveAttribute(String attributeName) {
+		Iterator<JavaPersistentAttribute> stream = this.attributesNamed(attributeName);
+		if (stream.hasNext()) {
+			JavaPersistentAttribute attribute = stream.next();
+			return stream.hasNext() ? null /*more than one*/: attribute;
+		}
+		return (this.superPersistentType == null) ? null : this.superPersistentType.resolveAttribute(attributeName);
+	}
+
+	protected Iterator<JavaPersistentAttribute> attributesNamed(final String attributeName) {
+		return new FilteringIterator<JavaPersistentAttribute>(this.attributes()) {
+			@Override
+			protected boolean accept(JavaPersistentAttribute o) {
+				return attributeName.equals(o.getName());
+			}
+		};
+	}
+
+	public Iterator<PersistentAttribute> allAttributes() {
+		return new CompositeIterator<PersistentAttribute>(
+				new TransformationIterator<PersistentType, Iterator<PersistentAttribute>>(this.inheritanceHierarchy()) {
+					@Override
+					protected Iterator<PersistentAttribute> transform(PersistentType pt) {
+						return pt.attributes();
+					}
+				}
+			);
+	}
+
+	public Iterator<String> allAttributeNames() {
+		return this.attributeNames(this.allAttributes());
+	}
+
+	protected void initializeAttributes() {
+		for (Iterator<JavaResourcePersistentAttribute> stream = this.resourceAttributes(); stream.hasNext(); ) {
+			this.attributes.add(this.createAttribute(stream.next()));
+		}
+	}
+
+	protected Iterator<JavaResourcePersistentAttribute> resourceAttributes() {
+		return (this.getAccess() == AccessType.PROPERTY) ?
+				this.resourcePersistentType.persistableProperties() :
+				this.resourcePersistentType.persistableFields();
+	}
+
+	protected void updateAttributes() {
+		HashBag<JavaPersistentAttribute> contextAttributesToRemove = CollectionTools.bag(this.attributes(), this.attributesSize());
+		ArrayList<JavaPersistentAttribute> contextAttributesToUpdate = new ArrayList<JavaPersistentAttribute>(this.attributesSize());
+		int resourceIndex = 0;
+
+		for (Iterator<JavaResourcePersistentAttribute> resourceAttributes = this.resourceAttributes(); resourceAttributes.hasNext(); ) {
+			JavaResourcePersistentAttribute resourceAttribute = resourceAttributes.next();
+			boolean match = false;
+			for (Iterator<JavaPersistentAttribute> contextAttributes = contextAttributesToRemove.iterator(); contextAttributes.hasNext(); ) {
+				JavaPersistentAttribute contextAttribute = contextAttributes.next();
+				if (contextAttribute.getResourcePersistentAttribute() == resourceAttribute) {
+					this.moveAttribute(resourceIndex, contextAttribute);
+					contextAttributes.remove();
+					contextAttributesToUpdate.add(contextAttribute);
+					match = true;
+					break;
+				}
+			}
+			if ( ! match) {
+				this.addAttribute(resourceIndex, this.createAttribute(resourceAttribute));
+			}
+			resourceIndex++;
+		}
+		for (JavaPersistentAttribute contextAttribute : contextAttributesToRemove) {
+			this.removeAttribute(contextAttribute);
+		}
+		// handle adding and removing attributes first, update the
+		// remaining attributes last; this reduces the churn during "update"
+		for (JavaPersistentAttribute contextAttribute : contextAttributesToUpdate) {
+			contextAttribute.update();
+		}
+	}
+
+	protected JavaPersistentAttribute createAttribute(JavaResourcePersistentAttribute jrpa) {
+		return this.getJpaFactory().buildJavaPersistentAttribute(this, jrpa);
+	}
+
+	public boolean hasAnyAnnotatedAttributes() {
+		return this.resourcePersistentType.hasAnyAnnotatedAttributes();
+	}
+
+
+	// ********** super persistent type **********
+
+	public PersistentType getSuperPersistentType() {
+		return this.superPersistentType;
+	}
+
+	protected void setSuperPersistentType(PersistentType superPersistentType) {
+		PersistentType old = this.superPersistentType;
+		this.superPersistentType = superPersistentType;
+		this.firePropertyChanged(SUPER_PERSISTENT_TYPE_PROPERTY, old, superPersistentType);
+	}
+
+	protected PersistentType buildSuperPersistentType() {
+		HashSet<JavaResourcePersistentType> visited = new HashSet<JavaResourcePersistentType>();
+		visited.add(this.resourcePersistentType);
+		PersistentType spt = this.getSuperPersistentType(this.resourcePersistentType.getSuperclassQualifiedName(), visited);
+		if (spt == null) {
+			return null;
+		}
+		if (CollectionTools.contains(spt.inheritanceHierarchy(), this)) {
+			return null;  // short-circuit in this case, we have circular inheritance
+		}
+		return spt.isMapped() ? spt : spt.getSuperPersistentType();
+	}
+
+	/**
+	 * The JPA spec allows non-persistent types in a persistent type's
+	 * inheritance hierarchy. We check for a persistent type with the
+	 * specified name in the persistence unit. If it is not found we use
+	 * resource persistent type and look for *its* super type.
+	 * 
+	 * The 'visited' collection is used to detect a cycle in the *resource* type
+	 * inheritance hierarchy and prevent the resulting stack overflow.
+	 * Any cycles in the *context* type inheritance hierarchy are handled in
+	 * #buildSuperPersistentType().
+	 */
+	protected PersistentType getSuperPersistentType(String typeName, Collection<JavaResourcePersistentType> visited) {
+		if (typeName == null) {
+			return null;
+		}
+		JavaResourcePersistentType resourceType = this.getJpaProject().getJavaResourcePersistentType(typeName);
+		if ((resourceType == null) || visited.contains(resourceType)) {
+			return null;
+		}
+		visited.add(resourceType);
+		PersistentType spt = this.getPersistentType(typeName);
+		return (spt != null) ? spt : this.getSuperPersistentType(resourceType.getSuperclassQualifiedName(), visited);  // recurse
+	}
+
+	protected PersistentType getPersistentType(String typeName) {
+		return this.getPersistenceUnit().getPersistentType(typeName);
+	}
+
+
+	// ********** inheritance **********
+
+	public Iterator<PersistentType> inheritanceHierarchy() {
+		return this.inheritanceHierarchyOf(this);
+	}
+
+	public Iterator<PersistentType> ancestors() {
+		return this.inheritanceHierarchyOf(this.superPersistentType);
+	}
+
+	protected Iterator<PersistentType> inheritanceHierarchyOf(PersistentType start) {
+		// using a chain iterator to traverse up the inheritance tree
+		return new ChainIterator<PersistentType>(start) {
+			@Override
+			protected PersistentType nextLink(PersistentType persistentType) {
+				return persistentType.getSuperPersistentType();
+			}
+		};
+	}
+
+
+	// ********** code completion  **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		Iterator<String> values = this.mapping.javaCompletionProposals(pos, filter, astRoot);
+		if (values != null) {
+			return values;
+		}
+		for (JavaPersistentAttribute attribute : this.getAttributes()) {
+			values = attribute.javaCompletionProposals(pos, filter, astRoot);
+			if (values != null) {
+				return values;
+			}
+		}
+		return EmptyIterator.instance();
+	}
+
+
+	// ********** validation **********
+
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		if (reporter.isCancelled()) {
+			throw new ValidationCancelledException();
+		}
+		// TODO temporary hack since we don't know yet where to put
+		// any messages for types in another project (e.g. referenced by
+		// persistence.xml)
+		IFile file = this.resourcePersistentType.getFile();
+		// 'file' will be null if the type is "external" and binary;
+		// the file will be in a different project if the type is "external" and source;
+		// the type will be binary if it is in a JAR in the current project
+		if ((file != null) && file.getProject().equals(this.getJpaProject().getProject()) &&
+				(this.resourcePersistentType instanceof SourceNode)) {
+			// build the AST root here to pass down
+			this.validate(messages, reporter, this.buildASTRoot());
+		}
+	}
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateMapping(messages, reporter, astRoot);
+		this.validateAttributes(messages, reporter, astRoot);
+	}
+
+	protected void validateMapping(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		try {
+			this.mapping.validate(messages, reporter, astRoot);
+		} catch(Throwable t) {
+			JptCorePlugin.log(t);
+		}
+	}
+
+	protected void validateAttributes(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		for (JavaPersistentAttribute attribute : this.getAttributes()) {
+			this.validateAttribute(attribute, reporter, messages, astRoot);
+		}
+	}
+
+	protected void validateAttribute(JavaPersistentAttribute attribute, IReporter reporter, List<IMessage> messages, CompilationUnit astRoot) {
+		try {
+			attribute.validate(messages, reporter, astRoot);
+		} catch(Throwable t) {
+			JptCorePlugin.log(t);
+		}
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getSelectionTextRange(astRoot);
+	}
+
+
+	// ********** misc **********
+
+	public boolean isMapped() {
+		return this.mapping.isMapped();
+	}
+
+	public AccessType getOwnerOverrideAccess() {
+		return this.getParent().getOverridePersistentTypeAccess();
+	}
+
+	public AccessType getOwnerDefaultAccess() {
+		return this.getParent().getDefaultPersistentTypeAccess();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.name);
+	}
+
+	protected CompilationUnit buildASTRoot() {
+		return this.resourcePersistentType.getJavaResourceCompilationUnit().buildASTRoot();
+	}
+
+	protected JpaFile getJpaFile() {
+		return this.getJpaFile(this.resourcePersistentType.getFile());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaQuery.java
new file mode 100644
index 0000000..0f3c687
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaQuery.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.QueryHint;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaQuery;
+import org.eclipse.jpt.core.context.java.JavaQueryHint;
+import org.eclipse.jpt.core.resource.java.BaseNamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+
+public abstract class AbstractJavaQuery extends AbstractJavaJpaContextNode 
+	implements JavaQuery
+{
+	protected String name;
+
+	protected String query;
+
+	protected final Vector<JavaQueryHint> hints;
+
+	protected BaseNamedQueryAnnotation queryAnnotation;
+	
+	protected AbstractJavaQuery(JavaJpaContextNode parent) {
+		super(parent);
+		this.hints = new Vector<JavaQueryHint>();
+	}
+
+	protected BaseNamedQueryAnnotation getResourceQuery() {
+		return this.queryAnnotation;
+	}
+	
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		this.queryAnnotation.setName(newName);
+		firePropertyChanged(NAME_PROPERTY, oldName, newName);
+	}
+	
+	protected void setName_(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		firePropertyChanged(NAME_PROPERTY, oldName, newName);
+	}
+
+	public String getQuery() {
+		return this.query;
+	}
+
+	public void setQuery(String newQuery) {
+		String oldQuery = this.query;
+		this.query = newQuery;
+		this.queryAnnotation.setQuery(newQuery);
+		firePropertyChanged(QUERY_PROPERTY, oldQuery, newQuery);
+	}
+	
+	protected void setQuery_(String newQuery) {
+		String oldQuery = this.query;
+		this.query = newQuery;
+		firePropertyChanged(QUERY_PROPERTY, oldQuery, newQuery);
+	}
+
+	public ListIterator<JavaQueryHint> hints() {
+		return new CloneListIterator<JavaQueryHint>(this.hints);
+	}
+
+	public int hintsSize() {
+		return this.hints.size();
+	}
+	
+	public JavaQueryHint addHint(int index) {
+		JavaQueryHint hint = getJpaFactory().buildJavaQueryHint(this);
+		this.hints.add(index, hint);
+		this.getResourceQuery().addHint(index);
+		this.fireItemAdded(HINTS_LIST, index, hint);
+		return hint;
+	}
+
+	protected void addHint(int index, JavaQueryHint hint) {
+		addItemToList(index, hint, this.hints, HINTS_LIST);
+	}
+	
+	protected void addHint(JavaQueryHint hint) {
+		addHint(this.hints.size(), hint);
+	}
+	
+	public void removeHint(QueryHint queryHint) {
+		removeHint(this.hints.indexOf(queryHint));
+	}
+	
+	public void removeHint(int index) {
+		JavaQueryHint removedHint = this.hints.remove(index);
+		this.getResourceQuery().removeHint(index);
+		fireItemRemoved(HINTS_LIST, index, removedHint);
+	}
+	
+	protected void removeHint_(JavaQueryHint hint) {
+		removeItemFromList(hint, this.hints, HINTS_LIST);
+	}
+	
+	public void moveHint(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.hints, targetIndex, sourceIndex);
+		this.getResourceQuery().moveHint(targetIndex, sourceIndex);
+		fireItemMoved(HINTS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	protected void initialize(BaseNamedQueryAnnotation annotation) {
+		this.queryAnnotation = annotation;
+		this.name = annotation.getName();
+		this.query = annotation.getQuery();
+		this.initializeQueryHints();
+	}
+
+	protected void update(BaseNamedQueryAnnotation annotation) {
+		this.queryAnnotation = annotation;
+		this.setName_(annotation.getName());
+		this.setQuery_(annotation.getQuery());
+		this.updateQueryHints();
+		getPersistenceUnit().addQuery(this);
+	}
+
+	protected void initializeQueryHints() {
+		for (ListIterator<QueryHintAnnotation> resourceHints = this.queryAnnotation.hints(); resourceHints.hasNext(); ) {
+			this.hints.add(createQueryHint(resourceHints.next()));
+		}
+	}
+	
+	protected void updateQueryHints() {
+		ListIterator<JavaQueryHint> contextHints = hints();
+		ListIterator<QueryHintAnnotation> resourceHints = this.queryAnnotation.hints();
+		
+		while (contextHints.hasNext()) {
+			JavaQueryHint hint = contextHints.next();
+			if (resourceHints.hasNext()) {
+				hint.update(resourceHints.next());
+			}
+			else {
+				removeHint_(hint);
+			}
+		}
+		
+		while (resourceHints.hasNext()) {
+			addHint(createQueryHint(resourceHints.next()));
+		}
+	}
+
+	protected JavaQueryHint createQueryHint(QueryHintAnnotation resourceQueryHint) {
+		JavaQueryHint queryHint =  getJpaFactory().buildJavaQueryHint(this);
+		queryHint.initialize(resourceQueryHint);
+		return queryHint;
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.queryAnnotation.getTextRange(astRoot);
+	}
+	
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.queryAnnotation.getNameTextRange(astRoot);
+	}
+	
+	public boolean overrides(Query other) {
+		// java is at the base of the tree
+		return false;
+	}
+	
+	public boolean duplicates(Query other) {
+		return (this != other)
+				&& ! StringTools.stringIsEmpty(this.name)
+				&& this.name.equals(other.getName())
+				&& ! this.overrides(other)
+				&& ! other.overrides(this);
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java
new file mode 100644
index 0000000..d081904
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipMapping.java
@@ -0,0 +1,348 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaRelationshipReference;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaCascade;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCascade2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java relationship mapping
+ */
+public abstract class AbstractJavaRelationshipMapping<T extends RelationshipMapping2_0Annotation>
+	extends AbstractJavaAttributeMapping<T>
+	implements JavaRelationshipMapping2_0
+{
+	protected String specifiedTargetEntity;
+	protected String defaultTargetEntity;
+	protected String fullyQualifiedTargetEntity;
+	protected PersistentType resolvedTargetType;
+	protected Entity resolvedTargetEntity;
+	
+	protected final JavaRelationshipReference relationshipReference;
+	
+	protected final JavaCascade2_0 cascade;
+	
+	protected FetchType specifiedFetch;
+	
+	
+	protected AbstractJavaRelationshipMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.relationshipReference = buildRelationshipReference();
+		this.cascade = buildCascade();
+	}
+	
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.relationshipReference.initialize();
+		this.specifiedFetch = this.getResourceFetch();
+		this.cascade.initialize();
+		this.defaultTargetEntity = this.buildDefaultTargetEntity();
+		this.specifiedTargetEntity = this.getResourceTargetEntity();
+		this.fullyQualifiedTargetEntity = this.buildFullyQualifiedTargetEntity();
+		this.resolvedTargetType = this.resolveTargetType();
+		this.resolvedTargetEntity = this.resolveTargetEntity();
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.relationshipReference.update();
+		this.setSpecifiedFetch_(this.getResourceFetch());
+		this.cascade.update();
+		this.setDefaultTargetEntity(this.buildDefaultTargetEntity());
+		this.setSpecifiedTargetEntity_(this.getResourceTargetEntity());
+		this.setFullyQualifiedTargetEntity(this.buildFullyQualifiedTargetEntity());
+		this.resolvedTargetType = this.resolveTargetType();
+		this.setResolvedTargetEntity(this.resolveTargetEntity());
+	}
+	
+	
+	// ********** target entity **********
+
+	public String getTargetEntity() {
+		return (this.specifiedTargetEntity != null) ? this.specifiedTargetEntity : this.defaultTargetEntity;
+	}
+
+	public String getSpecifiedTargetEntity() {
+		return this.specifiedTargetEntity;
+	}
+
+	public void setSpecifiedTargetEntity(String targetEntity) {
+		String old = this.specifiedTargetEntity;
+		this.specifiedTargetEntity = targetEntity;
+		this.mappingAnnotation.setTargetEntity(targetEntity);
+		this.firePropertyChanged(SPECIFIED_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	protected void setSpecifiedTargetEntity_(String targetEntity) {
+		String old = this.specifiedTargetEntity;
+		this.specifiedTargetEntity = targetEntity;
+		this.firePropertyChanged(SPECIFIED_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	protected String getResourceTargetEntity() {
+		return this.mappingAnnotation.getTargetEntity();
+	}
+
+	public String getDefaultTargetEntity() {
+		return this.defaultTargetEntity;
+	}
+
+	protected void setDefaultTargetEntity(String targetEntity) {
+		String old = this.defaultTargetEntity;
+		this.defaultTargetEntity = targetEntity;
+		this.firePropertyChanged(DEFAULT_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	protected abstract String buildDefaultTargetEntity();
+
+	public String getFullyQualifiedTargetEntity() {
+		return this.fullyQualifiedTargetEntity;
+	}
+
+	protected void setFullyQualifiedTargetEntity(String targetEntity) {
+		String old = this.fullyQualifiedTargetEntity;
+		this.fullyQualifiedTargetEntity = targetEntity;
+		this.firePropertyChanged(FULLY_QUALIFIED_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	protected String buildFullyQualifiedTargetEntity() {
+		return (this.specifiedTargetEntity == null) ?
+			this.defaultTargetEntity :
+			this.mappingAnnotation.getFullyQualifiedTargetEntityClassName();
+	}
+
+	public PersistentType getResolvedTargetType() {
+		return this.resolvedTargetType;
+	}
+
+	protected PersistentType resolveTargetType() {
+		return (this.fullyQualifiedTargetEntity == null) ? null : this.getPersistenceUnit().getPersistentType(this.fullyQualifiedTargetEntity);
+	}
+	
+	public Entity getResolvedTargetEntity() {
+		return this.resolvedTargetEntity;
+	}
+
+	protected void setResolvedTargetEntity(Entity entity) {
+		Entity old = this.resolvedTargetEntity;
+		this.resolvedTargetEntity = entity;
+		this.firePropertyChanged(RESOLVED_TARGET_ENTITY_PROPERTY, old, entity);
+	}
+
+	protected Entity resolveTargetEntity() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+	public Iterator<String> allTargetEntityAttributeNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.allTargetEntityAttributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+		});
+	}
+
+	protected Iterator<AttributeMapping> allTargetEntityAttributeMappings() {
+		return (this.resolvedTargetEntity != null) ?
+				this.resolvedTargetEntity.allAttributeMappings() :
+				EmptyIterator.<AttributeMapping> instance();
+	}
+
+	protected String getTargetEntityIdAttributeName() {
+		PersistentAttribute attribute = this.getTargetEntityIdAttribute();
+		return (attribute == null) ? null : attribute.getName();
+	}
+
+	protected PersistentAttribute getTargetEntityIdAttribute() {
+		return (this.resolvedTargetEntity == null) ? null : this.resolvedTargetEntity.getIdAttribute();
+	}
+
+	public char getTargetEntityEnclosingTypeSeparator() {
+		return '.';
+	}
+
+
+	// ********** relationship reference **********  
+
+	public JavaRelationshipReference getRelationshipReference() {
+		return this.relationshipReference;
+	}
+
+	protected abstract JavaRelationshipReference buildRelationshipReference();
+
+	@Override
+	public boolean isRelationshipOwner() {
+		return this.relationshipReference.isRelationshipOwner();
+	}
+
+	public RelationshipMapping getRelationshipOwner() {
+		Entity targetEntity = this.getResolvedTargetEntity();
+		if (targetEntity == null) {
+			return null;
+		}
+		for (PersistentAttribute each : 
+			CollectionTools.iterable(
+				targetEntity.getPersistentType().allAttributes())) {
+			if (this.isOwnedBy(each.getMapping())) {
+				return (RelationshipMapping) each.getMapping();
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public boolean isOwnedBy(AttributeMapping mapping) {
+		if (mapping.isRelationshipOwner()) {
+			return this.relationshipReference.isOwnedBy((RelationshipMapping) mapping);
+		}
+		return false;
+	}
+
+	@Override
+	public boolean isOverridableAssociationMapping() {
+		return this.relationshipReference.isOverridableAssociation();
+	}
+
+
+	// ********** cascade **********  
+	
+	protected JavaCascade2_0 buildCascade() {
+		return new GenericJavaCascade(this);
+	}
+	
+	public JavaCascade2_0 getCascade() {
+		return this.cascade;
+	}
+	
+	
+	// ********** fetch **********  
+
+	public FetchType getFetch() {
+		return (this.specifiedFetch != null) ? this.specifiedFetch : this.getDefaultFetch();
+	}
+
+	public FetchType getSpecifiedFetch() {
+		return this.specifiedFetch;
+	}
+
+	public void setSpecifiedFetch(FetchType fetch) {
+		FetchType old = this.specifiedFetch;
+		this.specifiedFetch = fetch;
+		this.mappingAnnotation.setFetch(FetchType.toJavaResourceModel(fetch));
+		this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
+	}
+
+	protected void setSpecifiedFetch_(FetchType fetch) {
+		FetchType old = this.specifiedFetch;
+		this.specifiedFetch = fetch;
+		this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
+	}
+
+	protected FetchType getResourceFetch() {
+		return FetchType.fromJavaResourceModel(this.mappingAnnotation.getFetch());
+	}
+
+
+	// ********** Java completion proposals **********  
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return this.relationshipReference.javaCompletionProposals(pos, filter, astRoot);
+	}
+
+
+	// ********** validation **********  
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateTargetEntity(messages, astRoot);
+		this.relationshipReference.validate(messages, reporter, astRoot);
+	}
+
+	protected void validateTargetEntity(List<IMessage> messages, CompilationUnit astRoot) {
+		if (this.getTargetEntity() == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TARGET_ENTITY_NOT_DEFINED,
+					new String[] {this.getName()}, 
+					this, 
+					this.getValidationTextRange(astRoot)
+				)
+			);
+		}
+		else if (this.resolvedTargetEntity == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TARGET_ENTITY_IS_NOT_AN_ENTITY,
+					new String[] {this.getTargetEntity(), this.getName()}, 
+					this, 
+					this.getTargetEntityTextRange(astRoot)
+				)
+			);
+		}
+	}
+
+	protected TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.mappingAnnotation.getTargetEntityTextRange(astRoot), astRoot);
+	}
+
+	protected TextRange getTextRange(TextRange textRange, CompilationUnit astRoot) {
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+	}
+
+
+	// ********** metamodel ********** 
+
+	@Override
+	public String getMetamodelTypeName() {
+		return (this.fullyQualifiedTargetEntity != null) ? this.fullyQualifiedTargetEntity : MetamodelField.DEFAULT_TYPE_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipReference.java
new file mode 100644
index 0000000..1b5ccb1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaRelationshipReference.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaRelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaRelationshipReference;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public abstract class AbstractJavaRelationshipReference
+	extends AbstractJavaJpaContextNode 
+	implements JavaRelationshipReference
+{
+	// cache the strategy for property change notification
+	protected JoiningStrategy cachedPredominantJoiningStrategy;
+	
+	
+	public AbstractJavaRelationshipReference(JavaRelationshipMapping parent) {
+		super(parent);
+	}
+	
+	
+	public JavaRelationshipMapping getRelationshipMapping() {
+		return (JavaRelationshipMapping) getParent();
+	}
+	
+	public TypeMapping getTypeMapping() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+	
+	public Entity getEntity() {
+		TypeMapping typeMapping = getTypeMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+	
+	public boolean isOverridableAssociation() {
+		return getPredominantJoiningStrategy().isOverridableAssociation();
+	}
+
+	public boolean isParentVirtual() {
+		return getRelationshipMapping().getPersistentAttribute().isVirtual();
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+
+	// **************** predominant joining strategy ***************************
+	
+	public JoiningStrategy getPredominantJoiningStrategy() {
+		return this.cachedPredominantJoiningStrategy;
+	}
+	
+	protected void setPredominantJoiningStrategy() {
+		setPredominantJoiningStrategy(calculatePredominantJoiningStrategy());
+	}
+	
+	protected void setPredominantJoiningStrategy(JoiningStrategy newJoiningStrategy) {
+		JoiningStrategy oldJoiningStrategy = this.cachedPredominantJoiningStrategy;
+		this.cachedPredominantJoiningStrategy = newJoiningStrategy;
+		firePropertyChanged(PREDOMINANT_JOINING_STRATEGY_PROPERTY, oldJoiningStrategy, newJoiningStrategy);
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	public void initialize() {
+		initializeJoiningStrategies();
+		this.cachedPredominantJoiningStrategy = calculatePredominantJoiningStrategy();
+	}
+	
+	protected abstract void initializeJoiningStrategies();
+	
+	public void update() {
+		updateJoiningStrategies();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected abstract void updateJoiningStrategies();
+	
+	protected abstract JoiningStrategy calculatePredominantJoiningStrategy();
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return getRelationshipMapping().getValidationTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSequenceGenerator.java
new file mode 100644
index 0000000..02d7926
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSequenceGenerator.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.SequenceGenerator;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+
+/**
+ * 
+ */
+public abstract class AbstractJavaSequenceGenerator extends AbstractJavaGenerator
+	implements JavaSequenceGenerator
+{
+	protected String specifiedSequenceName;
+
+
+	protected AbstractJavaSequenceGenerator(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+
+	// ********** sequence name **********
+
+	public String getSequenceName() {
+		return (this.specifiedSequenceName != null) ? this.specifiedSequenceName : this.getDefaultSequenceName();
+	}
+
+	public String getSpecifiedSequenceName() {
+		return this.specifiedSequenceName;
+	}
+
+	public void setSpecifiedSequenceName(String specifiedSequenceName) {
+		String old = this.specifiedSequenceName;
+		this.specifiedSequenceName = specifiedSequenceName;
+		this.getResourceGenerator().setSequenceName(specifiedSequenceName);
+		this.firePropertyChanged(SPECIFIED_SEQUENCE_NAME_PROPERTY, old, specifiedSequenceName);
+	}
+
+	protected void setSpecifiedSequenceName_(String specifiedSequenceName) {
+		String old = this.specifiedSequenceName;
+		this.specifiedSequenceName = specifiedSequenceName;
+		this.firePropertyChanged(SPECIFIED_SEQUENCE_NAME_PROPERTY, old, specifiedSequenceName);
+	}
+
+	public String getDefaultSequenceName() {
+		return null;
+	}
+
+
+	// ********** resource => context **********
+
+	public void initialize(SequenceGeneratorAnnotation resourceSequenceGenerator) {
+		super.initialize(resourceSequenceGenerator);
+		this.specifiedSequenceName = resourceSequenceGenerator.getSequenceName();
+	}
+	
+	public void update(SequenceGeneratorAnnotation resourceSequenceGenerator) {
+		super.update(resourceSequenceGenerator);
+		this.setSpecifiedSequenceName_(resourceSequenceGenerator.getSequenceName()); 
+	}
+
+
+	// ********** Java completion proposals **********
+
+	/**
+	 * called if the database is connected:
+	 * sequenceName
+	 */
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.sequenceNameTouches(pos, astRoot)) {
+			return this.getJavaCandidateSequences(filter).iterator();
+		}
+		return null;
+	}
+
+	protected boolean sequenceNameTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceGenerator().sequenceNameTouches(pos, astRoot);
+	}
+
+	protected Iterable<String> getJavaCandidateSequences(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateSequences(filter));
+	}
+
+	protected Iterable<String> getCandidateSequences(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateSequences(), filter);
+	}
+
+	protected Iterable<String> getCandidateSequences() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema != null) ? dbSchema.getSortedSequenceIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+
+	// ********** misc **********
+
+	public int getDefaultInitialValue() {
+		return SequenceGenerator.DEFAULT_INITIAL_VALUE;
+	}
+	
+	@Override
+	protected SequenceGeneratorAnnotation getResourceGenerator() {
+		return (SequenceGeneratorAnnotation) super.getResourceGenerator();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
new file mode 100644
index 0000000..375f50d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.Nullable;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.jpa2.context.java.NullJavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java single relationship (1:1, m:1) mapping
+ */
+public abstract class AbstractJavaSingleRelationshipMapping<T extends RelationshipMapping2_0Annotation>
+	extends AbstractJavaRelationshipMapping<T>
+	implements JavaSingleRelationshipMapping2_0
+{
+	protected Boolean specifiedOptional;
+
+	protected final JavaDerivedIdentity2_0 derivedIdentity;
+	
+	
+	protected AbstractJavaSingleRelationshipMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.derivedIdentity = buildDerivedIdentity();
+	}
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.specifiedOptional = this.getResourceOptional();
+		this.derivedIdentity.initialize();
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.setSpecifiedOptional_(this.getResourceOptional());
+		this.derivedIdentity.update();
+	}
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.JOIN_COLUMN);
+		names.add(JPA.JOIN_COLUMNS);
+		names.add(JPA.JOIN_TABLE);
+		if (this.isJpa2_0Compatible()) {
+			names.add(JPA.ID);
+			names.add(JPA2_0.MAPS_ID);
+		}
+	}
+	
+	
+	// ********** optional **********
+	
+	public boolean isOptional() {
+		return (this.specifiedOptional != null) ? this.specifiedOptional.booleanValue() : this.isDefaultOptional();
+	}
+	
+	public Boolean getSpecifiedOptional() {
+		return this.specifiedOptional;
+	}
+	
+	public void setSpecifiedOptional(Boolean optional) {
+		Boolean old = this.specifiedOptional;
+		this.specifiedOptional = optional;
+		this.setResourceOptional(optional);
+		this.firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, old, optional);
+	}
+	
+	protected void setSpecifiedOptional_(Boolean optional) {
+		Boolean old = this.specifiedOptional;
+		this.specifiedOptional = optional;
+		this.firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, old, optional);
+	}
+	
+	public boolean isDefaultOptional() {
+		return Nullable.DEFAULT_OPTIONAL;
+	}
+	
+	protected abstract Boolean getResourceOptional();
+	
+	protected abstract void setResourceOptional(Boolean newOptional);
+	
+	
+	// ********** 2.0 derived identity **********
+	
+	protected JavaDerivedIdentity2_0 buildDerivedIdentity() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) this.getJpaFactory()).buildJavaDerivedIdentity(this) : 
+			new NullJavaDerivedIdentity2_0(this);
+	}
+	
+	public JavaDerivedIdentity2_0 getDerivedIdentity() {
+		return this.derivedIdentity;
+	}
+	
+	
+	// ********** AbstractJavaRelationshipMapping implementation **********
+	
+	@Override
+	protected String buildDefaultTargetEntity() {
+		return this.getPersistentAttribute().getSingleReferenceTargetTypeName();
+	}
+	
+	
+	// ********** Fetchable implementation **********
+	
+	public FetchType getDefaultFetch() {
+		return DEFAULT_FETCH_TYPE;
+	}
+	
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null) {
+			result = this.derivedIdentity.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.derivedIdentity.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java
new file mode 100644
index 0000000..db128ba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTable.java
@@ -0,0 +1,502 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.resource.java.BaseTableAnnotation;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.NameTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+/**
+ * Java table
+ */
+public abstract class AbstractJavaTable
+	extends AbstractJavaJpaContextNode
+	implements Table, UniqueConstraint.Owner
+{
+	protected String specifiedName;
+	protected String defaultName;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected final Vector<JavaUniqueConstraint> uniqueConstraints = new Vector<JavaUniqueConstraint>();
+
+
+	// ********** constructor **********
+
+	protected AbstractJavaTable(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+
+	// ********** abstract methods **********
+
+	/**
+	 * Return the Java table annotation. Do not return null if the Java
+	 * annotation does not exist; return a null table annotation instead.
+	 */
+	protected abstract BaseTableAnnotation getAnnotation();
+
+	/**
+	 * Return the name of the Java annotation.
+	 */
+	protected abstract String getAnnotationName();
+
+	protected abstract String buildDefaultName();
+
+	protected abstract String buildDefaultSchema();
+
+	protected abstract String buildDefaultCatalog();
+
+
+	// ********** name **********
+
+	public String getName() {
+		return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
+	}
+
+	public String getSpecifiedName() {
+		return this.specifiedName;
+	}
+
+	public void setSpecifiedName(String name) {
+		String old = this.specifiedName;
+		this.specifiedName = name;
+		this.getAnnotation().setName(name);
+		this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedName_(String name) {
+		String old = this.specifiedName;
+		this.specifiedName = name;
+		this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
+	}
+
+	public String getDefaultName() {
+		return this.defaultName;
+	}
+
+	protected void setDefaultName(String name) {
+		String old = this.defaultName;
+		this.defaultName = name;
+		this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** schema **********
+
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.getAnnotation().setSchema(schema);
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedSchema_(String newSpecifiedSchema) {
+		String oldSpecifiedSchema = this.specifiedSchema;
+		this.specifiedSchema = newSpecifiedSchema;
+		firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, oldSpecifiedSchema, newSpecifiedSchema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+
+	// ********** catalog **********
+
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.getAnnotation().setCatalog(catalog);
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedCatalog_(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+
+	// ********** unique constraints **********
+
+	public @SuppressWarnings("unchecked") ListIterator<JavaUniqueConstraint> uniqueConstraints() {
+		return new CloneListIterator<JavaUniqueConstraint>(this.uniqueConstraints);
+	}
+
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+
+	public JavaUniqueConstraint addUniqueConstraint(int index) {
+		JavaUniqueConstraint uniqueConstraint = getJpaFactory().buildJavaUniqueConstraint(this, this);
+		this.uniqueConstraints.add(index, uniqueConstraint);
+		UniqueConstraintAnnotation uniqueConstraintAnnotation = this.getAnnotation().addUniqueConstraint(index);
+		uniqueConstraint.initialize(uniqueConstraintAnnotation);
+		fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, uniqueConstraint);
+		return uniqueConstraint;
+	}
+
+	public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
+		this.removeUniqueConstraint(this.uniqueConstraints.indexOf(uniqueConstraint));
+	}
+
+	public void removeUniqueConstraint(int index) {
+		JavaUniqueConstraint removedUniqueConstraint = this.uniqueConstraints.remove(index);
+		this.getAnnotation().removeUniqueConstraint(index);
+		fireItemRemoved(UNIQUE_CONSTRAINTS_LIST, index, removedUniqueConstraint);
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.uniqueConstraints, targetIndex, sourceIndex);
+		this.getAnnotation().moveUniqueConstraint(targetIndex, sourceIndex);
+		fireItemMoved(UNIQUE_CONSTRAINTS_LIST, targetIndex, sourceIndex);
+	}
+
+	protected void addUniqueConstraint(int index, JavaUniqueConstraint uniqueConstraint) {
+		addItemToList(index, uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+
+	protected void addUniqueConstraint(JavaUniqueConstraint uniqueConstraint) {
+		this.addUniqueConstraint(this.uniqueConstraints.size(), uniqueConstraint);
+	}
+
+	protected void removeUniqueConstraint_(JavaUniqueConstraint uniqueConstraint) {
+		removeItemFromList(uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+
+	protected void initializeUniqueConstraints(BaseTableAnnotation baseTableAnnotation) {
+		for (Iterator<UniqueConstraintAnnotation> stream = baseTableAnnotation.uniqueConstraints(); stream.hasNext(); ) {
+			this.uniqueConstraints.add(buildUniqueConstraint(stream.next()));
+		}
+	}
+
+	protected void updateUniqueConstraints(BaseTableAnnotation baseTableAnnotation) {
+		ListIterator<UniqueConstraintAnnotation> constraintAnnotations = baseTableAnnotation.uniqueConstraints();
+		ListIterator<JavaUniqueConstraint> constraints = this.uniqueConstraints();
+		while (constraints.hasNext()) {
+			JavaUniqueConstraint uniqueConstraint = constraints.next();
+			if (constraintAnnotations.hasNext()) {
+				uniqueConstraint.update(constraintAnnotations.next());
+			} else {
+				this.removeUniqueConstraint_(uniqueConstraint);
+			}
+		}
+
+		while (constraintAnnotations.hasNext()) {
+			this.addUniqueConstraint(this.buildUniqueConstraint(constraintAnnotations.next()));
+		}
+	}
+
+	protected JavaUniqueConstraint buildUniqueConstraint(UniqueConstraintAnnotation uniqueConstraintAnnotation) {
+		JavaUniqueConstraint uniqueConstraint = this.getJpaFactory().buildJavaUniqueConstraint(this, this);
+		uniqueConstraint.initialize(uniqueConstraintAnnotation);
+		return uniqueConstraint;
+	}
+
+
+	// ********** convenience methods **********
+
+	protected TextRange getTextRange(TextRange textRange, CompilationUnit astRoot) {
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+	}
+
+	protected TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.getAnnotation().getNameTextRange(astRoot), astRoot);
+	}
+
+	protected boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.getAnnotation().nameTouches(pos, astRoot);
+	}
+
+	protected TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.getAnnotation().getSchemaTextRange(astRoot), astRoot);
+	}
+
+	protected boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		return this.getAnnotation().schemaTouches(pos, astRoot);
+	}
+
+	protected TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.getAnnotation().getCatalogTextRange(astRoot), astRoot);
+	}
+
+	protected boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		return this.getAnnotation().catalogTouches(pos, astRoot);
+	}
+
+
+	// ********** resource => context **********
+
+	protected void initialize(BaseTableAnnotation baseTableAnnotation) {
+		this.defaultName = this.buildDefaultName();
+		this.specifiedName = baseTableAnnotation.getName();
+
+		this.defaultSchema = this.buildDefaultSchema();
+		this.specifiedSchema = baseTableAnnotation.getSchema();
+
+		this.defaultCatalog = this.buildDefaultCatalog();
+		this.specifiedCatalog = baseTableAnnotation.getCatalog();
+
+		this.initializeUniqueConstraints(baseTableAnnotation);
+	}
+
+	protected void update(BaseTableAnnotation baseTableAnnotation) {
+		this.setDefaultName(this.buildDefaultName());
+		this.setSpecifiedName_(baseTableAnnotation.getName());
+
+		this.setDefaultSchema(this.buildDefaultSchema());
+		this.setSpecifiedSchema_(baseTableAnnotation.getSchema());
+
+		this.setDefaultCatalog(this.buildDefaultCatalog());
+		this.setSpecifiedCatalog_(baseTableAnnotation.getCatalog());
+
+		this.updateUniqueConstraints(baseTableAnnotation);
+	}
+
+
+	// ********** database **********
+
+	public org.eclipse.jpt.db.Table getDbTable() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getName());
+	}
+
+	public Schema getDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDbSchemaContainer() {
+		String catalog = this.getCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDbCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+	public boolean isResolved() {
+		return this.getDbTable() != null;
+	}
+
+	public boolean hasResolvedSchema() {
+		return this.getDbSchema() != null;
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public boolean hasResolvedCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) || (this.getDbCatalog(catalog) != null);
+	}
+
+
+	// ********** UniqueConstraint.Owner implementation **********
+
+	public Iterator<String> candidateUniqueConstraintColumnNames() {
+		org.eclipse.jpt.db.Table dbTable = this.getDbTable();
+		return (dbTable != null) ? dbTable.getSortedColumnIdentifiers().iterator() : EmptyIterator.<String>instance();
+	}
+
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.getAnnotation().getTextRange(astRoot), astRoot);
+	}
+
+
+	// ********** Java completion proposals **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaUniqueConstraint constraint : CollectionTools.iterable(this.uniqueConstraints())) {
+			result = constraint.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * called if the database is connected:
+	 * name, schema, catalog
+	 */
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.nameTouches(pos, astRoot)) {
+			return this.getJavaCandidateNames(filter).iterator();
+		}
+		if (this.schemaTouches(pos, astRoot)) {
+			return this.getJavaCandidateSchemata(filter).iterator();
+		}
+		if (this.catalogTouches(pos, astRoot)) {
+			return this.getJavaCandidateCatalogs(filter).iterator();
+		}
+		return null;
+	}
+
+	protected Iterable<String> getJavaCandidateNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateNames(filter));
+	}
+
+	protected Iterable<String> getCandidateNames(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateNames(), filter);
+	}
+
+	protected Iterable<String> getCandidateNames() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema != null) ? dbSchema.getSortedTableIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	protected Iterable<String> getJavaCandidateSchemata(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateSchemata(filter));
+	}
+
+	protected Iterable<String> getCandidateSchemata(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateSchemata(), filter);
+	}
+
+	protected Iterable<String> getCandidateSchemata() {
+		return this.getDbSchemaContainer().getSortedSchemaIdentifiers();
+	}
+
+	protected Iterable<String> getJavaCandidateCatalogs(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateCatalogs(filter));
+	}
+
+	protected Iterable<String> getCandidateCatalogs(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateCatalogs(), filter);
+	}
+
+	protected Iterable<String> getCandidateCatalogs() {
+		Database db = this.getDatabase();
+		return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+
+	// ********** misc **********
+
+	/**
+	 * covariant override
+	 */
+	@Override
+	public JavaJpaContextNode getParent() {
+		return (JavaJpaContextNode) super.getParent();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.getQualifiedName());
+	}
+
+	protected String getQualifiedName() {
+		return NameTools.buildQualifiedDatabaseObjectName(this.getCatalog(), this.getSchema(), this.getName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java
new file mode 100644
index 0000000..1dfc6ac
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMapping.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+
+
+public abstract class AbstractJavaTypeMapping extends AbstractJavaJpaContextNode
+	implements JavaTypeMapping
+{
+	protected JavaResourcePersistentType javaResourcePersistentType;
+
+
+	protected AbstractJavaTypeMapping(JavaPersistentType parent) {
+		super(parent);
+	}
+	
+	@Override
+	public JavaPersistentType getParent() {
+		return (JavaPersistentType) super.getParent();
+	}
+	
+	protected JavaResourcePersistentType getResourcePersistentType() {
+		return this.javaResourcePersistentType;
+	}
+	
+	protected Annotation getResourceMappingAnnotation() {
+		return this.javaResourcePersistentType.getAnnotation(getAnnotationName());
+	}
+
+	//***************** TypeMapping impl ***************************************
+	
+	public JavaPersistentType getPersistentType() {
+		return getParent();
+	}
+	
+	/* default implementation */
+	public JavaPersistentType getIdClass() {
+		return null;
+	}
+	
+	public String getPrimaryTableName() {
+		return null;
+	}
+
+	public org.eclipse.jpt.db.Table getPrimaryDbTable() {
+		return null;
+	}
+
+	public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+		return null;
+	}
+
+	public Schema getDbSchema() {
+		return null;
+	}
+
+	public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
+		return true;
+	}
+
+	public Iterator<Table> associatedTables() {
+		return EmptyIterator.instance();
+	}
+
+	public Iterator<String> associatedTableNamesIncludingInherited() {
+		return EmptyIterator.instance();
+	}
+
+	public Iterator<Table> associatedTablesIncludingInherited() {
+		return EmptyIterator.instance();
+	}
+	
+	public TypeMapping getSuperTypeMapping() {
+		return (getPersistentType().getSuperPersistentType() == null) ?
+				null 
+				: getPersistentType().getSuperPersistentType().getMapping();
+	}
+	
+	/**
+	 * Return an iterator of TypeMappings, each which inherits from the one before,
+	 * and terminates at the root entity (or at the point of cyclicity).
+	 */
+	public Iterator<TypeMapping> inheritanceHierarchy() {
+		return this.getInheritanceHierarchy().iterator();
+	}
+
+	public Iterable<TypeMapping> getInheritanceHierarchy() {
+		return new TransformationIterable<PersistentType, TypeMapping>(CollectionTools.iterable(getPersistentType().inheritanceHierarchy())) {
+			@Override
+			protected TypeMapping transform(PersistentType type) {
+				return type.getMapping();
+			}
+		};
+	}
+	
+	public Iterator<JavaAttributeMapping> attributeMappings() {
+		return new TransformationIterator<JavaPersistentAttribute, JavaAttributeMapping>(getPersistentType().attributes()) {
+			@Override
+			protected JavaAttributeMapping transform(JavaPersistentAttribute attribute) {
+				return attribute.getMapping();
+			}
+		};
+	}
+	
+	public Iterable<JavaAttributeMapping> getAttributeMappings(final String mappingKey) {
+		return new FilteringIterable<JavaAttributeMapping>(CollectionTools.collection(attributeMappings())) {
+			@Override
+			protected boolean accept(JavaAttributeMapping o) {
+				return StringTools.stringsAreEqual(o.getKey(), mappingKey);
+			}
+		};
+	}
+
+	public Iterator<AttributeMapping> allAttributeMappings() {
+		return new CompositeIterator<AttributeMapping>(
+			new TransformationIterator<TypeMapping, Iterator<AttributeMapping>>(this.inheritanceHierarchy()) {
+				@Override
+				protected Iterator<AttributeMapping> transform(TypeMapping typeMapping) {
+					return typeMapping == null ? EmptyIterator.<AttributeMapping> instance() : typeMapping.attributeMappings();
+				}
+		});
+	}
+	
+	public Iterable<AttributeMapping> getAllAttributeMappings(final String mappingKey) {
+		return new FilteringIterable<AttributeMapping>(CollectionTools.collection(allAttributeMappings())) {
+			@Override
+			protected boolean accept(AttributeMapping o) {
+				return StringTools.stringsAreEqual(o.getKey(), mappingKey);
+			}
+		};
+	}
+	
+	public Iterator<String> overridableAttributeNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.attributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAttributeMappingNames();
+				}
+			});
+	}
+
+	public Iterator<String> allOverridableAttributeNames() {
+		return new CompositeIterator<String>(new TransformationIterator<TypeMapping, Iterator<String>>(this.inheritanceHierarchy()) {
+			@Override
+			protected Iterator<String> transform(TypeMapping mapping) {
+				return mapping.overridableAttributeNames();
+			}
+		});
+	}
+	
+	public Column resolveOverriddenColumn(String attributeName) {
+		for (AttributeMapping attributeMapping : CollectionTools.iterable(attributeMappings())) {
+			Column resolvedColumn = attributeMapping.resolveOverriddenColumn(attributeName);
+			if (resolvedColumn != null) {
+				return resolvedColumn;
+			}
+		}
+		return null;
+	}
+	
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		for (AttributeMapping attributeMapping : CollectionTools.iterable(attributeMappings())) {
+			RelationshipReference resolvedRelationshipReference = attributeMapping.resolveRelationshipReference(attributeName);
+			if (resolvedRelationshipReference != null) {
+				return resolvedRelationshipReference;
+			}
+		}
+		return null;
+	}
+	
+	public Iterator<String> overridableAssociationNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.attributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAssociationMappingNames();
+				}
+			});
+	}
+	
+	public Iterator<String> allOverridableAssociationNames() {
+		return new CompositeIterator<String>(new TransformationIterator<TypeMapping, Iterator<String>>(this.inheritanceHierarchy()) {
+			@Override
+			protected Iterator<String> transform(TypeMapping mapping) {
+				return mapping.overridableAssociationNames();
+			}
+		});
+	}
+	
+	
+	//******************** updating *********************
+	public void initialize(JavaResourcePersistentType jrpt) {
+		this.javaResourcePersistentType = jrpt;
+	}
+
+	public void update(JavaResourcePersistentType jrpt) {
+		this.javaResourcePersistentType = jrpt;
+	}
+	
+	//******************** validation *********************
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return getPersistenceUnit().shouldValidateAgainstDatabase();
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.getResourceMappingAnnotation().getTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getPersistentType().getValidationTextRange(astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getPersistentType().getName());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMappingDefinition.java
new file mode 100644
index 0000000..65e6850
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaTypeMappingDefinition.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+public abstract class AbstractJavaTypeMappingDefinition
+	implements JavaTypeMappingDefinition
+{
+	protected AbstractJavaTypeMappingDefinition() {
+		super();
+	}
+	
+	
+	/**
+	 * Default implementation.  Override if the mapping definition needs to do more analysis.
+	 */
+	public boolean test(JavaPersistentType persistentType) {
+		return persistentType.getResourcePersistentType().getAnnotation(getAnnotationName()) 
+			!= null;
+	}
+	
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.getAnnotationName());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaVersionMapping.java
new file mode 100644
index 0000000..7605471
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/AbstractJavaVersionMapping.java
@@ -0,0 +1,221 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.resource.java.VersionAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaVersionMapping
+	extends AbstractJavaAttributeMapping<VersionAnnotation> 
+	implements JavaVersionMapping
+{
+	protected final JavaColumn column;
+	
+	protected JavaConverter converter;
+	
+	protected final JavaConverter nullConverter;
+
+	protected AbstractJavaVersionMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.column = getJpaFactory().buildJavaColumn(this, this);
+		this.nullConverter = getJpaFactory().buildJavaNullConverter(this);
+		this.converter = this.nullConverter;
+	}
+	
+	@Override
+	protected void initialize( ) {
+		super.initialize();
+		this.column.initialize(this.getResourceColumn());
+		this.converter = this.buildConverter(this.getResourceConverterType());
+	}
+		
+	public ColumnAnnotation getResourceColumn() {
+		return (ColumnAnnotation) getResourcePersistentAttribute().
+				getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
+	}
+
+	//************** JavaAttributeMapping implementation ***************
+
+	public String getKey() {
+		return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	public String getAnnotationName() {
+		return VersionAnnotation.ANNOTATION_NAME;
+	}
+	
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.COLUMN);
+		names.add(JPA.TEMPORAL);
+	}
+
+	//************** NamedColumn.Owner implementation ***************
+
+	public String getDefaultColumnName() {
+		return getName();
+	}
+
+	//************** BaseColumn.Owner implementation ***************
+	
+	public String getDefaultTableName() {
+		return getTypeMapping().getPrimaryTableName();
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return getTypeMapping().associatedTableNamesIncludingInherited();
+	}
+
+	//************** VersionMapping implementation ***************
+	
+	public JavaColumn getColumn() {
+		return this.column;
+	}
+	
+	public JavaConverter getConverter() {
+		return this.converter;
+	}
+	
+	protected String getConverterType() {
+		return this.converter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		JavaConverter oldConverter = this.converter;
+		JavaConverter newConverter = buildConverter(converterType);
+		this.converter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.converter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(JavaConverter newConverter) {
+		JavaConverter oldConverter = this.converter;
+		this.converter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.column.update(this.getResourceColumn());
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update(this.getResourcePersistentAttribute());
+		}
+		else {
+			JavaConverter javaConverter = buildConverter(getResourceConverterType());
+			setConverter(javaConverter);
+		}
+	}
+	
+	protected JavaConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;			
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getJpaFactory().buildJavaTemporalConverter(this, this.getResourcePersistentAttribute());
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.getResourcePersistentAttribute().getAnnotation(TemporalAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		return Converter.NO_CONVERTER;
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = getConverter().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+	
+	//***********  Validation  ******************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.getColumn().validate(messages, reporter, astRoot);
+		this.getConverter().validate(messages, reporter, astRoot);
+	}
+
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+			column,
+			textRange
+		);
+	}
+
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+			new String[] {column.getName(), column.getDbTable().getName()}, 
+			column,
+			textRange
+		);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdClassReference.java
new file mode 100644
index 0000000..7d52f03
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaIdClassReference.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.core.resource.java.IdClassAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaIdClassReference
+	extends AbstractJavaJpaContextNode
+	implements JavaIdClassReference
+{
+	protected String idClassName;
+
+	protected String fullyQualifiedIdClassName;
+	
+	protected JavaPersistentType idClass;
+	
+	
+	public GenericJavaIdClassReference(JavaTypeMapping parent) {
+		super(parent);
+	}
+	
+	
+	protected JavaTypeMapping getTypeMapping() {
+		return (JavaTypeMapping) getParent();
+	}
+	
+	protected JavaPersistentType getPersistentType() {
+		return getTypeMapping().getPersistentType();
+	}
+	
+	
+	// **************** PersistentType.Owner impl *****************************
+	
+	public AccessType getOverridePersistentTypeAccess() {
+		return getPersistentType().getAccess();
+	}
+	
+	public AccessType getDefaultPersistentTypeAccess() {
+		// this shouldn't be needed, since we've specified an override access, but just to be safe ...
+		return getPersistentType().getAccess();
+	}
+	
+	
+	// **************** IdClassReference impl *********************************
+	
+	public String getSpecifiedIdClassName() {
+		return this.idClassName;
+	}
+	
+	public void setSpecifiedIdClassName(String newClassName) {
+		String oldClassName = this.idClassName;
+		this.idClassName = newClassName;
+		if (this.valuesAreDifferent(newClassName, oldClassName)) {
+			if (newClassName != null) {
+				if (getIdClassAnnotation() == null) {
+					addIdClassAnnotation();
+				}
+				getIdClassAnnotation().setValue(newClassName);
+			}
+			else {
+				removeIdClassAnnotation();
+			}
+		}
+		firePropertyChanged(SPECIFIED_ID_CLASS_NAME_PROPERTY, oldClassName, newClassName);
+	}
+	
+	protected void setIdClassName_(String newClassName) {
+		String oldClassName = this.idClassName;
+		this.idClassName = newClassName;
+		firePropertyChanged(SPECIFIED_ID_CLASS_NAME_PROPERTY, oldClassName, newClassName);
+	}
+	
+	protected String buildIdClassName() {
+		IdClassAnnotation annotation = getIdClassAnnotation();
+		if (annotation != null) {
+			return annotation.getValue();
+		}
+		return null;
+	}
+	
+	public String getDefaultIdClassName() {
+		return null;
+	}
+	
+	public String getIdClassName() {
+		return getSpecifiedIdClassName();
+	}
+	
+	public boolean isSpecified() {
+		return getSpecifiedIdClassName() != null;
+	}
+	
+	public JavaPersistentType getIdClass() {
+		return this.idClass;
+	}
+	
+	protected void setIdClass_(JavaPersistentType newIdClass) {
+		JavaPersistentType oldIdClass = this.idClass;
+		this.idClass = newIdClass;
+		firePropertyChanged(ID_CLASS_PROPERTY, oldIdClass, newIdClass);
+	}
+	
+	protected JavaPersistentType buildIdClass() {
+		JavaResourcePersistentType resourceIdClass = getResourceIdClass();
+		return (resourceIdClass == null) ? 
+				null : this.buildIdClass(resourceIdClass);
+	}
+	
+	protected JavaPersistentType buildIdClass(JavaResourcePersistentType resourceClass) {
+		return getJpaFactory().buildJavaPersistentType(this, resourceClass);
+	}
+	
+	protected JavaResourcePersistentType getResourcePersistentType() {
+		return getPersistentType().getResourcePersistentType();
+	}
+	
+	protected IdClassAnnotation getIdClassAnnotation() {
+		return (IdClassAnnotation) getResourcePersistentType().
+				getAnnotation(IdClassAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected void addIdClassAnnotation() {
+		getResourcePersistentType().addAnnotation(IdClassAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected void removeIdClassAnnotation() {
+		getResourcePersistentType().removeAnnotation(IdClassAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected JavaResourcePersistentType getResourceIdClass() {
+		return (this.fullyQualifiedIdClassName == null) ?
+				null : getJpaProject().getJavaResourcePersistentType(this.fullyQualifiedIdClassName);
+	}
+
+	public String getFullyQualifiedIdClassName() {
+		return this.fullyQualifiedIdClassName;
+	}
+
+	protected void setFullyQualifiedIdClassName(String idClass) {
+		String old = this.fullyQualifiedIdClassName;
+		this.fullyQualifiedIdClassName = idClass;
+		this.firePropertyChanged(FULLY_QUALIFIED_ID_CLASS_PROPERTY, old, idClass);
+	}
+
+	protected String buildFullyQualifiedIdClassName() {
+		IdClassAnnotation annotation = getIdClassAnnotation();
+		return (annotation == null) ?
+				null : annotation.getFullyQualifiedClassName();
+	}
+	
+	public char getIdClassEnclosingTypeSeparator() {
+		return '.';
+	}
+	
+	public void initialize() {
+		this.idClassName = buildIdClassName();
+		this.fullyQualifiedIdClassName = this.buildFullyQualifiedIdClassName();
+		this.idClass = buildIdClass();
+	}	
+	
+	public void update() {
+		setIdClassName_(buildIdClassName());
+		this.setFullyQualifiedIdClassName(this.buildFullyQualifiedIdClassName());
+		updateIdClass();
+	}
+	
+	protected void updateIdClass() {
+		JavaResourcePersistentType resourceIdClass = getResourceIdClass();
+		if (resourceIdClass == null) {
+			setIdClass_(null);
+		}
+		else { 
+			if (this.idClass == null || this.idClass.getResourcePersistentType() != resourceIdClass) {
+				setIdClass_(buildIdClass(resourceIdClass));
+			}
+			this.idClass.update(resourceIdClass);
+		}
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return (getIdClassAnnotation() == null) ?
+				getTypeMapping().getValidationTextRange(astRoot)
+				: getIdClassAnnotation().getTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.java
new file mode 100644
index 0000000..9af9cdb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.java
@@ -0,0 +1,264 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnInAssociationOverrideJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn.Owner;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class GenericJavaJoinColumnInAssociationOverrideJoiningStrategy 
+	extends AbstractJavaJoinColumnJoiningStrategy
+	implements JavaJoinColumnInAssociationOverrideJoiningStrategy
+{
+	protected transient AssociationOverrideAnnotation associationOverrideAnnotation;
+	
+	public GenericJavaJoinColumnInAssociationOverrideJoiningStrategy(JavaAssociationOverrideRelationshipReference parent) {
+		super(parent);
+	}
+	
+	@Override
+	protected Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+	
+	public boolean isTargetForeignKeyRelationship() {
+		RelationshipMapping relationshipMapping = getRelationshipMapping();
+		if (relationshipMapping != null) {
+			return relationshipMapping.getRelationshipReference().isTargetForeignKeyRelationship();
+		}
+		return false;
+	}
+
+	public TypeMapping getRelationshipSource() {
+		if (isTargetForeignKeyRelationship()) {
+			return getRelationshipMapping().getResolvedTargetEntity();
+		}
+		return getAssociationOverrideOwner().getTypeMapping();
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		if (isTargetForeignKeyRelationship()) {
+			return getAssociationOverrideOwner().getTypeMapping();
+		}
+		RelationshipMapping relationshipMapping = getRelationshipMapping();
+		return relationshipMapping == null ? null : relationshipMapping.getResolvedTargetEntity();
+	}
+
+	protected Entity getRelationshipTargetEntity() {
+		TypeMapping relationshipTarget = getRelationshipTarget();
+		return (relationshipTarget != null) && (relationshipTarget.getKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) ? (Entity) relationshipTarget : null;
+	}
+
+	@Override
+	public RelationshipMapping getRelationshipMapping() {
+		return getAssociationOverrideOwner().getRelationshipMapping(getAttributeName());
+	}
+	
+	protected String getAttributeName() {
+		return this.getAssociationOverride().getName();
+	}
+
+	@Override
+	public String getTableName() {
+		if (isTargetForeignKeyRelationship()) {
+			return super.getTableName();
+		}
+		return getAssociationOverrideOwner().getDefaultTableName();
+	}
+
+	@Override
+	public boolean tableNameIsInvalid(String tableName) {
+		if (isTargetForeignKeyRelationship()) {
+			return super.tableNameIsInvalid(tableName);
+		}
+		return getAssociationOverrideOwner().tableNameIsInvalid(tableName);
+	}
+
+	@Override
+	public Iterator<String> candidateTableNames() {
+		if (isTargetForeignKeyRelationship()) {
+			return super.candidateTableNames();
+		}
+		return getAssociationOverrideOwner().candidateTableNames();
+	}
+
+	@Override
+	public Table getDbTable(String tableName) {
+		if (isTargetForeignKeyRelationship()) {
+			return super.getDbTable(tableName);
+		}
+		return getAssociationOverrideOwner().getDbTable(tableName);
+	}
+
+	public String getColumnTableNotValidDescription() {
+		return null;
+	}
+
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	protected JavaAssociationOverride getAssociationOverride() {
+		return this.getRelationshipReference().getAssociationOverride();
+	}
+	
+	protected JavaAssociationOverride.Owner getAssociationOverrideOwner() {
+		return getAssociationOverride().getOwner();
+	}
+
+	@Override
+	public JavaAssociationOverrideRelationshipReference getRelationshipReference() {
+		return (JavaAssociationOverrideRelationshipReference) super.getRelationshipReference();
+	}
+	
+	@Override
+	protected ListIterator<JoinColumnAnnotation> joinColumnAnnotations() {
+		return this.associationOverrideAnnotation.joinColumns();
+	}
+	
+	@Override
+	protected JoinColumnAnnotation buildNullJoinColumnAnnotation() {
+		return new NullJoinColumnAnnotation(this.associationOverrideAnnotation);
+	}
+		
+	@Override
+	protected JoinColumnAnnotation addAnnotation(int index) {
+		return this.associationOverrideAnnotation.addJoinColumn(index);
+	}
+	
+	@Override
+	protected void removeAnnotation(int index) {
+		this.associationOverrideAnnotation.removeJoinColumn(index);
+	}
+	
+	@Override
+	protected void moveAnnotation(int targetIndex, int sourceIndex) {
+		this.associationOverrideAnnotation.moveJoinColumn(targetIndex, sourceIndex);
+	}
+	
+	public void initialize(AssociationOverrideAnnotation associationOverride) {
+		this.associationOverrideAnnotation = associationOverride;
+		super.initialize();
+	}
+	
+	public void update(AssociationOverrideAnnotation associationOverride) {
+		this.associationOverrideAnnotation = associationOverride;
+		super.update();
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getRelationshipReference().getValidationTextRange(astRoot);
+	}
+	
+//	 ********** join column owner adapter **********
+	
+	protected class JoinColumnOwner
+		implements JavaJoinColumn.Owner
+	{
+
+		protected JoinColumnOwner() {
+			super();
+		}
+
+		public String getDefaultTableName() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getTableName();
+		}
+		
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public String getAttributeName() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getAttributeName();
+		}
+		
+		public PersistentAttribute getPersistentAttribute() {
+			RelationshipMapping relationshipMapping = getRelationshipMapping();
+			return relationshipMapping == null ? null : relationshipMapping.getPersistentAttribute();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getRelationshipSource();
+		}
+		
+		public Entity getRelationshipTarget() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getRelationshipTargetEntity();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.tableNameIsInvalid(tableName);
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.candidateTableNames();
+		}
+
+		public Table getDbTable(String tableName) {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getDbTable(tableName);
+		}
+
+		public Table getReferencedColumnDbTable() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getReferencedColumnDbTable();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return false;
+		}
+
+		public int joinColumnsSize() {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.joinColumnsSize();
+		}
+
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaJoinColumnInAssociationOverrideJoiningStrategy.this.getValidationTextRange(astRoot);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildColumnUnresolvedNameMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildColumnTableNotValidMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildColumnUnresolvedReferencedColumnNameMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(getAssociationOverride(), column, textRange);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..859d781
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinColumnJoiningStrategy.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnEnabledRelationshipReference;
+
+public class GenericJavaJoinColumnJoiningStrategy 
+	extends AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy
+{
+
+	public GenericJavaJoinColumnJoiningStrategy(JavaJoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+	}
+
+	public TypeMapping getRelationshipSource() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		return getRelationshipTargetEntity();
+	}
+
+	@Override
+	protected Entity getRelationshipTargetEntity() {
+		return getRelationshipMapping().getResolvedTargetEntity();
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..1c45868
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaJoinTableJoiningStrategy.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaJoinTableJoiningStrategy 
+	extends AbstractJavaJoinTableJoiningStrategy
+{
+	protected JavaResourcePersistentAttribute resourcePersistentAttribute;
+	
+	
+	public GenericJavaJoinTableJoiningStrategy(JavaJoinTableEnabledRelationshipReference parent) {
+		super(parent);
+	}
+	
+	public boolean isOverridableAssociation() {
+		return getJpaPlatformVariation().isJoinTableOverridable();
+	}
+	
+	@Override
+	public JavaJoinTableEnabledRelationshipReference getParent() {
+		return (JavaJoinTableEnabledRelationshipReference) super.getParent();
+	}
+	
+	@Override
+	public JavaJoinTableEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return getRelationshipMapping().shouldValidateAgainstDatabase();
+	}
+	
+	
+	// **************** join table *********************************************
+	
+	@Override
+	protected JoinTableAnnotation addAnnotation() {
+		return (JoinTableAnnotation) this.resourcePersistentAttribute.
+				addAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
+	}
+	
+	@Override
+	protected void removeAnnotation() {
+		this.resourcePersistentAttribute.
+				removeAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
+	}
+	
+	
+	// **************** resource => context ************************************
+
+	@Override
+	public void initialize() {
+		this.resourcePersistentAttribute = 
+			getRelationshipReference().getRelationshipMapping().
+				getPersistentAttribute().getResourcePersistentAttribute();
+		super.initialize();
+	}
+	
+	@Override
+	public void update() {
+		this.resourcePersistentAttribute = 
+			getRelationshipReference().getRelationshipMapping().
+				getPersistentAttribute().getResourcePersistentAttribute();
+		super.update();
+	}
+	
+	public JoinTableAnnotation getAnnotation() {
+		return 	(JoinTableAnnotation) this.resourcePersistentAttribute.
+				getNonNullAnnotation(JoinTableAnnotation.ANNOTATION_NAME);
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getRelationshipReference().getValidationTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java
new file mode 100644
index 0000000..0844f8f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToManyRelationshipReference.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToManyRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaMappedByJoiningStrategy;
+import org.eclipse.jpt.core.resource.java.OwnableRelationshipMappingAnnotation;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaManyToManyRelationshipReference
+	extends AbstractJavaRelationshipReference
+	implements JavaManyToManyRelationshipReference
+{
+	protected final JavaMappedByJoiningStrategy mappedByJoiningStrategy;
+	
+	protected final JavaJoinTableJoiningStrategy joinTableJoiningStrategy;
+	
+	
+	public GenericJavaManyToManyRelationshipReference(JavaManyToManyMapping parent) {
+		super(parent);
+		this.mappedByJoiningStrategy = buildMappedByJoiningStrategy();
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+	}
+	
+	
+	protected JavaMappedByJoiningStrategy buildMappedByJoiningStrategy() {
+		return new GenericJavaMappedByJoiningStrategy(this);
+	}
+	
+	protected JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new GenericJavaJoinTableJoiningStrategy(this);
+	}
+	
+	@Override
+	public JavaManyToManyMapping getRelationshipMapping() {
+		return (JavaManyToManyMapping) getParent();
+	}
+	
+	public OwnableRelationshipMappingAnnotation getMappingAnnotation() {
+		return getRelationshipMapping().getMappingAnnotation();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return this.getMappedByJoiningStrategy().getMappedByAttribute() == null;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return this.mappedByJoiningStrategy.relationshipIsOwnedBy(mapping);
+	}
+	
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null) {
+			result = this.mappedByJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.joinTableJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	
+	// **************** mapped by **********************************************
+	
+	public JavaMappedByJoiningStrategy getMappedByJoiningStrategy() {
+		return this.mappedByJoiningStrategy;
+	}
+	
+	public void setMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.addStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesMappedByJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.mappedByJoiningStrategy;
+	}
+	
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return mappedByMapping.getKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** join table joining strategy  ***************************
+	
+	public JavaJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public void setJoinTableJoiningStrategy() {
+		// join table is default option, so no need to add to resource
+		this.mappedByJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return getMappedByJoiningStrategy().getMappedByAttribute() == null;
+	}
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.mappedByJoiningStrategy.initialize();
+		this.joinTableJoiningStrategy.initialize();
+	}
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.mappedByJoiningStrategy.update();
+		this.joinTableJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.mappedByJoiningStrategy.validate(messages, reporter, astRoot);
+		this.joinTableJoiningStrategy.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java
new file mode 100644
index 0000000..7373ddb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaManyToOneRelationshipReference.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.NullJavaJoinTableJoiningStrategy;
+
+public class GenericJavaManyToOneRelationshipReference
+	extends AbstractJavaManyToOneRelationshipReference
+{
+
+	public GenericJavaManyToOneRelationshipReference(JavaManyToOneMapping parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new NullJavaJoinTableJoiningStrategy(this);
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		// the only joining strategy
+		return this.joinColumnJoiningStrategy;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedByJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedByJoiningStrategy.java
new file mode 100644
index 0000000..6fe3a33
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaMappedByJoiningStrategy.java
@@ -0,0 +1,230 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.java.JavaMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOwnableRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaRelationshipMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.OwnableRelationshipMappingAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaMappedByJoiningStrategy
+	extends AbstractJavaJpaContextNode 
+	implements JavaMappedByJoiningStrategy
+{
+	protected OwnableRelationshipMappingAnnotation mappingAnnotation;
+	
+	protected String mappedByAttribute;
+	
+	
+	public GenericJavaMappedByJoiningStrategy(JavaOwnableRelationshipReference parent) {
+		super(parent);
+	}
+	
+	
+	@Override
+	public JavaOwnableRelationshipReference getParent() {
+		return (JavaOwnableRelationshipReference) super.getParent();
+	}
+	
+	public JavaOwnableRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public JavaRelationshipMapping getRelationshipMapping() {
+		return getParent().getRelationshipMapping();
+	}
+	
+	public String getTableName() {
+		RelationshipMapping owner = getRelationshipOwner();
+		return owner == null ? null : owner.getRelationshipReference().getPredominantJoiningStrategy().getTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		RelationshipMapping owner = getRelationshipOwner();
+		return owner == null ? null : owner.getRelationshipReference().getPredominantJoiningStrategy().getDbTable(tableName);
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		RelationshipMapping owner = getRelationshipOwner();
+		return owner == null ? false : owner.getRelationshipReference().getPredominantJoiningStrategy().tableNameIsInvalid(tableName);
+	}
+
+	public String getColumnTableNotValidDescription() {
+		//this will not be called if getRelationshipOwner() is null
+		return getRelationshipOwner().getRelationshipReference().getPredominantJoiningStrategy().getColumnTableNotValidDescription();
+	}
+
+	protected RelationshipMapping getRelationshipOwner() {
+		return getRelationshipMapping().getRelationshipOwner();
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	public boolean relationshipIsOwnedBy(RelationshipMapping otherMapping) {
+		String thisEntity = 
+			(getRelationshipReference().getEntity()) == null ?
+				null : getRelationshipReference().getEntity().getName();
+		String otherTargetEntity = 
+			(otherMapping.getResolvedTargetEntity() == null) ?
+				null : otherMapping.getResolvedTargetEntity().getName();
+		return StringTools.stringsAreEqual(
+				thisEntity,
+				otherTargetEntity)
+			&& StringTools.stringsAreEqual(
+				getMappedByAttribute(), 
+				otherMapping.getName());
+	}
+	
+	public String getMappedByAttribute() {
+		return this.mappedByAttribute;
+	}
+	
+	public void setMappedByAttribute(String newMappedByAttribute) {
+		String oldMappedByAttribute = this.mappedByAttribute;
+		this.mappedByAttribute = newMappedByAttribute;
+		this.mappingAnnotation.setMappedBy(newMappedByAttribute);
+		firePropertyChanged(MAPPED_BY_ATTRIBUTE_PROPERTY, oldMappedByAttribute, newMappedByAttribute);
+	}
+	
+	protected void setMappedByAttribute_(String newMappedByAttribute) {
+		String oldMappedByAttribute = this.mappedByAttribute;
+		this.mappedByAttribute = newMappedByAttribute;
+		firePropertyChanged(MAPPED_BY_ATTRIBUTE_PROPERTY, oldMappedByAttribute, newMappedByAttribute);
+	}
+	
+	public void addStrategy() {
+		if (this.mappedByAttribute == null) {
+			setMappedByAttribute(""); //$NON-NLS-1$
+		}
+	}
+	
+	public void removeStrategy() {
+		if (this.mappedByAttribute != null) {
+			setMappedByAttribute(null);
+		}
+	}
+	
+	public void initialize() {
+		this.mappingAnnotation = this.getRelationshipReference().getMappingAnnotation();
+		this.mappedByAttribute = this.mappingAnnotation.getMappedBy();
+	}
+	
+	public void update() {
+		this.mappingAnnotation = this.getRelationshipReference().getMappingAnnotation();
+		setMappedByAttribute_(this.mappingAnnotation.getMappedBy());
+	}
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.mappingAnnotation.mappedByTouches(pos, astRoot)) {
+			result = javaCandidateMappedByAttributeNames(filter);
+		}
+		return result;
+	}
+	
+	public Iterator<String> candidateMappedByAttributeNames() {
+		return getRelationshipMapping().allTargetEntityAttributeNames();	
+	}
+	
+	public Iterator<String> candidateMappedByAttributeNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateMappedByAttributeNames(), filter);
+	}
+	
+	protected Iterator<String> javaCandidateMappedByAttributeNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateMappedByAttributeNames(filter));
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.mappingAnnotation.getMappedByTextRange(astRoot);
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		
+		if (getMappedByAttribute() == null) {
+			return;
+		}
+		
+		Entity targetEntity = this.getRelationshipMapping().getResolvedTargetEntity();
+		if (targetEntity == null) {
+			return;  // null target entity is validated elsewhere
+		}
+		
+		AttributeMapping mappedByMapping = targetEntity.resolveAttributeMapping(this.mappedByAttribute);
+		
+		if (mappedByMapping == null) {
+			messages.add(
+				buildMessage(
+					JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
+					new String[] {this.mappedByAttribute},
+					astRoot));
+			return;
+		}
+		
+		if (! this.getRelationshipReference().mayBeMappedBy(mappedByMapping)) {
+			messages.add(
+				buildMessage(
+					JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
+					new String[] {this.mappedByAttribute},
+					astRoot));
+			return;
+		}
+		
+		// if mappedByMapping is not a relationship owner, then it should have 
+		// been flagged in above rule (mappedByIsValid)
+		if (! ((RelationshipMapping) mappedByMapping).isRelationshipOwner()) {
+			messages.add(buildMessage(
+					JpaValidationMessages.MAPPING_MAPPED_BY_ON_BOTH_SIDES,
+					new String[] {this.mappedByAttribute},
+					astRoot));
+		}
+	}
+	
+	protected IMessage buildMessage(String msgID, String[] params, CompilationUnit astRoot) {
+		PersistentAttribute attribute = getRelationshipMapping().getPersistentAttribute();
+		String attributeDesc = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
+		
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				msgID,
+				ArrayTools.add(params, 0, attributeDesc),
+				this,
+				this.getValidationTextRange(astRoot));
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java
new file mode 100644
index 0000000..a1cd310
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaOneToOneRelationshipReference.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.java.NullJavaJoinTableJoiningStrategy;
+
+public class GenericJavaOneToOneRelationshipReference
+	extends AbstractJavaOneToOneRelationshipReference
+{
+	
+	public GenericJavaOneToOneRelationshipReference(JavaOneToOneMapping parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new NullJavaJoinTableJoiningStrategy(this);
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		else if (this.primaryKeyJoinColumnJoiningStrategy.primaryKeyJoinColumnsSize() > 0) {
+			return this.primaryKeyJoinColumnJoiningStrategy;
+		}
+		return this.joinColumnJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..cf3cb4a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,363 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaRelationshipMapping;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class GenericJavaPrimaryKeyJoinColumnJoiningStrategy
+	extends AbstractJavaJpaContextNode
+	implements JavaPrimaryKeyJoinColumnJoiningStrategy
+{
+	protected JavaResourcePersistentAttribute resourcePersistentAttribute;
+	
+	protected final Vector<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns = new Vector<JavaPrimaryKeyJoinColumn>();
+	protected final JavaJoinColumn.Owner joinColumnOwner;
+	
+	
+	public GenericJavaPrimaryKeyJoinColumnJoiningStrategy(
+			JavaPrimaryKeyJoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+	}
+	
+	protected JavaJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	@Override
+	public JavaPrimaryKeyJoinColumnEnabledRelationshipReference getParent() {
+		return (JavaPrimaryKeyJoinColumnEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JavaPrimaryKeyJoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return getParent();
+	}
+	
+	public JavaRelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+
+	public String getTableName() {
+		return getTypeMapping().getPrimaryTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		return getTypeMapping().getDbTable(tableName);
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+
+	protected TypeMapping getTypeMapping() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	public String getColumnTableNotValidDescription() {
+		return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
+	}
+
+	// **************** primary key join columns *******************************
+	
+	public ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns() {
+		return new CloneListIterator<JavaPrimaryKeyJoinColumn>(this.primaryKeyJoinColumns);
+	}
+	
+	public int primaryKeyJoinColumnsSize() {
+		return this.primaryKeyJoinColumns.size();
+	}
+	
+	public boolean hasPrimaryKeyJoinColumns() {
+		return ! this.primaryKeyJoinColumns.isEmpty();
+	}
+	
+	public JavaPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index) {
+		JavaPrimaryKeyJoinColumn pkJoinColumn = 
+			getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.joinColumnOwner);
+		this.primaryKeyJoinColumns.add(index, pkJoinColumn);
+		PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation = addAnnotation(index);
+		pkJoinColumn.initialize(pkJoinColumnAnnotation);
+		fireItemAdded(PRIMARY_KEY_JOIN_COLUMNS_LIST, index, pkJoinColumn);
+		return pkJoinColumn;
+	}
+	
+	protected void addPrimaryKeyJoinColumn(int index, JavaPrimaryKeyJoinColumn joinColumn) {
+		addItemToList(index, joinColumn, this.primaryKeyJoinColumns, PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	protected void addPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn joinColumn) {
+		addPrimaryKeyJoinColumn(this.primaryKeyJoinColumns.size(), joinColumn);
+	}
+	
+	public void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn pkJoinColumn) {
+		removePrimaryKeyJoinColumn(this.primaryKeyJoinColumns.indexOf(pkJoinColumn));
+	}
+	
+	public void removePrimaryKeyJoinColumn(int index) {
+		JavaPrimaryKeyJoinColumn pkJoinColumn = this.primaryKeyJoinColumns.remove(index);
+		removeAnnotation(index);
+		fireItemRemoved(PRIMARY_KEY_JOIN_COLUMNS_LIST, index, pkJoinColumn);
+	}
+
+	protected void removePrimaryKeyJoinColumn_(JavaPrimaryKeyJoinColumn joinColumn) {
+		removeItemFromList(joinColumn, this.primaryKeyJoinColumns, PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.primaryKeyJoinColumns, targetIndex, sourceIndex);
+		moveAnnotation(targetIndex, sourceIndex);
+		fireItemMoved(PRIMARY_KEY_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	protected PrimaryKeyJoinColumnAnnotation addAnnotation(int index) {
+		return (PrimaryKeyJoinColumnAnnotation) this.resourcePersistentAttribute.
+			addAnnotation(
+				index, 
+				PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+				PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected void removeAnnotation(int index) {
+		this.resourcePersistentAttribute.
+			removeAnnotation(
+				index, 
+				PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+				PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+	}
+	
+	protected void moveAnnotation(int targetIndex, int sourceIndex) {
+		this.resourcePersistentAttribute.
+			moveAnnotation(
+				targetIndex, 
+				sourceIndex, 
+				PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+	}
+	
+	public void addStrategy() {
+		if (primaryKeyJoinColumnsSize() == 0) {
+			addPrimaryKeyJoinColumn(0);
+		}
+	}
+	
+	public void removeStrategy() {
+		for (PrimaryKeyJoinColumn each : CollectionTools.iterable(primaryKeyJoinColumns())) {
+			removePrimaryKeyJoinColumn(each);
+		}
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	public void initialize() {
+		this.resourcePersistentAttribute = 
+			getRelationshipReference().getRelationshipMapping().
+				getPersistentAttribute().getResourcePersistentAttribute();
+		initializePrimaryKeyJoinColumns();
+	}
+	
+	protected void initializePrimaryKeyJoinColumns() {
+		Iterator<NestableAnnotation> annotations = 
+			this.resourcePersistentAttribute.annotations(
+				PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+				PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+		
+		while (annotations.hasNext()) {
+			this.primaryKeyJoinColumns.add(
+				buildPrimaryKeyJoinColumn(
+					(PrimaryKeyJoinColumnAnnotation) annotations.next()));
+		}
+	}
+	
+	public void update() {
+		this.resourcePersistentAttribute = 
+			getRelationshipReference().getRelationshipMapping().
+				getPersistentAttribute().getResourcePersistentAttribute();
+		updatePrimaryKeyJoinColumns();
+	}
+	
+	protected void updatePrimaryKeyJoinColumns() {
+		ListIterator<JavaPrimaryKeyJoinColumn> joinColumns = primaryKeyJoinColumns();
+		Iterator<NestableAnnotation> annotations = 
+			this.resourcePersistentAttribute.annotations(
+				PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME, 
+				PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME);
+		
+		while (joinColumns.hasNext()) {
+			JavaPrimaryKeyJoinColumn joinColumn = joinColumns.next();
+			if (annotations.hasNext()) {
+				joinColumn.update(
+					(PrimaryKeyJoinColumnAnnotation) annotations.next());
+			}
+			else {
+				removePrimaryKeyJoinColumn_(joinColumn);
+			}
+		}
+		
+		while (annotations.hasNext()) {
+			addPrimaryKeyJoinColumn(
+				buildPrimaryKeyJoinColumn(
+					(PrimaryKeyJoinColumnAnnotation) annotations.next()));
+		}
+	}
+	
+	protected JavaPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(
+			PrimaryKeyJoinColumnAnnotation annotation) {
+		JavaPrimaryKeyJoinColumn joinColumn = 
+			getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.joinColumnOwner);
+		joinColumn.initialize(annotation);
+		return joinColumn;
+	}
+	
+	
+	// **************** Java completion proposals ******************************
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaPrimaryKeyJoinColumn column : CollectionTools.iterable(this.primaryKeyJoinColumns())) {
+			result = column.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getRelationshipReference().getValidationTextRange(astRoot);
+	}
+	
+	
+	// ********** join column owner adapter **********
+
+	protected class JoinColumnOwner 
+		implements JavaJoinColumn.Owner 
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+		
+		
+		/**
+		 * by default, the join column is in the type mapping's primary table
+		 */
+		public String getDefaultTableName() {
+			return GenericJavaPrimaryKeyJoinColumnJoiningStrategy.this.getTableName();
+		}
+		
+		public Entity getRelationshipTarget() {
+			return getRelationshipMapping().getResolvedTargetEntity();
+		}
+		
+		public String getAttributeName() {
+			return getRelationshipMapping().getName();
+		}
+		
+		public PersistentAttribute getPersistentAttribute() {
+			return getRelationshipMapping().getPersistentAttribute();
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return getTypeMapping().tableNameIsInvalid(tableName);
+		}
+
+		/**
+		 * the join column can be on a secondary table
+		 */
+		public Iterator<String> candidateTableNames() {
+			return getTypeMapping().associatedTableNamesIncludingInherited();
+		}
+		
+		public TypeMapping getTypeMapping() {
+			return GenericJavaPrimaryKeyJoinColumnJoiningStrategy.this.getTypeMapping();
+		}
+		
+		public Table getDbTable(String tableName) {
+			return getTypeMapping().getDbTable(tableName);
+		}
+		
+		public Table getReferencedColumnDbTable() {
+			Entity targetEntity = getRelationshipTarget();
+			return (targetEntity == null) ? null : targetEntity.getPrimaryDbTable();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return false;
+		}
+		
+		public String getDefaultColumnName() {
+			return null;
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaPrimaryKeyJoinColumnJoiningStrategy.this.getValidationTextRange(astRoot);
+		}
+		
+		public int joinColumnsSize() {
+			return GenericJavaPrimaryKeyJoinColumnJoiningStrategy.this.primaryKeyJoinColumnsSize();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaBasicMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaBasicMappingDefinition.java
new file mode 100644
index 0000000..1f6ae3c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaBasicMappingDefinition.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+
+public class JavaBasicMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaBasicMappingDefinition INSTANCE = 
+		new JavaBasicMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaBasicMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return BasicAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaBasicMapping(parent);
+	}
+	
+	@Override
+	public boolean testDefault(JavaPersistentAttribute persistentAttribute) {
+		return persistentAttribute.typeIsBasic();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddableDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddableDefinition.java
new file mode 100644
index 0000000..2a94eab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddableDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.resource.java.EmbeddableAnnotation;
+
+public class JavaEmbeddableDefinition
+	extends AbstractJavaTypeMappingDefinition
+{
+	// singleton
+	private static final JavaEmbeddableDefinition INSTANCE = 
+			new JavaEmbeddableDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JavaTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaEmbeddableDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return EmbeddableAnnotation.ANNOTATION_NAME;
+	}
+
+	public JavaEmbeddable buildMapping(JavaPersistentType parent, JpaFactory factory) {
+		return factory.buildJavaEmbeddable(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java
new file mode 100644
index 0000000..fe78cad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddedIdMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.EmbeddedIdAnnotation;
+
+public class JavaEmbeddedIdMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaEmbeddedIdMappingDefinition INSTANCE = 
+		new JavaEmbeddedIdMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singletong usage
+	 */
+	private JavaEmbeddedIdMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return EmbeddedIdAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaEmbeddedIdMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddedMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddedMappingDefinition.java
new file mode 100644
index 0000000..5910a53
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEmbeddedMappingDefinition.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+
+public class JavaEmbeddedMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaEmbeddedMappingDefinition INSTANCE = 
+		new JavaEmbeddedMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaEmbeddedMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return EmbeddedAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaEmbeddedMapping(parent);
+	}
+	
+	@Override
+	public boolean testDefault(JavaPersistentAttribute persistentAttribute) {
+		return persistentAttribute.getEmbeddable() != null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEntityDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEntityDefinition.java
new file mode 100644
index 0000000..58df102
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEntityDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.resource.java.EntityAnnotation;
+
+public class JavaEntityDefinition
+	extends AbstractJavaTypeMappingDefinition
+{
+	// singleton
+	private static final JavaEntityDefinition INSTANCE = 
+			new JavaEntityDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JavaTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaEntityDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return EntityAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaEntity buildMapping(JavaPersistentType parent, JpaFactory factory) {
+		return factory.buildJavaEntity(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEntityTextRangeResolver.java
new file mode 100644
index 0000000..29b3308
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaEntityTextRangeResolver.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class JavaEntityTextRangeResolver
+	implements PrimaryKeyTextRangeResolver
+{
+	private JavaEntity entity;
+	
+	private CompilationUnit astRoot;
+	
+	
+	public JavaEntityTextRangeResolver(JavaEntity entity, CompilationUnit astRoot) {
+		this.entity = entity;
+		this.astRoot = astRoot;
+	}
+	
+	
+	public TextRange getTypeMappingTextRange() {
+		return this.entity.getValidationTextRange(this.astRoot);
+	}
+	
+	public TextRange getIdClassTextRange() {
+		return this.entity.getIdClassReference().getValidationTextRange(this.astRoot);
+	}
+	
+	public TextRange getAttributeMappingTextRange(String attributeName) {
+		return this.entity.getPersistentType().
+				getAttributeNamed(attributeName).getMapping().getValidationTextRange(this.astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaIdMappingDefinition.java
new file mode 100644
index 0000000..3e6e059
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaIdMappingDefinition.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+
+public class JavaIdMappingDefinition
+	extends AbstractJavaIdMappingDefinition
+{
+	// singleton
+	private static final JavaIdMappingDefinition INSTANCE = 
+		new JavaIdMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaIdMappingDefinition() {
+		super();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaManyToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaManyToManyMappingDefinition.java
new file mode 100644
index 0000000..e8e8382
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaManyToManyMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.ManyToManyAnnotation;
+
+public class JavaManyToManyMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaManyToManyMappingDefinition INSTANCE = 
+		new JavaManyToManyMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaManyToManyMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return ManyToManyAnnotation.ANNOTATION_NAME;
+	}
+
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaManyToManyMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaManyToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaManyToOneMappingDefinition.java
new file mode 100644
index 0000000..6eef2bb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaManyToOneMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+
+public class JavaManyToOneMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaManyToOneMappingDefinition INSTANCE = 
+		new JavaManyToOneMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaManyToOneMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return ManyToOneAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaManyToOneMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaMappedSuperclassDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaMappedSuperclassDefinition.java
new file mode 100644
index 0000000..d14c61c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaMappedSuperclassDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.resource.java.MappedSuperclassAnnotation;
+
+public class JavaMappedSuperclassDefinition
+	extends AbstractJavaTypeMappingDefinition
+{
+	// singleton
+	private static final JavaMappedSuperclassDefinition INSTANCE = 
+			new JavaMappedSuperclassDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JavaTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaMappedSuperclassDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return MappedSuperclassAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaMappedSuperclass buildMapping(JavaPersistentType parent, JpaFactory factory) {
+		return factory.buildJavaMappedSuperclass(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java
new file mode 100644
index 0000000..35f5d8a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class JavaMappedSuperclassTextRangeResolver
+	implements PrimaryKeyTextRangeResolver
+{
+	private JavaMappedSuperclass mappedSuperclass;
+	
+	private CompilationUnit astRoot;
+	
+	
+	public JavaMappedSuperclassTextRangeResolver(
+			JavaMappedSuperclass mappedSuperclass, CompilationUnit astRoot) {
+		
+		this.mappedSuperclass = mappedSuperclass;
+		this.astRoot = astRoot;
+	}
+	
+	
+	public TextRange getTypeMappingTextRange() {
+		return this.mappedSuperclass.getValidationTextRange(this.astRoot);
+	}
+	
+	public TextRange getIdClassTextRange() {
+		return this.mappedSuperclass.getIdClassReference().getValidationTextRange(this.astRoot);
+	}
+	
+	public TextRange getAttributeMappingTextRange(String attributeName) {
+		return this.mappedSuperclass.getPersistentType().
+				getAttributeNamed(attributeName).getMapping().getValidationTextRange(this.astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaNullTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaNullTypeMapping.java
new file mode 100644
index 0000000..cbb5e22
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaNullTypeMapping.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class JavaNullTypeMapping extends AbstractJavaTypeMapping
+{
+	public JavaNullTypeMapping(JavaPersistentType parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return null;
+	}
+	
+	public String getKey() {
+		return MappingKeys.NULL_TYPE_MAPPING_KEY;
+	}
+	
+	public boolean isMapped() {
+		return false;
+	}
+	
+	public Iterable<String> getSupportingAnnotationNames() {
+		return EmptyIterable.instance();
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return false;
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+	
+	/**
+	 * We added this message here because the most likely solution is to add
+	 * an annotation to the .java file.
+	 * This message used to be found on the <class> tag in persistence.xml.
+	 * The other possible way to fix the error is to remove it from persistence.xml.
+	 * This can be accomplished with the Synchronize Classes action.
+	 * We could also add a quick fix for this error.
+	 */
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		messages.add(
+			DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PERSISTENCE_UNIT_INVALID_CLASS,
+				new String[] {this.getPersistentType().getName()},
+				this,
+				this.getValidationTextRange(astRoot)
+			)
+		);
+	}
+	
+	@Override
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getPersistentType().getValidationTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaOneToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaOneToManyMappingDefinition.java
new file mode 100644
index 0000000..019d6f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaOneToManyMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+
+public class JavaOneToManyMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaOneToManyMappingDefinition INSTANCE = 
+		new JavaOneToManyMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaOneToManyMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return OneToManyAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaOneToManyMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaOneToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaOneToOneMappingDefinition.java
new file mode 100644
index 0000000..c785d6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaOneToOneMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+
+public class JavaOneToOneMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaOneToOneMappingDefinition INSTANCE = 
+		new JavaOneToOneMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaOneToOneMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return OneToOneAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaOneToOneMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaTransientMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaTransientMappingDefinition.java
new file mode 100644
index 0000000..197f4e9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaTransientMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TransientAnnotation;
+
+public class JavaTransientMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaTransientMappingDefinition INSTANCE = 
+		new JavaTransientMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaTransientMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return TransientAnnotation.ANNOTATION_NAME;
+	}
+
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaTransientMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaVersionMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaVersionMappingDefinition.java
new file mode 100644
index 0000000..dc674b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/JavaVersionMappingDefinition.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.VersionAnnotation;
+
+public class JavaVersionMappingDefinition
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaVersionMappingDefinition INSTANCE = 
+		new JavaVersionMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaVersionMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return VersionAnnotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return factory.buildJavaVersionMapping(parent);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAssociationOverrideAnnotation.java
new file mode 100644
index 0000000..debfe67
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAssociationOverrideAnnotation.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public abstract class VirtualAssociationOverrideAnnotation
+	extends VirtualOverrideAnnotation
+	implements AssociationOverrideAnnotation
+{
+	protected JoiningStrategy joiningStrategy;
+
+	private final Vector<JoinColumnAnnotation> joinColumns;
+	
+	protected VirtualAssociationOverrideAnnotation(JavaResourcePersistentMember parent, String name, JoiningStrategy joiningStrategy) {
+		super(parent, name);
+		this.joiningStrategy = joiningStrategy;
+		this.joinColumns = this.buildJoinColumns();
+	}
+	
+	protected Vector<JoinColumnAnnotation> buildJoinColumns() {
+		if (this.joiningStrategy instanceof JoinColumnJoiningStrategy) {
+			Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(((JoinColumnJoiningStrategy) this.joiningStrategy).joinColumnsSize());
+			for (JoinColumn joinColumn : CollectionTools.iterable(((JoinColumnJoiningStrategy) this.joiningStrategy).joinColumns())) {
+				result.add(new VirtualAssociationOverrideJoinColumnAnnotation(this, joinColumn));
+			}
+			return result;
+		}
+		return new Vector<JoinColumnAnnotation>();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected AssociationOverrideAnnotation addAnnotation() {
+		return (AssociationOverrideAnnotation) super.addAnnotation();
+	}
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return this.joinColumns.listIterator();
+	}
+	
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.elementAt(index);
+	}
+	
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+	
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+	
+	public JoinColumnAnnotation addJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		//Rebuilt every time so no need to implement update()
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAssociationOverrideJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAssociationOverrideJoinColumnAnnotation.java
new file mode 100644
index 0000000..b782216
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAssociationOverrideJoinColumnAnnotation.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.internal.resource.java.NullBaseColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Column
+ */
+public final class VirtualAssociationOverrideJoinColumnAnnotation extends NullBaseColumnAnnotation
+	implements JoinColumnAnnotation
+{
+	private JoinColumn joinColumn;
+
+	public VirtualAssociationOverrideJoinColumnAnnotation(Annotation parent, JoinColumn joinColumn) {
+		super(parent);
+		this.joinColumn = joinColumn;
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected JoinColumnAnnotation addAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public String getName() {
+		return this.joinColumn.getSpecifiedName();
+	}
+
+	@Override
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public String getReferencedColumnName() {
+		return this.joinColumn.getSpecifiedReferencedColumnName();
+	}
+	
+	public void setReferencedColumnName(String referencedColumnName) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+	
+	@Override
+	public String getColumnDefinition() {
+		return this.joinColumn.getColumnDefinition();
+	}
+
+	@Override
+	public void setColumnDefinition(String columnDefinition) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public String getTable() {
+		return this.joinColumn.getSpecifiedTable();
+	}
+
+	@Override
+	public void setTable(String table) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public Boolean getInsertable() {
+		return this.joinColumn.getSpecifiedInsertable();
+	}
+
+	@Override
+	public void setInsertable(Boolean insertable) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public Boolean getUpdatable() {
+		return this.joinColumn.getSpecifiedUpdatable();
+	}
+
+	@Override
+	public void setUpdatable(Boolean updatable) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public Boolean getNullable() {
+		return this.joinColumn.getSpecifiedNullable();
+	}
+
+	@Override
+	public void setNullable(Boolean nullable) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public Boolean getUnique() {
+		return this.joinColumn.getSpecifiedUnique();
+	}
+
+	@Override
+	public void setUnique(Boolean unique) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAttributeOverrideAnnotation.java
new file mode 100644
index 0000000..25e71fa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAttributeOverrideAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public class VirtualAttributeOverrideAnnotation
+	extends VirtualOverrideAnnotation
+	implements AttributeOverrideAnnotation 
+{
+	private final VirtualAttributeOverrideColumnAnnotation column;
+
+
+	public VirtualAttributeOverrideAnnotation(JavaResourcePersistentMember parent, String name, Column column) {
+		super(parent, name);
+		this.column = new VirtualAttributeOverrideColumnAnnotation(this, column);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected AttributeOverrideAnnotation addAnnotation() {
+		return (AttributeOverrideAnnotation) super.addAnnotation();
+	}
+
+	// ****** column
+	public ColumnAnnotation getColumn() {
+		return this.column;
+	}
+
+	public ColumnAnnotation getNonNullColumn() {
+		return this.getColumn();
+	}
+
+	public ColumnAnnotation addColumn() {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeColumn() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAttributeOverrideColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAttributeOverrideColumnAnnotation.java
new file mode 100644
index 0000000..89ebcab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualAttributeOverrideColumnAnnotation.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.internal.resource.java.NullAttributeOverrideColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+
+/**
+ * javax.persistence.Column
+ */
+public class VirtualAttributeOverrideColumnAnnotation
+	extends NullAttributeOverrideColumnAnnotation
+{
+	private Column column;
+
+	public VirtualAttributeOverrideColumnAnnotation(AttributeOverrideAnnotation parent, Column column) {
+		super(parent);
+		this.column = column;
+	}
+
+	@Override
+	public String getName() {
+		return this.column.getSpecifiedName();
+	}
+
+	@Override
+	public String getColumnDefinition() {
+		return this.column.getColumnDefinition();
+	}
+
+	@Override
+	public String getTable() {
+		return this.column.getSpecifiedTable();
+	}
+
+	@Override
+	public Boolean getInsertable() {
+		return this.column.getSpecifiedInsertable();
+	}
+
+	@Override
+	public Boolean getUpdatable() {
+		return this.column.getSpecifiedUpdatable();
+	}
+
+	@Override
+	public Boolean getNullable() {
+		return this.column.getSpecifiedNullable();
+	}
+
+	@Override
+	public Boolean getUnique() {
+		return this.column.getSpecifiedUnique();
+	}
+
+	@Override
+	public Integer getLength() {
+		return this.column.getSpecifiedLength();
+	}
+
+	@Override
+	public Integer getScale() {
+		return this.column.getSpecifiedScale();
+	}
+
+	@Override
+	public Integer getPrecision() {
+		return this.column.getSpecifiedPrecision();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualOverrideAnnotation.java
new file mode 100644
index 0000000..01f1615
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/java/VirtualOverrideAnnotation.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common behavior for virtual versions of
+ *     javax.persistence.AttributeOverride
+ * and
+ *     javax.persistence.AssociationOverride
+ */
+public abstract class VirtualOverrideAnnotation
+	extends NullAnnotation
+	implements OverrideAnnotation
+{
+	private final String name;
+
+	public VirtualOverrideAnnotation(JavaResourcePersistentMember parent, String name) {
+		super(parent);
+		this.name = name;
+	}
+
+	@Override
+	protected OverrideAnnotation addAnnotation() {
+		return (OverrideAnnotation) super.addAnnotation();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+	
+	public void setName(String name) {
+		if (name != null) {
+			this.addAnnotation().setName(name);
+		}		
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractEntityMappings.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractEntityMappings.java
new file mode 100644
index 0000000..8a17c88
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractEntityMappings.java
@@ -0,0 +1,822 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.MappingFileRoot;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmGenerator;
+import org.eclipse.jpt.core.context.orm.OrmPersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmQueryContainer;
+import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator;
+import org.eclipse.jpt.core.context.orm.OrmStructureNodes;
+import org.eclipse.jpt.core.context.orm.OrmTableGenerator;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXml;
+import org.eclipse.jpt.core.context.orm.PersistenceUnitMetadata;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.ListIterable;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneListIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * <code>orm.xml</code> file
+ * <br>
+ * <code>entity-mappings</code> element
+ */
+public abstract class AbstractEntityMappings
+	extends AbstractOrmXmlContextNode
+	implements EntityMappings
+{
+	protected final XmlEntityMappings xmlEntityMappings;
+	
+	protected String description;
+
+	protected String package_;
+
+	protected AccessType specifiedAccess;
+	protected AccessType defaultAccess;
+		
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+
+	protected final PersistenceUnitMetadata persistenceUnitMetadata;
+
+	protected final List<OrmPersistentType> persistentTypes;
+
+	protected final List<OrmSequenceGenerator> sequenceGenerators;
+	
+	protected final List<OrmTableGenerator> tableGenerators;
+
+	protected final OrmQueryContainer queryContainer;
+
+
+	protected AbstractEntityMappings(OrmXml parent, XmlEntityMappings xmlEntityMappings) {
+		super(parent);
+		this.xmlEntityMappings = xmlEntityMappings;
+		this.persistentTypes = new ArrayList<OrmPersistentType>();
+		this.sequenceGenerators = new ArrayList<OrmSequenceGenerator>();
+		this.tableGenerators = new ArrayList<OrmTableGenerator>();
+		this.queryContainer = this.getXmlContextNodeFactory().buildOrmQueryContainer(this, xmlEntityMappings);
+
+		this.persistenceUnitMetadata = this.buildPersistenceUnitMetadata();
+		this.description = this.xmlEntityMappings.getDescription();
+		this.package_ = this.xmlEntityMappings.getPackage();
+
+		this.defaultAccess = this.getPersistenceUnit().getDefaultAccess();
+		this.specifiedAccess = this.getResourceAccess();
+
+		this.defaultCatalog = this.getPersistenceUnit().getDefaultCatalog();
+		this.specifiedCatalog = this.xmlEntityMappings.getCatalog();
+
+		this.defaultSchema = this.getPersistenceUnit().getDefaultSchema();
+		this.specifiedSchema = this.xmlEntityMappings.getSchema();
+
+		this.initializePersistentTypes();
+		this.initializeTableGenerators();
+		this.initializeSequenceGenerators();
+	}
+	
+	protected PersistenceUnitMetadata buildPersistenceUnitMetadata() {
+		return this.getXmlContextNodeFactory().buildPersistenceUnitMetadata(this);
+	}
+	
+	protected OrmPersistentType buildPersistentType(XmlTypeMapping resourceMapping) {
+		return this.getXmlContextNodeFactory().buildOrmPersistentType(this, resourceMapping);
+	}	
+	
+	// **************** JpaNode impl *******************************************
+	
+	@Override
+	public OrmXml getParent() {
+		return (OrmXml) super.getParent();
+	}
+
+	protected OrmXml getOrmXml() {
+		return this.getParent();
+	}
+	
+	
+	// **************** JpaContextNode impl ************************************
+	
+	@Override
+	public MappingFileRoot getMappingFileRoot() {
+		return this;
+	}
+	
+	
+	// **************** JpaStructureNode impl **********************************
+	
+	public String getId() {
+		return OrmStructureNodes.ENTITY_MAPPINGS_ID;
+	}
+	
+	
+	// ********** PersistentType.Owner implementation **********
+
+	public AccessType getOverridePersistentTypeAccess() {
+		return this.isXmlMappingMetadataComplete() ? this.getSpecifiedAccess() : null;
+	}
+
+	public AccessType getDefaultPersistentTypeAccess() {
+		return getAccess();
+	}
+	
+	public String getDefaultPersistentTypePackage() {
+		return getPackage();
+	}
+	
+	protected boolean isXmlMappingMetadataComplete() {
+		return this.persistenceUnitMetadata.isXmlMappingMetadataComplete();
+	}
+	
+	public boolean isDefaultPersistentTypeMetadataComplete() {
+		return this.isXmlMappingMetadataComplete();
+	}
+	
+	
+	// **************** EntityMappings impl ************************************
+	
+	public XmlEntityMappings getXmlEntityMappings() {
+		return this.xmlEntityMappings;
+	}
+	
+	public void changeMapping(OrmPersistentType ormPersistentType, OrmTypeMapping oldMapping, OrmTypeMapping newMapping) {
+		AccessType savedAccess = ormPersistentType.getSpecifiedAccess();
+		ormPersistentType.dispose();
+		int sourceIndex = this.persistentTypes.indexOf(ormPersistentType);
+		this.persistentTypes.remove(sourceIndex);
+		oldMapping.removeFromResourceModel(this.xmlEntityMappings);
+		int targetIndex = insertionIndex(ormPersistentType);
+		this.persistentTypes.add(targetIndex, ormPersistentType);
+		newMapping.addToResourceModel(this.xmlEntityMappings);
+		
+		newMapping.initializeFrom(oldMapping);
+		//not sure where else to put this, need to set the access on the resource model
+		ormPersistentType.setSpecifiedAccess(savedAccess);
+		fireItemMoved(PERSISTENT_TYPES_LIST, targetIndex, sourceIndex);
+	}
+	
+	public OrmPersistentType getPersistentType(String fullyQualifiedTypeName) {
+		for (OrmPersistentType ormPersistentType : this.getPersistentTypes()) {
+			if (ormPersistentType.isFor(fullyQualifiedTypeName)) {
+				return ormPersistentType;
+			}
+		}
+		return null;
+	}
+
+	public boolean containsPersistentType(String fullyQualifiedTypeName) {
+		return getPersistentType(fullyQualifiedTypeName) != null;
+	}
+
+	public PersistentType resolvePersistentType(String className) {
+		if (className == null) {
+			return null;
+		}
+
+		//static inner class listed in orm.xml will use '$', replace with '.'
+		className = className.replace('$', '.');
+
+		// first try to resolve using only the locally specified name...
+		PersistentType mapKeyPersistentType = getPersistenceUnit().getPersistentType(className);
+		if (mapKeyPersistentType != null) {
+			return mapKeyPersistentType;
+		}
+
+		// ...then try to resolve by prepending the global package name
+		if (getPackage() == null) {
+			return null;
+		}
+		return getPersistenceUnit().getPersistentType(getPackage() + '.' + className);
+	}
+
+	public JavaResourcePersistentType resolveJavaResourcePersistentType(String className) {
+		if (className == null) {
+			return null;
+		}
+
+		//static inner class listed in orm.xml will use '$', replace with '.'
+		className = className.replace('$', '.');
+
+		// first try to resolve using only the locally specified name...
+		JavaResourcePersistentType jrpt = getJpaProject().getJavaResourcePersistentType(className);
+		if (jrpt != null) {
+			return jrpt;
+		}
+
+		// ...then try to resolve by prepending the global package name
+		if (getPackage() == null) {
+			return null;
+		}
+		return getJpaProject().getJavaResourcePersistentType(getPackage() + '.' +  className);
+	}
+
+	public PersistenceUnitMetadata getPersistenceUnitMetadata() {
+		return this.persistenceUnitMetadata;
+	}
+
+	public String getPackage() {
+		return this.package_;
+	}
+	
+	public void setPackage(String newPackage) {
+		String oldPackage = this.package_;
+		this.package_ = newPackage;
+		this.xmlEntityMappings.setPackage(newPackage);
+		firePropertyChanged(PACKAGE_PROPERTY, oldPackage, newPackage);
+	}
+
+	public String getVersion() {
+		return this.xmlEntityMappings.getVersion();
+	}
+
+	public String getDescription() {
+		return this.description;
+	}
+
+	public void setDescription(String newDescription) {
+		String oldDescription = this.description;
+		this.description = newDescription;
+		this.xmlEntityMappings.setDescription(newDescription);
+		firePropertyChanged(DESCRIPTION_PROPERTY, oldDescription, newDescription);
+	}
+
+
+	// ********** access **********
+
+	public AccessType getAccess() {
+		return (this.specifiedAccess != null) ? this.specifiedAccess : this.defaultAccess;
+	}
+
+	public AccessType getSpecifiedAccess() {
+		return this.specifiedAccess;
+	}
+
+	public void setSpecifiedAccess(AccessType access) {
+		AccessType old = this.specifiedAccess;
+		this.specifiedAccess = access;
+		this.xmlEntityMappings.setAccess(AccessType.toOrmResourceModel(access));
+		this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, access);
+	}
+
+	public AccessType getDefaultAccess() {
+		return this.defaultAccess;
+	}
+
+	protected void setDefaultAccess(AccessType access) {
+		AccessType old = this.defaultAccess;
+		this.defaultAccess = access;
+		this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, access);
+	}
+
+
+	// ********** schema **********
+
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.xmlEntityMappings.setSchema(schema);
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public Schema getDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
+	}
+
+
+	// ********** catalog **********
+
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+	
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.xmlEntityMappings.setCatalog(catalog);
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDbCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+
+	// ********** schema container **********
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDbSchemaContainer() {
+		String catalog = this.getCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+
+	// ********** ORM persistent types **********
+
+	public ListIterator<OrmPersistentType> persistentTypes() {
+		return new CloneListIterator<OrmPersistentType>(this.persistentTypes);
+	}
+	
+	public ListIterable<OrmPersistentType> getPersistentTypes() {
+		return new LiveCloneListIterable<OrmPersistentType>(this.persistentTypes);
+	}
+	
+	public int getPersistentTypesSize() {
+		return this.persistentTypes.size();
+	}
+	
+	public OrmPersistentType addPersistentType(String mappingKey, String className) {
+		OrmTypeMappingDefinition mappingDefinition = 
+				getMappingFileDefinition().getOrmTypeMappingDefinition(mappingKey);
+		XmlTypeMapping typeMapping = 
+				mappingDefinition.buildResourceMapping(getResourceNodeFactory());
+		OrmPersistentType persistentType = buildPersistentType(typeMapping);
+		int index = insertionIndex(persistentType);
+		this.persistentTypes.add(index, persistentType);
+		if (className.startsWith(getPackage() + '.')) {
+			// adds short name if package name is specified
+			className = className.substring(getPackage().length() + 1);
+		}
+		persistentType.getMapping().addToResourceModel(this.xmlEntityMappings);
+		typeMapping.setClassName(className);
+		fireItemAdded(PERSISTENT_TYPES_LIST, index, persistentType);
+		return persistentType;
+	}
+
+	protected int insertionIndex(OrmPersistentType ormPersistentType) {
+		return CollectionTools.insertionIndexOf(this.persistentTypes, ormPersistentType, MAPPING_COMPARATOR);
+	}
+
+	protected static final Comparator<OrmPersistentType> MAPPING_COMPARATOR =
+		new Comparator<OrmPersistentType>() {
+			public int compare(OrmPersistentType o1, OrmPersistentType o2) {
+				int o1Sequence = o1.getMapping().getXmlSequence();
+				int o2Sequence = o2.getMapping().getXmlSequence();
+				if (o1Sequence < o2Sequence) {
+					return -1;
+				}
+				if (o1Sequence == o2Sequence) {
+					return 0;
+				}
+				return 1;
+			}
+		};
+
+	public void removePersistentType(int index) {
+		OrmPersistentType persistentType = this.persistentTypes.get(index);
+		persistentType.dispose();
+		this.persistentTypes.remove(index);
+		persistentType.getMapping().removeFromResourceModel(this.xmlEntityMappings);
+		fireItemRemoved(PERSISTENT_TYPES_LIST, index, persistentType);		
+	}
+	
+	public void removePersistentType(OrmPersistentType persistentType) {
+		removePersistentType(this.persistentTypes.indexOf(persistentType));	
+	}
+	
+	protected void removePersistentType_(OrmPersistentType persistentType) {
+		persistentType.dispose();
+		removeItemFromList(persistentType, this.persistentTypes, PERSISTENT_TYPES_LIST);
+	}
+	
+	protected void movePersistentType_(int index, OrmPersistentType persistentType) {
+		moveItemInList(index, this.persistentTypes.indexOf(persistentType), this.persistentTypes, PERSISTENT_TYPES_LIST);
+	}
+
+
+	// ********** sequence generators **********
+
+	public ListIterable<OrmSequenceGenerator> getSequenceGenerators() {
+		return new LiveCloneListIterable<OrmSequenceGenerator>(this.sequenceGenerators);
+	}
+	
+	public int getSequenceGeneratorsSize() {
+		return this.sequenceGenerators.size();
+	}
+	
+	public OrmSequenceGenerator addSequenceGenerator(int index) {
+		XmlSequenceGenerator resourceSequenceGenerator = this.buildResourceSequenceGenerator();
+		OrmSequenceGenerator contextSequenceGenerator =  this.buildSequenceGenerator(resourceSequenceGenerator);
+		this.sequenceGenerators.add(index, contextSequenceGenerator);
+		this.xmlEntityMappings.getSequenceGenerators().add(index, resourceSequenceGenerator);
+		fireItemAdded(SEQUENCE_GENERATORS_LIST, index, contextSequenceGenerator);
+		return contextSequenceGenerator;
+	}
+
+	protected void addSequenceGenerator(int index, OrmSequenceGenerator sequenceGenerator) {
+		addItemToList(index, sequenceGenerator, this.sequenceGenerators, EntityMappings.SEQUENCE_GENERATORS_LIST);
+	}
+
+	protected void addSequenceGenerator(OrmSequenceGenerator sequenceGenerator) {
+		this.addSequenceGenerator(this.sequenceGenerators.size(), sequenceGenerator);
+	}
+
+	public void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator) {
+		removeSequenceGenerator(this.sequenceGenerators.indexOf(sequenceGenerator));
+	}
+	
+	public void removeSequenceGenerator(int index) {
+		OrmSequenceGenerator removedSequenceGenerator = this.sequenceGenerators.remove(index);
+		fireItemRemoved(SEQUENCE_GENERATORS_LIST, index, removedSequenceGenerator);
+		this.xmlEntityMappings.getSequenceGenerators().remove(index);
+	}
+	
+	protected void removeSequenceGenerator_(OrmSequenceGenerator sequenceGenerator) {
+		removeItemFromList(sequenceGenerator, this.sequenceGenerators, EntityMappings.SEQUENCE_GENERATORS_LIST);
+	}
+
+	public void moveSequenceGenerator(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.sequenceGenerators, targetIndex, sourceIndex);
+		this.xmlEntityMappings.getSequenceGenerators().move(targetIndex, sourceIndex);
+		fireItemMoved(EntityMappings.SEQUENCE_GENERATORS_LIST, targetIndex, sourceIndex);	
+	}
+	
+	protected XmlSequenceGenerator buildResourceSequenceGenerator() {
+		return OrmFactory.eINSTANCE.createXmlSequenceGenerator();
+	}
+
+	// ********** table generators **********
+
+	public ListIterable<OrmTableGenerator> getTableGenerators() {
+		return new LiveCloneListIterable<OrmTableGenerator>(this.tableGenerators);
+	}
+
+	public int getTableGeneratorsSize() {
+		return this.tableGenerators.size();
+	}
+	
+	public OrmTableGenerator addTableGenerator(int index) {
+		XmlTableGenerator resourceTableGenerator = buildResourceTableGenerator();
+		OrmTableGenerator contextTableGenerator = buildTableGenerator(resourceTableGenerator);
+		this.tableGenerators.add(index, contextTableGenerator);
+		this.xmlEntityMappings.getTableGenerators().add(index, resourceTableGenerator);
+		fireItemAdded(TABLE_GENERATORS_LIST, index, contextTableGenerator);
+		return contextTableGenerator;
+	}
+	
+	protected void addTableGenerator(int index, OrmTableGenerator tableGenerator) {
+		addItemToList(index, tableGenerator, this.tableGenerators, EntityMappings.TABLE_GENERATORS_LIST);
+	}
+
+	protected void addTableGenerator(OrmTableGenerator tableGenerator) {
+		this.addTableGenerator(this.tableGenerators.size(), tableGenerator);
+	}
+
+	public void removeTableGenerator(OrmTableGenerator tableGenerator) {
+		removeTableGenerator(this.tableGenerators.indexOf(tableGenerator));
+	}
+
+	public void removeTableGenerator(int index) {
+		OrmTableGenerator removedTableGenerator = this.tableGenerators.remove(index);
+		this.xmlEntityMappings.getTableGenerators().remove(index);
+		fireItemRemoved(TABLE_GENERATORS_LIST, index, removedTableGenerator);
+	}
+	
+	protected void removeTableGenerator_(OrmTableGenerator tableGenerator) {
+		removeItemFromList(tableGenerator, this.tableGenerators, EntityMappings.TABLE_GENERATORS_LIST);
+	}
+
+	public void moveTableGenerator(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.tableGenerators, targetIndex, sourceIndex);
+		this.xmlEntityMappings.getTableGenerators().move(targetIndex, sourceIndex);
+		fireItemMoved(EntityMappings.TABLE_GENERATORS_LIST, targetIndex, sourceIndex);	
+	}
+	
+	protected XmlTableGenerator buildResourceTableGenerator() {
+		return OrmFactory.eINSTANCE.createXmlTableGenerator();
+	}
+
+
+	// ********** named queries **********
+	public OrmQueryContainer getQueryContainer() {
+		return this.queryContainer;
+	}
+
+
+	// ********** misc **********
+
+	public OrmPersistenceUnitDefaults getPersistenceUnitDefaults() {
+		return this.persistenceUnitMetadata.getPersistenceUnitDefaults();
+	}
+
+
+	// ********** initialization **********
+	
+	protected void initializePersistentTypes() {
+		for (XmlTypeMapping typeMapping : this.xmlEntityMappings.getTypeMappings()) {
+			addPersistentType(typeMapping);
+		}	
+	}
+	
+	protected void initializeTableGenerators() {
+		for (XmlTableGenerator tableGenerator : this.xmlEntityMappings.getTableGenerators()) {
+			this.tableGenerators.add(buildTableGenerator(tableGenerator));
+		}
+	}
+	
+	protected void initializeSequenceGenerators() {
+		for (XmlSequenceGenerator sequenceGenerator : this.xmlEntityMappings.getSequenceGenerators()) {
+			this.sequenceGenerators.add(buildSequenceGenerator(sequenceGenerator));
+		}
+	}
+
+	
+	// ********** update **********
+
+	public void update() {
+		this.setDescription(this.xmlEntityMappings.getDescription());
+		this.setPackage(this.xmlEntityMappings.getPackage());
+
+		this.setDefaultAccess(this.getPersistenceUnit().getDefaultAccess());
+		this.setSpecifiedAccess(this.getResourceAccess());
+
+		this.setDefaultCatalog(this.getPersistenceUnit().getDefaultCatalog());
+		this.setSpecifiedCatalog(this.xmlEntityMappings.getCatalog());
+
+		this.setDefaultSchema(this.getPersistenceUnit().getDefaultSchema());
+		this.setSpecifiedSchema(this.xmlEntityMappings.getSchema());
+
+		this.persistenceUnitMetadata.update();
+		this.updatePersistentTypes();
+		this.updateTableGenerators();
+		this.updateSequenceGenerators();
+		getQueryContainer().update();
+	}
+	
+	protected AccessType getResourceAccess() {
+		return AccessType.fromOrmResourceModel(this.xmlEntityMappings.getAccess());
+	}
+
+	protected void updatePersistentTypes() {
+		Collection<OrmPersistentType> contextTypesToRemove = CollectionTools.collection(persistentTypes());
+		Collection<OrmPersistentType> contextTypesToUpdate = new ArrayList<OrmPersistentType>();
+		int resourceIndex = 0;
+		
+		List<XmlTypeMapping> xmlTypeMappings = this.xmlEntityMappings.getTypeMappings();
+		for (XmlTypeMapping xmlTypeMapping : xmlTypeMappings.toArray(new XmlTypeMapping[xmlTypeMappings.size()])) {
+			boolean contextAttributeFound = false;
+			for (OrmPersistentType contextType : contextTypesToRemove) {
+				if (contextType.getMapping().getResourceTypeMapping() == xmlTypeMapping) {
+					movePersistentType_(resourceIndex, contextType);
+					contextTypesToRemove.remove(contextType);
+					contextTypesToUpdate.add(contextType);
+					contextAttributeFound = true;
+					break;
+				}
+			}
+			if (!contextAttributeFound) {
+				OrmPersistentType ormPersistentType = addPersistentType(xmlTypeMapping);
+				fireItemAdded(PERSISTENT_TYPES_LIST, getPersistentTypesSize(), ormPersistentType);
+			}
+			resourceIndex++;
+		}
+		for (OrmPersistentType contextType : contextTypesToRemove) {
+			removePersistentType_(contextType);
+		}
+		//first handle adding/removing of the persistent types, then update the others last, 
+		//this causes less churn in the update process
+		for (OrmPersistentType contextType : contextTypesToUpdate) {
+			contextType.update();
+		}	
+	}
+	
+	//not firing change notification so this can be reused in initialize and update
+	protected OrmPersistentType addPersistentType(XmlTypeMapping resourceMapping) {
+		OrmPersistentType ormPersistentType = buildPersistentType(resourceMapping);
+		this.persistentTypes.add(ormPersistentType);
+		return ormPersistentType;
+	}
+	
+	protected void updateTableGenerators() {
+		// make a copy of the XML generators (to prevent ConcurrentModificationException)
+		Iterator<XmlTableGenerator> xmlGenerators = new CloneIterator<XmlTableGenerator>(this.xmlEntityMappings.getTableGenerators());
+
+		for (OrmTableGenerator contextGenerator : this.getTableGenerators()) {
+			if (xmlGenerators.hasNext()) {
+				contextGenerator.update(xmlGenerators.next());
+			} else {
+				this.removeTableGenerator_(contextGenerator);
+			}
+		}
+		
+		while (xmlGenerators.hasNext()) {
+			addTableGenerator(buildTableGenerator(xmlGenerators.next()));
+		}
+	}
+
+	protected OrmTableGenerator buildTableGenerator(XmlTableGenerator resourceTableGenerator) {
+		return getXmlContextNodeFactory().buildOrmTableGenerator(this, resourceTableGenerator);
+	}
+
+	protected void updateSequenceGenerators() {
+		// make a copy of the XML sequence generators (to prevent ConcurrentModificationException)
+		Iterator<XmlSequenceGenerator> xmlSequenceGenerators = new CloneIterator<XmlSequenceGenerator>(this.xmlEntityMappings.getSequenceGenerators());//prevent ConcurrentModificiationException
+
+		for (OrmSequenceGenerator contextSequenceGenerator : this.getSequenceGenerators()) {
+			if (xmlSequenceGenerators.hasNext()) {
+				contextSequenceGenerator.update(xmlSequenceGenerators.next());
+			}
+			else {
+				removeSequenceGenerator_(contextSequenceGenerator);
+			}
+		}
+		
+		while (xmlSequenceGenerators.hasNext()) {
+			addSequenceGenerator(buildSequenceGenerator(xmlSequenceGenerators.next()));
+		}
+	}
+
+	protected OrmSequenceGenerator buildSequenceGenerator(XmlSequenceGenerator resourceSequenceGenerator) {
+		return getXmlContextNodeFactory().buildOrmSequenceGenerator(this, resourceSequenceGenerator);
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		for (PersistentType persistentType : this.getPersistentTypes()) {
+			persistentType.postUpdate();
+		}
+	}
+
+	// ********** text **********
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		for (OrmPersistentType persistentType: this.getPersistentTypes()) {
+			if (persistentType.contains(textOffset)) {
+				return persistentType.getStructureNode(textOffset);
+			}
+		}
+		return this;
+	}
+	
+	public boolean containsOffset(int textOffset) {
+		return (this.xmlEntityMappings != null) && this.xmlEntityMappings.containsOffset(textOffset);
+	}
+	
+	public TextRange getSelectionTextRange() {
+		return this.xmlEntityMappings.getSelectionTextRange();
+	}
+	
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+	
+	
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateVersion(messages);
+		this.validateGenerators(messages);
+		this.queryContainer.validate(messages, reporter);
+		for (OrmPersistentType  ormPersistentType : this.getPersistentTypes()) {
+			this.validatePersistentType(ormPersistentType, messages, reporter);
+		}
+	}
+	
+	protected void validateVersion(List<IMessage> messages) {
+		if (! latestDocumentVersion().equals(this.xmlEntityMappings.getVersion())) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.LOW_SEVERITY,
+						JpaValidationMessages.XML_VERSION_NOT_LATEST,
+						this,
+						this.xmlEntityMappings.getVersionTextRange()));
+		}
+	}
+	
+	/**
+	 * Return the latest version of the document supported by the platform
+	 */
+	protected abstract String latestDocumentVersion();
+	
+	protected void validateGenerators(List<IMessage> messages) {
+		for (OrmGenerator localGenerator : this.getGenerators()) {
+			for (Iterator<Generator> globalGenerators = this.getPersistenceUnit().generators(); globalGenerators.hasNext(); ) {
+				if (localGenerator.duplicates(globalGenerators.next())) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.GENERATOR_DUPLICATE_NAME,
+							new String[] {localGenerator.getName()},
+							localGenerator,
+							localGenerator.getNameTextRange()
+						)
+					);
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Return all the generators, table and sequence.
+	 */
+	@SuppressWarnings("unchecked")
+	protected Iterable<OrmGenerator> getGenerators() {
+		return new CompositeIterable<OrmGenerator>(
+						this.getTableGenerators(),
+						this.getSequenceGenerators()
+				);
+	}
+	
+
+	protected void validatePersistentType(OrmPersistentType persistentType, List<IMessage> messages, IReporter reporter) {
+		try {
+			persistentType.validate(messages, reporter);
+		} catch (Throwable exception) {
+			JptCorePlugin.log(exception);			
+		}
+	}
+
+
+	// ********** dispose **********
+	
+	public void dispose() {
+		for (OrmPersistentType  ormPersistentType : this.getPersistentTypes()) {
+			ormPersistentType.dispose();
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..de18403
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAssociationOverrideRelationshipReference.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnInAssociationOverrideJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmAssociationOverrideRelationshipReference extends AbstractOrmXmlContextNode
+	implements OrmAssociationOverrideRelationshipReference
+{
+
+	// cache the strategy for property change notification
+	protected JoiningStrategy cachedPredominantJoiningStrategy;
+
+	protected OrmJoinColumnInAssociationOverrideJoiningStrategy joinColumnJoiningStrategy;
+
+	protected AbstractOrmAssociationOverrideRelationshipReference(OrmAssociationOverride parent, XmlAssociationOverride xao) {
+		super(parent);
+		this.initializeJoiningStrategies(xao);
+	}
+	
+	protected OrmJoinColumnInAssociationOverrideJoiningStrategy buildJoinColumnJoiningStrategy(XmlAssociationOverride xao) {
+		return new GenericOrmJoinColumnInAssociationOverrideJoiningStrategy(this, xao);
+	}
+	
+	public void initializeFrom(AssociationOverrideRelationshipReference oldAssociationOverride) {
+		if (oldAssociationOverride.getJoinColumnJoiningStrategy().hasSpecifiedJoinColumns()) {
+			getJoinColumnJoiningStrategy().initializeFrom(oldAssociationOverride.getJoinColumnJoiningStrategy());
+		}
+	}
+	
+	@Override
+	public OrmAssociationOverride getParent() {
+		return (OrmAssociationOverride) super.getParent();
+	}
+	
+	public OrmAssociationOverride getAssociationOverride() {
+		return getParent();
+	}
+
+	public TypeMapping getTypeMapping() {
+		return getAssociationOverride().getOwner().getTypeMapping();
+	}
+	
+	public Entity getEntity() {
+		TypeMapping typeMapping = getTypeMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	public boolean isParentVirtual() {
+		return getAssociationOverride().isVirtual();
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+	
+	// **************** predominant joining strategy ***************************
+	
+	public JoiningStrategy getPredominantJoiningStrategy() {
+		return this.cachedPredominantJoiningStrategy;
+	}
+	
+	protected void setPredominantJoiningStrategy(JoiningStrategy newJoiningStrategy) {
+		JoiningStrategy oldJoiningStrategy = this.cachedPredominantJoiningStrategy;
+		this.cachedPredominantJoiningStrategy = newJoiningStrategy;
+		firePropertyChanged(PREDOMINANT_JOINING_STRATEGY_PROPERTY, oldJoiningStrategy, newJoiningStrategy);
+	}
+
+	protected void initialize(XmlAssociationOverride associationOverride) {
+		initializeJoiningStrategies(associationOverride);
+		this.cachedPredominantJoiningStrategy = calculatePredominantJoiningStrategy();
+	}		
+	
+	protected void initializeJoiningStrategies(XmlAssociationOverride xao) {
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy(xao);
+	}
+
+	public void update(XmlAssociationOverride associationOverride) {
+		updateJoiningStrategies(associationOverride);
+		setPredominantJoiningStrategy(calculatePredominantJoiningStrategy());
+	}	
+		
+	protected void updateJoiningStrategies(XmlAssociationOverride associationOverride) {
+		this.joinColumnJoiningStrategy.update(associationOverride);
+	}
+	
+	protected abstract JoiningStrategy calculatePredominantJoiningStrategy();
+	
+	// **************** join columns *******************************************
+	
+
+	public OrmJoinColumnInAssociationOverrideJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+	
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+	
+	public void setJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.addStrategy();
+	}
+	
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinColumn() {
+		return false;
+	}
+
+	public RelationshipMapping getRelationshipMapping() {
+		return getAssociationOverride().getOwner().getRelationshipMapping(getAssociationOverride().getName());
+	}
+
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return getRelationshipMapping().isOwnedBy(mapping);
+	}
+
+	public boolean isRelationshipOwner() {
+		return getRelationshipMapping().isRelationshipOwner();
+	}
+	
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.joinColumnJoiningStrategy.validate(messages, reporter);
+	}
+
+	public TextRange getValidationTextRange() {
+		return getAssociationOverride().getValidationTextRange();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java
new file mode 100644
index 0000000..ed65020
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmAttributeMapping.java
@@ -0,0 +1,386 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.ColumnMapping;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmBaseEmbeddedMapping;
+import org.eclipse.jpt.core.context.orm.OrmBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmColumnMapping;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddedMapping;
+import org.eclipse.jpt.core.context.orm.OrmIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmMultiRelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmSingleRelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmTransientMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmVersionMapping;
+import org.eclipse.jpt.core.internal.jpa2.context.SimpleMetamodelField;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.AttributeMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmAttributeMapping<T extends XmlAttributeMapping>
+	extends AbstractOrmXmlContextNode
+	implements OrmAttributeMapping, AttributeMapping2_0
+{
+	protected String name;
+	
+	protected final T resourceAttributeMapping;
+
+	protected AbstractOrmAttributeMapping(OrmPersistentAttribute parent, T resourceAttributeMapping) {
+		super(parent);
+		this.resourceAttributeMapping = resourceAttributeMapping;
+		this.name = this.getResourceMappingName();
+	}	
+	
+	protected JavaPersistentAttribute getJavaPersistentAttribute() {
+		return this.getPersistentAttribute().getJavaPersistentAttribute();
+	}
+	
+	protected JavaResourcePersistentAttribute getJavaResourcePersistentAttribute() {
+		return this.getJavaPersistentAttribute().getResourcePersistentAttribute();
+	}
+
+	public boolean isVirtual() {
+		return getPersistentAttribute().isVirtual();
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.resourceAttributeMapping.setName(name);
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+		this.getPersistentAttribute().nameChanged(old, name);
+	}
+
+	protected void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+		this.getPersistentAttribute().nameChanged(old, name);
+	}
+	
+	public OrmPersistentAttribute getPersistentAttribute() {
+		return (OrmPersistentAttribute) getParent();
+	}
+
+	protected EntityMappings getEntityMappings() {
+		return this.getPersistentAttribute().getOwningPersistentType().getParent();
+	}
+
+	protected PersistentType resolvePersistentType(String className) {
+		return this.getEntityMappings().resolvePersistentType(className);
+	}
+
+	public boolean isDefault() {
+		return false;
+	}
+	
+	public void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping) {
+		setName(oldMapping.getName());
+	}
+
+	public void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
+		initializeFromOrmAttributeMapping((OrmAttributeMapping) oldMapping);
+	}
+
+	public void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping) {
+		initializeFromOrmColumnMapping(oldMapping);
+	}
+
+	public void initializeFromOrmIdMapping(OrmIdMapping oldMapping) {
+		initializeFromOrmColumnMapping(oldMapping);
+	}
+
+	public void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping) {
+		initializeFromOrmAttributeMapping(oldMapping);
+	}
+
+	public void initializeFromOrmBaseEmbeddedMapping(OrmBaseEmbeddedMapping oldMapping) {
+		initializeFromOrmAttributeMapping(oldMapping);
+	}
+
+	public void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping) {
+		initializeFromOrmBaseEmbeddedMapping(oldMapping);
+	}
+
+	public void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping) {
+		initializeFromOrmBaseEmbeddedMapping(oldMapping);
+	}
+
+	public void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping) {
+		initializeFromOrmColumnMapping(oldMapping);
+	}
+
+	public void initializeFromOrmRelationshipMapping(OrmRelationshipMapping oldMapping) {
+		initializeFromOrmAttributeMapping(oldMapping);
+	}
+
+	public void initializeFromOrmMultiRelationshipMapping(OrmMultiRelationshipMapping oldMapping) {
+		initializeFromOrmRelationshipMapping(oldMapping);
+	}
+
+	public void initializeFromOrmSingleRelationshipMapping(OrmSingleRelationshipMapping oldMapping) {
+		initializeFromOrmRelationshipMapping(oldMapping);
+	}
+
+	public void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping) {
+		initializeFromOrmMultiRelationshipMapping(oldMapping);
+	}
+
+	public void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping) {
+		initializeFromOrmSingleRelationshipMapping(oldMapping);
+	}
+
+	public void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping) {
+		initializeFromOrmSingleRelationshipMapping(oldMapping);
+	}
+
+	public void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping) {
+		initializeFromOrmMultiRelationshipMapping(oldMapping);
+	}
+
+	public String getPrimaryKeyColumnName() {
+		return null;
+	}
+
+	public OrmTypeMapping getTypeMapping() {
+		return this.getPersistentAttribute().getOwningTypeMapping();
+	}
+
+
+	public boolean isOverridableAttributeMapping() {
+		return false;
+	}
+
+	public boolean isOverridableAssociationMapping() {
+		return false;
+	}
+
+	public boolean isRelationshipOwner() {
+		return false;
+	}
+
+	public boolean isOwnedBy(AttributeMapping mapping) {
+		// Default implementation - override where needed
+		return false;
+	}
+	
+	public Iterator<String> allMappingNames() {
+		return getName() == null ? EmptyIterator.<String> instance() : new SingleElementIterator<String>(getName());
+	}
+	
+	public AttributeMapping resolveAttributeMapping(String attributeName) {
+		if (getName() != null && getName().equals(attributeName)) {
+			return this;
+		}
+		return null;
+	}
+	
+	public Iterator<String> allOverrideableAttributeMappingNames() {
+		if (isOverridableAttributeMapping() && getName() != null) {
+			return new SingleElementIterator<String>(getName());
+		}
+		return EmptyIterator.<String> instance();
+	}
+	
+	public Iterator<String> allOverrideableAssociationMappingNames() {
+		if (isOverridableAssociationMapping() && getName() != null) {
+			return new SingleElementIterator<String>(getName());
+		}
+		return EmptyIterator.<String> instance();
+	}
+	
+	public Column resolveOverriddenColumn(String attributeName) {
+		ColumnMapping columnMapping = this.resolveColumnMapping(attributeName);
+		return columnMapping == null ? null : columnMapping.getColumn();
+	}
+	
+	protected ColumnMapping resolveColumnMapping(String attributeName) {
+		AttributeMapping attributeMapping = resolveAttributeMapping(attributeName);
+		if (attributeMapping != null && attributeMapping.isOverridableAttributeMapping()) {
+			return (ColumnMapping) attributeMapping;
+		}
+		return null;
+	}	
+
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		RelationshipMapping relationshipMapping = this.resolveRelationshipMapping(attributeName);
+		return relationshipMapping == null ? null : relationshipMapping.getRelationshipReference();
+	}
+	
+	protected RelationshipMapping resolveRelationshipMapping(String attributeName) {
+		AttributeMapping attributeMapping = resolveAttributeMapping(attributeName);
+		if (attributeMapping != null && attributeMapping.isOverridableAssociationMapping()) {
+			return (RelationshipMapping) attributeMapping;
+		}
+		return null;
+	}	
+
+	public T getResourceAttributeMapping() {
+		return this.resourceAttributeMapping;
+	}
+	
+	public void update() {
+		this.setName_(this.getResourceMappingName());
+	}
+	
+	protected String getResourceMappingName() {
+		return this.resourceAttributeMapping.getName();
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return this.getTypeMapping().shouldValidateAgainstDatabase();
+	}
+
+	public boolean contains(int textOffset) {
+		return this.resourceAttributeMapping.containsOffset(textOffset);
+	}
+	
+	public TextRange getSelectionTextRange() {
+		return this.resourceAttributeMapping.getSelectionTextRange();
+	}	
+	
+	public TextRange getValidationTextRange() {
+		return (this.getPersistentAttribute().isVirtual()) ? this.getTypeMapping().getAttributesTextRange() : this.resourceAttributeMapping.getValidationTextRange();
+	}
+	
+	public TextRange getNameTextRange() {
+		return this.resourceAttributeMapping.getNameTextRange();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ********** metamodel **********
+
+	public MetamodelField getMetamodelField() {
+		// if we don't have a name we can't build a metamodel field...
+		String metamodelFieldName = this.getMetamodelFieldName();
+		return (metamodelFieldName == null) ? null :
+					new SimpleMetamodelField(
+						this.getMetamodelFieldModifiers(),
+						this.getMetamodelFieldTypeName(),
+						this.getMetamodelFieldTypeArgumentNames(),
+						metamodelFieldName
+					);
+	}
+
+	protected Iterable<String> getMetamodelFieldModifiers() {
+		return STANDARD_METAMODEL_FIELD_MODIFIERS;
+	}
+
+	/**
+	 * most mappings are "singular"
+	 */
+	protected String getMetamodelFieldTypeName() {
+		return JPA2_0.SINGULAR_ATTRIBUTE;
+	}
+
+	protected final Iterable<String> getMetamodelFieldTypeArgumentNames() {
+		ArrayList<String> typeArgumentNames = new ArrayList<String>(3);
+		typeArgumentNames.add(this.getTypeMapping().getPersistentType().getName());
+		this.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
+		return typeArgumentNames;
+	}
+
+	/**
+	 * by default, we add only the mapping's attribute type name;
+	 * but collection relationship mappings will also need to add the key type
+	 * name if the "collection" is of type java.util.Map
+	 */
+	protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
+		typeArgumentNames.add(this.getMetamodelTypeName());
+	}
+
+	public String getMetamodelTypeName() {
+		return ((OrmPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelTypeName();
+	}
+
+	protected String getMetamodelFieldName() {
+		return this.getName();
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateAttribute(messages);
+		this.validateMapping(messages);
+	}
+	
+	protected void validateAttribute(List<IMessage> messages) {
+		if (StringTools.stringIsEmpty(this.name)) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME,
+					this, 
+					this.getValidationTextRange()
+				)
+			);
+			return;
+		}
+	}
+	
+	//TODO validation message - i think more info is needed in this message.  include type mapping type?
+	protected void validateMapping(List<IMessage> messages) {
+		if ( ! this.getTypeMapping().attributeMappingKeyAllowed(this.getKey())) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_MAPPING,
+					new String[] {this.name},
+					this, 
+					this.getValidationTextRange()
+				)
+			);
+		}
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseColumn.java
new file mode 100644
index 0000000..fe0fc25
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseColumn.java
@@ -0,0 +1,329 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmBaseColumn;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmBaseColumn<T extends AbstractXmlColumn> extends AbstractOrmNamedColumn<T>
+	implements OrmBaseColumn
+{
+	protected String specifiedTable;
+	
+	protected String defaultTable;
+
+	protected Boolean specifiedUnique;
+	
+	protected Boolean specifiedNullable;
+	
+	protected Boolean specifiedInsertable;
+	
+	protected Boolean specifiedUpdatable;
+
+	protected AbstractOrmBaseColumn(XmlContextNode parent, OrmBaseColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	public void initializeFrom(BaseColumn oldColumn) {
+		super.initializeFrom(oldColumn);
+		setSpecifiedTable(oldColumn.getSpecifiedTable());
+		setSpecifiedUnique(oldColumn.getSpecifiedUnique());
+		setSpecifiedNullable(oldColumn.getSpecifiedNullable());
+		setSpecifiedInsertable(oldColumn.getSpecifiedInsertable());
+		setSpecifiedUpdatable(oldColumn.getSpecifiedUpdatable());
+	}
+	
+	@Override
+	public OrmBaseColumn.Owner getOwner() {
+		return (OrmBaseColumn.Owner) super.getOwner();
+	}
+	
+//	@Override
+//	protected void addInsignificantXmlFeatureIdsTo(Set<Integer> insignificantXmlFeatureIds) {
+//		super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
+//		insignificantXmlFeatureIds.add(JpaCoreMappingsPackage.IABSTRACT_COLUMN__DEFAULT_TABLE);
+//		insignificantXmlFeatureIds.add(JpaCoreMappingsPackage.IABSTRACT_COLUMN__TABLE);
+//	}
+	
+	@Override
+	public String getTable() {
+		return (this.getSpecifiedTable() == null) ? getDefaultTable() : this.getSpecifiedTable();
+	}
+
+	public String getSpecifiedTable() {
+		return this.specifiedTable;
+	}
+
+	public void setSpecifiedTable(String newSpecifiedTable) {
+		String oldSpecifiedTable = this.specifiedTable;
+		this.specifiedTable = newSpecifiedTable;
+		if (this.valuesAreDifferent(oldSpecifiedTable, newSpecifiedTable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setTable(newSpecifiedTable);						
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedTable != null) {
+				addResourceColumn();
+				getResourceColumn().setTable(newSpecifiedTable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_TABLE_PROPERTY, oldSpecifiedTable, newSpecifiedTable);
+	}
+	
+	protected void setSpecifiedTable_(String newSpecifiedTable) {
+		String oldSpecifiedTable = this.specifiedTable;
+		this.specifiedTable = newSpecifiedTable;
+		firePropertyChanged(BaseColumn.SPECIFIED_TABLE_PROPERTY, oldSpecifiedTable, newSpecifiedTable);
+	}
+
+	public String getDefaultTable() {
+		return this.defaultTable;
+	}
+
+	protected void setDefaultTable(String newDefaultTable) {
+		String oldDefaultTable = this.defaultTable;
+		this.defaultTable = newDefaultTable;
+		firePropertyChanged(BaseColumn.DEFAULT_TABLE_PROPERTY, oldDefaultTable, newDefaultTable);
+	}
+	
+	public boolean tableNameIsInvalid() {
+		return getOwner().tableNameIsInvalid(getTable());
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return getOwner().candidateTableNames();
+	}
+
+	public boolean isUnique() {
+		return (this.getSpecifiedUnique() == null) ? this.isDefaultUnique() : this.getSpecifiedUnique().booleanValue();
+	}
+	
+	public boolean isDefaultUnique() {
+		return BaseColumn.DEFAULT_UNIQUE;
+	}
+	
+	public Boolean getSpecifiedUnique() {
+		return this.specifiedUnique;
+	}
+	
+	public void setSpecifiedUnique(Boolean newSpecifiedUnique) {
+		Boolean oldSpecifiedUnique = this.specifiedUnique;
+		this.specifiedUnique = newSpecifiedUnique;
+		if (this.valuesAreDifferent(oldSpecifiedUnique, newSpecifiedUnique)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setUnique(newSpecifiedUnique);						
+				if (this.getResourceColumn().isUnset()) {
+					removeResourceColumn();
+				}
+			}
+			else if (newSpecifiedUnique != null) {
+				addResourceColumn();
+				getResourceColumn().setUnique(newSpecifiedUnique);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_UNIQUE_PROPERTY, oldSpecifiedUnique, newSpecifiedUnique);
+	}
+	
+	protected void setSpecifiedUnique_(Boolean newSpecifiedUnique) {
+		Boolean oldSpecifiedUnique = this.specifiedUnique;
+		this.specifiedUnique = newSpecifiedUnique;
+		firePropertyChanged(BaseColumn.SPECIFIED_UNIQUE_PROPERTY, oldSpecifiedUnique, newSpecifiedUnique);
+	}
+	
+	public boolean isNullable() {
+		return (this.getSpecifiedNullable() == null) ? this.isDefaultNullable() : this.getSpecifiedNullable().booleanValue();
+	}
+	
+	public boolean isDefaultNullable() {
+		return BaseColumn.DEFAULT_NULLABLE;
+	}
+	
+	public Boolean getSpecifiedNullable() {
+		return this.specifiedNullable;
+	}
+	
+	public void setSpecifiedNullable(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		if (this.valuesAreDifferent(oldSpecifiedNullable, newSpecifiedNullable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setNullable(newSpecifiedNullable);						
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedNullable != null) {
+				addResourceColumn();
+				getResourceColumn().setNullable(newSpecifiedNullable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+
+	protected void setSpecifiedNullable_(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+
+	public boolean isInsertable() {
+		return (this.getSpecifiedInsertable() == null) ? this.isDefaultInsertable() : this.getSpecifiedInsertable().booleanValue();
+	}
+	
+	public boolean isDefaultInsertable() {
+		return BaseColumn.DEFAULT_INSERTABLE;
+	}
+	
+	public Boolean getSpecifiedInsertable() {
+		return this.specifiedInsertable;
+	}
+	
+	public void setSpecifiedInsertable(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		if (this.valuesAreDifferent(oldSpecifiedInsertable, newSpecifiedInsertable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setInsertable(newSpecifiedInsertable);						
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedInsertable != null) {
+				addResourceColumn();
+				getResourceColumn().setInsertable(newSpecifiedInsertable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+	
+	protected void setSpecifiedInsertable_(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+
+	public boolean isUpdatable() {
+		return (this.getSpecifiedUpdatable() == null) ? this.isDefaultUpdatable() : this.getSpecifiedUpdatable().booleanValue();
+	}
+	
+	public boolean isDefaultUpdatable() {
+		return BaseColumn.DEFAULT_UPDATABLE;
+	}
+	
+	public Boolean getSpecifiedUpdatable() {
+		return this.specifiedUpdatable;
+	}
+	
+	public void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		if (this.valuesAreDifferent(oldSpecifiedUpdatable, newSpecifiedUpdatable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setUpdatable(newSpecifiedUpdatable);						
+				if (this.getResourceColumn().isUnset()) {
+					removeResourceColumn();
+				}
+			}
+			else if (newSpecifiedUpdatable != null) {
+				addResourceColumn();
+				getResourceColumn().setUpdatable(newSpecifiedUpdatable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+	
+	protected void setSpecifiedUpdatable_(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+
+	public TextRange getTableTextRange() {
+		if (getResourceColumn() != null) {
+			TextRange textRange = getResourceColumn().getTableTextRange();
+			if (textRange != null) {
+				return textRange;
+			}
+		}
+		return this.getParent().getValidationTextRange(); 
+	}
+	
+	@Override
+	protected void initialize(T column) {
+		super.initialize(column);
+		this.specifiedTable = this.getResourceTable(column);
+		this.defaultTable = this.buildDefaultTableName();
+		//TODO default from java for all of these settings
+		this.specifiedNullable = this.getResourceNullable(column);
+		this.specifiedUpdatable = this.getResourceUpdatable(column);
+		this.specifiedUnique = this.getResourceUnique(column);
+		this.specifiedInsertable = this.getResourceInsertable(column);
+	}
+	
+	@Override
+	protected void update(T column) {
+		super.update(column);
+		setSpecifiedTable_(this.getResourceTable(column));
+		setDefaultTable(this.buildDefaultTableName());
+		setSpecifiedNullable_(this.getResourceNullable(column));
+		setSpecifiedUpdatable_(this.getResourceUpdatable(column));
+		setSpecifiedUnique_(this.getResourceUnique(column));
+		setSpecifiedInsertable_(this.getResourceInsertable(column));
+	}
+
+	protected String getResourceTable(T column) {
+		return column == null ? null : column.getTable();
+	}
+
+	protected Boolean getResourceNullable(T column) {
+		return column == null ? null : column.getNullable();
+	}
+	
+	protected Boolean getResourceUpdatable(T column) {
+		return column == null ? null : column.getUpdatable();
+	}
+	
+	protected Boolean getResourceUnique(T column) {
+		return column == null ? null : column.getUnique();
+	}
+	
+	protected Boolean getResourceInsertable(T column) {
+		return column == null ? null : column.getInsertable();
+	}
+	
+	protected String buildDefaultTableName() {
+		return getOwner().getDefaultTableName();
+	}
+
+
+	// ****************** validation ****************
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		if (this.validateTable(messages)) {
+			super.validate(messages, reporter);
+		}
+	}
+
+	/**
+	 * Return true if the table is valid and no messages are logged
+	 */
+	protected boolean validateTable(List<IMessage> messages) {
+		if (this.tableNameIsInvalid()) {
+			messages.add(this.getOwner().buildTableNotValidMessage(this, this.getTableTextRange()));
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
new file mode 100644
index 0000000..eb17fba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
@@ -0,0 +1,384 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaBaseEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmBaseEmbeddedMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmBaseEmbeddedMapping<T extends AbstractXmlEmbedded>
+	extends AbstractOrmAttributeMapping<T>
+	implements OrmBaseEmbeddedMapping
+{
+	protected OrmAttributeOverrideContainer attributeOverrideContainer;
+	
+	protected Embeddable targetEmbeddable;
+	
+	
+	protected AbstractOrmBaseEmbeddedMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.targetEmbeddable = embeddableFor(this.getJavaPersistentAttribute());
+		this.attributeOverrideContainer 
+				= getXmlContextNodeFactory().buildOrmAttributeOverrideContainer(
+					this,
+					buildAttributeOverrideContainerOwner());
+	}
+	
+	
+	protected OrmAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
+		return new AttributeOverrideContainerOwner();
+	}
+	
+	@Override
+	public void initializeFromOrmBaseEmbeddedMapping(OrmBaseEmbeddedMapping oldMapping) {
+		super.initializeFromOrmBaseEmbeddedMapping(oldMapping);
+		this.attributeOverrideContainer.initializeFromAttributeOverrideContainer(oldMapping.getAttributeOverrideContainer());
+	}
+
+	public OrmAttributeOverrideContainer getAttributeOverrideContainer() {
+		return this.attributeOverrideContainer;
+	}
+
+	protected JavaAttributeOverride getJavaAttributeOverrideNamed(String attributeName) {
+		if (getJavaEmbeddedMapping() != null) {
+			return getJavaEmbeddedMapping().getAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+		}
+		return null;
+	}	
+	
+	public Embeddable getTargetEmbeddable() {
+		return this.targetEmbeddable;
+	}
+	
+	protected void setTargetEmbeddable_(Embeddable newTargetEmbeddable) {
+		Embeddable oldTargetEmbeddable = this.targetEmbeddable;
+		this.targetEmbeddable = newTargetEmbeddable;
+		firePropertyChanged(TARGET_EMBEDDABLE_PROPERTY, oldTargetEmbeddable, newTargetEmbeddable);
+	}
+
+	protected Iterator<AttributeMapping> embeddableAttributeMappings() {
+		Embeddable targetEmbeddable = getTargetEmbeddable();
+		if (targetEmbeddable != null && targetEmbeddable != getPersistentAttribute().getOwningTypeMapping()) {
+			return targetEmbeddable.attributeMappings();
+		}
+		return EmptyIterator.instance();
+	}
+	
+	@Override
+	public Iterator<String> allOverrideableAttributeMappingNames() {
+		return this.isJpa2_0Compatible() ?
+				this.embeddableOverrideableAttributeMappingNames() :
+				super.allOverrideableAttributeMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAttributeMappingNames();
+				}
+			}
+		);
+	}
+
+	@Override
+	public Iterator<String> allOverrideableAssociationMappingNames() {
+		return this.isJpa2_0Compatible() ?
+				this.embeddableOverrideableAssociationMappingNames() :
+				super.allOverrideableAssociationMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAssociationMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAssociationMappingNames();
+				}
+			}
+		);
+	}
+	
+	protected Iterator<String> embeddableOverrideableMappingNames(Transformer<AttributeMapping, Iterator<String>> transformer) {
+		return new TransformationIterator<String, String>(
+			new CompositeIterator<String>(
+				new TransformationIterator<AttributeMapping, Iterator<String>>(this.embeddableAttributeMappings(), transformer))) 
+		{
+			@Override
+			protected String transform(String next) {
+				return getName() + '.' + next;
+			}
+		};
+	}
+	
+	@Override
+	public Column resolveOverriddenColumn(String attributeName) {
+		if (getName() == null) {
+			return null;
+		}
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = attributeName.indexOf('.');
+			if (dotIndex != -1) {
+				if (getName().equals(attributeName.substring(0, dotIndex))) {
+					attributeName = attributeName.substring(dotIndex + 1);
+					AttributeOverride override = getAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+					if (override != null && !override.isVirtual()) {
+						return override.getColumn();
+					}
+					if (this.getTargetEmbeddable() == null) {
+						return null;
+					}
+					return this.getTargetEmbeddable().resolveOverriddenColumn(attributeName);
+				}
+			}
+		}
+		return null;
+	}
+
+	public JavaBaseEmbeddedMapping getJavaEmbeddedMapping() {
+		JavaPersistentAttribute jpa = this.getJavaPersistentAttribute();
+		if ((jpa != null) && this.valuesAreEqual(jpa.getMappingKey(), this.getKey())) {
+			return (JavaBaseEmbeddedMapping) jpa.getMapping();
+		}
+		return null;
+	}
+
+	
+	@Override
+	public void update() {
+		super.update();
+		setTargetEmbeddable_(embeddableFor(this.getJavaPersistentAttribute()));
+		getAttributeOverrideContainer().update();
+	}
+	
+	
+	//******** Validation ******************
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		if (validateTargetEmbeddable(messages, reporter)) {
+			validateOverrides(messages, reporter);
+		}
+	}
+
+	protected boolean validateTargetEmbeddable(List<IMessage> messages, IReporter reporter) {
+		if (getTargetEmbeddable() == null) {
+			String targetEmbeddableTypeName = getPersistentAttribute().getTypeName();
+			// if the type isn't resolveable, there'll already be a java error
+			if (targetEmbeddableTypeName != null) {
+				messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.TARGET_NOT_AN_EMBEDDABLE,
+							new String[] {targetEmbeddableTypeName}, 
+							this, 
+							this.getValidationTextRange()));
+			}
+			return false;
+		}
+		return true;
+	}
+
+	protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
+		getAttributeOverrideContainer().validate(messages, reporter);
+	}
+
+	//************ static methods ************
+	
+	public static Embeddable embeddableFor(JavaPersistentAttribute javaPersistentAttribute) {
+		return (javaPersistentAttribute == null) ? null : javaPersistentAttribute.getEmbeddable();
+	}
+	
+	
+	//********** AttributeOverrideContainer.Owner implementation *********	
+	
+	protected class AttributeOverrideContainerOwner
+		implements OrmAttributeOverrideContainer.Owner
+	{
+		public OrmTypeMapping getTypeMapping() {
+			return AbstractOrmBaseEmbeddedMapping.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmBaseEmbeddedMapping.this.getTargetEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+				: allOverridableAttributeNames_(typeMapping);
+		}
+		
+		/* assumes the type mapping is not null */
+		protected Iterator<String> allOverridableAttributeNames_(TypeMapping typeMapping) {
+			return typeMapping.allOverridableAttributeNames();
+		}
+		
+		public EList<XmlAttributeOverride> getResourceAttributeOverrides() {
+			return AbstractOrmBaseEmbeddedMapping.this.resourceAttributeMapping.getAttributeOverrides();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			if (getPersistentAttribute().isVirtual() && !getTypeMapping().isMetadataComplete()) {
+				JavaAttributeOverride javaAttributeOverride = getJavaAttributeOverrideNamed(attributeOverrideName);
+				if (javaAttributeOverride != null && !javaAttributeOverride.isVirtual()) {
+					return javaAttributeOverride.getColumn();
+				}
+			}
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public XmlColumn buildVirtualXmlColumn(Column overridableColumn, String attributeName, boolean isMetadataComplete) {
+			return new VirtualXmlAttributeOverrideColumn(overridableColumn);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return getTypeMapping().tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return getTypeMapping().associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return getTypeMapping().getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return getTypeMapping().getPrimaryTableName();
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeUnresolvedColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideUnresolvedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeUnresolvedColumnTableNotValidMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					AbstractOrmBaseEmbeddedMapping.this.getName(), 
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideUnresolvedColumnNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+				);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					AbstractOrmBaseEmbeddedMapping.this.getName(), 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] { 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column,
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmBaseEmbeddedMapping.this.getValidationTextRange();
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBasicMapping.java
new file mode 100644
index 0000000..abe63ea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmBasicMapping.java
@@ -0,0 +1,329 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BasicMapping;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.Fetchable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.Nullable;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.context.orm.OrmColumnMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmBasicMapping<T extends XmlBasic>
+	extends AbstractOrmAttributeMapping<T>
+	implements OrmBasicMapping
+{
+	protected final OrmColumn column;
+	
+	protected FetchType specifiedFetch;
+
+	protected Boolean specifiedOptional;
+	
+	protected OrmConverter converter;
+	
+	protected final OrmConverter nullConverter;
+	
+	protected AbstractOrmBasicMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.column = getXmlContextNodeFactory().buildOrmColumn(this, this);
+		this.column.initialize(this.getResourceColumn());//TODO pass in to factory
+		this.specifiedFetch = this.getResourceFetch();
+		this.specifiedOptional = this.getResourceOptional();
+		this.nullConverter = this.getXmlContextNodeFactory().buildOrmNullConverter(this);
+		this.converter = this.buildConverter(this.getResourceConverterType());
+	}
+
+	public FetchType getFetch() {
+		return (this.getSpecifiedFetch() == null) ? this.getDefaultFetch() : this.getSpecifiedFetch();
+	}
+
+	public FetchType getDefaultFetch() {
+		return BasicMapping.DEFAULT_FETCH_TYPE;
+	}
+
+	public FetchType getSpecifiedFetch() {
+		return this.specifiedFetch;
+	}
+	
+	public void setSpecifiedFetch(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		this.resourceAttributeMapping.setFetch(FetchType.toOrmResourceModel(newSpecifiedFetch));
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+
+	protected void setSpecifiedFetch_(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+
+	public boolean isOptional() {
+		return (this.getSpecifiedOptional() == null) ? this.isDefaultOptional() : this.getSpecifiedOptional().booleanValue();
+	}
+	
+	public boolean isDefaultOptional() {
+		return Nullable.DEFAULT_OPTIONAL;
+	}
+
+	public Boolean getSpecifiedOptional() {
+		return this.specifiedOptional;
+	}
+	
+	public void setSpecifiedOptional(Boolean newSpecifiedOptional) {
+		Boolean oldOptional = this.specifiedOptional;
+		this.specifiedOptional = newSpecifiedOptional;
+		this.resourceAttributeMapping.setOptional(newSpecifiedOptional);
+		firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, oldOptional, newSpecifiedOptional);
+	}
+	
+	protected void setSpecifiedOptional_(Boolean newSpecifiedOptional) {
+		Boolean oldOptional = this.specifiedOptional;
+		this.specifiedOptional = newSpecifiedOptional;
+		firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, oldOptional, newSpecifiedOptional);
+	}
+	
+	public OrmConverter getConverter() {
+		return this.converter;
+	}
+	
+	protected String getConverterType() {
+		return this.converter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		OrmConverter oldConverter = this.converter;
+		OrmConverter newConverter = buildConverter(converterType);
+		this.converter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.converter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(OrmConverter newConverter) {
+		OrmConverter oldConverter = this.converter;
+		this.converter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}	
+
+	public String getKey() {
+		return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmBasicMapping(this);
+	}
+
+
+	@Override
+	public void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
+		super.initializeFromOrmColumnMapping(oldMapping);
+		getColumn().initializeFrom(oldMapping.getColumn());
+	}
+
+	public int getXmlSequence() {
+		return 20;
+	}
+
+	@Override
+	public boolean isOverridableAttributeMapping() {
+		return true;
+	}
+
+	public OrmColumn getColumn() {
+		return this.column;
+	}
+
+	public String getDefaultColumnName() {		
+		return getName();
+	}
+
+	public String getDefaultTableName() {
+		return getTypeMapping().getPrimaryTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		return getTypeMapping().getDbTable(tableName);
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return getTypeMapping().associatedTableNamesIncludingInherited();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setSpecifiedFetch_(this.getResourceFetch());
+		this.setSpecifiedOptional_(this.getResourceOptional());
+		this.column.update(this.getResourceColumn());
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update();
+		}
+		else {
+			setConverter(buildConverter(getResourceConverterType()));
+		}
+	}
+	
+	protected Boolean getResourceOptional() {
+		return this.resourceAttributeMapping.getOptional();
+	}
+	
+	protected FetchType getResourceFetch() {
+		return FetchType.fromOrmResourceModel(this.resourceAttributeMapping.getFetch());
+	}
+	
+	protected OrmConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;
+		}
+		if (this.valuesAreEqual(converterType, Converter.ENUMERATED_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmEnumeratedConverter(this, this.resourceAttributeMapping);
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmTemporalConverter(this, this.resourceAttributeMapping);
+		}
+		if (this.valuesAreEqual(converterType, Converter.LOB_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmLobConverter(this, this.resourceAttributeMapping);
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.resourceAttributeMapping.getEnumerated() != null) {
+			return Converter.ENUMERATED_CONVERTER;
+		}
+		else if (this.resourceAttributeMapping.getTemporal() != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		else if (this.resourceAttributeMapping.isLob()) {
+			return Converter.LOB_CONVERTER;
+		}
+		
+		return Converter.NO_CONVERTER;
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getBasics().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getBasics().remove(this.resourceAttributeMapping);
+	}
+	
+	//***************** XmlColumn.Owner implementation ****************
+	
+	public XmlColumn getResourceColumn() {
+		return this.resourceAttributeMapping.getColumn();
+	}
+	
+	public void addResourceColumn() {
+		this.resourceAttributeMapping.setColumn(OrmFactory.eINSTANCE.createXmlColumn());
+	}
+	
+	public void removeResourceColumn() {
+		this.resourceAttributeMapping.setColumn(null);
+	}
+	
+	// ****************** validation ****************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		getColumn().validate(messages, reporter);
+	}
+
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		if (isVirtual()) {
+			return this.buildVirtualUnresolvedNameMessage(column, textRange);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+			new String[] {column.getName(), column.getDbTable().getName()}, 
+			column,
+			textRange
+		);
+	}
+
+	protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME,
+			new String[] {getName(), column.getName(), column.getDbTable().getName()},
+			column, 
+			textRange
+		);
+	}
+
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		if (isVirtual()) {
+			return this.buildVirtualTableNotValidMessage(column, textRange);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+			column, 
+			textRange
+		);
+	}
+	
+	public IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				getName(),
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+			column, 
+			textRange
+		);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmEmbeddable.java
new file mode 100644
index 0000000..67f61d5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmEmbeddable.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Oracle. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddable;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddable;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+
+public abstract class AbstractOrmEmbeddable
+	extends AbstractOrmTypeMapping<XmlEmbeddable>
+	implements OrmEmbeddable
+{
+	protected AbstractOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
+	}
+
+	public int getXmlSequence() {
+		return 2;
+	}
+	
+	public JavaEmbeddable getJavaEmbeddable() {
+		JavaPersistentType javaPersistentType = this.getJavaPersistentType();
+		if (javaPersistentType != null && javaPersistentType.getMappingKey() == MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY) {
+			return (JavaEmbeddable) javaPersistentType.getMapping();
+		}
+		return null;
+	}
+
+	/**
+	 * This checks metaDataComplete before returning the JavaEmbeddable.
+	 * As far as defaults are concerned, if metadataComplete is true, the JavaEmbeddable is ignored.
+	 */
+	protected JavaEmbeddable getJavaEmbeddableForDefaults() {
+		if (isMetadataComplete()) {
+			return null;
+		}
+		return getJavaEmbeddable();
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return false;
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+
+	public Iterator<String> associatedTableNamesIncludingInherited() {
+		return EmptyIterator.instance();
+	}
+
+	public Iterator<Table> associatedTables() {
+		return EmptyIterator.instance();
+	}
+
+	public Iterator<Table> associatedTablesIncludingInherited() {
+		return EmptyIterator.instance();
+	}
+
+	public void addToResourceModel(XmlEntityMappings entityMappings) {
+		entityMappings.getEmbeddables().add(this.resourceTypeMapping);
+	}
+	
+	public void removeFromResourceModel(XmlEntityMappings entityMappings) {
+		entityMappings.getEmbeddables().remove(this.resourceTypeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmEntity.java
new file mode 100644
index 0000000..e25a980
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmEntity.java
@@ -0,0 +1,2134 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.JpaPlatformVariation.Supported;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.core.context.DiscriminatorType;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.InheritanceType;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.SecondaryTable;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaSecondaryTable;
+import org.eclipse.jpt.core.context.java.JavaTable;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmBaseJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmDiscriminatorColumn;
+import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.context.orm.OrmGeneratorContainer;
+import org.eclipse.jpt.core.context.orm.OrmIdClassReference;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmQueryContainer;
+import org.eclipse.jpt.core.context.orm.OrmSecondaryTable;
+import org.eclipse.jpt.core.context.orm.OrmTable;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaEntity;
+import org.eclipse.jpt.core.internal.jpa1.context.GenericEntityPrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheableHolder2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.orm.Inheritance;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlSecondaryTable;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmEntity
+	extends AbstractOrmTypeMapping<XmlEntity>
+	implements OrmEntity, OrmCacheableHolder2_0
+{
+	protected String specifiedName;
+	
+	protected String defaultName;
+	
+	protected final OrmIdClassReference idClassReference;
+	
+	protected final OrmTable table;
+	
+	protected boolean specifiedTableIsAllowed;
+	
+	protected boolean tableIsUndefined;
+	
+	protected final List<OrmSecondaryTable> specifiedSecondaryTables;
+	
+	protected final List<OrmSecondaryTable> virtualSecondaryTables;
+	
+	protected final List<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns;
+	
+	protected final List<OrmPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns;
+	
+	protected InheritanceType specifiedInheritanceStrategy;
+	
+	protected InheritanceType defaultInheritanceStrategy;
+	
+	protected String defaultDiscriminatorValue;
+	
+	protected String specifiedDiscriminatorValue;
+	
+	protected boolean specifiedDiscriminatorValueIsAllowed;
+	
+	protected boolean discriminatorValueIsUndefined;
+	
+	protected final OrmDiscriminatorColumn discriminatorColumn;
+	
+	protected boolean specifiedDiscriminatorColumnIsAllowed;
+	
+	protected boolean discriminatorColumnIsUndefined;
+	
+	protected final OrmGeneratorContainer generatorContainer;
+	
+	protected final OrmAttributeOverrideContainer attributeOverrideContainer;
+	
+	protected final OrmAssociationOverrideContainer associationOverrideContainer;
+	
+	protected final OrmQueryContainer queryContainer;
+	
+	protected Entity rootEntity;
+	
+	protected AbstractOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping) {
+		super(parent, resourceMapping);
+		this.idClassReference = buildIdClassReference();
+		this.table = getXmlContextNodeFactory().buildOrmTable(this);
+		this.specifiedSecondaryTables = new ArrayList<OrmSecondaryTable>();
+		this.virtualSecondaryTables = new ArrayList<OrmSecondaryTable>();
+		this.discriminatorColumn = buildDiscriminatorColumn();
+		this.specifiedPrimaryKeyJoinColumns = new ArrayList<OrmPrimaryKeyJoinColumn>();
+		this.defaultPrimaryKeyJoinColumns = new ArrayList<OrmPrimaryKeyJoinColumn>();
+		this.associationOverrideContainer = buildAssociationOverrideContainer();
+		this.attributeOverrideContainer = buildAttributeOverrideContainer();
+		this.queryContainer = this.buildQueryContainer();
+		this.generatorContainer = this.buildGeneratorContainer();
+		this.specifiedName = this.resourceTypeMapping.getName();
+		this.defaultName = this.buildDefaultName();
+		this.rootEntity = this.calculateRootEntity();
+		this.initializeInheritance(this.getResourceInheritance());
+		this.specifiedDiscriminatorColumnIsAllowed = this.buildSpecifiedDiscriminatorColumnIsAllowed();
+		this.discriminatorColumnIsUndefined = this.buildDiscriminatorColumnIsUndefined();
+		this.discriminatorColumn.initialize(this.resourceTypeMapping); //TODO pass in to constructor
+		this.specifiedDiscriminatorValueIsAllowed = this.buildSpecifiedDiscriminatorValueIsAllowed();
+		this.discriminatorValueIsUndefined = this.buildDiscriminatorValueIsUndefined();
+		this.specifiedDiscriminatorValue = this.resourceTypeMapping.getDiscriminatorValue();
+		this.defaultDiscriminatorValue = this.buildDefaultDiscriminatorValue();
+		this.specifiedTableIsAllowed = this.buildSpecifiedTableIsAllowed();
+		this.tableIsUndefined = this.buildTableIsUndefined();
+		this.table.initialize(this.resourceTypeMapping);//TODO pass in to constructor
+		this.initializeSpecifiedSecondaryTables();
+		this.initializeVirtualSecondaryTables();
+		this.initializeSpecifiedPrimaryKeyJoinColumns();
+		this.initializeDefaultPrimaryKeyJoinColumns();
+	}
+	
+	protected OrmIdClassReference buildIdClassReference() {
+		return new GenericOrmIdClassReference(this, getJavaIdClassReferenceForDefaults());
+	}
+	
+	protected OrmDiscriminatorColumn buildDiscriminatorColumn() {
+		return getXmlContextNodeFactory().buildOrmDiscriminatorColumn(this, buildDiscriminatorColumnOwner());
+	}
+	
+	protected OrmDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
+		return new OrmDiscriminatorColumn.Owner(){
+			public String getDefaultTableName() {
+				return AbstractOrmEntity.this.getPrimaryTableName();
+			}
+
+			public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+				return AbstractOrmEntity.this.getDbTable(tableName);
+			}
+
+			public TypeMapping getTypeMapping() {
+				return AbstractOrmEntity.this;
+			}
+			
+			public String getDefaultColumnName() {
+				if (getResourceTypeMapping().getDiscriminatorColumn() == null) {
+					if (!isMetadataComplete()) {
+						if (getJavaEntity() != null && getJavaEntity().getDiscriminatorColumn().getSpecifiedName() != null) {
+							return getJavaEntity().getDiscriminatorColumn().getSpecifiedName();
+						}
+					}
+				}
+				return isDescendant() ?
+						getRootEntity().getDiscriminatorColumn().getName()
+					:
+						isTablePerClass() ? 
+							null
+						:
+							DiscriminatorColumn.DEFAULT_NAME;
+			}
+			
+			public int getDefaultLength() {
+				if (getResourceTypeMapping().getDiscriminatorColumn() == null) {
+					if (!isMetadataComplete()) {
+						if (getJavaEntity() != null && getJavaEntity().getDiscriminatorColumn().getSpecifiedLength() != null) {
+							return getJavaEntity().getDiscriminatorColumn().getSpecifiedLength().intValue();
+						}
+					}
+				}
+				return isDescendant() ?
+					getRootEntity().getDiscriminatorColumn().getLength()
+				:
+					isTablePerClass() ? 
+						0//TODO think i want to return null here
+					:
+						DiscriminatorColumn.DEFAULT_LENGTH;
+			}
+			
+			public DiscriminatorType getDefaultDiscriminatorType() {
+				if (getResourceTypeMapping().getDiscriminatorColumn() == null) {
+					if (!isMetadataComplete()) {
+						if (getJavaEntity() != null && getJavaEntity().getDiscriminatorColumn().getSpecifiedDiscriminatorType() != null) {
+							return getJavaEntity().getDiscriminatorColumn().getSpecifiedDiscriminatorType();
+						}
+					}
+				}
+				return isDescendant() ?
+					getRootEntity().getDiscriminatorColumn().getDiscriminatorType()
+				:
+					isTablePerClass() ? 
+						null
+					:
+						DiscriminatorColumn.DEFAULT_DISCRIMINATOR_TYPE;
+			}
+
+			public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.DISCRIMINATOR_COLUMN_UNRESOLVED_NAME,
+					new String[] {column.getName(), column.getDbTable().getName()}, 
+					column,
+					textRange
+				);
+			}
+
+			public TextRange getValidationTextRange() {
+				return AbstractOrmEntity.this.getValidationTextRange();
+			}
+		};
+	}
+
+	protected OrmAssociationOverrideContainer buildAssociationOverrideContainer() {
+		return getXmlContextNodeFactory().buildOrmAssociationOverrideContainer(
+			this,
+			new AssociationOverrideContainerOwner());
+	}
+	
+	protected OrmAttributeOverrideContainer buildAttributeOverrideContainer() {
+		return getXmlContextNodeFactory().buildOrmAttributeOverrideContainer(
+			this,
+			new AttributeOverrideContainerOwner());
+	}
+
+	protected OrmGeneratorContainer buildGeneratorContainer() {
+		return getXmlContextNodeFactory().buildOrmGeneratorContainer(this, this.resourceTypeMapping);
+	}
+
+	protected OrmQueryContainer buildQueryContainer() {
+		return getXmlContextNodeFactory().buildOrmQueryContainer(this, this.resourceTypeMapping);
+	}
+	
+
+	// ******************* TypeMapping implementation ********************
+
+	public String getKey() {
+		return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
+	}
+	
+	@Override
+	public JavaPersistentType getIdClass() {
+		return this.idClassReference.getIdClass();
+	}
+
+	@Override
+	public String getPrimaryTableName() {
+		return this.table.getName();
+	}
+	
+	@Override
+	public org.eclipse.jpt.db.Table getPrimaryDbTable() {
+		return this.table.getDbTable();
+	}
+
+	@Override
+	public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+		// matching database objects and identifiers is database platform-specific
+		return this.getDataSource().selectDatabaseObjectForIdentifier(this.getAssociatedDbTablesIncludingInherited(), tableName);
+	}
+
+	private Iterable<org.eclipse.jpt.db.Table> getAssociatedDbTablesIncludingInherited() {
+		return new FilteringIterable<org.eclipse.jpt.db.Table>(this.getAssociatedDbTablesIncludingInherited_()) {
+			@Override
+			protected boolean accept(org.eclipse.jpt.db.Table t) {
+				return t != null;
+			}
+		};
+	}
+
+	private Iterable<org.eclipse.jpt.db.Table> getAssociatedDbTablesIncludingInherited_() {
+		return new TransformationIterable<Table, org.eclipse.jpt.db.Table>(this.getAssociatedTablesIncludingInherited()) {
+			@Override
+			protected org.eclipse.jpt.db.Table transform(Table t) {
+				return t.getDbTable();
+			}
+		};
+	}
+	
+	@Override
+	public Schema getDbSchema() {
+		return this.table.getDbSchema();
+	}
+	
+	public JavaEntity getJavaEntity() {
+		JavaPersistentType javaPersistentType = this.getJavaPersistentType();
+		if (javaPersistentType != null && javaPersistentType.getMappingKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) {
+			return (JavaEntity) javaPersistentType.getMapping();
+		}
+		return null;
+	}
+
+	/**
+	 * This checks metaDataComplete before returning the JavaEntity.
+	 * As far as defaults are concerned, if metadataComplete is true, the JavaEntity is ignored.
+	 */
+	protected JavaEntity getJavaEntityForDefaults() {
+		if (isMetadataComplete()) {
+			return null;
+		}
+		return getJavaEntity();
+	}
+	
+	protected JavaIdClassReference getJavaIdClassReferenceForDefaults() {
+		JavaEntity entity = getJavaEntityForDefaults();
+		return (entity == null) ? null : entity.getIdClassReference();
+	}
+	
+	
+	//****************** OrmAttributeOverrideContainer.Owner implementation *******************
+	
+	public TypeMapping getOverridableTypeMapping() {
+		PersistentType superPersistentType = getPersistentType().getSuperPersistentType();
+		return superPersistentType == null ? null : superPersistentType.getMapping();
+	}
+
+	public OrmTypeMapping getTypeMapping() {
+		return this;
+	}
+	
+	protected JavaAttributeOverride getJavaAttributeOverrideNamed(String attributeName) {
+		if (getJavaEntity() != null) {
+			return getJavaEntity().getAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+		}
+		return null;
+	}
+	
+	@Override
+	public RelationshipReference resolveRelationshipReference(String name) {
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = name.indexOf('.');
+			if (dotIndex != -1) {
+				AssociationOverride override = getAssociationOverrideContainer().getAssociationOverrideNamed(name.substring(dotIndex + 1));
+				if (override != null && !override.isVirtual()) {
+					return override.getRelationshipReference();
+				}
+			}
+		}
+		return super.resolveRelationshipReference(name);
+	}
+	
+	protected JavaAssociationOverride getJavaAssociationOverrideNamed(String attributeName) {
+		if (getJavaEntity() != null) {
+			return getJavaEntity().getAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+		}
+		return null;
+	}
+	
+	// **************** name **************************************************
+	
+	public String getName() {
+		return (this.getSpecifiedName() == null) ? getDefaultName() : this.getSpecifiedName();
+	}
+	
+	public String getSpecifiedName() {
+		return this.specifiedName;
+	}
+	
+	public void setSpecifiedName(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		this.resourceTypeMapping.setName(newSpecifiedName);
+		firePropertyChanged(SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+	
+	public String getDefaultName() {
+		return this.defaultName;
+	}
+	
+	protected void setDefaultName(String newDefaultName) {
+		String oldDefaultName = this.defaultName;
+		this.defaultName = newDefaultName;
+		firePropertyChanged(DEFAULT_NAME_PROPERTY, oldDefaultName, newDefaultName);
+	}
+	
+	
+	// **************** id class **********************************************
+	
+	public OrmIdClassReference getIdClassReference() {
+		return this.idClassReference;
+	}
+	
+	
+	// **************** table *************************************************
+	
+	public OrmTable getTable() {
+		return this.table;
+	}
+
+	public ListIterator<OrmSecondaryTable> secondaryTables() {
+		if (specifiedSecondaryTablesSize() > 0) {
+			return specifiedSecondaryTables();
+		}
+		return virtualSecondaryTables();
+	}
+
+	public int secondaryTablesSize() {
+		if (specifiedSecondaryTablesSize() > 0) {
+			return specifiedSecondaryTablesSize();
+		}
+		return virtualSecondaryTablesSize();
+	}
+	
+	public ListIterator<OrmSecondaryTable> virtualSecondaryTables() {
+		return new CloneListIterator<OrmSecondaryTable>(this.virtualSecondaryTables);
+	}
+
+	public int virtualSecondaryTablesSize() {
+		return this.virtualSecondaryTables.size();
+	}
+	
+	protected void addVirtualSecondaryTable(OrmSecondaryTable secondaryTable) {
+		addItemToList(secondaryTable, this.virtualSecondaryTables, OrmEntity.VIRTUAL_SECONDARY_TABLES_LIST);
+	}
+	
+	protected void removeVirtualSecondaryTable(OrmSecondaryTable secondaryTable) {
+		removeItemFromList(secondaryTable, this.virtualSecondaryTables, OrmEntity.VIRTUAL_SECONDARY_TABLES_LIST);
+	}
+
+	public ListIterator<OrmSecondaryTable> specifiedSecondaryTables() {
+		return new CloneListIterator<OrmSecondaryTable>(this.specifiedSecondaryTables);
+	}
+
+	public int specifiedSecondaryTablesSize() {
+		return this.specifiedSecondaryTables.size();
+	}
+	
+	public OrmSecondaryTable addSpecifiedSecondaryTable(int index) {
+		if (!secondaryTablesDefinedInXml()) {
+			throw new IllegalStateException("Virtual secondary tables exist, must first call setSecondaryTablesDefinedInXml(true)"); //$NON-NLS-1$
+		}
+		XmlSecondaryTable secondaryTableResource = OrmFactory.eINSTANCE.createXmlSecondaryTable();
+		OrmSecondaryTable secondaryTable =  buildSecondaryTable(secondaryTableResource);
+		this.specifiedSecondaryTables.add(index, secondaryTable);
+		this.resourceTypeMapping.getSecondaryTables().add(index, secondaryTableResource);
+		fireItemAdded(Entity.SPECIFIED_SECONDARY_TABLES_LIST, index, secondaryTable);
+		return secondaryTable;
+	}
+
+	public OrmSecondaryTable addSpecifiedSecondaryTable() {
+		return this.addSpecifiedSecondaryTable(this.specifiedSecondaryTables.size());
+	}
+	
+	protected void addSpecifiedSecondaryTable(int index, OrmSecondaryTable secondaryTable) {
+		addItemToList(index, secondaryTable, this.specifiedSecondaryTables, Entity.SPECIFIED_SECONDARY_TABLES_LIST);
+	}
+	
+	protected void addSpecifiedSecondaryTable(OrmSecondaryTable secondaryTable) {
+		this.addSpecifiedSecondaryTable(this.specifiedSecondaryTables.size(), secondaryTable);
+	}
+	
+	public void removeSpecifiedSecondaryTable(SecondaryTable secondaryTable) {
+		this.removeSpecifiedSecondaryTable(this.specifiedSecondaryTables.indexOf(secondaryTable));
+	}
+	
+	public void removeSpecifiedSecondaryTable(int index) {
+		OrmSecondaryTable removedSecondaryTable = this.specifiedSecondaryTables.remove(index);
+		this.resourceTypeMapping.getSecondaryTables().remove(index);
+		fireItemRemoved(Entity.SPECIFIED_SECONDARY_TABLES_LIST, index, removedSecondaryTable);
+	}
+	
+	protected void removeSpecifiedSecondaryTable_(OrmSecondaryTable secondaryTable) {
+		removeItemFromList(secondaryTable, this.specifiedSecondaryTables, Entity.SPECIFIED_SECONDARY_TABLES_LIST);
+	}
+	
+	public void moveSpecifiedSecondaryTable(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedSecondaryTables, targetIndex, sourceIndex);
+		this.resourceTypeMapping.getSecondaryTables().move(targetIndex, sourceIndex);
+		fireItemMoved(Entity.SPECIFIED_SECONDARY_TABLES_LIST, targetIndex, sourceIndex);		
+	}
+	
+	public boolean containsSecondaryTable(String name) {
+		return containsSecondaryTable(name, secondaryTables());
+	}
+	
+	public boolean containsSpecifiedSecondaryTable(String name) {
+		return containsSecondaryTable(name, specifiedSecondaryTables());
+	}
+	
+	public boolean containsVirtualSecondaryTable(String name) {
+		return containsSecondaryTable(name, virtualSecondaryTables());
+	}
+	
+	public boolean containsVirtualSecondaryTable(OrmSecondaryTable secondaryTable) {
+		return this.virtualSecondaryTables.contains(secondaryTable);
+	}
+
+	protected boolean containsSecondaryTable(String name, ListIterator<OrmSecondaryTable> secondaryTables) {
+		for (OrmSecondaryTable secondaryTable : CollectionTools.iterable(secondaryTables)) {
+			String secondaryTableName = secondaryTable.getName();
+			if (secondaryTableName != null && secondaryTableName.equals(name)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean secondaryTablesDefinedInXml() {
+		return virtualSecondaryTablesSize() == 0;
+	}
+	
+	public void setSecondaryTablesDefinedInXml(boolean defineInXml) {
+		if (defineInXml == secondaryTablesDefinedInXml()) {
+			return;
+		}
+		if (defineInXml) {
+			specifySecondaryTablesInXml();
+		}
+		else {
+			removeSecondaryTablesFromXml();
+		}
+	}
+	
+	/**
+	 * This is used to take all the java secondary tables and specify them in the xml.  You must
+	 * use setSecondaryTablesDefinedInXml(boolean) before calling addSpecifiedSecondaryTable().
+	 * 
+	 * Yes this code looks odd, but be careful making changes to it
+	 */
+	protected void specifySecondaryTablesInXml() {
+		if (virtualSecondaryTablesSize() != 0) {
+			List<OrmSecondaryTable> virtualSecondaryTables1 = CollectionTools.list(this.virtualSecondaryTables());
+			List<OrmSecondaryTable> virtualSecondaryTables2 = CollectionTools.list(this.virtualSecondaryTables());
+			//remove all the virtual secondary tables without firing change notification.
+			for (OrmSecondaryTable virtualSecondaryTable : CollectionTools.iterable(virtualSecondaryTables())) {
+				this.virtualSecondaryTables.remove(virtualSecondaryTable);				
+			}
+			//add specified secondary tables for each virtual secondary table. If the virtual secondary tables
+			//are not removed first, they will be removed as a side effect of adding the first specified secondary table.
+			//This screws up the change notification to the UI, since that change notification is in a different thread
+			for (OrmSecondaryTable virtualSecondaryTable : virtualSecondaryTables2) {
+				XmlSecondaryTable secondaryTableResource = OrmFactory.eINSTANCE.createXmlSecondaryTable();
+				OrmSecondaryTable specifiedSecondaryTable =  buildSecondaryTable(secondaryTableResource);
+				this.specifiedSecondaryTables.add(specifiedSecondaryTable);
+				this.resourceTypeMapping.getSecondaryTables().add(secondaryTableResource);
+				specifiedSecondaryTable.initializeFrom(virtualSecondaryTable);
+			}
+			//fire change notification at the end
+			fireItemsRemoved(OrmEntity.VIRTUAL_SECONDARY_TABLES_LIST, 0, virtualSecondaryTables1);
+			fireItemsAdded(Entity.SPECIFIED_SECONDARY_TABLES_LIST, 0, this.specifiedSecondaryTables);		
+		}
+	}
+	
+	protected void removeSecondaryTablesFromXml() {
+		if (specifiedSecondaryTablesSize() != 0) {
+			List<OrmSecondaryTable> specifiedSecondaryTablesCopy = CollectionTools.list(this.specifiedSecondaryTables());
+			for (OrmSecondaryTable specifiedSecondaryTable : CollectionTools.iterable(specifiedSecondaryTables())) {
+				int index = this.specifiedSecondaryTables.indexOf(specifiedSecondaryTable);
+				this.specifiedSecondaryTables.remove(specifiedSecondaryTable);
+				if (this.specifiedSecondaryTables.size() == 0) {
+					initializeVirtualSecondaryTables();
+				}
+				this.resourceTypeMapping.getSecondaryTables().remove(index);
+			}
+			fireItemsRemoved(Entity.SPECIFIED_SECONDARY_TABLES_LIST, 0, specifiedSecondaryTablesCopy);
+			if (this.virtualSecondaryTables.size() != 0) {
+				fireItemsAdded(OrmEntity.VIRTUAL_SECONDARY_TABLES_LIST, 0, this.virtualSecondaryTables);
+			}
+		}
+	}
+	
+	protected Iterator<String> tableNames(Iterator<Table> tables) {
+		return new TransformationIterator<Table, String>(tables) {
+			@Override
+			protected String transform(Table t) {
+				return t.getName();
+			}
+		};
+	}
+
+	public Iterator<String> associatedTableNamesIncludingInherited() {
+		return this.nonNullTableNames(this.associatedTablesIncludingInherited());
+	}
+
+	protected Iterator<String> nonNullTableNames(Iterator<Table> tables) {
+		return new FilteringIterator<String>(this.tableNames(tables)) {
+			@Override
+			protected boolean accept(String o) {
+				return o != null;
+			}
+		};
+	}
+
+	public Iterator<Table> associatedTables() {
+		return new CompositeIterator<Table>(this.table, this.secondaryTables());
+	}
+
+	public Iterator<Table> associatedTablesIncludingInherited() {
+		return this.getAssociatedTablesIncludingInherited().iterator();
+	}
+
+	public Iterable<Table> getAssociatedTablesIncludingInherited() {
+		return new CompositeIterable<Table>(new TransformationIterable<TypeMapping, Iterable<Table>>(CollectionTools.iterable(this.inheritanceHierarchy())) {
+			@Override
+			protected Iterable<Table> transform(TypeMapping mapping) {
+				return new FilteringIterable<Table>(CollectionTools.iterable(mapping.associatedTables())) {
+					@Override
+					protected boolean accept(Table o) {
+						return true;
+						//TODO
+						//filtering these out so as to avoid the duplicate table, root and children share the same table
+						//return !(o instanceof SingleTableInheritanceChildTableImpl);
+					}
+				};
+			}
+		});
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		if (tableIsUndefined()) {
+			return false;
+		}
+		return ! CollectionTools.contains(this.associatedTableNamesIncludingInherited(), tableName);
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return super.shouldValidateAgainstDatabase() && ! isAbstractTablePerClass();
+	}
+
+	public InheritanceType getInheritanceStrategy() {
+		return (this.getSpecifiedInheritanceStrategy() == null) ? this.getDefaultInheritanceStrategy() : this.getSpecifiedInheritanceStrategy();
+	}
+	
+	public InheritanceType getDefaultInheritanceStrategy() {
+		return this.defaultInheritanceStrategy;
+	}
+	
+	protected void setDefaultInheritanceStrategy(InheritanceType newInheritanceType) {
+		InheritanceType oldInheritanceType = this.defaultInheritanceStrategy;
+		this.defaultInheritanceStrategy = newInheritanceType;
+		firePropertyChanged(DEFAULT_INHERITANCE_STRATEGY_PROPERTY, oldInheritanceType, newInheritanceType);
+	}
+	
+	public InheritanceType getSpecifiedInheritanceStrategy() {
+		return this.specifiedInheritanceStrategy;
+	}
+	
+	public void setSpecifiedInheritanceStrategy(InheritanceType newInheritanceType) {
+		InheritanceType oldInheritanceType = this.specifiedInheritanceStrategy;
+		this.specifiedInheritanceStrategy = newInheritanceType;
+		if (oldInheritanceType != newInheritanceType) {
+			if (this.getResourceInheritance() != null) {
+				this.getResourceInheritance().setStrategy(InheritanceType.toOrmResourceModel(newInheritanceType));						
+				if (this.getResourceInheritance().isUnset()) {
+					removeResourceInheritance();
+				}
+			}
+			else if (newInheritanceType != null) {
+				addResourceInheritance();
+				getResourceInheritance().setStrategy(InheritanceType.toOrmResourceModel(newInheritanceType));
+			}
+		}
+		firePropertyChanged(SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, oldInheritanceType, newInheritanceType);
+	}
+	
+	protected void setSpecifiedInheritanceStrategy_(InheritanceType newInheritanceType) {
+		InheritanceType oldInheritanceType = this.specifiedInheritanceStrategy;
+		this.specifiedInheritanceStrategy = newInheritanceType;
+		firePropertyChanged(SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, oldInheritanceType, newInheritanceType);
+	}
+
+	protected Inheritance getResourceInheritance() {
+		return this.resourceTypeMapping.getInheritance();
+	}
+	
+	protected void addResourceInheritance() {
+		this.resourceTypeMapping.setInheritance(OrmFactory.eINSTANCE.createInheritance());		
+	}
+	
+	protected void removeResourceInheritance() {
+		this.resourceTypeMapping.setInheritance(null);
+	}
+
+	public OrmDiscriminatorColumn getDiscriminatorColumn() {
+		return this.discriminatorColumn;
+	}
+
+	public OrmGeneratorContainer getGeneratorContainer() {
+		return this.generatorContainer;
+	}
+
+	public String getDefaultDiscriminatorValue() {
+		return this.defaultDiscriminatorValue;
+	}
+
+	protected void setDefaultDiscriminatorValue(String newDefaultDiscriminatorValue) {
+		String oldDefaultDiscriminatorValue = this.defaultDiscriminatorValue;
+		this.defaultDiscriminatorValue = newDefaultDiscriminatorValue;
+		firePropertyChanged(DEFAULT_DISCRIMINATOR_VALUE_PROPERTY, oldDefaultDiscriminatorValue, newDefaultDiscriminatorValue);
+	}
+
+	public String getSpecifiedDiscriminatorValue() {
+		return this.specifiedDiscriminatorValue;
+	}
+
+	public void setSpecifiedDiscriminatorValue(String newSpecifiedDiscriminatorValue) {
+		String oldSpecifiedDiscriminatorValue = this.specifiedDiscriminatorValue;
+		this.specifiedDiscriminatorValue = newSpecifiedDiscriminatorValue;
+		this.resourceTypeMapping.setDiscriminatorValue(newSpecifiedDiscriminatorValue);
+		firePropertyChanged(SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, oldSpecifiedDiscriminatorValue, newSpecifiedDiscriminatorValue);
+	}
+
+	public String getDiscriminatorValue() {
+		return (this.getSpecifiedDiscriminatorValue() == null) ? getDefaultDiscriminatorValue() : this.getSpecifiedDiscriminatorValue();
+	}
+	
+	public boolean specifiedDiscriminatorValueIsAllowed() {
+		return this.specifiedDiscriminatorValueIsAllowed;
+	}
+	
+	protected void setSpecifiedDiscriminatorValueIsAllowed(boolean specifiedDiscriminatorValueIsAllowed) {
+		boolean old = this.specifiedDiscriminatorValueIsAllowed;
+		this.specifiedDiscriminatorValueIsAllowed = specifiedDiscriminatorValueIsAllowed;
+		firePropertyChanged(Entity.SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY, old, specifiedDiscriminatorValueIsAllowed);
+	}
+	
+	public boolean discriminatorValueIsUndefined() {
+		return this.discriminatorValueIsUndefined;
+	}
+	
+	protected void setDiscriminatorValueIsUndefined(boolean discriminatorValueIsUndefined) {
+		boolean old = this.discriminatorValueIsUndefined;
+		this.discriminatorValueIsUndefined = discriminatorValueIsUndefined;
+		firePropertyChanged(Entity.DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY, old, discriminatorValueIsUndefined);
+	}
+	
+	public boolean specifiedDiscriminatorColumnIsAllowed() {
+		return this.specifiedDiscriminatorColumnIsAllowed;
+	}
+	
+	protected void setSpecifiedDiscriminatorColumnIsAllowed(boolean specifiedDiscriminatorColumnIsAllowed) {
+		boolean old = this.specifiedDiscriminatorColumnIsAllowed;
+		this.specifiedDiscriminatorColumnIsAllowed = specifiedDiscriminatorColumnIsAllowed;
+		firePropertyChanged(Entity.SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY, old, specifiedDiscriminatorColumnIsAllowed);
+	}
+	
+	public boolean discriminatorColumnIsUndefined() {
+		return this.discriminatorColumnIsUndefined;
+	}
+	
+	protected void setDiscriminatorColumnIsUndefined(boolean discriminatorColumnIsUndefined) {
+		boolean old = this.discriminatorColumnIsUndefined;
+		this.discriminatorColumnIsUndefined = discriminatorColumnIsUndefined;
+		firePropertyChanged(Entity.DISCRIMINATOR_COLUMN_IS_UNDEFINED_PROPERTY, old, discriminatorColumnIsUndefined);
+	}
+
+	
+	public boolean specifiedTableIsAllowed() {
+		return this.specifiedTableIsAllowed;
+	}
+	
+	protected void setSpecifiedTableIsAllowed(boolean specifiedTableIsAllowed) {
+		boolean old = this.specifiedTableIsAllowed;
+		this.specifiedTableIsAllowed = specifiedTableIsAllowed;
+		firePropertyChanged(Entity.SPECIFIED_TABLE_IS_ALLOWED_PROPERTY, old, specifiedTableIsAllowed);
+	}
+	
+	public boolean tableIsUndefined() {
+		return this.tableIsUndefined;
+	}
+	
+	protected void setTableIsUndefined(boolean tableIsUndefined) {
+		boolean old = this.tableIsUndefined;
+		this.tableIsUndefined = tableIsUndefined;
+		firePropertyChanged(Entity.TABLE_IS_UNDEFINED_PROPERTY, old, tableIsUndefined);
+	}
+
+	public ListIterator<OrmPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns() {
+		return new CloneListIterator<OrmPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumns);
+	}
+	
+	public int defaultPrimaryKeyJoinColumnsSize() {
+		return this.defaultPrimaryKeyJoinColumns.size();
+	}
+
+	public OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
+		throw new UnsupportedOperationException("use defaultPrimaryKeyJoinColumns() instead"); //$NON-NLS-1$
+	}
+
+	protected void addDefaultPrimaryKeyJoinColumn(OrmPrimaryKeyJoinColumn defaultPkJoinColumn) {
+		addItemToList(defaultPkJoinColumn, this.defaultPrimaryKeyJoinColumns, OrmEntity.DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	protected void removeDefaultPrimaryKeyJoinColumn(PrimaryKeyJoinColumn defaultPkJoinColumn) {
+		removeItemFromList(defaultPkJoinColumn, this.defaultPrimaryKeyJoinColumns, OrmEntity.DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns() {
+		return this.specifiedPrimaryKeyJoinColumns.isEmpty() ? this.defaultPrimaryKeyJoinColumns() : this.specifiedPrimaryKeyJoinColumns();
+	}
+	
+	public int primaryKeyJoinColumnsSize() {
+		return this.specifiedPrimaryKeyJoinColumns.isEmpty() ? this.defaultPrimaryKeyJoinColumnsSize() : this.specifiedPrimaryKeyJoinColumnsSize();
+	}
+	
+	public ListIterator<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns() {
+		return new CloneListIterator<OrmPrimaryKeyJoinColumn>(this.specifiedPrimaryKeyJoinColumns);
+	}
+
+	public int specifiedPrimaryKeyJoinColumnsSize() {
+		return this.specifiedPrimaryKeyJoinColumns.size();
+	}
+	
+	public boolean containsSpecifiedPrimaryKeyJoinColumns() {
+		return !this.specifiedPrimaryKeyJoinColumns.isEmpty();
+	}	
+
+	public OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
+		if (!this.defaultPrimaryKeyJoinColumns.isEmpty()) {
+			this.defaultPrimaryKeyJoinColumns.clear();
+		}
+		XmlPrimaryKeyJoinColumn resourcePkJoinColumn = OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn();
+		OrmPrimaryKeyJoinColumn contextPkJoinColumn = buildPrimaryKeyJoinColumn(resourcePkJoinColumn);
+		this.specifiedPrimaryKeyJoinColumns.add(index, contextPkJoinColumn);
+		this.resourceTypeMapping.getPrimaryKeyJoinColumns().add(index, resourcePkJoinColumn);
+
+		this.fireItemAdded(Entity.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, contextPkJoinColumn);
+		this.fireListCleared(OrmEntity.DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+		return contextPkJoinColumn;
+	}
+	
+	protected OrmBaseJoinColumn.Owner createPrimaryKeyJoinColumnOwner() {
+		return new PrimaryKeyJoinColumnOwner();
+	}
+
+	protected void addSpecifiedPrimaryKeyJoinColumn(int index, OrmPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		addItemToList(index, primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, Entity.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	protected void addSpecifiedPrimaryKeyJoinColumn(OrmPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		this.addSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.size(), primaryKeyJoinColumn);
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.indexOf(primaryKeyJoinColumn));
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
+		OrmPrimaryKeyJoinColumn removedPrimaryKeyJoinColumn = this.specifiedPrimaryKeyJoinColumns.remove(index);
+		if (!containsSpecifiedPrimaryKeyJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			initializeDefaultPrimaryKeyJoinColumns();
+		}
+		this.resourceTypeMapping.getPrimaryKeyJoinColumns().remove(index);
+		fireItemRemoved(Entity.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, removedPrimaryKeyJoinColumn);
+		if (!this.defaultPrimaryKeyJoinColumns.isEmpty()) {
+			fireListChanged(OrmEntity.DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST, this.defaultPrimaryKeyJoinColumns);
+		}
+	}
+
+	protected void removeSpecifiedPrimaryKeyJoinColumn_(OrmPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		removeItemFromList(primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, Entity.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedPrimaryKeyJoinColumns, targetIndex, sourceIndex);
+		this.resourceTypeMapping.getPrimaryKeyJoinColumns().move(targetIndex, sourceIndex);
+		fireItemMoved(Entity.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+
+	public OrmAttributeOverrideContainer getAttributeOverrideContainer() {
+		return this.attributeOverrideContainer;
+	}
+	
+	public OrmAssociationOverrideContainer getAssociationOverrideContainer() {
+		return this.associationOverrideContainer;
+	}
+	
+	public OrmQueryContainer getQueryContainer() {
+		return this.queryContainer;
+	}
+
+	public String getDefaultTableName() {
+		JavaEntity javaEntity = this.getJavaEntity();
+		if (javaEntity != null) {
+			JavaTable javaTable = javaEntity.getTable();
+			if ( ! this.isMetadataComplete()
+					&& ! this.table.isResourceSpecified()
+					&& javaTable.getSpecifiedName() != null) {
+				return javaTable.getSpecifiedName();
+			}
+		}
+		return this.isSingleTableDescendant() ?
+						this.getRootEntity().getTable().getName()
+					:
+						this.isAbstractTablePerClass() ?
+								null
+							:
+								this.getName();
+	}
+
+	public String getDefaultSchema() {
+		JavaEntity javaEntity = this.getJavaEntity();
+		if (javaEntity != null) {
+			JavaTable javaTable = javaEntity.getTable();
+			if ( ! this.isMetadataComplete()
+					&& ! this.table.isResourceSpecified()
+					&& javaTable.getSpecifiedSchema() != null) {
+				return javaTable.getSpecifiedSchema();
+			}
+		}
+
+		return this.isSingleTableDescendant() ?
+						this.getRootEntity().getTable().getSchema()
+					:
+						this.isAbstractTablePerClass() ?
+								null
+							:
+								this.getContextDefaultSchema();
+	}
+
+	public String getDefaultCatalog() {
+		JavaEntity javaEntity = this.getJavaEntity();
+		if (javaEntity != null) {
+			JavaTable javaTable = javaEntity.getTable();
+			if ( ! this.isMetadataComplete()
+					&& ! this.table.isResourceSpecified()
+					&& javaTable.getSpecifiedCatalog() != null) {
+				return javaTable.getSpecifiedCatalog();
+			}
+		}
+
+		return this.isSingleTableDescendant() ?
+						this.getRootEntity().getTable().getCatalog()
+					:
+						this.isAbstractTablePerClass() ?
+							null
+						:
+							this.getContextDefaultCatalog();
+	}
+
+	/**
+	 * Return whether the entity is a descendant of the root entity
+	 * of a "single table" inheritance hierarchy.
+	 */
+	protected boolean isSingleTableDescendant() {
+		return this.isDescendant() && (this.getInheritanceStrategy() == InheritanceType.SINGLE_TABLE);
+	}
+	
+	public Entity getParentEntity() {
+		for (Iterator<PersistentType> stream = getPersistentType().ancestors(); stream.hasNext();) {
+			TypeMapping tm = stream.next().getMapping();
+			if (tm instanceof Entity) {
+				return (Entity) tm;
+			}
+		}
+		return null;
+	}
+	
+	public Entity getRootEntity() {
+		return this.rootEntity;
+	}
+	
+	public boolean isRoot() {
+		return this == this.getRootEntity();
+	}
+	
+	/**
+	 * Return whether the entity is a descendant in (as opposed to the root of)
+	 * an inheritance hierarchy.
+	 */
+	protected boolean isDescendant() {
+		return ! this.isRoot();
+	}
+	
+	/**
+	 * Return whether the entity is the top of an inheritance hierarchy
+	 * and has no descendants and no specified inheritance strategy has been defined.
+	 */
+	protected boolean isRootNoDescendantsNoStrategyDefined() {
+		return isRoot() && !getPersistenceUnit().entityIsRootWithSubEntities(this.getName()) && getSpecifiedInheritanceStrategy() == null;
+	}
+
+	/**
+	 * Return whether the entity is abstract and is a part of a 
+	 * "table per class" inheritance hierarchy.
+	 */
+	protected boolean isAbstractTablePerClass() {
+		return isAbstract() && isTablePerClass();
+	}
+	
+	/**
+	 * Return whether the entity is a part of a "table per class" 
+	 * inheritance hierarchy.
+	 */
+	protected boolean isTablePerClass() {
+		return (this.getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS);
+	}
+	
+	/**
+	 * Return whether the type is abstract, false if no java type exists.
+	 */
+	protected boolean isAbstract() {
+		JavaResourcePersistentType javaResourcePersistentType = getJavaResourcePersistentType();
+		return javaResourcePersistentType == null ? false : javaResourcePersistentType.isAbstract();
+	}
+
+//	public String primaryKeyColumnName() {
+//		String pkColumnName = null;
+//		for (Iterator<IPersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) {
+//			IPersistentAttribute attribute = stream.next();
+//			String name = attribute.primaryKeyColumnName();
+//			if (pkColumnName == null) {
+//				pkColumnName = name;
+//			}
+//			else if (name != null) {
+//				// if we encounter a composite primary key, return null
+//				return null;
+//			}
+//		}
+//		// if we encounter only a single primary key column name, return it
+//		return pkColumnName;
+//	}
+//
+//	public String primaryKeyAttributeName() {
+//		String pkColumnName = null;
+//		String pkAttributeName = null;
+//		for (Iterator<IPersistentAttribute> stream = getPersistentType().allAttributes(); stream.hasNext();) {
+//			IPersistentAttribute attribute = stream.next();
+//			String name = attribute.primaryKeyColumnName();
+//			if (pkColumnName == null) {
+//				pkColumnName = name;
+//				pkAttributeName = attribute.getName();
+//			}
+//			else if (name != null) {
+//				// if we encounter a composite primary key, return null
+//				return null;
+//			}
+//		}
+//		// if we encounter only a single primary key column name, return it
+//		return pkAttributeName;
+//	}
+//
+
+
+	public int getXmlSequence() {
+		return 1;
+	}
+
+	/**
+	 * Return an iterator of Entities, each which inherits from the one before,
+	 * and terminates at the root entity (or at the point of cyclicity).
+	 */
+	protected Iterator<TypeMapping> ancestors() {
+		return new TransformationIterator<PersistentType, TypeMapping>(getPersistentType().ancestors()) {
+			@Override
+			protected TypeMapping transform(PersistentType type) {
+				return type.getMapping();
+			}
+		};
+	}
+	
+	@Override
+	public Iterator<String> overridableAttributeNames() {
+		if (!isTablePerClass()) {
+			return EmptyIterator.instance();
+		}
+		return super.overridableAttributeNames();
+	}
+	
+	@Override
+	public Column resolveOverriddenColumn(String attributeName) {
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = attributeName.indexOf('.');
+			if (dotIndex != -1) {
+				AttributeOverride override = getAttributeOverrideContainer().getAttributeOverrideNamed(attributeName.substring(dotIndex + 1));
+				if (override != null && !override.isVirtual()) {
+					return override.getColumn();
+				}
+			}
+		}
+		return super.resolveOverriddenColumn(attributeName);
+	}
+	
+	@Override
+	public Iterator<String> overridableAssociationNames() {
+		if (!isTablePerClass()) {
+			return EmptyIterator.instance();
+		}
+		return super.overridableAssociationNames();
+	}
+	
+	public AttributeMapping resolveAttributeMapping(String name) {
+		for (AttributeMapping attributeMapping : CollectionTools.iterable(this.allAttributeMappings())) {
+			AttributeMapping resolvedMapping = attributeMapping.resolveAttributeMapping(name);
+			if (resolvedMapping != null) {
+				return resolvedMapping;
+			}
+		}
+		return null;
+	}
+
+//
+//	public IAttributeOverride createAttributeOverride(int index) {
+//		return OrmFactory.eINSTANCE.createXmlAttributeOverride(new IEntity.AttributeOverrideOwner(this));
+//	}
+//
+//	public IAssociationOverride createAssociationOverride(int index) {
+//		return OrmFactory.eINSTANCE.createXmlAssociationOverride(new IEntity.AssociationOverrideOwner(this));
+//	}
+//
+//	public IAttributeOverride attributeOverrideNamed(String name) {
+//		return (IAttributeOverride) overrideNamed(name, getAttributeOverrides());
+//	}
+//
+//	public boolean containsAttributeOverride(String name) {
+//		return containsOverride(name, getAttributeOverrides());
+//	}
+//
+//	public boolean containsSpecifiedAttributeOverride(String name) {
+//		return containsOverride(name, getSpecifiedAttributeOverrides());
+//	}
+//
+//	public boolean containsAssociationOverride(String name) {
+//		return containsOverride(name, getAssociationOverrides());
+//	}
+//
+//	public boolean containsSpecifiedAssociationOverride(String name) {
+//		return containsOverride(name, getSpecifiedAssociationOverrides());
+//	}
+//
+//	private IOverride overrideNamed(String name, List<? extends IOverride> overrides) {
+//		for (IOverride override : overrides) {
+//			String overrideName = override.getName();
+//			if (overrideName == null && name == null) {
+//				return override;
+//			}
+//			if (overrideName != null && overrideName.equals(name)) {
+//				return override;
+//			}
+//		}
+//		return null;
+//	}
+//
+//	private boolean containsOverride(String name, List<? extends IOverride> overrides) {
+//		return overrideNamed(name, overrides) != null;
+//	}
+//
+//	public boolean containsSpecifiedPrimaryKeyJoinColumns() {
+//		return !this.getSpecifiedPrimaryKeyJoinColumns().isEmpty();
+//	}
+	
+	protected void initializeInheritance(Inheritance inheritanceResource) {
+		this.specifiedInheritanceStrategy = this.getResourceInheritanceStrategy(inheritanceResource);
+		//no need to initialize defaultInheritanceStrategy, need to get all the persistentTypes in the model first
+	}
+
+	protected void initializeSpecifiedSecondaryTables() {
+		for (XmlSecondaryTable secondaryTable : this.resourceTypeMapping.getSecondaryTables()) {
+			this.specifiedSecondaryTables.add(buildSecondaryTable(secondaryTable));
+		}
+	}
+	
+	protected void initializeVirtualSecondaryTables() {
+		if (isMetadataComplete()) {
+			return;
+		}
+		if (getJavaEntity() == null) {
+			return;
+		}
+		if (specifiedSecondaryTablesSize() > 0) {
+			return;
+		}
+		ListIterator<JavaSecondaryTable> javaSecondaryTables = getJavaEntity().secondaryTables();
+		while(javaSecondaryTables.hasNext()) {
+			JavaSecondaryTable javaSecondaryTable = javaSecondaryTables.next();
+			if (javaSecondaryTable.getName() != null) {
+				this.virtualSecondaryTables.add(buildVirtualSecondaryTable(javaSecondaryTable));
+			}
+		}
+	}	
+	
+	protected void initializeDefaultPrimaryKeyJoinColumns() {
+		if (isMetadataComplete()) {
+			return;
+		}
+		if (getJavaEntity() == null) {
+			this.defaultPrimaryKeyJoinColumns.add(buildPrimaryKeyJoinColumn(null));
+			return;
+		}
+		if (specifiedPrimaryKeyJoinColumnsSize() > 0) {
+			return;
+		}
+		ListIterator<JavaPrimaryKeyJoinColumn> javaPkJoinColumns = getJavaEntity().primaryKeyJoinColumns();
+		while(javaPkJoinColumns.hasNext()) {
+			JavaPrimaryKeyJoinColumn javaPkJoinColumn = javaPkJoinColumns.next();
+			if (javaPkJoinColumn.getName() != null) {
+				this.defaultPrimaryKeyJoinColumns.add(buildVirtualPrimaryKeyJoinColumn(javaPkJoinColumn));
+			}
+		}
+	}
+
+	protected void initializeSpecifiedPrimaryKeyJoinColumns() {
+		for (XmlPrimaryKeyJoinColumn resourcePkJoinColumn : this.resourceTypeMapping.getPrimaryKeyJoinColumns()) {
+			this.specifiedPrimaryKeyJoinColumns.add(buildPrimaryKeyJoinColumn(resourcePkJoinColumn));
+		}
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.setSpecifiedName(this.resourceTypeMapping.getName());
+		this.setDefaultName(this.buildDefaultName());
+		this.idClassReference.update(getJavaIdClassReferenceForDefaults());
+		this.updateInheritance(this.getResourceInheritance());
+		this.updateRootEntity();
+		this.updateDiscriminatorColumn();
+		this.updateDiscriminatorValue();
+		this.setSpecifiedTableIsAllowed(this.buildSpecifiedTableIsAllowed());
+		this.setTableIsUndefined(this.buildTableIsUndefined());
+		this.table.update(this.resourceTypeMapping);
+		this.updateSpecifiedSecondaryTables();
+		this.updateVirtualSecondaryTables();
+		this.generatorContainer.update();
+		this.updateSpecifiedPrimaryKeyJoinColumns();
+		this.updateDefaultPrimaryKeyJoinColumns();
+		getAttributeOverrideContainer().update();
+		getAssociationOverrideContainer().update();
+		getQueryContainer().update();
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		this.postUpdateDiscriminatorColumn();
+		this.postUpdateDiscriminatorValue();
+	}
+
+	protected String buildDefaultName() {
+		if (!isMetadataComplete()) {
+			JavaEntity javaEntity = getJavaEntity();
+			if (javaEntity != null) {
+				return javaEntity.getName();
+			}
+		}
+		String className = getClass_();
+		return StringTools.stringIsEmpty(className) ? null : ClassName.getSimpleName(className);
+	}
+	
+	protected void updateDiscriminatorColumn() {
+		this.setSpecifiedDiscriminatorColumnIsAllowed(this.buildSpecifiedDiscriminatorColumnIsAllowed());
+		getDiscriminatorColumn().update(this.resourceTypeMapping);
+	}
+	
+	protected void postUpdateDiscriminatorColumn() {
+		this.setDiscriminatorColumnIsUndefined(this.buildDiscriminatorColumnIsUndefined());
+		this.getDiscriminatorColumn().postUpdate();
+	}
+	
+	protected void updateDiscriminatorValue() {
+		this.setSpecifiedDiscriminatorValueIsAllowed(this.buildSpecifiedDiscriminatorValueIsAllowed());
+		this.setSpecifiedDiscriminatorValue(this.resourceTypeMapping.getDiscriminatorValue());
+	}
+	
+	protected void postUpdateDiscriminatorValue() {
+		this.setDiscriminatorValueIsUndefined(this.buildDiscriminatorValueIsUndefined());
+		this.setDefaultDiscriminatorValue(this.buildDefaultDiscriminatorValue());
+	}
+	
+	/**
+	 * From the Spec:
+	 * If the DiscriminatorValue annotation is not specified, a
+	 * provider-specific function to generate a value representing
+	 * the entity type is used for the value of the discriminator
+	 * column. If the DiscriminatorType is STRING, the discriminator
+	 * value default is the entity name.
+	 * 
+	 * TODO extension point for provider-specific function?
+	 */
+	protected String buildDefaultDiscriminatorValue() {
+		if (!isMetadataComplete() && getJavaEntity() != null) {
+			return getJavaEntity().getDiscriminatorValue();
+		}
+		if (discriminatorValueIsUndefined()) {
+			return null;
+		}
+		if (this.getDiscriminatorType() != DiscriminatorType.STRING) {
+			return null;
+		}
+		return this.getName();
+	}
+
+	protected DiscriminatorType getDiscriminatorType() {
+		return this.getDiscriminatorColumn().getDiscriminatorType();
+	}
+	
+	protected JavaResourcePersistentType getJavaResourcePersistentType() {
+		if (getPersistentType().getJavaPersistentType() != null) {
+			return getPersistentType().getJavaPersistentType().getResourcePersistentType();
+		}
+		return null;
+	}
+	
+	protected boolean buildSpecifiedDiscriminatorValueIsAllowed() {
+		return !isTablePerClass() && !isAbstract();
+	}
+		
+	protected boolean buildDiscriminatorValueIsUndefined() {
+		return isTablePerClass() || isAbstract() || isRootNoDescendantsNoStrategyDefined();
+	}
+	
+	protected boolean buildSpecifiedDiscriminatorColumnIsAllowed() {
+		return !isTablePerClass() && isRoot();
+	}
+	
+	protected boolean buildDiscriminatorColumnIsUndefined() {
+		return isTablePerClass() || isRootNoDescendantsNoStrategyDefined();
+	}
+	
+	protected boolean buildSpecifiedTableIsAllowed() {
+		return !isAbstractTablePerClass() && !isSingleTableDescendant();
+	}
+	
+	protected boolean buildTableIsUndefined() {
+		return isAbstractTablePerClass();
+	}
+	
+
+	protected void updateInheritance(Inheritance inheritanceResource) {
+		this.setSpecifiedInheritanceStrategy_(this.getResourceInheritanceStrategy(inheritanceResource));
+		this.setDefaultInheritanceStrategy(this.buildDefaultInheritanceStrategy());
+	}
+	
+	protected void updateRootEntity() {
+		//I am making an assumption here that we don't need property change notification for rootEntity, this might be wrong
+		this.rootEntity = calculateRootEntity();
+		if (this.rootEntity != this) {
+			this.rootEntity.addSubEntity(this);
+		}
+	}
+	
+	protected Entity calculateRootEntity() {
+		Entity root = this;
+		for (Iterator<TypeMapping> stream = inheritanceHierarchy(); stream.hasNext();) {
+			TypeMapping typeMapping = stream.next();
+			if (typeMapping instanceof Entity) {
+				root = (Entity) typeMapping;
+			}
+		}
+		return root;
+	}
+	
+	public void addSubEntity(Entity subEntity) {
+		getPersistenceUnit().addRootEntityWithSubEntities(getName());
+	}
+	
+	protected void updateSpecifiedSecondaryTables() {
+		// make a copy of the XML tables (to prevent ConcurrentModificationException)
+		Iterator<XmlSecondaryTable> xmlTables = new CloneIterator<XmlSecondaryTable>(this.resourceTypeMapping.getSecondaryTables());
+		
+		for (Iterator<OrmSecondaryTable> contextTables = this.specifiedSecondaryTables(); contextTables.hasNext(); ) {
+			OrmSecondaryTable contextTable = contextTables.next();
+			if (xmlTables.hasNext()) {
+				contextTable.update(xmlTables.next());
+			}
+			else {
+				removeSpecifiedSecondaryTable_(contextTable);
+			}
+		}
+		
+		while (xmlTables.hasNext()) {
+			addSpecifiedSecondaryTable(buildSecondaryTable(xmlTables.next()));
+		}
+	}
+	
+	//if any secondary-tables are specified in the xml file, then all of the java secondaryTables are overriden
+	protected void updateVirtualSecondaryTables() {
+		ListIterator<OrmSecondaryTable> secondaryTables = virtualSecondaryTables();
+		ListIterator<JavaSecondaryTable> javaSecondaryTables = EmptyListIterator.instance();
+		
+		if (getJavaEntity() != null && !isMetadataComplete() && specifiedSecondaryTablesSize() == 0) {
+			javaSecondaryTables = getJavaEntity().secondaryTables();
+		}
+		while (secondaryTables.hasNext()) {
+			OrmSecondaryTable virtualSecondaryTable = secondaryTables.next();
+			if (javaSecondaryTables.hasNext()) {
+				JavaSecondaryTable javaSecondaryTable = javaSecondaryTables.next();
+				virtualSecondaryTable.update(new VirtualXmlSecondaryTable(javaSecondaryTable));
+			}
+			else {
+				removeVirtualSecondaryTable(virtualSecondaryTable);
+			}
+		}
+		
+		while (javaSecondaryTables.hasNext()) {
+			JavaSecondaryTable javaSecondaryTable = javaSecondaryTables.next();
+			addVirtualSecondaryTable(buildVirtualSecondaryTable(javaSecondaryTable));
+		}
+	}
+
+	protected OrmSecondaryTable buildSecondaryTable(XmlSecondaryTable xmlSecondaryTable) {
+		return getXmlContextNodeFactory().buildOrmSecondaryTable(this, xmlSecondaryTable);
+	}
+	
+	protected OrmSecondaryTable buildVirtualSecondaryTable(JavaSecondaryTable javaSecondaryTable) {
+		return buildSecondaryTable(new VirtualXmlSecondaryTable(javaSecondaryTable));
+	}
+
+	protected InheritanceType getResourceInheritanceStrategy(Inheritance inheritanceResource) {
+		if (inheritanceResource == null) {
+			return null;
+		}
+		return InheritanceType.fromOrmResourceModel(inheritanceResource.getStrategy());
+	}
+	
+	protected InheritanceType buildDefaultInheritanceStrategy() {
+		if ((this.getResourceInheritance() == null)
+				&& ! this.isMetadataComplete()
+				&& (this.getJavaEntity() != null)) {
+			return this.getJavaEntity().getInheritanceStrategy();
+		}
+		return this.isRoot() ? InheritanceType.SINGLE_TABLE : this.getRootEntity().getInheritanceStrategy();
+	}
+	
+	protected void updateSpecifiedPrimaryKeyJoinColumns() {
+		// make a copy of the XML join columns (to prevent ConcurrentModificationException)
+		Iterator<XmlPrimaryKeyJoinColumn> xmlPkJoinColumns = new CloneIterator<XmlPrimaryKeyJoinColumn>(this.resourceTypeMapping.getPrimaryKeyJoinColumns());
+		
+		for (Iterator<OrmPrimaryKeyJoinColumn> contextPkJoinColumns = this.specifiedPrimaryKeyJoinColumns(); contextPkJoinColumns.hasNext(); ) {
+			OrmPrimaryKeyJoinColumn contextPkJoinColumn = contextPkJoinColumns.next();
+			if (xmlPkJoinColumns.hasNext()) {
+				contextPkJoinColumn.update(xmlPkJoinColumns.next());
+			}
+			else {
+				removeSpecifiedPrimaryKeyJoinColumn_(contextPkJoinColumn);
+			}
+		}
+		
+		while (xmlPkJoinColumns.hasNext()) {
+			addSpecifiedPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(xmlPkJoinColumns.next()));
+		}
+	}
+	
+	//if there are any specified pkJoinColumns, then no default pkJoinColumns
+	//if the java has specified pkJoinColumns, then those are the default pkJoinColumns
+	//otherwise, just 1 pkJoinColumn, defaults being null if multiple primaryKey columns
+	protected void updateDefaultPrimaryKeyJoinColumns() {
+		ListIterator<OrmPrimaryKeyJoinColumn> defaultPkJoinColumns = defaultPrimaryKeyJoinColumns();
+		ListIterator<JavaPrimaryKeyJoinColumn> javaPkJoinColumns = EmptyListIterator.instance();
+		
+		if (getJavaEntity() != null && !isMetadataComplete() && specifiedPrimaryKeyJoinColumnsSize() == 0) {
+			javaPkJoinColumns = getJavaEntity().primaryKeyJoinColumns();
+		}
+		while (defaultPkJoinColumns.hasNext()) {
+			OrmPrimaryKeyJoinColumn defaultPkJoinColumn = defaultPkJoinColumns.next();
+			if (javaPkJoinColumns.hasNext()) {
+				JavaPrimaryKeyJoinColumn javaPkJoinColumn = javaPkJoinColumns.next();
+				defaultPkJoinColumn.update(new VirtualXmlPrimaryKeyJoinColumn(javaPkJoinColumn));
+			}
+			else {
+				if (defaultPrimaryKeyJoinColumnsSize() == 1) {
+					defaultPkJoinColumn.update(null);
+				}
+				else {
+					removeDefaultPrimaryKeyJoinColumn(defaultPkJoinColumn);
+				}
+			}
+		}
+		
+		while (javaPkJoinColumns.hasNext()) {
+			JavaPrimaryKeyJoinColumn javaPkJoinColumn = javaPkJoinColumns.next();
+			addDefaultPrimaryKeyJoinColumn(buildVirtualPrimaryKeyJoinColumn(javaPkJoinColumn));
+		}
+		
+		if (defaultPrimaryKeyJoinColumnsSize() == 0 && specifiedPrimaryKeyJoinColumnsSize() == 0) {
+			addDefaultPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(null));
+		}
+	}
+	
+	protected OrmPrimaryKeyJoinColumn buildVirtualPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn javaSecondaryTable) {
+		return buildPrimaryKeyJoinColumn(new VirtualXmlPrimaryKeyJoinColumn(javaSecondaryTable));
+	}
+	
+	protected OrmPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(XmlPrimaryKeyJoinColumn resourcePkJoinColumn) {
+		return getXmlContextNodeFactory().buildOrmPrimaryKeyJoinColumn(this, createPrimaryKeyJoinColumnOwner(), resourcePkJoinColumn);
+	}
+	
+	
+	// *************************************************************************
+	
+	public String getPrimaryKeyColumnName() {
+		return AbstractJavaEntity.getPrimaryKeyColumnName(this);
+	}
+	
+	public PersistentAttribute getIdAttribute() {
+		Iterable<AttributeMapping> idAttributeMappings = getAllAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY);
+		if (CollectionTools.size(idAttributeMappings) != 1) {
+			return null;
+		}
+		return idAttributeMappings.iterator().next().getPersistentAttribute();
+	}
+
+	public void addToResourceModel(XmlEntityMappings entityMappings) {
+		entityMappings.getEntities().add(this.resourceTypeMapping);
+	}
+	
+	public void removeFromResourceModel(XmlEntityMappings entityMappings) {
+		entityMappings.getEntities().remove(this.resourceTypeMapping);
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		validatePrimaryKey(messages, reporter);
+		validateTable(messages, reporter);	
+		for (Iterator<OrmSecondaryTable> stream = this.secondaryTables(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter);
+		}
+		validateInheritance(messages, reporter);
+		this.generatorContainer.validate(messages, reporter);
+		this.queryContainer.validate(messages, reporter);
+		this.attributeOverrideContainer.validate(messages, reporter);
+		this.associationOverrideContainer.validate(messages, reporter);
+	}
+	
+	protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
+		buildPrimaryKeyValidator().validate(messages, reporter);
+	}
+	
+	protected PrimaryKeyValidator buildPrimaryKeyValidator() {
+		return new GenericEntityPrimaryKeyValidator(this, buildTextRangeResolver());
+		// TODO - JPA 2.0 validation
+	}
+	
+	protected PrimaryKeyTextRangeResolver buildTextRangeResolver() {
+		return new OrmEntityTextRangeResolver(this);
+	}
+	
+	protected void validateTable(List<IMessage> messages, IReporter reporter) {
+		if (isAbstractTablePerClass()) {
+			if (this.table.isResourceSpecified()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
+						new String[] {this.getName()},
+						this,
+						this.getTable().getValidationTextRange()
+					)
+				);
+			}			
+			return;
+		}
+		if (isSingleTableDescendant()) {
+			if (this.table.isResourceSpecified()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE,
+						new String[] {this.getName()},
+						this,
+						this.getTable().getValidationTextRange()
+					)
+				);
+			}
+			return;
+		}
+		this.table.validate(messages, reporter);
+	}
+	
+	protected void validateInheritance(List<IMessage> messages, IReporter reporter) {
+		validateInheritanceStrategy(messages);
+		validateDiscriminatorColumn(messages, reporter);
+		validateDiscriminatorValue(messages);
+	}
+	
+	protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter) {
+		if (specifiedDiscriminatorColumnIsAllowed() && !discriminatorColumnIsUndefined()) {
+			getDiscriminatorColumn().validate(messages, reporter);
+		}
+		else if (getDiscriminatorColumn().isResourceSpecified()) {
+			if (!isRoot()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorColumnTextRange()
+					)
+				);				
+			}
+			else if (isTablePerClass()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorColumnTextRange()
+					)
+				);				
+				
+			}
+		}
+	}
+	
+	protected void validateDiscriminatorValue(List<IMessage> messages) {
+		if (discriminatorValueIsUndefined() && getSpecifiedDiscriminatorValue() != null) {
+			if (isAbstract()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorValueTextRange()
+					)
+				);
+			}
+			else if (isTablePerClass()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED,
+						new String[] {this.getName()},
+						this,
+						this.getDiscriminatorValueTextRange()
+					)
+				);				
+			}
+		}
+	}
+	
+	protected void validateInheritanceStrategy(List<IMessage> messages) {
+		Supported tablePerConcreteClassInheritanceIsSupported = getJpaPlatformVariation().getTablePerConcreteClassInheritanceIsSupported();
+		if (tablePerConcreteClassInheritanceIsSupported == Supported.YES) {
+			return;
+		}
+		if ((getInheritanceStrategy() == InheritanceType.TABLE_PER_CLASS) && isRoot()) {
+			if (tablePerConcreteClassInheritanceIsSupported == Supported.NO) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
+						new String[] {this.getName()},
+						this,
+						this.getInheritanceStrategyTextRange()
+					)
+				);
+			}
+			else {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM,
+						new String[] {this.getName()},
+						this,
+						this.getInheritanceStrategyTextRange()
+					)
+				);
+			}
+		}
+	}
+
+	protected TextRange getDiscriminatorValueTextRange() {
+		return this.resourceTypeMapping.getDiscriminatorValueTextRange();
+	}
+	
+	protected TextRange getDiscriminatorColumnTextRange() {
+		return this.resourceTypeMapping.getDiscriminatorColumn().getValidationTextRange();
+	}
+
+	protected TextRange getInheritanceStrategyTextRange() {
+		return this.resourceTypeMapping.getInheritanceStrategyTextRange();
+	}
+		
+	protected class AssociationOverrideContainerOwner
+		implements OrmAssociationOverrideContainer.Owner
+	{
+		public OrmTypeMapping getTypeMapping() {
+			return AbstractOrmEntity.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmEntity.this.getOverridableTypeMapping();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAssociationNames();
+		}
+		
+		public EList<XmlAssociationOverride> getResourceAssociationOverrides() {
+			return AbstractOrmEntity.this.resourceTypeMapping.getAssociationOverrides();
+		}
+		
+		public RelationshipReference resolveRelationshipReference(String associationOverrideName) {
+			if (!isMetadataComplete()) {
+				JavaPersistentType javaPersistentType = getPersistentType().getJavaPersistentType();
+				if (javaPersistentType != null) {
+					RelationshipReference relationshipReference = javaPersistentType.getMapping().resolveRelationshipReference(associationOverrideName);
+					if (relationshipReference != null) {
+						return relationshipReference;
+					}
+				}
+			}
+			return MappingTools.resolveRelationshipReference(getOverridableTypeMapping(), associationOverrideName);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return AbstractOrmEntity.this.tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return AbstractOrmEntity.this.associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractOrmEntity.this.getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return AbstractOrmEntity.this.getPrimaryTableName();
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+					new String[] {overrideName, column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmEntity.this.getValidationTextRange();
+		}
+	}
+	
+	
+	//********** OrmAttributeOverrideContainer.Owner implementation *********	
+	
+	protected class AttributeOverrideContainerOwner
+		implements OrmAttributeOverrideContainer.Owner
+	{
+		public OrmTypeMapping getTypeMapping() {
+			return AbstractOrmEntity.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmEntity.this.getOverridableTypeMapping();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+				: allOverridableAttributeNames_(typeMapping);
+		}
+		
+		/* assumes the type mapping is not null */
+		protected Iterator allOverridableAttributeNames_(TypeMapping typeMapping) {
+			final Collection mappedByRelationshipAttributes = CollectionTools.collection(
+					new TransformationIterator<SingleRelationshipMapping2_0, String>(getMapsIdRelationships()) {
+						@Override
+						protected String transform(SingleRelationshipMapping2_0 next) {
+							return next.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue();
+						}
+					});
+			return new FilteringIterator<String>(typeMapping.allOverridableAttributeNames()) {
+				@Override
+				protected boolean accept(String o) {
+					if (mappedByRelationshipAttributes.isEmpty()) {
+						return true;
+					}
+					// overrideable names are (usually?) qualified with a container mapping, 
+					// which may also be the one mapped by a relationship
+					String qualifier = 
+							(o.indexOf('.') > 0) ?
+								o.substring(0, o.indexOf('.'))
+								: o;
+					return ! mappedByRelationshipAttributes.contains(qualifier);
+				}
+			};
+		}
+		
+		protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+			return new FilteringIterable<SingleRelationshipMapping2_0>(
+					new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+						new CompositeIterable<AttributeMapping>(
+							getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+							getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+				@Override
+				protected boolean accept(SingleRelationshipMapping2_0 o) {
+					return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+				}
+			};
+		}
+		
+		public EList<XmlAttributeOverride> getResourceAttributeOverrides() {
+			return AbstractOrmEntity.this.resourceTypeMapping.getAttributeOverrides();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			if (!isMetadataComplete()) {
+				JavaPersistentType javaPersistentType = getPersistentType().getJavaPersistentType();
+				if (javaPersistentType != null) {
+					Column column = javaPersistentType.getMapping().resolveOverriddenColumn(attributeOverrideName);
+					if (column != null) {
+						return column;
+					}
+				}
+			}
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public XmlColumn buildVirtualXmlColumn(Column overridableColumn, String attributeName, boolean isMetadataComplete) {
+			JavaAttributeOverride javaAttributeOverride = null;
+			if (!isMetadataComplete) {
+				javaAttributeOverride = getJavaAttributeOverrideNamed(attributeName);
+			}
+			if (javaAttributeOverride == null) {
+				//TODO not the greatest solution here, but things seems to work, so I'm stepping away slowly
+				if (overridableColumn instanceof JavaColumn) {
+					return new VirtualXmlColumn(AbstractOrmEntity.this, overridableColumn);
+				}
+				return new VirtualXmlAttributeOverrideColumn(overridableColumn);
+			}
+			return new VirtualXmlColumn(AbstractOrmEntity.this, javaAttributeOverride.getColumn());
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return AbstractOrmEntity.this.tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return AbstractOrmEntity.this.associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractOrmEntity.this.getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return AbstractOrmEntity.this.getPrimaryTableName();
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmEntity.this.getValidationTextRange();
+		}
+	}
+	
+	
+	protected class PrimaryKeyJoinColumnOwner implements OrmBaseJoinColumn.Owner
+	{
+		public TypeMapping getTypeMapping() {
+			return AbstractOrmEntity.this;
+		}
+
+		public String getDefaultTableName() {
+			return AbstractOrmEntity.this.getPrimaryTableName();
+		}
+
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractOrmEntity.this.getDbTable(tableName);
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			Entity parentEntity = AbstractOrmEntity.this.getParentEntity();
+			return (parentEntity == null) ? null : parentEntity.getPrimaryDbTable();
+		}
+
+		public int joinColumnsSize() {
+			return AbstractOrmEntity.this.primaryKeyJoinColumnsSize();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return AbstractOrmEntity.this.defaultPrimaryKeyJoinColumns.contains(joinColumn);
+		}
+		
+		public String getDefaultColumnName() {
+			if (joinColumnsSize() != 1) {
+				return null;
+			}
+			Entity parentEntity = AbstractOrmEntity.this.getParentEntity();
+			return (parentEntity == null) ? getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
+		}
+		
+		public TextRange getValidationTextRange() {
+			return null;
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet: bug 148262"); //$NON-NLS-1$
+		}
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmGenerator.java
new file mode 100644
index 0000000..696357b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmGenerator.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaGenerator;
+import org.eclipse.jpt.core.context.orm.OrmGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlGenerator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * 
+ */
+public abstract class AbstractOrmGenerator<T extends XmlGenerator>
+	extends AbstractOrmXmlContextNode 
+	implements OrmGenerator
+{
+
+	protected String name;
+
+	protected Integer specifiedInitialValue;
+	protected int defaultInitialValue;
+
+	protected Integer specifiedAllocationSize;
+	protected int defaultAllocationSize;
+
+	protected T resourceGenerator;
+
+
+	protected AbstractOrmGenerator(XmlContextNode parent) {
+		super(parent);
+	}
+
+	protected T getResourceGenerator() {
+		return this.resourceGenerator;
+	}
+	
+
+	// ********** name **********
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.getResourceGenerator().setName(name);
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+	
+	protected void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** initial value **********
+
+	public int getInitialValue() {
+		return (this.specifiedInitialValue != null) ? this.specifiedInitialValue.intValue() : this.defaultInitialValue;
+	}
+
+	public Integer getSpecifiedInitialValue() {
+		return this.specifiedInitialValue;
+	}
+
+	public void setSpecifiedInitialValue(Integer specifiedInitialValue) {
+		Integer old = this.specifiedInitialValue;
+		this.specifiedInitialValue = specifiedInitialValue;
+		this.getResourceGenerator().setInitialValue(specifiedInitialValue);
+		this.firePropertyChanged(SPECIFIED_INITIAL_VALUE_PROPERTY, old, specifiedInitialValue);
+	}
+	
+	protected void setSpecifiedInitialValue_(Integer specifiedInitialValue) {
+		Integer old = this.specifiedInitialValue;
+		this.specifiedInitialValue = specifiedInitialValue;
+		this.firePropertyChanged(SPECIFIED_INITIAL_VALUE_PROPERTY, old, specifiedInitialValue);
+	}
+	
+	public int getDefaultInitialValue() {
+		return this.defaultInitialValue;
+	}
+	
+	protected void setDefaultInitialValue(int defaultInitialValue) {
+		int old = this.defaultInitialValue;
+		this.defaultInitialValue = defaultInitialValue;
+		this.firePropertyChanged(DEFAULT_INITIAL_VALUE_PROPERTY, old, defaultInitialValue);
+	}
+	
+
+	// ********** allocation size **********
+
+	public int getAllocationSize() {
+		return (this.specifiedAllocationSize != null) ? this.specifiedAllocationSize.intValue() : this.defaultAllocationSize;
+	}
+
+	public Integer getSpecifiedAllocationSize() {
+		return this.specifiedAllocationSize;
+	}
+
+	public void setSpecifiedAllocationSize(Integer specifiedAllocationSize) {
+		Integer old = this.specifiedAllocationSize;
+		this.specifiedAllocationSize = specifiedAllocationSize;
+		this.getResourceGenerator().setAllocationSize(specifiedAllocationSize);
+		this.firePropertyChanged(SPECIFIED_ALLOCATION_SIZE_PROPERTY, old, specifiedAllocationSize);
+	}
+	
+	protected void setSpecifiedAllocationSize_(Integer specifiedAllocationSize) {
+		Integer old = this.specifiedAllocationSize;
+		this.specifiedAllocationSize = specifiedAllocationSize;
+		this.firePropertyChanged(SPECIFIED_ALLOCATION_SIZE_PROPERTY, old, specifiedAllocationSize);
+	}
+
+	public int getDefaultAllocationSize() {
+		return Generator.DEFAULT_ALLOCATION_SIZE;
+	}
+	
+	protected void setDefaultAllocationSize(int defaultAllocationSize) {
+		int old = this.defaultAllocationSize;
+		this.defaultAllocationSize = defaultAllocationSize;
+		this.firePropertyChanged(DEFAULT_ALLOCATION_SIZE_PROPERTY, old, defaultAllocationSize);
+	}
+
+
+	// ********** text ranges **********
+
+	public TextRange getValidationTextRange() {
+		TextRange validationTextRange = this.getResourceGenerator().getValidationTextRange();
+		return validationTextRange != null ? validationTextRange : getParent().getValidationTextRange();
+	}
+	
+	public TextRange getNameTextRange() {
+		TextRange nameTextRange = this.getResourceGenerator().getNameTextRange();
+		return nameTextRange != null ? nameTextRange : getValidationTextRange();
+	}
+
+
+	// ********** resource => context **********
+
+	protected void initialize(T xmlResourceGenerator) {
+		this.resourceGenerator = xmlResourceGenerator;
+		this.name = xmlResourceGenerator.getName();
+		this.specifiedInitialValue = xmlResourceGenerator.getInitialValue();
+		this.specifiedAllocationSize = xmlResourceGenerator.getAllocationSize();
+		//TODO defaults
+	}
+	
+	protected void update(T xmlResourceGenerator) {
+		this.resourceGenerator = xmlResourceGenerator;
+		this.setName_(xmlResourceGenerator.getName());
+		this.setSpecifiedInitialValue_(xmlResourceGenerator.getInitialValue());
+		this.setSpecifiedAllocationSize_(xmlResourceGenerator.getAllocationSize());
+		getPersistenceUnit().addGenerator(this);
+		//TODO defaults
+	}
+	
+
+	// ********** database stuff **********
+
+	public Schema getDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDbSchemaContainer() {
+		String catalog = this.getCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+	protected abstract String getSchema();
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDbCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+	protected abstract String getCatalog();
+
+
+	// ********** misc **********
+
+	public boolean isVirtual() {
+		return getResourceGenerator().isVirtual();
+	}
+	
+	@Override
+	public XmlContextNode getParent() {
+		return (XmlContextNode) super.getParent();
+	}
+	
+	public boolean overrides(Generator other) {
+		// this isn't ideal, but it will have to do until we have further adopter input
+		return (this.name != null)
+				&& this.name.equals(other.getName())
+				&& (other instanceof JavaGenerator);
+	}
+	
+	public boolean duplicates(Generator other) {
+		return (this != other)
+				&& ! StringTools.stringIsEmpty(this.name)
+				&& this.name.equals(other.getName())
+				&& ! this.isVirtual()
+				&& ! this.overrides(other)
+				&& ! other.overrides(this);
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.name);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmIdMapping.java
new file mode 100644
index 0000000..6dc07ed
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmIdMapping.java
@@ -0,0 +1,431 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.context.orm.OrmColumnMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.context.orm.OrmGeneratedValue;
+import org.eclipse.jpt.core.context.orm.OrmGeneratorContainer;
+import org.eclipse.jpt.core.context.orm.OrmIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.IdMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmIdMapping<T extends XmlId>
+	extends AbstractOrmAttributeMapping<T>
+	implements OrmIdMapping, IdMapping2_0
+{
+	protected final OrmColumn column;
+	
+	/* 2.0 feature - a relationship may map this id */
+	protected boolean mappedByRelationship;
+	
+	protected OrmGeneratedValue generatedValue;
+	
+	protected OrmConverter converter;
+	
+	protected final OrmConverter nullConverter;
+	
+	protected final OrmGeneratorContainer generatorContainer;
+	
+	
+	protected AbstractOrmIdMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.column = getXmlContextNodeFactory().buildOrmColumn(this, this);
+		this.column.initialize(this.resourceAttributeMapping.getColumn());//TODO pass in to constructor
+		this.mappedByRelationship = calculateMappedByRelationship();
+		this.generatorContainer = buildGeneratorContainer();
+		this.initializeGeneratedValue();
+		this.nullConverter = this.getXmlContextNodeFactory().buildOrmNullConverter(this);
+		this.converter = this.buildConverter(this.getResourceConverterType());
+	}
+	
+	
+	protected OrmGeneratorContainer buildGeneratorContainer() {
+		return getXmlContextNodeFactory().buildOrmGeneratorContainer(this, this.resourceAttributeMapping);
+	}
+	
+	public String getKey() {
+		return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public int getXmlSequence() {
+		return 0;
+	}
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmIdMapping(this);
+	}
+	
+	@Override
+	public void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
+		super.initializeFromOrmColumnMapping(oldMapping);
+		getColumn().initializeFrom(oldMapping.getColumn());
+	}
+	
+	public OrmColumn getColumn() {
+		return this.column;
+	}
+	
+	public OrmConverter getConverter() {
+		return this.converter;
+	}
+	
+	protected String getConverterType() {
+		return this.converter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		OrmConverter oldConverter = this.converter;
+		OrmConverter newConverter = buildConverter(converterType);
+		this.converter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.converter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(OrmConverter newConverter) {
+		OrmConverter oldConverter = this.converter;
+		this.converter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	public OrmGeneratedValue addGeneratedValue() {
+		if (getGeneratedValue() != null) {
+			throw new IllegalStateException("gemeratedValue already exists"); //$NON-NLS-1$
+		}
+		XmlGeneratedValue resourceGeneratedValue = OrmFactory.eINSTANCE.createXmlGeneratedValue();
+		this.generatedValue = buildGeneratedValue(resourceGeneratedValue);
+		this.resourceAttributeMapping.setGeneratedValue(resourceGeneratedValue);
+		firePropertyChanged(GENERATED_VALUE_PROPERTY, null, this.generatedValue);
+		return this.generatedValue;
+	}
+	
+	public void removeGeneratedValue() {
+		if (getGeneratedValue() == null) {
+			throw new IllegalStateException("gemeratedValue does not exist, cannot be removed"); //$NON-NLS-1$
+		}
+		OrmGeneratedValue oldGeneratedValue = this.generatedValue;
+		this.generatedValue = null;
+		this.resourceAttributeMapping.setGeneratedValue(null);
+		firePropertyChanged(GENERATED_VALUE_PROPERTY, oldGeneratedValue, null);
+	}
+	
+	public OrmGeneratedValue getGeneratedValue() {
+		return this.generatedValue;
+	}
+	
+	protected void setGeneratedValue(OrmGeneratedValue newGeneratedValue) {
+		OrmGeneratedValue oldGeneratedValue = this.generatedValue;
+		this.generatedValue = newGeneratedValue;
+		firePropertyChanged(GENERATED_VALUE_PROPERTY, oldGeneratedValue, newGeneratedValue);
+	}
+	
+	public OrmGeneratorContainer getGeneratorContainer() {
+		return this.generatorContainer;
+	}
+	
+	@Override
+	public String getPrimaryKeyColumnName() {
+		return this.getColumn().getName();
+	}
+	
+	@Override
+	public boolean isOverridableAttributeMapping() {
+		return true;
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getIds().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getIds().remove(this.resourceAttributeMapping);
+	}
+	
+	
+	//***************** XmlColumn.Owner implementation ****************
+	
+	public XmlColumn getResourceColumn() {
+		return this.resourceAttributeMapping.getColumn();
+	}
+	
+	protected boolean isColumnSpecified() {
+		if (! isVirtual()) {
+			return getResourceColumn() != null;
+		}
+		else {
+			return getJavaResourcePersistentAttribute().getAnnotation(JPA.COLUMN) != null;
+		}
+	}
+	
+	public void addResourceColumn() {
+		this.resourceAttributeMapping.setColumn(OrmFactory.eINSTANCE.createXmlColumn());
+	}
+	
+	public void removeResourceColumn() {
+		this.resourceAttributeMapping.setColumn(null);
+	}
+	
+	
+	//************** NamedColumn.Owner implementation ***************
+	
+	public Table getDbTable(String tableName) {
+		return getTypeMapping().getDbTable(tableName);
+	}
+	
+	public String getDefaultColumnName() {		
+		return (isMappedByRelationship() && ! isColumnSpecified()) ? null : getName();
+	}
+	
+	
+	//************** BaseColumn.Owner implementation ***************
+	
+	public String getDefaultTableName() {
+		return (isMappedByRelationship() && ! isColumnSpecified()) ? null : getTypeMapping().getPrimaryTableName();
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+	
+	public Iterator<String> candidateTableNames() {
+		return getTypeMapping().associatedTableNamesIncludingInherited();
+	}
+	
+	
+	// **************** IdColumn2_0 impl **************************************
+	
+	public boolean isMappedByRelationship() {
+		return this.mappedByRelationship;
+	}
+	
+	protected void setMappedByRelationship(boolean newValue) {
+		boolean oldValue = this.mappedByRelationship;
+		this.mappedByRelationship = newValue;
+		firePropertyChanged(MAPPED_BY_RELATIONSHIP_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean calculateMappedByRelationship() {
+		for (SingleRelationshipMapping2_0 each : getMapsIdRelationships()) {
+			if (each.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getResolvedAttributeMappingValue() == this) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	protected void initializeGeneratedValue() {
+		if (this.resourceAttributeMapping.getGeneratedValue() != null) {
+			this.generatedValue = buildGeneratedValue(this.resourceAttributeMapping.getGeneratedValue());
+		}
+	}
+	
+	protected OrmGeneratedValue buildGeneratedValue(XmlGeneratedValue resourceGeneratedValue) {
+		return getXmlContextNodeFactory().buildOrmGeneratedValue(this, resourceGeneratedValue);
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.column.update(getResourceColumn());
+		setMappedByRelationship(calculateMappedByRelationship());
+		this.generatorContainer.update();
+		this.updateGeneratedValue();
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update();
+		}
+		else {
+			setConverter(buildConverter(getResourceConverterType()));
+		}
+	}
+	
+	protected void updateGeneratedValue() {
+		if (this.resourceAttributeMapping.getGeneratedValue() == null) {
+			if (getGeneratedValue() != null) {
+				setGeneratedValue(null);
+			}
+		}
+		else {
+			if (getGeneratedValue() == null) {
+				setGeneratedValue(buildGeneratedValue(this.resourceAttributeMapping.getGeneratedValue()));
+			}
+			else {
+				getGeneratedValue().update(this.resourceAttributeMapping.getGeneratedValue());
+			}
+		}
+	}
+	
+	protected OrmConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmTemporalConverter(this, this.resourceAttributeMapping);
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.resourceAttributeMapping.getTemporal() != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		return Converter.NO_CONVERTER;
+	}
+	
+	
+	// ****************** validation ****************
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		// [JPA 2.0] if the column is specified, or if the id is not mapped by a relationship,
+		// then the column is validated.
+		// (In JPA 1.0, the column will always be validated, since the id is never mapped by a
+		//  relationship)
+		if (isColumnSpecified() || ! isMappedByRelationship()) {
+			getColumn().validate(messages, reporter);
+		}
+		
+		// [JPA 2.0] if the column is specified and the id is mapped by a relationship, 
+		// then that is an error
+		// (In JPA 1.0, this will never be the case, since the id is never mapped by a relationship)
+		if (isColumnSpecified() && isMappedByRelationship()) {
+			messages.add(
+					buildMessage(
+						JpaValidationMessages.ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED,
+						new String[] {},
+						getColumn().getValidationTextRange()));
+		}
+		
+		if (this.generatedValue != null) {
+			this.generatedValue.validate(messages, reporter);
+		}
+		this.generatorContainer.validate(messages, reporter);
+	}
+
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		if (isVirtual()) {
+			return this.buildVirtualUnresolvedNameMessage(column, textRange);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+			new String[] {column.getName(), column.getDbTable().getName()}, 
+			column,
+			textRange
+		);
+	}
+
+	protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME,
+			new String[] {getName(), column.getName(), column.getDbTable().getName()},
+			column, 
+			textRange
+		);
+	}
+
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		if (isVirtual()) {
+			return this.buildVirtualTableNotValidMessage(column, textRange);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+			column, 
+			textRange
+		);
+	}
+	
+	public IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				getName(),
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+			column, 
+			textRange
+		);
+	}
+	
+	/* TODO - move to AbstractOrmAttributeMapping? */
+	protected IMessage buildMessage(String msgID, String[] params, TextRange textRange) {
+		String attributeDescString;
+		PersistentAttribute attribute = getPersistentAttribute();
+		if (attribute.isVirtual()) {
+			attributeDescString = NLS.bind(JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC, attribute.getName());
+		}
+		else {
+			attributeDescString = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY, msgID, ArrayTools.add(params, 0, attributeDescString), this, textRange);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.java
new file mode 100644
index 0000000..670a504
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn.Owner;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public abstract class AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy 
+	extends AbstractOrmJoinColumnJoiningStrategy
+{
+	
+	protected AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy(
+			OrmJoinColumnEnabledRelationshipReference parent,
+			XmlJoinColumnsMapping resource) {
+		super(parent, resource);
+	}
+	
+	@Override
+	protected Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+	
+	@Override
+	public OrmJoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return (OrmJoinColumnEnabledRelationshipReference) super.getRelationshipReference();
+	}
+
+	protected abstract Entity getRelationshipTargetEntity();
+
+	public String getColumnTableNotValidDescription() {
+		return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
+	}
+
+	public boolean isOverridableAssociation() {
+		return true;
+	}
+		
+	public TextRange getValidationTextRange() {
+		return this.getRelationshipReference().getValidationTextRange();
+	}
+
+	// ********** join column owner adapter **********
+
+	protected class JoinColumnOwner
+		implements OrmJoinColumn.Owner 
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+		
+		/**
+		 * by default, the join column is in the type mapping's primary table
+		 */
+		public String getDefaultTableName() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.getTableName();
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public String getAttributeName() {
+			return getRelationshipMapping().getName();
+		}
+
+		public PersistentAttribute getPersistentAttribute() {
+			return getRelationshipMapping().getPersistentAttribute();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.getRelationshipSource();
+		}
+
+		public Entity getRelationshipTarget() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.getRelationshipTargetEntity();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.tableNameIsInvalid(tableName);
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.candidateTableNames();
+		}
+		
+		public Table getDbTable(String tableName) {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.getDbTable(tableName);
+		}
+		
+		public Table getReferencedColumnDbTable() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.getReferencedColumnDbTable();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.defaultJoinColumn == joinColumn;
+		}
+
+		public int joinColumnsSize() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.joinColumnsSize();
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy.this.getValidationTextRange();
+		}
+		
+		protected boolean isPersistentAttributeVirtual() {
+			return getPersistentAttribute().isVirtual();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualTableNotValidMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					this.getAttributeName(),
+					column.getTable(), column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {this.getAttributeName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedReferencedColumnNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {this.getAttributeName(), column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {this.getAttributeName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {this.getAttributeName()},
+				column, 
+				textRange
+			);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..7c1f778
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinColumnJoiningStrategy.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmJoinColumnJoiningStrategy 
+	extends AbstractOrmXmlContextNode
+	implements OrmJoinColumnJoiningStrategy
+{
+	protected OrmJoinColumn defaultJoinColumn;
+	
+	protected final Vector<OrmJoinColumn> specifiedJoinColumns = new Vector<OrmJoinColumn>();
+
+	protected final OrmJoinColumn.Owner joinColumnOwner;
+	
+	protected XmlJoinColumnsMapping resource;
+	
+	
+	protected AbstractOrmJoinColumnJoiningStrategy(
+			JoinColumnEnabledRelationshipReference parent,
+			XmlJoinColumnsMapping resource) {
+		super(parent);
+		this.resource = resource;
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+		this.initializeSpecifiedJoinColumns();
+		this.initializeDefaultJoinColumn();
+	}
+	
+	public void initializeFrom(JoinColumnJoiningStrategy oldStrategy) {
+		for (JoinColumn joinColumn : CollectionTools.iterable(oldStrategy.joinColumns())) {
+			JoinColumn newJoinColumn = this.addSpecifiedJoinColumn(this.specifiedJoinColumnsSize());
+			newJoinColumn.setSpecifiedName(joinColumn.getName());
+			newJoinColumn.setSpecifiedReferencedColumnName(joinColumn.getReferencedColumnName());			
+		}
+	}
+	
+	protected abstract OrmJoinColumn.Owner buildJoinColumnOwner();
+	
+	protected void initializeSpecifiedJoinColumns() {
+		for (XmlJoinColumn resourceJoinColumn : this.resource.getJoinColumns()) {
+			this.specifiedJoinColumns.add(buildJoinColumn(resourceJoinColumn));
+		}
+	}
+	
+	protected void initializeDefaultJoinColumn() {
+		if (mayHaveDefaultJoinColumn()) {
+			this.defaultJoinColumn = this.buildJoinColumn(null);
+		}
+	}	
+	
+	@Override
+	public JoinColumnEnabledRelationshipReference getParent() {
+		return (JoinColumnEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public String getTableName() {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? null : getRelationshipSource().getPrimaryTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? null : typeMapping.getDbTable(tableName);
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? false : typeMapping.tableNameIsInvalid(tableName);
+	}
+
+	protected Iterator<String> candidateTableNames() {
+		TypeMapping typeMapping = getRelationshipSource();
+		return typeMapping == null ? EmptyIterator.<String> instance() : typeMapping.associatedTableNamesIncludingInherited();
+	}
+	
+	public void addStrategy() {
+		if (specifiedJoinColumnsSize() == 0) {
+			addSpecifiedJoinColumn(0);
+		}
+	}
+	
+	public void removeStrategy() {
+		for (JoinColumn each : CollectionTools.iterable(specifiedJoinColumns())) {
+			removeSpecifiedJoinColumn(each);
+		}
+	}
+
+	public Table getReferencedColumnDbTable() {
+		TypeMapping relationshipTarget = getRelationshipTarget();
+		return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
+	}
+	
+	
+	// **************** join columns *******************************************
+	
+	public ListIterator<OrmJoinColumn> joinColumns() {
+		return this.hasSpecifiedJoinColumns() ? 
+			this.specifiedJoinColumns() : this.defaultJoinColumns();
+	}
+	
+	public int joinColumnsSize() {
+		return this.hasSpecifiedJoinColumns() ? 
+			this.specifiedJoinColumnsSize() : this.defaultJoinColumnsSize();
+	}
+	
+	
+	// **************** default join column ************************************
+	
+	public OrmJoinColumn getDefaultJoinColumn() {
+		return this.defaultJoinColumn;
+	}
+	
+	protected void setDefaultJoinColumn(OrmJoinColumn joinColumn) {
+		OrmJoinColumn old = this.defaultJoinColumn;
+		this.defaultJoinColumn = joinColumn;
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, old, joinColumn);
+	}
+	
+	protected ListIterator<OrmJoinColumn> defaultJoinColumns() {
+		if (this.defaultJoinColumn != null) {
+			return new SingleElementListIterator<OrmJoinColumn>(this.defaultJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+	
+	protected int defaultJoinColumnsSize() {
+		return (this.defaultJoinColumn == null) ? 0 : 1;
+	}
+	
+	
+	// **************** specified join columns *********************************
+	
+	public ListIterator<OrmJoinColumn> specifiedJoinColumns() {
+		return new CloneListIterator<OrmJoinColumn>(this.specifiedJoinColumns);
+	}
+
+	public int specifiedJoinColumnsSize() {
+		return this.specifiedJoinColumns.size();
+	}
+
+	public boolean hasSpecifiedJoinColumns() {
+		return ! this.specifiedJoinColumns.isEmpty();
+	}
+
+	public OrmJoinColumn addSpecifiedJoinColumn(int index) {
+		OrmJoinColumn oldDefaultJoinColumn = this.defaultJoinColumn;
+		if (oldDefaultJoinColumn != null) {
+			//null the default join column now if one already exists.
+			//if one does not exist, there is already a specified join column.
+			//Remove it now so that it doesn't get removed during an update and
+			//cause change notifications to be sent to the UI in the wrong order
+			this.defaultJoinColumn = null;
+		}
+		XmlJoinColumn resourceJoinColumn = OrmFactory.eINSTANCE.createXmlJoinColumn();
+		OrmJoinColumn contextJoinColumn = this.buildJoinColumn(resourceJoinColumn);
+		this.specifiedJoinColumns.add(index, contextJoinColumn);
+		this.resource.getJoinColumns().add(index, resourceJoinColumn);
+		this.fireItemAdded(SPECIFIED_JOIN_COLUMNS_LIST, index, contextJoinColumn);
+		if (oldDefaultJoinColumn != null) {
+			this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, oldDefaultJoinColumn, null);
+		}
+		return contextJoinColumn;
+	}
+
+	protected void addSpecifiedJoinColumn(int index, OrmJoinColumn joinColumn) {
+		this.addItemToList(index, joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+
+	protected void addSpecifiedJoinColumn(OrmJoinColumn joinColumn) {
+		this.addSpecifiedJoinColumn(this.specifiedJoinColumns.size(), joinColumn);
+	}
+
+	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
+		this.removeSpecifiedJoinColumn(this.specifiedJoinColumns.indexOf(joinColumn));
+	}
+	
+	public void removeSpecifiedJoinColumn(int index) {
+		OrmJoinColumn removedJoinColumn = this.specifiedJoinColumns.remove(index);
+		if (this.specifiedJoinColumns.isEmpty()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultJoinColumn = this.buildJoinColumn(null);
+		}
+		this.resource.getJoinColumns().remove(index);
+		this.fireItemRemoved(SPECIFIED_JOIN_COLUMNS_LIST, index, removedJoinColumn);
+		if (this.defaultJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(DEFAULT_JOIN_COLUMN_PROPERTY, null, this.defaultJoinColumn);		
+		}
+	}
+
+	protected void removeSpecifiedJoinColumn_(OrmJoinColumn joinColumn) {
+		removeItemFromList(joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+	
+	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedJoinColumns, targetIndex, sourceIndex);
+		this.resource.getJoinColumns().move(targetIndex, sourceIndex);
+		fireItemMoved(SPECIFIED_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	protected OrmJoinColumn buildJoinColumn(XmlJoinColumn resourceJoinColumn) {
+		return this.getXmlContextNodeFactory().buildOrmJoinColumn(this, this.joinColumnOwner, resourceJoinColumn);
+	}
+	
+	// **************** resource => context ************************************
+	
+	public void update() {
+		updateSpecifiedJoinColumns();
+		updateDefaultJoinColumn();
+	}
+	
+	protected void updateSpecifiedJoinColumns() {
+		// make a copy of the XML join columns (to prevent ConcurrentModificationException)
+		Iterator<XmlJoinColumn> xmlJoinColumns = 
+			new CloneIterator<XmlJoinColumn>(this.resource.getJoinColumns());
+		
+		for (Iterator<OrmJoinColumn> contextJoinColumns = this.specifiedJoinColumns(); 
+				contextJoinColumns.hasNext(); ) {
+			OrmJoinColumn contextJoinColumn = contextJoinColumns.next();
+			if (xmlJoinColumns.hasNext()) {
+				contextJoinColumn.update(xmlJoinColumns.next());
+			}
+			else {
+				removeSpecifiedJoinColumn_(contextJoinColumn);
+			}
+		}
+		
+		while (xmlJoinColumns.hasNext()) {
+			addSpecifiedJoinColumn(buildJoinColumn(xmlJoinColumns.next()));
+		}
+	}
+	
+	protected void updateDefaultJoinColumn() {
+		if (mayHaveDefaultJoinColumn()) {
+			if (this.defaultJoinColumn == null) {
+				this.setDefaultJoinColumn(this.buildJoinColumn(null));
+			} else {
+				this.defaultJoinColumn.update(null);
+			}
+		} else {
+			this.setDefaultJoinColumn(null);
+		}
+	}
+	
+	protected boolean mayHaveDefaultJoinColumn() {
+		return getRelationshipReference().mayHaveDefaultJoinColumn()
+			&& ! hasSpecifiedJoinColumns();
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		for (Iterator<OrmJoinColumn> stream = this.joinColumns(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..7cc5d7a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmJoinTableJoiningStrategy.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmJoinTableJoiningStrategy 
+	extends AbstractOrmXmlContextNode
+	implements OrmJoinTableJoiningStrategy
+{
+	protected OrmJoinTable joinTable;
+	
+	
+	protected AbstractOrmJoinTableJoiningStrategy(
+			JoinTableEnabledRelationshipReference parent) {
+		super(parent);
+	}	
+	
+	public void initializeFrom(JoinTableJoiningStrategy oldStrategy) {
+		JoinTable oldJoinTable = (oldStrategy.getJoinTable());
+		if (oldJoinTable != null) {
+			this.addStrategy();
+			this.getJoinTable().setSpecifiedCatalog(oldJoinTable.getSpecifiedCatalog());
+			this.getJoinTable().setSpecifiedSchema(oldJoinTable.getSpecifiedSchema());
+			this.getJoinTable().setSpecifiedName(oldJoinTable.getSpecifiedName());
+		}
+	}	
+	
+	@Override
+	public JoinTableEnabledRelationshipReference getParent() {
+		return (JoinTableEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JoinTableEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public String getTableName() {
+		return getJoinTable().getName();
+	}
+
+	public Table getDbTable(String tableName) {
+		return getJoinTable().getDbTable();
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return !StringTools.stringsAreEqual(getTableName(), tableName);
+	}
+
+	public String getColumnTableNotValidDescription() {
+		return JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE;
+	}
+
+	public String getJoinTableDefaultName() {
+		return MappingTools.buildJoinTableDefaultName(this.getRelationshipReference());
+	}
+	
+	public void addStrategy() {
+		if (this.joinTable == null) {
+			XmlJoinTable resourceJoinTable = OrmFactory.eINSTANCE.createXmlJoinTable();
+			this.joinTable = getXmlContextNodeFactory().buildOrmJoinTable(this, resourceJoinTable);
+			setResourceJoinTable(resourceJoinTable);
+			this.firePropertyChanged(JOIN_TABLE_PROPERTY, null, this.joinTable);
+		}
+	}
+	
+	public void removeStrategy() {
+		if (this.joinTable != null) {
+			OrmJoinTable oldJoinTable = this.joinTable;
+			this.joinTable = null;
+			removeResourceJoinTable();
+			this.firePropertyChanged(JOIN_TABLE_PROPERTY, oldJoinTable, null);
+		}
+	}
+	
+	protected abstract void setResourceJoinTable(XmlJoinTable resourceJoinTable);
+
+	
+	// **************** join table *********************************************
+	
+	public OrmJoinTable getJoinTable() {
+		return this.joinTable;
+	}
+	
+	public OrmJoinTable addJoinTable() {
+		addStrategy();
+		return this.joinTable;
+	}
+	
+	protected void setJoinTable_(OrmJoinTable newJoinTable) {
+		OrmJoinTable oldJoinTable = this.joinTable;
+		this.joinTable = newJoinTable;
+		this.firePropertyChanged(JOIN_TABLE_PROPERTY, oldJoinTable, newJoinTable);
+	}
+	
+	public XmlJoinTable addResourceJoinTable() {
+		XmlJoinTable resourceJoinTable = OrmFactory.eINSTANCE.createXmlJoinTable();
+		setResourceJoinTable(resourceJoinTable);
+		return resourceJoinTable;
+	}
+	
+	protected boolean mayHaveJoinTable() {
+		return getResourceJoinTable() != null 
+			|| getRelationshipReference().mayHaveDefaultJoinTable();
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	protected void initialize() {
+		if (mayHaveJoinTable()) {
+			this.joinTable = getXmlContextNodeFactory().buildOrmJoinTable(this, getResourceJoinTable());
+		}
+	}
+	
+	public void update() {
+		if (mayHaveJoinTable()) {
+			if (this.joinTable == null) {
+				setJoinTable_(getXmlContextNodeFactory().buildOrmJoinTable(this, getResourceJoinTable()));
+			}
+			this.joinTable.update();
+		}
+		else {
+			if (this.joinTable != null) {
+				// no resource, so no clean up
+				setJoinTable_(null);
+			}
+		}
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		if (this.joinTable != null) {
+			this.joinTable.validate(messages, reporter);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToManyMapping.java
new file mode 100644
index 0000000..51be06c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToManyMapping.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmManyToManyRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToManyMapping2_0;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+
+public abstract class AbstractOrmManyToManyMapping<T extends XmlManyToMany> 
+	extends AbstractOrmMultiRelationshipMapping<T>
+	implements OrmManyToManyMapping2_0
+{
+	protected AbstractOrmManyToManyMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	
+	@Override
+	protected OrmRelationshipReference buildRelationshipReference() {
+		return new GenericOrmManyToManyRelationshipReference(this, this.resourceAttributeMapping);
+	}
+	
+	public int getXmlSequence() {
+		return 70;
+	}
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmManyToManyMapping(this);
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getManyToManys().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getManyToManys().remove(this.resourceAttributeMapping);
+	}
+	
+	@Override
+	public OrmManyToManyRelationshipReference getRelationshipReference() {
+		return (OrmManyToManyRelationshipReference) super.getRelationshipReference();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToOneMapping.java
new file mode 100644
index 0000000..086df36
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToOneMapping.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+
+public abstract class AbstractOrmManyToOneMapping<T extends XmlManyToOne>
+	extends AbstractOrmSingleRelationshipMapping<T>
+	implements OrmManyToOneMapping2_0
+{
+	protected AbstractOrmManyToOneMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	
+	public int getXmlSequence() {
+		return 40;
+	}
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmManyToOneMapping(this);
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getManyToOnes().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getManyToOnes().remove(this.resourceAttributeMapping);
+	}
+	
+	@Override
+	public OrmManyToOneRelationshipReference2_0 getRelationshipReference() {
+		return (OrmManyToOneRelationshipReference2_0) super.getRelationshipReference();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToOneRelationshipReference.java
new file mode 100644
index 0000000..b4cd104
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmManyToOneRelationshipReference.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmManyToOneRelationshipReference
+	extends AbstractOrmRelationshipReference
+	implements OrmManyToOneRelationshipReference2_0
+{
+	protected OrmJoinColumnJoiningStrategy joinColumnJoiningStrategy;
+	
+	protected OrmJoinTableJoiningStrategy joinTableJoiningStrategy;
+	
+	protected AbstractOrmManyToOneRelationshipReference(
+			OrmManyToOneMapping parent, XmlManyToOne resource) {
+		super(parent, resource);
+	}
+	
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();
+	}
+	
+	protected OrmJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericOrmJoinColumnJoiningStrategy(this, getResourceMapping());
+	}
+	
+	protected abstract OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy();
+	
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		newRelationshipReference.initializeFromJoinColumnEnabledRelationshipReference(this);
+	}
+	
+	@Override
+	public void initializeFromJoinColumnEnabledRelationshipReference(
+			OrmJoinColumnEnabledRelationshipReference oldRelationshipReference) {
+		int index = 0;
+		for (JoinColumn joinColumn : 
+				CollectionTools.iterable(
+					oldRelationshipReference.getJoinColumnJoiningStrategy().specifiedJoinColumns())) {
+			OrmJoinColumn newJoinColumn = getJoinColumnJoiningStrategy().addSpecifiedJoinColumn(index++);
+			newJoinColumn.initializeFrom(joinColumn);
+		}
+	}
+	
+	@Override
+	public OrmManyToOneMapping getRelationshipMapping() {
+		return (OrmManyToOneMapping) getParent();
+	}
+	
+	public XmlManyToOne getResourceMapping() {
+		return getRelationshipMapping().getResourceAttributeMapping();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return true;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return false;
+	}
+	
+	
+	// **************** join columns *******************************************
+	
+	public OrmJoinColumnJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+	
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+	
+	public void setJoinColumnJoiningStrategy() {
+		this.joinTableJoiningStrategy.removeStrategy();
+		// join columns are default (only strategy in fact) so no need to add to resource
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinColumn() {
+		return this.getJoinTableJoiningStrategy().getJoinTable() == null;
+	}
+
+	// **************** join table *********************************************
+	
+	public OrmJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public final void setJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.addStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public final void unsetJoinTableJoiningStrategy() {
+		unsetJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetJoinTableJoiningStrategy_() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return false;
+	}
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.joinTableJoiningStrategy.update();
+		this.joinColumnJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.joinColumnJoiningStrategy.validate(messages, reporter);
+		this.joinTableJoiningStrategy.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMappedSuperclass.java
new file mode 100644
index 0000000..bd30ea7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMappedSuperclass.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+import org.eclipse.jpt.core.context.java.JavaMappedSuperclass;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmIdClassReference;
+import org.eclipse.jpt.core.context.orm.OrmMappedSuperclass;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmMappedSuperclass extends AbstractOrmTypeMapping<XmlMappedSuperclass>
+	implements OrmMappedSuperclass
+{
+	protected final OrmIdClassReference idClassReference;
+	
+	
+	protected AbstractOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping) {
+		super(parent, resourceMapping);
+		this.idClassReference = buildIdClassReference();
+	}
+	
+	
+	protected OrmIdClassReference buildIdClassReference() {
+		return new GenericOrmIdClassReference(this, getJavaIdClassReferenceForDefaults());
+	}
+	
+	public int getXmlSequence() {
+		return 0;
+	}
+	
+	public String getKey() {
+		return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
+	}
+	
+	@Override
+	public JavaPersistentType getIdClass() {
+		return this.idClassReference.getIdClass();
+	}
+	
+	
+	// **************** id class **********************************************
+	
+	public OrmIdClassReference getIdClassReference() {
+		return this.idClassReference;
+	}
+	
+	
+	// ************************************************************************
+	
+	public JavaMappedSuperclass getJavaMappedSuperclass() {
+		JavaPersistentType javaPersistentType = this.getJavaPersistentType();
+		if (javaPersistentType != null && javaPersistentType.getMappingKey() == MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY) {
+			return (JavaMappedSuperclass) javaPersistentType.getMapping();
+		}
+		return null;
+	}
+
+	/**
+	 * This checks metaDataComplete before returning the JavaMappedSuperclass.
+	 * As far as defaults are concerned, if metadataComplete is true, the JavaMappedSuperclass is ignored.
+	 */
+	protected JavaMappedSuperclass getJavaMappedSuperclassForDefaults() {
+		if (isMetadataComplete()) {
+			return null;
+		}
+		return getJavaMappedSuperclass();
+	}
+	
+	protected JavaIdClassReference getJavaIdClassReferenceForDefaults() {
+		JavaMappedSuperclass javaMappedSuperclass = getJavaMappedSuperclassForDefaults();
+		return (javaMappedSuperclass == null) ? null : javaMappedSuperclass.getIdClassReference();
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return false;
+	}
+	
+	@Override
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+	
+	public Iterator<String> associatedTableNamesIncludingInherited() {
+		return EmptyIterator.instance();
+	}
+
+	public Iterator<Table> associatedTables() {
+		return EmptyIterator.instance();
+	}
+
+	public Iterator<Table> associatedTablesIncludingInherited() {
+		return EmptyIterator.instance();
+	}
+
+	public void addToResourceModel(XmlEntityMappings entityMappings) {
+		entityMappings.getMappedSuperclasses().add(this.resourceTypeMapping);
+	}
+	
+	public void removeFromResourceModel(XmlEntityMappings entityMappings) {
+		entityMappings.getMappedSuperclasses().remove(this.resourceTypeMapping);
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.idClassReference.update(getJavaIdClassReferenceForDefaults());
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		validatePrimaryKey(messages, reporter);
+	}
+	
+	protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
+		buildPrimaryKeyValidator().validate(messages, reporter);
+	}
+	
+	protected PrimaryKeyValidator buildPrimaryKeyValidator() {
+		return new GenericMappedSuperclassPrimaryKeyValidator(this, buildTextRangeResolver());
+		// TODO - JPA 2.0 validation
+	}
+	
+	protected PrimaryKeyTextRangeResolver buildTextRangeResolver() {
+		return new OrmMappedSuperclassTextRangeResolver(this);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
new file mode 100644
index 0000000..e460f4a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
@@ -0,0 +1,869 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.CollectionMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmMultiRelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmOrderable;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmPersistentAttribute2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * ORM multi-relationship (m:m, 1:m) mapping
+ */
+public abstract class AbstractOrmMultiRelationshipMapping<T extends AbstractXmlMultiRelationshipMapping>
+	extends AbstractOrmRelationshipMapping<T>
+	implements OrmMultiRelationshipMapping, OrmCollectionMapping2_0
+{
+	protected final OrmOrderable orderable;
+		
+	protected String specifiedMapKey;
+	protected boolean noMapKey = false;
+	protected boolean pkMapKey = false;
+	protected boolean customMapKey = false;
+	
+	protected String specifiedMapKeyClass;
+	protected String defaultMapKeyClass;
+	protected PersistentType resolvedMapKeyType;
+	protected Embeddable resolvedMapKeyEmbeddable;
+	protected Entity resolvedMapKeyEntity;
+
+	protected Embeddable resolvedTargetEmbeddable;
+
+	protected Type valueType;
+	protected Type keyType;
+
+	protected final OrmColumn mapKeyColumn;
+
+	protected final OrmAttributeOverrideContainer mapKeyAttributeOverrideContainer;
+
+	protected AbstractOrmMultiRelationshipMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.orderable = this.buildOrderable();
+		this.resolvedTargetEmbeddable = this.resolveTargetEmbeddable();
+		this.valueType = this.buildValueType();
+		this.resolvedMapKeyType = this.resolveMapKeyType();
+		this.resolvedMapKeyEmbeddable = this.resolveMapKeyEmbeddable();
+		this.resolvedMapKeyEntity = this.resolveMapKeyEntity();
+		this.initializeMapKey();
+		this.defaultMapKeyClass = this.buildDefaultMapKeyClass();
+		this.specifiedMapKeyClass = this.getResourceMapKeyClass();
+		this.mapKeyColumn = getXmlContextNodeFactory().buildOrmColumn(this, this.buildMapKeyColumnOwner());
+		this.mapKeyAttributeOverrideContainer = buildMapKeyAttributeOverrideContainer();
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.orderable.update();
+		this.resolvedTargetEmbeddable = this.resolveTargetEmbeddable();
+		this.updateValueType();
+		this.setSpecifiedMapKeyClass_(this.getResourceMapKeyClass());
+		this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
+		this.resolvedMapKeyType = this.resolveMapKeyType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.setResolvedMapKeyEmbeddable(this.resolveMapKeyEmbeddable());
+		this.setResolvedMapKeyEntity(this.resolveMapKeyEntity());
+		this.updateKeyType();
+		this.updateMapKey();
+		this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
+		this.setSpecifiedMapKeyClass_(this.getResourceMapKeyClass());
+		this.mapKeyColumn.update(getResourceMapKeyColumn());
+		this.mapKeyColumn.update(getResourceMapKeyColumn());
+		this.mapKeyAttributeOverrideContainer.update();
+}
+	
+	@Override
+	protected String getResourceDefaultTargetEntity() {
+		return this.getJavaPersistentAttribute().getMultiReferenceTargetTypeName();
+	}
+	
+	public FetchType getDefaultFetch() {
+		return CollectionMapping.DEFAULT_FETCH_TYPE;
+	}
+	
+	// **************** order by ***********************************************
+
+	protected OrmOrderable buildOrderable() {
+		return this.isJpa2_0Compatible() ? 
+			this.getXmlContextNodeFactory().buildOrmOrderable(this, this.buildOrderableOwner()) : 
+			this.getXmlContextNodeFactory().buildOrmOrderable(this, new Orderable.Owner() {/*nothing*/});
+	}
+
+	public OrmOrderable getOrderable() {
+		return this.orderable;
+	}
+
+	protected Orderable2_0.Owner buildOrderableOwner() {
+		return new Orderable2_0.Owner() {
+			public String getTableName() {
+				return getRelationshipReference().getPredominantJoiningStrategy().getTableName();
+			}
+			public Table getDbTable(String tableName) {
+				return getRelationshipReference().getPredominantJoiningStrategy().getDbTable(tableName);
+			}
+		};
+	}
+
+	// ********** CollectionMapping implementation **********  
+
+	protected Embeddable resolveTargetEmbeddable() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	public Embeddable getResolvedMapKeyEmbeddable() {
+		return this.resolvedMapKeyEmbeddable;
+	}
+
+	protected void setResolvedMapKeyEmbeddable(Embeddable embeddable) {
+		Embeddable old = this.resolvedMapKeyEmbeddable;
+		this.resolvedMapKeyEmbeddable = embeddable;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_EMBEDDABLE_PROPERTY, old, embeddable);
+	}
+
+	public Entity getResolvedMapKeyEntity() {
+		return this.resolvedMapKeyEntity;
+	}
+
+	protected void setResolvedMapKeyEntity(Entity entity) {
+		Entity old = this.resolvedMapKeyEntity;
+		this.resolvedMapKeyEntity = entity;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_ENTITY_PROPERTY, old, entity);
+	}
+
+	public PersistentType getResolvedMapKeyType() {
+		return getResolvedMapKeyEmbeddable() == null ? null : getResolvedMapKeyEmbeddable().getPersistentType();
+	}
+	
+	protected PersistentType resolveMapKeyType() {
+		return this.resolvePersistentType(this.getMapKeyClass());
+	}
+
+	protected Embeddable resolveMapKeyEmbeddable() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	protected Entity resolveMapKeyEntity() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+	// **************** value type ************************************************
+
+	public Type getValueType() {
+		return this.valueType;
+	}
+
+	protected void setValueType(Type newValueType) {
+		Type old = this.valueType;
+		this.valueType = newValueType;
+		firePropertyChanged(VALUE_TYPE_PROPERTY, old, newValueType);
+	}
+
+	protected Type buildValueType() {
+		if (this.getResolvedTargetEntity() != null) {
+			return Type.ENTITY_TYPE;
+		}
+		else if (this.resolvedTargetEmbeddable != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		else if (getTargetEntity() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	protected void initializeValueType() {
+		this.valueType = this.buildValueType();
+	}
+
+	protected void updateValueType() {
+		this.setValueType(this.buildValueType()); 
+	}
+
+	// **************** key type ************************************************
+	
+	public Type getKeyType() {
+		return this.keyType;
+	}
+
+	protected void setKeyType(Type newKeyType) {
+		Type old = this.keyType;
+		this.keyType = newKeyType;
+		firePropertyChanged(KEY_TYPE_PROPERTY, old, newKeyType);
+	}
+
+	protected Type buildKeyType() {
+		if (getResolvedMapKeyEmbeddable() != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		if (getResolvedMapKeyEntity() != null) {
+			return Type.ENTITY_TYPE; 
+		}
+		else if (getMapKeyClass() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	protected void initializeKeyType() {
+		this.keyType = this.buildKeyType();
+	}
+
+	protected void updateKeyType() {
+		this.setKeyType(this.buildKeyType());
+	}
+
+	// **************** map key ************************************************
+	
+	public String getMapKey() {
+		if (this.noMapKey) {
+			return null;
+		}
+		if (this.pkMapKey) {
+			return this.getTargetEntityIdAttributeName();
+		}
+		if (this.customMapKey) {
+			return this.specifiedMapKey;
+		}
+		throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
+	}
+	
+	public String getSpecifiedMapKey() {
+		return this.specifiedMapKey;
+	}
+
+	public void setSpecifiedMapKey(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		if (this.attributeValueHasChanged(old, mapKey)) {
+			MapKey xmlMapKey = this.getXmlMapKey();
+			if (mapKey == null) {
+				if (xmlMapKey != null) {
+					this.removeXmlMapKey();
+				}
+			} else {
+				if (xmlMapKey == null) {
+					xmlMapKey = this.addXmlMapKey();
+				}
+				xmlMapKey.setName(mapKey);
+			}
+		}
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+	
+	protected void setSpecifiedMapKey_(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+	
+	protected void initializeMapKey() {
+		MapKey xmlMapKey = this.getXmlMapKey();
+		if (xmlMapKey == null) { 
+			this.noMapKey = true;
+		} else {
+			this.specifiedMapKey = xmlMapKey.getName();
+			if (this.specifiedMapKey == null) {
+				this.pkMapKey = true;
+			} else {
+				this.customMapKey = true;
+			}
+		}
+	}
+	
+	protected void updateMapKey() {
+		MapKey xmlMapKey = this.getXmlMapKey();
+		if (xmlMapKey == null) {
+			this.setSpecifiedMapKey_(null);
+			this.setNoMapKey_(true);
+			this.setPkMapKey_(false);
+			this.setCustomMapKey_(false);
+		} else {
+			String mk = xmlMapKey.getName();
+			this.setSpecifiedMapKey_(mk);
+			this.setNoMapKey_(false);
+			this.setPkMapKey_(mk == null);
+			this.setCustomMapKey_(mk != null);
+		}
+	}
+	
+	protected MapKey getXmlMapKey() {
+		return this.resourceAttributeMapping.getMapKey();
+	}
+	
+	protected MapKey addXmlMapKey() {
+		MapKey mapKey = OrmFactory.eINSTANCE.createMapKey();
+		this.resourceAttributeMapping.setMapKey(mapKey);
+		return mapKey;
+	}
+
+	protected void removeXmlMapKey() {
+		this.resourceAttributeMapping.setMapKey(null);
+	}
+	
+	public Iterator<String> candidateMapKeyNames() {
+		return this.allTargetEntityAttributeNames();
+	}
+	
+	
+	// **************** no map key ***********************************************
+		
+	public boolean isNoMapKey() {
+		return this.noMapKey;
+	}
+
+	public void setNoMapKey(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		if (noMapKey) {
+			if (this.getXmlMapKey() != null) {
+				this.removeXmlMapKey();
+			}
+		}
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);			
+	}
+	
+	protected void setNoMapKey_(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);			
+	}
+	
+	
+	// **************** pk map key ***********************************************
+		
+	public boolean isPkMapKey() {
+		return this.pkMapKey;
+	}
+	
+	public void setPkMapKey(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		MapKey xmlMapKey = this.getXmlMapKey();
+		if (pkMapKey) {
+			if (xmlMapKey == null) {
+				this.addXmlMapKey();
+			} else {
+				xmlMapKey.setName(null);
+			}
+		}
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);	
+	}
+	
+	protected void setPkMapKey_(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);	
+	}
+	
+	
+	// **************** custom map key ***********************************************
+		
+	public boolean isCustomMapKey() {
+		return this.customMapKey;
+	}
+
+	public void setCustomMapKey(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		if (customMapKey) {
+			this.setSpecifiedMapKey(""); //$NON-NLS-1$
+		}
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+	
+	protected void setCustomMapKey_(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+	
+
+	// **************** map key class ******************************************
+
+	public char getMapKeyClassEnclosingTypeSeparator() {
+		return '$';
+	}
+	
+	public String getMapKeyClass() {
+		return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
+	}
+
+	public String getSpecifiedMapKeyClass() {
+		return this.specifiedMapKeyClass;
+	}
+
+	public void setSpecifiedMapKeyClass(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		if (this.attributeValueHasChanged(old, mapKeyClass)) {
+			XmlClassReference xmlMapKeyClass = this.getXmlMapKeyClass();
+			if (mapKeyClass == null) {
+				if (xmlMapKeyClass != null) {
+					this.removeXmlMapKeyClass();
+				}
+			} else {
+				if (xmlMapKeyClass == null) {
+					xmlMapKeyClass = this.addXmlMapKeyClass();
+				}
+				xmlMapKeyClass.setClassName(mapKeyClass);
+			}
+		}
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected void setSpecifiedMapKeyClass_(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+	
+	protected XmlClassReference getXmlMapKeyClass() {
+		return this.resourceAttributeMapping.getMapKeyClass();
+	}
+	
+	protected XmlClassReference addXmlMapKeyClass() {
+		XmlClassReference mapKeyClass = OrmFactory.eINSTANCE.createXmlClassReference();
+		this.resourceAttributeMapping.setMapKeyClass(mapKeyClass);
+		return mapKeyClass;
+	}
+
+	protected void removeXmlMapKeyClass() {
+		this.resourceAttributeMapping.setMapKeyClass(null);
+	}
+
+	public String getDefaultMapKeyClass() {
+		return this.defaultMapKeyClass;
+	}
+
+	protected void setDefaultMapKeyClass(String mapKeyClass) {
+		String old = this.defaultMapKeyClass;
+		this.defaultMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String getResourceMapKeyClass() {
+		XmlClassReference mapKeyClass = this.resourceAttributeMapping.getMapKeyClass();
+		return mapKeyClass == null ? null : mapKeyClass.getClassName();
+	}
+	
+	protected String buildDefaultMapKeyClass() {
+		if (this.getJavaPersistentAttribute() != null) {
+			return this.getJavaPersistentAttribute().getMultiReferenceMapKeyTypeName();
+		}
+		return null;
+	}
+
+	// ************** value column ********************************************
+
+	public OrmColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+
+	protected XmlColumn getResourceMapKeyColumn() {
+		return this.resourceAttributeMapping.getMapKeyColumn();
+	}
+
+	protected OrmColumn.Owner buildMapKeyColumnOwner() {
+		return new MapKeyColumnOwner();
+	}
+
+	public OrmAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
+		return this.mapKeyAttributeOverrideContainer;
+	}
+
+	protected OrmAttributeOverrideContainer buildMapKeyAttributeOverrideContainer() {
+		return getXmlContextNodeFactory().buildOrmAttributeOverrideContainer(this, new MapKeyAttributeOverrideContainerOwner());
+	}
+
+	protected JavaAttributeOverride getJavaMapKeyAttributeOverrideNamed(String attributeName) {
+		if (getJavaMultiRelationshipMapping() != null) {
+			return getJavaMultiRelationshipMapping().getMapKeyAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+		}
+		return null;
+	}	
+
+	protected JavaCollectionMapping2_0 getJavaMultiRelationshipMapping() {
+		if (this.getJavaPersistentAttribute() == null) {
+			return null;
+		}
+		AttributeMapping javaAttributeMapping = this.getJavaPersistentAttribute().getMapping();
+		if (javaAttributeMapping.getKey() == this.getKey()) {
+			return ((JavaCollectionMapping2_0) javaAttributeMapping);
+		}
+		return null;
+	}
+
+	// ********** metamodel **********  
+
+	@Override
+	protected String getMetamodelFieldTypeName() {
+		return ((OrmPersistentAttribute2_0) getPersistentAttribute()).getMetamodelContainerFieldTypeName();
+	}
+
+	@Override
+	protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
+		this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
+		super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
+	}
+
+	protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
+		String keyTypeName = ((OrmPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldMapKeyTypeName();
+		if (keyTypeName != null) {
+			typeArgumentNames.add(keyTypeName);
+		}
+	}
+
+	public String getMetamodelFieldMapKeyTypeName() {
+		return MappingTools.getMetamodelFieldMapKeyTypeName(this);
+	}
+	
+	
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.orderable.validate(messages, reporter);
+		this.validateMapKey(messages, reporter);
+	}
+
+	public void validateMapKey(List<IMessage> messages, IReporter reporter) {
+		if (getMapKey() != null || getMapKeyAnnotation() != null) {
+			//TODO validate that the map key refers to an existing attribute
+			return;
+		}
+		if (getKeyType() == Type.BASIC_TYPE) {
+			this.getMapKeyColumn().validate(messages, reporter);
+			//validate map key converter
+		}
+		else if (getKeyType() == Type.ENTITY_TYPE) {
+			//validate map key join columns
+		}
+		else if (getKeyType() == Type.EMBEDDABLE_TYPE) {
+			getMapKeyAttributeOverrideContainer().validate(messages, reporter);
+			//validate map key association overrides
+		}
+	}
+	protected MapKeyAnnotation getMapKeyAnnotation() {
+		if (!isVirtual()) {
+			return null;
+		}
+		JavaResourcePersistentAttribute jrpa = getJavaResourcePersistentAttribute();
+		return jrpa == null ? null : (MapKeyAnnotation) jrpa.getAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+
+	protected class MapKeyColumnOwner implements OrmColumn.Owner {
+		public TypeMapping getTypeMapping() {
+			return AbstractOrmMultiRelationshipMapping.this.getTypeMapping();
+		}
+
+		protected OrmJoiningStrategy getPredominantJoiningStrategy() {
+			return getRelationshipReference().getPredominantJoiningStrategy();
+		}
+
+		public String getDefaultTableName() {
+			return getPredominantJoiningStrategy().getTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getPredominantJoiningStrategy().getDbTable(tableName);
+		}
+
+		public String getDefaultColumnName() {
+			return AbstractOrmMultiRelationshipMapping.this.getName() + "_KEY"; //$NON-NLS-1$
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return getRelationshipReference().getPredominantJoiningStrategy().tableNameIsInvalid(tableName);
+		}
+
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		public XmlColumn getResourceColumn() {
+			return AbstractOrmMultiRelationshipMapping.this.resourceAttributeMapping.getMapKeyColumn();
+		}
+
+		public void addResourceColumn() {
+			AbstractOrmMultiRelationshipMapping.this.resourceAttributeMapping.setMapKeyColumn(OrmFactory.eINSTANCE.createXmlColumn());
+		}
+
+		public void removeResourceColumn() {
+			AbstractOrmMultiRelationshipMapping.this.resourceAttributeMapping.setMapKeyColumn(null);
+		}
+
+		public TextRange getValidationTextRange() {
+			return AbstractOrmMultiRelationshipMapping.this.getValidationTextRange();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualTableNotValidMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.MAP_KEY_COLUMN_TABLE_NOT_VALID,
+				new String[] {column.getTable(), column.getName(), getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID,
+				new String[] {getName(), column.getTable(), column.getName(), getPredominantJoiningStrategy().getColumnTableNotValidDescription()},
+				column,
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.MAP_KEY_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME,
+				new String[] {getName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+	}
+
+	protected class MapKeyAttributeOverrideContainerOwner
+		implements OrmAttributeOverrideContainer.Owner
+	{
+		public OrmTypeMapping getTypeMapping() {
+			return AbstractOrmMultiRelationshipMapping.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmMultiRelationshipMapping.this.getResolvedMapKeyEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAttributeNames();
+		}
+		
+		protected JavaAttributeOverride getJavaAttributeOverrideNamed(String attributeName) {
+			return AbstractOrmMultiRelationshipMapping.this.getJavaMapKeyAttributeOverrideNamed(attributeName);
+		}
+		
+		public EList<XmlAttributeOverride> getResourceAttributeOverrides() {
+			return AbstractOrmMultiRelationshipMapping.this.resourceAttributeMapping.getMapKeyAttributeOverrides();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			if (getPersistentAttribute().isVirtual() && !getTypeMapping().isMetadataComplete()) {
+				JavaAttributeOverride javaAttributeOverride = getJavaAttributeOverrideNamed(attributeOverrideName);
+				if (javaAttributeOverride != null && !javaAttributeOverride.isVirtual()) {
+					return javaAttributeOverride.getColumn();
+				}
+			}
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		
+		public XmlColumn buildVirtualXmlColumn(Column overridableColumn, String attributeName, boolean isMetadataComplete) {
+			return new VirtualXmlAttributeOverrideColumn(overridableColumn);
+		}
+		
+		protected OrmJoiningStrategy getPredominantJoiningStrategy() {
+			return getRelationshipReference().getPredominantJoiningStrategy();
+		}
+		
+		public String getDefaultTableName() {
+			return getPredominantJoiningStrategy().getTableName();
+		}
+		
+		public Table getDbTable(String tableName) {
+			return getPredominantJoiningStrategy().getDbTable(tableName);
+		}
+		
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+		
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the collection table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					AbstractOrmMultiRelationshipMapping.this.getName(), 
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					AbstractOrmMultiRelationshipMapping.this.getName(), 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					getPredominantJoiningStrategy().getColumnTableNotValidDescription()}, 
+				column,
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmMultiRelationshipMapping.this.getValidationTextRange();
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmNamedColumn.java
new file mode 100644
index 0000000..cca8d0c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmNamedColumn.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmNamedColumn;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmNamedColumn<T extends AbstractXmlNamedColumn> extends AbstractOrmXmlContextNode
+	implements OrmNamedColumn
+{
+	protected Owner owner;
+	
+	protected String specifiedName;
+	
+	protected String defaultName;
+
+	protected String columnDefinition;
+
+	protected AbstractOrmNamedColumn(XmlContextNode parent, Owner owner) {
+		super(parent);
+		this.owner = owner;
+	}
+
+	@Override
+	public XmlContextNode getParent() {
+		return (XmlContextNode) super.getParent();
+	}
+	
+	public void initializeFrom(NamedColumn oldColumn) {
+		setSpecifiedName(oldColumn.getSpecifiedName());
+		setColumnDefinition(oldColumn.getColumnDefinition());
+	}
+
+	protected abstract T getResourceColumn();
+	
+	protected abstract void removeResourceColumn();
+	
+	protected abstract void addResourceColumn();
+
+	protected void removeResourceColumnIfFeaturesUnset() {
+		if (this.getResourceColumn().isUnset()) {
+			removeResourceColumn();
+		}		
+	}
+	
+	public Owner getOwner() {
+		return this.owner;
+	}
+
+	public String getName() {
+		return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
+	}
+
+	public String getSpecifiedName() {
+		return this.specifiedName;
+	}
+
+	public void setSpecifiedName(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		if (this.attributeValueHasChanged(oldSpecifiedName, newSpecifiedName)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setName(newSpecifiedName);
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedName != null) {
+				addResourceColumn();
+				getResourceColumn().setName(newSpecifiedName);
+			}
+		}
+		firePropertyChanged(SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+	
+	protected void setSpecifiedName_(String newSpecifiedName) {
+		String oldSpecifiedName = this.specifiedName;
+		this.specifiedName = newSpecifiedName;
+		firePropertyChanged(SPECIFIED_NAME_PROPERTY, oldSpecifiedName, newSpecifiedName);
+	}
+
+	public String getDefaultName() {
+		return this.defaultName;
+	}
+
+	protected void setDefaultName(String newDefaultName) {
+		String oldDefaultName = this.defaultName;
+		this.defaultName = newDefaultName;
+		firePropertyChanged(DEFAULT_NAME_PROPERTY, oldDefaultName, newDefaultName);
+	}
+	
+	public String getColumnDefinition() {
+		return this.columnDefinition;
+	}
+	
+	public void setColumnDefinition(String newColumnDefinition) {
+		String oldColumnDefinition = this.columnDefinition;
+		this.columnDefinition = newColumnDefinition;
+		if (this.attributeValueHasChanged(oldColumnDefinition, newColumnDefinition)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setColumnDefinition(newColumnDefinition);
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newColumnDefinition != null) {
+				addResourceColumn();
+				getResourceColumn().setColumnDefinition(newColumnDefinition);
+			}
+		}
+		firePropertyChanged(COLUMN_DEFINITION_PROPERTY, oldColumnDefinition, newColumnDefinition);
+	}
+	
+	protected void setColumnDefinition_(String newColumnDefinition) {
+		String oldColumnDefinition = this.columnDefinition;
+		this.columnDefinition = newColumnDefinition;
+		firePropertyChanged(COLUMN_DEFINITION_PROPERTY, oldColumnDefinition, newColumnDefinition);
+	}
+
+	public Column getDbColumn() {
+		Table table = this.getDbTable();
+		return (table == null) ? null : table.getColumnForIdentifier(getName());
+	}
+
+	public Table getDbTable() {
+		return getOwner().getDbTable(this.getTable());
+	}
+
+	/**
+	 * Return the name of the column's table. This is overridden
+	 * in AbstractOrmBaseColumn where a table can be defined.
+	 */
+	public String getTable() {
+		return this.getOwner().getTypeMapping().getPrimaryTableName();
+	}
+
+	public boolean isResolved() {
+		return getDbColumn() != null;
+	}
+
+	public TextRange getNameTextRange() {
+		if (getResourceColumn() != null) {
+			TextRange textRange = getResourceColumn().getNameTextRange();
+			if (textRange != null) {
+				return textRange;
+			}
+		}
+		return getOwner().getValidationTextRange();
+	}
+
+	public TextRange getValidationTextRange() {
+		TextRange textRange = getResourceColumn().getValidationTextRange();
+		if (textRange != null) {
+			return textRange;
+		}
+		return getOwner().getValidationTextRange();
+	}
+
+	
+	// ******************* initialization from orm xml resource model ********************
+	
+	protected void initialize(T column) {
+		this.specifiedName = this.getResourceColumnName(column);
+		this.defaultName = this.buildDefaultName();
+		this.columnDefinition = this.getResourceColumnDefinition(column);
+	}
+	
+	protected void update(T column) {
+		setSpecifiedName_(this.getResourceColumnName(column));
+		setDefaultName(this.buildDefaultName());
+		setColumnDefinition_(this.getResourceColumnDefinition(column));	
+	}
+
+	protected String getResourceColumnName(T column) {
+		return column == null ? null : column.getName();
+	}
+	
+	protected String getResourceColumnDefinition(T column) {
+		return column == null ? null : column.getColumnDefinition();
+	}
+	
+	/**
+	 * Return the default column name.
+	 */
+	protected String buildDefaultName() {
+		return this.getOwner().getDefaultColumnName();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateName(messages);
+	}
+	
+	protected void validateName(List<IMessage> messages) {
+		Table dbTable = this.getDbTable();
+		if (dbTable != null && ! this.isResolved()) {
+			messages.add(this.getOwner().buildUnresolvedNameMessage(this, this.getNameTextRange()));
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToManyMapping.java
new file mode 100644
index 0000000..e10221d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToManyMapping.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToManyRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+
+
+public abstract class AbstractOrmOneToManyMapping<T extends XmlOneToMany>
+	extends AbstractOrmMultiRelationshipMapping<T>
+	implements OrmOneToManyMapping2_0, OrmOrphanRemovalHolder2_0
+{
+	protected final OrmOrphanRemovable2_0 orphanRemoval;
+
+	// ********** constructor **********
+	protected AbstractOrmOneToManyMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.orphanRemoval = ((OrmXml2_0ContextNodeFactory) getXmlContextNodeFactory()).buildOrmOrphanRemoval(this, resourceMapping);
+	}
+
+	// ********** update **********
+	
+	@Override
+	public void update() {
+		super.update();
+		this.getOrphanRemoval().update();
+	}
+
+	public int getXmlSequence() {
+		return 50;
+	}
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmOneToManyMapping(this);
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getOneToManys().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getOneToManys().remove(this.resourceAttributeMapping);
+	}
+	
+	@Override
+	public OrmOneToManyRelationshipReference2_0 getRelationshipReference() {
+		return (OrmOneToManyRelationshipReference2_0) super.getRelationshipReference();
+	}
+
+	// ********** OrmOrphanRemovalHolder2_0 implementation **********
+
+	public OrmOrphanRemovable2_0 getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToManyRelationshipReference.java
new file mode 100644
index 0000000..9037e77
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToManyRelationshipReference.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmOwnableRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToManyRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmOneToManyRelationshipReference
+	extends AbstractOrmRelationshipReference
+	implements OrmOneToManyRelationshipReference2_0
+{
+	protected OrmMappedByJoiningStrategy mappedByJoiningStrategy;
+
+	protected OrmJoinTableJoiningStrategy joinTableJoiningStrategy;
+
+	protected OrmJoinColumnJoiningStrategy joinColumnJoiningStrategy;
+
+	protected AbstractOrmOneToManyRelationshipReference(
+			OrmOneToManyMapping parent, XmlOneToMany resource) {
+		super(parent, resource);
+	}
+	
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.mappedByJoiningStrategy = buildMappedByJoiningStrategy();
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();		
+		
+		// initialize join table last, as the existence of a default join 
+		// table is dependent on the other mechanisms (mappedBy)
+		// not being specified
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+	}
+	
+	protected OrmMappedByJoiningStrategy buildMappedByJoiningStrategy() {
+		return new GenericOrmMappedByJoiningStrategy(this, getResourceMapping());
+	}
+	
+	protected OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return 	new GenericOrmJoinTableJoiningStrategy(this, getResourceMapping());
+	}
+
+	protected abstract OrmJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy();
+	
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		newRelationshipReference.initializeFromOwnableRelationshipReference(this);
+		newRelationshipReference.initializeFromJoinTableEnabledRelationshipReference(this);
+	}
+	
+	@Override
+	public void initializeFromOwnableRelationshipReference(
+			OrmOwnableRelationshipReference oldRelationshipReference) {
+		super.initializeFromOwnableRelationshipReference(oldRelationshipReference);
+		this.mappedByJoiningStrategy.setMappedByAttribute(
+			oldRelationshipReference.getMappedByJoiningStrategy().getMappedByAttribute());
+	}
+	
+	@Override
+	public void initializeFromJoinTableEnabledRelationshipReference(
+			OrmJoinTableEnabledRelationshipReference oldRelationshipReference) {
+		super.initializeFromJoinTableEnabledRelationshipReference(oldRelationshipReference);
+		OrmJoinTable oldTable = 
+			oldRelationshipReference.getJoinTableJoiningStrategy().getJoinTable();
+		if (oldTable != null) {
+			this.joinTableJoiningStrategy.addJoinTable().initializeFrom(oldTable);
+		}
+	}
+	
+	@Override
+	public OrmOneToManyMapping getRelationshipMapping() {
+		return (OrmOneToManyMapping) getParent();
+	}
+	
+	public XmlOneToMany getResourceMapping() {
+		return getRelationshipMapping().getResourceAttributeMapping();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return this.getMappedByJoiningStrategy().getMappedByAttribute() == null;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return this.mappedByJoiningStrategy.relationshipIsOwnedBy(mapping);
+	}
+	
+	@Override
+	public boolean isTargetForeignKeyRelationship() {
+		return getJoinColumnJoiningStrategy().isTargetForeignKeyRelationship();
+	}
+
+
+	// **************** mapped by **********************************************
+	
+	public OrmMappedByJoiningStrategy getMappedByJoiningStrategy() {
+		return this.mappedByJoiningStrategy;
+	}
+	
+	public final void setMappedByJoiningStrategy() {
+		setMappedByJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void setMappedByJoiningStrategy_() {
+		this.mappedByJoiningStrategy.addStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public final void unsetMappedByJoiningStrategy() {
+		unsetMappedByJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetMappedByJoiningStrategy_() {
+		this.mappedByJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean usesMappedByJoiningStrategy() {
+		return this.getPredominantJoiningStrategy() == this.mappedByJoiningStrategy;
+	}
+	
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return mappedByMapping.getKey() == MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** join table *********************************************
+	
+	public OrmJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public final void setJoinTableJoiningStrategy() {
+		setJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void setJoinTableJoiningStrategy_() {
+		// join table is default, so no need to add to resource
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public final void unsetJoinTableJoiningStrategy() {
+		unsetJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetJoinTableJoiningStrategy_() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return this.mappedByJoiningStrategy.getMappedByAttribute() == null
+			&& ! this.joinColumnJoiningStrategy.hasSpecifiedJoinColumns();
+	}
+
+
+	// **************** join columns *******************************************
+
+	public OrmJoinColumnJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+
+	public void setJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.addStrategy();
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+
+	public boolean mayHaveDefaultJoinColumn() {
+		return false;
+	}
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.mappedByJoiningStrategy.update();
+		this.joinColumnJoiningStrategy.update();
+		
+		// update join table last, as the existence of a default join 
+		// table is dependent on the other mechanisms (mappedBy)
+		// not being specified
+		this.joinTableJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.mappedByJoiningStrategy.validate(messages, reporter);
+		this.joinTableJoiningStrategy.validate(messages, reporter);
+		this.joinColumnJoiningStrategy.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToOneMapping.java
new file mode 100644
index 0000000..277405c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToOneMapping.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+
+public abstract class AbstractOrmOneToOneMapping<T extends XmlOneToOne>
+	extends AbstractOrmSingleRelationshipMapping<T>
+	implements OrmOneToOneMapping2_0, OrmOrphanRemovalHolder2_0
+{
+	protected final OrmOrphanRemovable2_0 orphanRemoval;
+	
+	// ********** constructor **********
+	protected AbstractOrmOneToOneMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.orphanRemoval = ((OrmXml2_0ContextNodeFactory) getXmlContextNodeFactory()).buildOrmOrphanRemoval(this, resourceMapping);
+	}
+
+	// ********** update **********
+	
+	@Override
+	public void update() {
+		super.update();
+		this.getOrphanRemoval().update();
+	}
+	
+	public int getXmlSequence() {
+		return 60;
+	}
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmOneToOneMapping(this);
+	}
+
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getOneToOnes().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getOneToOnes().remove(this.resourceAttributeMapping);
+	}
+	
+	@Override
+	public OrmOneToOneRelationshipReference2_0 getRelationshipReference() {
+		return (OrmOneToOneRelationshipReference2_0) super.getRelationshipReference();
+	}
+
+	// ********** OrmOrphanRemovalHolder2_0 implementation **********
+
+	public OrmOrphanRemovable2_0 getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToOneRelationshipReference.java
new file mode 100644
index 0000000..1363714
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmOneToOneRelationshipReference.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmOwnableRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractOrmOneToOneRelationshipReference
+	extends AbstractOrmRelationshipReference
+	implements OrmOneToOneRelationshipReference2_0
+{
+	protected OrmMappedByJoiningStrategy mappedByJoiningStrategy;
+	
+	protected OrmJoinColumnJoiningStrategy joinColumnJoiningStrategy;
+	
+	protected OrmPrimaryKeyJoinColumnJoiningStrategy primaryKeyJoinColumnJoiningStrategy;
+
+	protected OrmJoinTableJoiningStrategy joinTableJoiningStrategy;
+	
+	
+	protected AbstractOrmOneToOneRelationshipReference(
+			OrmOneToOneMapping parent, XmlOneToOne resource) {
+		super(parent, resource);
+	}
+	
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.mappedByJoiningStrategy = buildMappedByJoiningStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy = buildPrimaryKeyJoinColumnJoiningStrategy();
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+		
+		// initialize join columns last, as the existence of a default join 
+		// column is dependent on the other mechanisms (mappedBy, join table)
+		// not being specified
+		this.joinColumnJoiningStrategy = buildJoinColumnJoiningStrategy();
+	}
+	
+	protected OrmMappedByJoiningStrategy buildMappedByJoiningStrategy() {
+		return new GenericOrmMappedByJoiningStrategy(this, getResourceMapping());
+	}
+	
+	protected OrmJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericOrmJoinColumnJoiningStrategy(this, getResourceMapping());
+	}
+	
+	protected OrmPrimaryKeyJoinColumnJoiningStrategy buildPrimaryKeyJoinColumnJoiningStrategy() {
+		return new GenericOrmPrimaryKeyJoinColumnJoiningStrategy(this, getResourceMapping());
+	}
+	
+	protected abstract OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy();
+	
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		newRelationshipReference.initializeFromOwnableRelationshipReference(this);
+		newRelationshipReference.initializeFromJoinColumnEnabledRelationshipReference(this);
+	// no other primary key reference as of yet, so no initialization based on pk join columns
+	}
+	
+	@Override
+	public void initializeFromOwnableRelationshipReference(
+			OrmOwnableRelationshipReference oldRelationshipReference) {
+		this.mappedByJoiningStrategy.setMappedByAttribute(
+			oldRelationshipReference.getMappedByJoiningStrategy().getMappedByAttribute());
+	}
+	
+	@Override
+	public void initializeFromJoinColumnEnabledRelationshipReference(
+			OrmJoinColumnEnabledRelationshipReference oldRelationshipReference) {
+		int index = 0;
+		for (JoinColumn joinColumn : 
+				CollectionTools.iterable(
+					oldRelationshipReference.getJoinColumnJoiningStrategy().specifiedJoinColumns())) {
+			OrmJoinColumn newJoinColumn = getJoinColumnJoiningStrategy().addSpecifiedJoinColumn(index++);
+			newJoinColumn.initializeFrom(joinColumn);
+		}
+	}
+	
+	@Override
+	public OrmOneToOneMapping getRelationshipMapping() {
+		return (OrmOneToOneMapping) getParent();
+	}
+	
+	public XmlOneToOne getResourceMapping() {
+		return getRelationshipMapping().getResourceAttributeMapping();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return this.mappedByJoiningStrategy.getMappedByAttribute() == null;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return this.mappedByJoiningStrategy.relationshipIsOwnedBy(mapping);
+	}	
+	
+	// **************** mapped by **********************************************
+	
+	public OrmMappedByJoiningStrategy getMappedByJoiningStrategy() {
+		return this.mappedByJoiningStrategy;
+	}
+	
+	public boolean usesMappedByJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.mappedByJoiningStrategy;
+	}
+	
+	public void setMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.addStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return mappedByMapping.getKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** join columns *******************************************
+	
+	public OrmJoinColumnJoiningStrategy getJoinColumnJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+	
+	public boolean usesJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinColumnJoiningStrategy;
+	}
+	
+	public void setJoinColumnJoiningStrategy() {
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		// join columns are default, so no need to add annotations
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetJoinColumnJoiningStrategy() {
+		this.joinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinColumn() {
+		return this.getMappedByJoiningStrategy().getMappedByAttribute() == null 
+			&& this.getPrimaryKeyJoinColumnJoiningStrategy().primaryKeyJoinColumnsSize() == 0
+			&& this.getJoinTableJoiningStrategy().getJoinTable() == null;
+	}
+	
+	
+	// **************** primary key join columns *******************************
+	
+	public OrmPrimaryKeyJoinColumnJoiningStrategy getPrimaryKeyJoinColumnJoiningStrategy() {
+		return this.primaryKeyJoinColumnJoiningStrategy;
+	}
+	
+	public boolean usesPrimaryKeyJoinColumnJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.primaryKeyJoinColumnJoiningStrategy;
+	}
+	
+	public void setPrimaryKeyJoinColumnJoiningStrategy() {
+		this.primaryKeyJoinColumnJoiningStrategy.addStrategy();
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetPrimaryKeyJoinColumnJoiningStrategy() {
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultPrimaryKeyJoinColumn() {
+		return false;
+	}
+
+
+	// **************** join table *********************************************
+	
+	public OrmJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public final void setJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.addStrategy();
+		this.mappedByJoiningStrategy.removeStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+		this.primaryKeyJoinColumnJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public final void unsetJoinTableJoiningStrategy() {
+		unsetJoinTableJoiningStrategy_();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected void unsetJoinTableJoiningStrategy_() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return false;
+	}
+
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.mappedByJoiningStrategy.update();
+		this.primaryKeyJoinColumnJoiningStrategy.update();
+		this.joinTableJoiningStrategy.update();
+		// update join columns last, as the existence of a default join 
+		// column is dependent on the other mechanisms (mappedBy, join table)
+		// not being specified
+		this.joinColumnJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.mappedByJoiningStrategy.validate(messages, reporter);
+		this.primaryKeyJoinColumnJoiningStrategy.validate(messages, reporter);
+		this.joinColumnJoiningStrategy.validate(messages, reporter);
+		this.joinTableJoiningStrategy.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmPersistentAttribute.java
new file mode 100644
index 0000000..fb0eab8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmPersistentAttribute.java
@@ -0,0 +1,316 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.CollectionMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmStructureNodes;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmPersistentAttribute2_0;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * ORM persistent attribute
+ */
+public abstract class AbstractOrmPersistentAttribute
+	extends AbstractOrmXmlContextNode
+	implements OrmPersistentAttribute2_0
+{
+	protected final Owner owner;
+
+	protected OrmAttributeMapping attributeMapping;
+
+	protected JavaPersistentAttribute javaPersistentAttribute;	
+	
+	protected AccessType defaultAccess;
+	
+	protected AbstractOrmPersistentAttribute(OrmPersistentType parent, Owner owner, XmlAttributeMapping resourceMapping) {
+		super(parent);
+		this.owner = owner;
+		this.attributeMapping = buildAttributeMapping(resourceMapping);
+		this.javaPersistentAttribute = findJavaPersistentAttribute();
+		this.defaultAccess = buildDefaultAccess();
+	}
+	
+	public XmlAttributeMapping getResourceAttributeMapping() {
+		return this.attributeMapping.getResourceAttributeMapping();
+	}
+	
+	public JavaPersistentAttribute getJavaPersistentAttribute() {
+		return this.javaPersistentAttribute;
+	}
+	
+	protected void setJavaPersistentAttribute(JavaPersistentAttribute javaPersistentAttribute) {
+		JavaPersistentAttribute old = this.javaPersistentAttribute;
+		this.javaPersistentAttribute = javaPersistentAttribute;
+		this.firePropertyChanged(JAVA_PERSISTENT_ATTRIBUTE_PROPERTY, old, javaPersistentAttribute);
+	}
+
+	protected OrmAttributeMapping buildAttributeMapping(XmlAttributeMapping resourceMapping) {
+		OrmAttributeMappingDefinition mappingDefinition = 
+				getMappingFileDefinition().getOrmAttributeMappingDefinition(resourceMapping.getMappingKey());
+		return mappingDefinition.buildContextMapping(this, resourceMapping, getXmlContextNodeFactory());
+	}
+	
+	public String getId() {
+		return OrmStructureNodes.PERSISTENT_ATTRIBUTE_ID;
+	}
+	
+	public AccessType getAccess() {
+		 return getSpecifiedAccess() != null ? getSpecifiedAccess() : getDefaultAccess();
+	}
+	
+	public AccessType getDefaultAccess() {
+		return this.defaultAccess;
+	}
+
+	protected void setDefaultAccess(AccessType newAccess) {
+		AccessType old = this.defaultAccess;
+		this.defaultAccess = newAccess;
+		firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, this.defaultAccess);
+	}
+	
+	public String getName() {
+		return this.attributeMapping.getName();
+	}
+
+	public void nameChanged(String oldName, String newName) {
+		firePropertyChanged(NAME_PROPERTY, oldName, newName);
+	}
+
+	public OrmAttributeMapping getSpecifiedMapping() {
+		return this.attributeMapping;
+	}
+	
+	public OrmAttributeMapping getMapping() {
+		return this.attributeMapping;
+	}
+
+	public String getMappingKey() {
+		return this.attributeMapping.getKey();
+	}
+
+	public String getDefaultMappingKey() {
+		return null;
+	}
+
+	public void setSpecifiedMappingKey(String newMappingKey) {
+		if (this.valuesAreEqual(this.getMappingKey(), newMappingKey)) {
+			return;
+		}
+		OrmAttributeMapping oldMapping = this.attributeMapping;
+		OrmAttributeMappingDefinition mappingDefinition = 
+				getMappingFileDefinition().getOrmAttributeMappingDefinition(newMappingKey);
+		XmlAttributeMapping resourceAttributeMapping = 
+				mappingDefinition.buildResourceMapping(getResourceNodeFactory());
+		this.attributeMapping = buildAttributeMapping(resourceAttributeMapping);
+		
+		getOwningPersistentType().changeMapping(this, oldMapping, this.attributeMapping);
+		firePropertyChanged(SPECIFIED_MAPPING_PROPERTY, oldMapping, this.attributeMapping);
+	}
+
+	public OrmPersistentType getOwningPersistentType() {
+		return (OrmPersistentType) getParent();
+	}
+
+	public OrmTypeMapping getOwningTypeMapping() {
+		return getOwningPersistentType().getMapping();
+	}
+
+	public boolean isVirtual() {
+		return getOwningPersistentType().containsVirtualAttribute(this);
+	}
+
+	public void makeVirtual() {
+		if (isVirtual()) {
+			throw new IllegalStateException("Attribute is already virtual"); //$NON-NLS-1$
+		}
+		getOwningPersistentType().makeAttributeVirtual(this);
+	}
+	
+	public void makeSpecified() {
+		if (!isVirtual()) {
+			throw new IllegalStateException("Attribute is already specified"); //$NON-NLS-1$
+		}
+		if (getMappingKey() == MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY) {
+			throw new IllegalStateException("Use makeSpecified(String) instead and specify a mapping type"); //$NON-NLS-1$
+		}
+		getOwningPersistentType().makeAttributeSpecified(this);
+	}
+	
+	public void makeSpecified(String mappingKey) {
+		if (!isVirtual()) {
+			throw new IllegalStateException("Attribute is already specified"); //$NON-NLS-1$
+		}
+		getOwningPersistentType().makeAttributeSpecified(this, mappingKey);
+	}
+	
+	public String getPrimaryKeyColumnName() {
+		return this.attributeMapping.getPrimaryKeyColumnName();
+	}
+	
+	public String getTypeName() {
+		JavaPersistentAttribute javaAttribute = getJavaPersistentAttribute();
+		return (javaAttribute == null) ? null : javaAttribute.getTypeName();
+	}
+	
+	public void update() {
+		this.attributeMapping.update();
+		this.setJavaPersistentAttribute(findJavaPersistentAttribute());
+		this.owner.updateJavaPersistentAttribute();
+		this.setDefaultAccess(buildDefaultAccess());
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		getMapping().postUpdate();
+	}
+	
+	protected JavaPersistentAttribute findJavaPersistentAttribute() {
+		return this.owner.findJavaPersistentAttribute(this);
+	}
+	
+	protected AccessType buildDefaultAccess() {
+		return getOwningPersistentType().getAccess();
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public JpaStructureNode getStructureNode(int offset) {
+		return this;
+	}
+
+	public boolean contains(int textOffset) {
+		if (isVirtual()) {
+			return false;
+		}
+		return this.attributeMapping.contains(textOffset);
+	}
+	
+	public TextRange getSelectionTextRange() {
+		if (isVirtual()) {
+			return null;
+		}
+		return this.attributeMapping.getSelectionTextRange();
+	}
+	
+	public void dispose() {
+		//nothing to dispose
+	}
+
+
+	// ********** misc overrides **********
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateAttribute(messages);
+		this.validateModifiers(messages);
+		this.attributeMapping.validate(messages, reporter);
+	}
+	
+	protected void validateAttribute(List<IMessage> messages) {
+		if (this.javaPersistentAttribute == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME,
+					new String[] {this.getName(), this.getOwningPersistentType().getMapping().getClass_()},
+					this.attributeMapping, 
+					this.attributeMapping.getNameTextRange()
+				)
+			);
+		}
+	}
+	
+	protected void validateModifiers(List<IMessage> messages) {
+		if (this.getMappingKey() == MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY) {
+			return;
+		}
+		if (this.javaPersistentAttribute == null) {
+			return;
+		}
+
+		if (this.javaPersistentAttribute.isField()) {
+			if (this.javaPersistentAttribute.isFinal()) {
+				messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_FINAL_FIELD));
+			}
+			if (this.javaPersistentAttribute.isPublic()) {
+				messages.add(this.buildAttributeMessage(JpaValidationMessages.PERSISTENT_ATTRIBUTE_PUBLIC_FIELD));
+			}
+		} else {
+			//TODO validation : need to have a validation message for final methods as well.
+			//From the JPA spec : No methods or persistent instance variables of the entity class may be final.
+		}
+	}
+
+	protected IMessage buildAttributeMessage(String msgID) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			msgID,
+			new String[] {this.getName()},
+			this, 
+			getValidationTextRange()
+		);
+	}
+
+	public TextRange getValidationTextRange() {
+		if (isVirtual()) {
+			return getOwningPersistentType().getMapping().getAttributesTextRange();
+		}
+		return this.attributeMapping.getValidationTextRange();
+	}
+
+
+	// ********** metamodel **********
+	
+	public String getMetamodelContainerFieldTypeName() {
+		return this.getJpaContainer().getMetamodelContainerFieldTypeName();
+	}
+
+	public String getMetamodelContainerFieldMapKeyTypeName() {
+		return this.getJpaContainer().getMetamodelContainerFieldMapKeyTypeName((CollectionMapping) this.getMapping());
+	}
+
+	public String getMetamodelTypeName() {
+		JavaPersistentAttribute2_0 javaAttribute = (JavaPersistentAttribute2_0) this.getJavaPersistentAttribute();
+		return (javaAttribute == null) ? MetamodelField.DEFAULT_TYPE_NAME : javaAttribute.getMetamodelTypeName();
+	}
+
+	protected JavaPersistentAttribute.JpaContainer getJpaContainer() {
+		JavaPersistentAttribute2_0 javaAttribute = (JavaPersistentAttribute2_0) getJavaPersistentAttribute();
+		return javaAttribute == null ? JavaPersistentAttribute.JpaContainer.Null.instance() : javaAttribute.getJpaContainer();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmQuery.java
new file mode 100644
index 0000000..fe9aedf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmQuery.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.QueryHint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaQuery;
+import org.eclipse.jpt.core.context.orm.OrmQuery;
+import org.eclipse.jpt.core.context.orm.OrmQueryHint;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlQuery;
+import org.eclipse.jpt.core.resource.orm.XmlQueryHint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+
+public abstract class AbstractOrmQuery<E extends XmlQuery> extends AbstractOrmXmlContextNode 
+	implements OrmQuery
+{
+
+	protected String name;
+
+	protected String query;
+
+	protected final List<OrmQueryHint> hints;
+
+	protected E resourceQuery;
+	
+	protected AbstractOrmQuery(XmlContextNode parent, E resourceQuery) {
+		super(parent);
+		this.hints = new ArrayList<OrmQueryHint>();
+		this.initialize(resourceQuery);
+	}
+
+	protected E getResourceQuery() {
+		return this.resourceQuery;
+	}
+	
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		this.getResourceQuery().setName(newName);
+		firePropertyChanged(Query.NAME_PROPERTY, oldName, newName);
+	}
+
+	public String getQuery() {
+		return this.query;
+	}
+
+	public void setQuery(String newQuery) {
+		String oldQuery = this.query;
+		this.query = newQuery;
+		this.getResourceQuery().setQuery(newQuery);
+		firePropertyChanged(Query.QUERY_PROPERTY, oldQuery, newQuery);
+	}
+
+	public ListIterator<OrmQueryHint> hints() {
+		return new CloneListIterator<OrmQueryHint>(this.hints);
+	}
+	
+	public int hintsSize() {
+		return this.hints.size();
+	}
+	
+	public OrmQueryHint addHint(int index) {
+		XmlQueryHint resourceQueryHint = OrmFactory.eINSTANCE.createXmlQueryHint();
+		OrmQueryHint contextQueryHint = buildQueryHint(resourceQueryHint);
+		this.hints.add(index, contextQueryHint);
+		this.getResourceQuery().getHints().add(index, resourceQueryHint);
+		this.fireItemAdded(Query.HINTS_LIST, index, contextQueryHint);
+		return contextQueryHint;
+	}
+
+	protected void addHint(int index, OrmQueryHint queryHint) {
+		addItemToList(index, queryHint, this.hints, Query.HINTS_LIST);
+	}
+	
+	protected void addHint(OrmQueryHint queryHint) {
+		this.addHint(this.hints.size(), queryHint);
+	}
+	
+	public void removeHint(QueryHint queryHint) {
+		removeHint(this.hints.indexOf(queryHint));
+	}
+	
+	public void removeHint(int index) {
+		OrmQueryHint queryHint = this.hints.remove(index);
+		this.getResourceQuery().getHints().remove(index);
+		fireItemRemoved(Query.HINTS_LIST, index, queryHint);
+	}
+
+	protected void removeHint_(OrmQueryHint queryHint) {
+		removeItemFromList(queryHint, this.hints, Query.HINTS_LIST);
+	}
+	
+	public void moveHint(int targetIndex, int sourceIndex) {
+		this.getResourceQuery().getHints().move(targetIndex, sourceIndex);
+		moveItemInList(targetIndex, sourceIndex, this.hints, Query.HINTS_LIST);		
+	}
+
+	
+	protected void initialize(E xmlQuery) {
+		this.resourceQuery = xmlQuery;
+		this.name = xmlQuery.getName();
+		this.query = xmlQuery.getQuery();
+		this.initializeHints();
+	}
+	
+	protected void initializeHints() {
+		for (XmlQueryHint resourceQueryHint : this.resourceQuery.getHints()) {
+			this.hints.add(buildQueryHint(resourceQueryHint));
+		}
+	}
+
+	protected OrmQueryHint buildQueryHint(XmlQueryHint resourceQueryHint) {
+		return getXmlContextNodeFactory().buildOrmQueryHint(this, resourceQueryHint);
+	}
+	
+	public void update(E xmlQuery) {
+		this.resourceQuery = xmlQuery;
+		this.setName(xmlQuery.getName());
+		this.setQuery(xmlQuery.getQuery());
+		this.updateHints();
+		getPersistenceUnit().addQuery(this);
+	}
+	
+	protected void updateHints() {
+		// make a copy of the XML hints (to prevent ConcurrentModificationException)
+		Iterator<XmlQueryHint> xmlHints = new CloneIterator<XmlQueryHint>(this.resourceQuery.getHints());
+
+		for (Iterator<OrmQueryHint> contextHints = this.hints(); contextHints.hasNext(); ) {
+			OrmQueryHint contextHint = contextHints.next();
+			if (xmlHints.hasNext()) {
+				contextHint.update(xmlHints.next());
+			}
+			else {
+				removeHint_(contextHint);
+			}
+		}
+		
+		while (xmlHints.hasNext()) {
+			addHint(buildQueryHint(xmlHints.next()));
+		}
+	}
+	
+	public boolean overrides(Query other) {
+		// this isn't ideal, but it will have to do until we have further adopter input
+		return (this.name != null)
+				&& this.name.equals(other.getName())
+				&& (other instanceof JavaQuery);
+	}
+	
+	public boolean duplicates(Query other) {
+		return (this != other)
+				&& ! StringTools.stringIsEmpty(this.name)
+				&& this.name.equals(other.getName())
+				&& ! this.overrides(other)
+				&& ! other.overrides(this);
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.getResourceQuery().getValidationTextRange();
+	}
+	
+	public TextRange getNameTextRange() {
+		return this.getResourceQuery().getNameTextRange();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java
new file mode 100644
index 0000000..975ffef
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipMapping.java
@@ -0,0 +1,356 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmCascade;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCascade2_0;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmRelationshipMapping<T extends AbstractXmlRelationshipMapping>
+	extends AbstractOrmAttributeMapping<T>
+	implements OrmRelationshipMapping
+{
+	protected String specifiedTargetEntity;
+	protected String defaultTargetEntity;
+	protected PersistentType resolvedTargetType;
+	protected Entity resolvedTargetEntity;
+	
+	protected final OrmRelationshipReference relationshipReference;
+	
+	protected final OrmCascade2_0 cascade;
+
+	protected FetchType specifiedFetch;
+	
+	
+	protected AbstractOrmRelationshipMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.relationshipReference = buildRelationshipReference();
+		this.cascade = buildCascade();
+		this.specifiedTargetEntity = getResourceTargetEntity();
+		this.defaultTargetEntity = buildDefaultTargetEntity();
+		this.resolvedTargetType = this.resolveTargetType();
+		this.resolvedTargetEntity = this.resolveTargetEntity();
+		this.specifiedFetch = getResourceFetch();
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.relationshipReference.update();
+		this.cascade.update();
+		this.setSpecifiedTargetEntity_(this.getResourceTargetEntity());
+		this.setDefaultTargetEntity(this.buildDefaultTargetEntity());
+		this.resolvedTargetType = this.resolveTargetType();
+		this.setResolvedTargetEntity(this.resolveTargetEntity());
+		this.setSpecifiedFetch_(this.getResourceFetch());
+	}
+	
+	protected abstract OrmRelationshipReference buildRelationshipReference();
+	
+	@Override
+	public OrmPersistentAttribute getParent() {
+		return (OrmPersistentAttribute) super.getParent();
+	}
+	
+	@Override
+	public boolean isRelationshipOwner() {
+		return this.relationshipReference.isRelationshipOwner();
+	}
+	
+	@Override
+	public boolean isOwnedBy(AttributeMapping mapping) {
+		if (mapping.isRelationshipOwner()) {
+			return this.relationshipReference.isOwnedBy((RelationshipMapping) mapping);
+		}
+		return false;
+	}
+
+	public RelationshipMapping getRelationshipOwner() {
+		Entity targetEntity = this.getResolvedTargetEntity();
+		if (targetEntity == null) {
+			return null;
+		}
+		for (PersistentAttribute each : 
+			CollectionTools.iterable(
+				targetEntity.getPersistentType().allAttributes())) {
+			if (this.isOwnedBy(each.getMapping())) {
+				return (RelationshipMapping) each.getMapping();
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public boolean isOverridableAssociationMapping() {
+		return this.relationshipReference.isOverridableAssociation();
+	}	
+	
+	
+	// **************** target entity ******************************************
+
+	public char getTargetEntityEnclosingTypeSeparator() {
+		return '$';
+	}
+	
+	public String getTargetEntity() {
+		return (this.specifiedTargetEntity != null) ? this.specifiedTargetEntity : this.defaultTargetEntity;
+	}
+
+	public String getSpecifiedTargetEntity() {
+		return this.specifiedTargetEntity;
+	}
+
+	public void setSpecifiedTargetEntity(String targetEntity) {
+		String old = this.specifiedTargetEntity;
+		this.specifiedTargetEntity = targetEntity;
+		this.resourceAttributeMapping.setTargetEntity(targetEntity);
+		this.firePropertyChanged(SPECIFIED_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	protected void setSpecifiedTargetEntity_(String targetEntity) {
+		String old = this.specifiedTargetEntity;
+		this.specifiedTargetEntity = targetEntity;
+		this.firePropertyChanged(SPECIFIED_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	public String getDefaultTargetEntity() {
+		return this.defaultTargetEntity;
+	}
+
+	protected void setDefaultTargetEntity(String targetEntity) {
+		String old = this.defaultTargetEntity;
+		this.defaultTargetEntity = targetEntity;
+		this.firePropertyChanged(DEFAULT_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	public Entity getResolvedTargetEntity() {
+		return this.resolvedTargetEntity;
+	}
+
+	protected void setResolvedTargetEntity(Entity targetEntity) {
+		Entity old = this.resolvedTargetEntity;
+		this.resolvedTargetEntity = targetEntity;
+		this.firePropertyChanged(RESOLVED_TARGET_ENTITY_PROPERTY, old, targetEntity);
+	}
+
+	public PersistentType getResolvedTargetType() {
+		return this.resolvedTargetType;
+	}
+
+	protected PersistentType resolveTargetType() {
+		return this.resolvePersistentType(this.getTargetEntity());
+	}
+
+	protected String getResourceTargetEntity() {
+		return this.resourceAttributeMapping.getTargetEntity();
+	}
+
+	protected String buildDefaultTargetEntity() {
+		if (this.getJavaPersistentAttribute() != null) {
+			return getResourceDefaultTargetEntity();
+		}
+		return null;
+	}
+
+	protected abstract String getResourceDefaultTargetEntity();
+
+	protected Entity resolveTargetEntity() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+
+	// **************** reference **********************************************
+	
+	public OrmRelationshipReference getRelationshipReference() {
+		return this.relationshipReference;
+	}
+	
+	
+	// **************** cascade ************************************************
+	
+	protected OrmCascade2_0 buildCascade() {
+		return new GenericOrmCascade(this, this.resourceAttributeMapping);
+	}
+	
+	public OrmCascade2_0 getCascade() {
+		return this.cascade;
+	}
+	
+	
+	// **************** fetch **************************************************
+
+	public FetchType getFetch() {
+		return (this.specifiedFetch != null) ? this.specifiedFetch : this.getDefaultFetch();
+	}
+
+	public FetchType getSpecifiedFetch() {
+		return this.specifiedFetch;
+	}
+	
+	public void setSpecifiedFetch(FetchType fetch) {
+		FetchType old = this.specifiedFetch;
+		this.specifiedFetch = fetch;
+		this.resourceAttributeMapping.setFetch(FetchType.toOrmResourceModel(fetch));
+		this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
+	}
+
+	protected void setSpecifiedFetch_(FetchType fetch) {
+		FetchType old = this.specifiedFetch;
+		this.specifiedFetch = fetch;
+		this.firePropertyChanged(SPECIFIED_FETCH_PROPERTY, old, fetch);
+	}
+	protected FetchType getResourceFetch() {
+		return FetchType.fromOrmResourceModel(this.resourceAttributeMapping.getFetch());
+	}
+
+
+	// ********** RelationshipMapping implementation **********
+
+	@Override
+	public void initializeFromOrmRelationshipMapping(OrmRelationshipMapping oldMapping) {
+		super.initializeFromOrmRelationshipMapping(oldMapping);
+		setSpecifiedTargetEntity(oldMapping.getSpecifiedTargetEntity());
+		setSpecifiedFetch(oldMapping.getSpecifiedFetch());
+		oldMapping.getRelationshipReference().initializeOn(this.relationshipReference);
+		this.cascade.initializeFrom(oldMapping.getCascade());
+		//TODO should we set the fetch type from a BasicMapping??
+	}
+	
+	public Iterator<String> allTargetEntityAttributeNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.allTargetEntityAttributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+		});
+	}
+
+	public Iterator<AttributeMapping> allTargetEntityAttributeMappings() {
+		return (this.resolvedTargetEntity != null) ?
+				this.resolvedTargetEntity.allAttributeMappings() :
+				EmptyIterator.<AttributeMapping> instance();
+	}
+
+	protected String getTargetEntityIdAttributeName() {
+		PersistentAttribute attribute = this.getTargetEntityIdAttribute();
+		return (attribute == null) ? null : attribute.getName();
+	}
+
+	protected PersistentAttribute getTargetEntityIdAttribute() {
+		return (this.resolvedTargetEntity == null) ? null : this.resolvedTargetEntity.getIdAttribute();
+	}
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		validateTargetEntity(messages);
+		this.relationshipReference.validate(messages, reporter);
+	}
+	
+	protected void validateTargetEntity(List<IMessage> messages) {
+		if (getTargetEntity() == null) {
+			if (getPersistentAttribute().isVirtual()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED,
+						new String[] {this.getName()}, 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+			else { 
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TARGET_ENTITY_NOT_DEFINED,
+						new String[] {this.getName()}, 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+		}
+		else if (getResolvedTargetEntity() == null) {
+			if (getPersistentAttribute().isVirtual()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY,
+						new String[] {this.getName(), getTargetEntity()}, 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+			else {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TARGET_ENTITY_IS_NOT_AN_ENTITY,
+						new String[] {getTargetEntity(), this.getName()}, 
+						this, 
+						this.getTargetEntityTextRange()
+					)
+				);
+			}
+		}
+	}
+	
+	protected TextRange getTextRange(TextRange textRange) {
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
+	}
+
+	protected TextRange getTargetEntityTextRange() {
+		return this.getTextRange(this.getResourceAttributeMapping().getTargetEntityTextRange());
+	}	
+
+
+	// ********** metamodel ********** 
+
+	@Override
+	public String getMetamodelTypeName() {
+		if (this.resolvedTargetType == null) {
+			return MetamodelField.DEFAULT_TYPE_NAME;
+		}
+		String targetTypeName = this.resolvedTargetType.getName();
+		return (targetTypeName != null) ? targetTypeName : MetamodelField.DEFAULT_TYPE_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipReference.java
new file mode 100644
index 0000000..5f52225
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmRelationshipReference.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOwnableRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public abstract class AbstractOrmRelationshipReference 
+	extends AbstractOrmXmlContextNode
+	implements OrmRelationshipReference
+{
+	protected AbstractXmlRelationshipMapping resourceMapping;
+	
+	// cache the strategy for property change notification
+	protected OrmJoiningStrategy cachedPredominantJoiningStrategy;
+	
+	
+	protected AbstractOrmRelationshipReference(
+			OrmRelationshipMapping parent, AbstractXmlRelationshipMapping resourceMapping) {
+		
+		super(parent);
+		this.resourceMapping = resourceMapping;
+		this.initialize();
+	}
+	
+	public void initializeFromOwnableRelationshipReference(
+			OrmOwnableRelationshipReference oldRelationshipReference) {
+		// no op
+	}
+	
+	public void initializeFromJoinColumnEnabledRelationshipReference(
+			OrmJoinColumnEnabledRelationshipReference oldRelationshipReference) {
+		// no op
+	}
+	
+	public void initializeFromJoinTableEnabledRelationshipReference(
+			OrmJoinTableEnabledRelationshipReference oldRelationshipReference) {
+		// no op
+	}
+	
+	public OrmRelationshipMapping getRelationshipMapping() {
+		return (OrmRelationshipMapping) getParent();
+	}
+	
+	public TypeMapping getTypeMapping() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+	
+	public Entity getEntity() {
+		TypeMapping typeMapping = getTypeMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+	
+	public boolean isOverridableAssociation() {
+		return getPredominantJoiningStrategy().isOverridableAssociation();
+	}
+
+	public boolean isParentVirtual() {
+		return getRelationshipMapping().getPersistentAttribute().isVirtual();
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+	
+	
+	// **************** predominant joining strategy ***************************
+	
+	public OrmJoiningStrategy getPredominantJoiningStrategy() {
+		return this.cachedPredominantJoiningStrategy;
+	}
+	
+	protected void setPredominantJoiningStrategy() {
+		setPredominantJoiningStrategy(calculatePredominantJoiningStrategy());
+	}
+	
+	protected void setPredominantJoiningStrategy(OrmJoiningStrategy newJoiningStrategy) {
+		JoiningStrategy oldJoiningStrategy = this.cachedPredominantJoiningStrategy;
+		this.cachedPredominantJoiningStrategy = newJoiningStrategy;
+		firePropertyChanged(PREDOMINANT_JOINING_STRATEGY_PROPERTY, oldJoiningStrategy, newJoiningStrategy);
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	protected void initialize() {
+		initializeJoiningStrategies();
+		this.cachedPredominantJoiningStrategy = calculatePredominantJoiningStrategy();
+	}
+	
+	protected abstract void initializeJoiningStrategies();
+	
+
+	public void update() {
+		updateJoiningStrategies();
+		setPredominantJoiningStrategy();
+	}
+	
+	protected abstract void updateJoiningStrategies();
+	
+	protected abstract OrmJoiningStrategy calculatePredominantJoiningStrategy();
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange() {
+		return getRelationshipMapping().getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSequenceGenerator.java
new file mode 100644
index 0000000..4f3f6df
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSequenceGenerator.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.SequenceGenerator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+
+/**
+ * 
+ */
+public abstract class AbstractOrmSequenceGenerator
+	extends AbstractOrmGenerator<XmlSequenceGenerator>
+	implements OrmSequenceGenerator
+{
+
+	protected String specifiedSequenceName;
+	protected String defaultSequenceName;
+
+
+	protected AbstractOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator) {
+		super(parent);
+		this.initialize(resourceSequenceGenerator);
+	}
+
+
+	@Override
+	public int getDefaultInitialValue() {
+		return SequenceGenerator.DEFAULT_INITIAL_VALUE;
+	}
+
+	// ********** sequence name **********
+
+	public String getSequenceName() {
+		return (this.specifiedSequenceName != null) ? this.specifiedSequenceName : this.defaultSequenceName;
+	}
+
+	public String getSpecifiedSequenceName() {
+		return this.specifiedSequenceName;
+	}
+
+	public void setSpecifiedSequenceName(String specifiedSequenceName) {
+		String old = this.specifiedSequenceName;
+		this.specifiedSequenceName = specifiedSequenceName;
+		this.getResourceGenerator().setSequenceName(specifiedSequenceName);
+		this.firePropertyChanged(SPECIFIED_SEQUENCE_NAME_PROPERTY, old, specifiedSequenceName);
+	}
+	
+	protected void setSpecifiedSequenceName_(String specifiedSequenceName) {
+		String old = this.specifiedSequenceName;
+		this.specifiedSequenceName = specifiedSequenceName;
+		this.firePropertyChanged(SPECIFIED_SEQUENCE_NAME_PROPERTY, old, specifiedSequenceName);
+	}
+
+	public String getDefaultSequenceName() {
+		return this.defaultSequenceName;
+	}
+	
+	protected void setDefaultSequenceName(String defaultSequenceName) {
+		String old = this.defaultSequenceName;
+		this.defaultSequenceName = defaultSequenceName;
+		this.firePropertyChanged(DEFAULT_SEQUENCE_NAME_PROPERTY, old, defaultSequenceName);
+	}
+
+
+	// ********** resource => context **********
+
+	@Override
+	protected void initialize(XmlSequenceGenerator sequenceGenerator) {
+		super.initialize(sequenceGenerator);
+		this.specifiedSequenceName = sequenceGenerator.getSequenceName();
+		//TODO default sequence name
+	}
+	
+	@Override
+	public void update(XmlSequenceGenerator sequenceGenerator) {
+		super.update(sequenceGenerator);
+		this.setSpecifiedSequenceName_(sequenceGenerator.getSequenceName());
+		//TODO default sequence name
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java
new file mode 100644
index 0000000..a424485
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmSingleRelationshipMapping.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.Nullable;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmSingleRelationshipMapping;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmSingleRelationshipMapping<T extends AbstractXmlSingleRelationshipMapping>
+	extends AbstractOrmRelationshipMapping<T>
+	implements OrmSingleRelationshipMapping2_0
+{
+	protected Boolean specifiedOptional;
+	
+	protected final OrmDerivedIdentity2_0 derivedIdentity;
+	
+	
+	protected AbstractOrmSingleRelationshipMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.specifiedOptional = this.getResourceOptional();
+		//TODO defaultOptional
+		this.derivedIdentity = buildDerivedIdentity();
+	}
+	
+	
+	@Override
+	public void initializeFromOrmSingleRelationshipMapping(OrmSingleRelationshipMapping oldMapping) {
+		super.initializeFromOrmSingleRelationshipMapping(oldMapping);
+		getDerivedIdentity().initializeFrom(((OrmSingleRelationshipMapping2_0) oldMapping).getDerivedIdentity());
+	}
+	
+	@Override
+	protected String getResourceDefaultTargetEntity() {
+		return this.getJavaPersistentAttribute().getSingleReferenceTargetTypeName();
+	}
+	
+	public FetchType getDefaultFetch() {
+		return DEFAULT_FETCH_TYPE;
+	}
+	
+	
+	// **************** optional ***********************************************
+
+	public boolean isOptional() {
+		return (this.specifiedOptional != null) ? this.specifiedOptional.booleanValue() : this.isDefaultOptional();
+	}
+	
+	public Boolean getSpecifiedOptional() {
+		return this.specifiedOptional;
+	}
+	
+	public void setSpecifiedOptional(Boolean optional) {
+		Boolean old = this.specifiedOptional;
+		this.specifiedOptional = optional;
+		this.resourceAttributeMapping.setOptional(optional);
+		this.firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, old, optional);
+	}
+	
+	protected void setSpecifiedOptional_(Boolean optional) {
+		Boolean old = this.specifiedOptional;
+		this.specifiedOptional = optional;
+		this.firePropertyChanged(Nullable.SPECIFIED_OPTIONAL_PROPERTY, old, optional);
+	}
+	
+	public boolean isDefaultOptional() {
+		return Nullable.DEFAULT_OPTIONAL;
+	}
+	
+	
+	// ********** 2.0 derived identity **********
+	
+	protected OrmDerivedIdentity2_0 buildDerivedIdentity() {
+		return ((OrmXml2_0ContextNodeFactory) getXmlContextNodeFactory()).
+				buildOrmDerivedIdentity(this, (XmlSingleRelationshipMapping_2_0) this.resourceAttributeMapping);
+	}
+	
+	public OrmDerivedIdentity2_0 getDerivedIdentity() {
+		return this.derivedIdentity;
+	}
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	public void update() {
+		super.update();
+		this.setSpecifiedOptional_(this.getResourceOptional());
+		this.derivedIdentity.update();
+	}
+	
+	protected Boolean getResourceOptional() {
+		return this.resourceAttributeMapping.getOptional();
+	}
+	
+	
+	// **************** validation ************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.derivedIdentity.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java
new file mode 100644
index 0000000..41d1ff0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTable.java
@@ -0,0 +1,475 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.Table;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmUniqueConstraint;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlTable;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.NameTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+/**
+ * 
+ */
+public abstract class AbstractOrmTable
+	extends AbstractOrmXmlContextNode
+	implements Table, UniqueConstraint.Owner
+{
+	protected String specifiedName;
+	protected String defaultName;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+	
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected final List<OrmUniqueConstraint> uniqueConstraints;
+
+
+	// ********** constructor **********
+
+	protected AbstractOrmTable(XmlContextNode parent) {
+		super(parent);
+		this.uniqueConstraints = new ArrayList<OrmUniqueConstraint>();
+	}
+
+
+	// ********** abstract methods **********
+
+	/**
+	 * Return null if no resource table exists.
+	 */
+	protected abstract AbstractXmlTable getResourceTable();
+
+	/**
+	 * Return the added resource table.
+	 */
+	protected abstract AbstractXmlTable addResourceTable();
+
+	protected abstract void removeResourceTable();
+
+	protected abstract String buildDefaultName();
+	
+	protected abstract String buildDefaultSchema();
+	
+	protected abstract String buildDefaultCatalog();
+	
+
+	public boolean isResourceSpecified() {
+		return this.getResourceTable() != null;
+	}
+
+	// ********** name **********
+
+	public String getName() {
+		return (this.specifiedName != null) ? this.specifiedName : this.defaultName;
+	}
+
+	public String getSpecifiedName() {
+		return this.specifiedName;
+	}
+	
+	public void setSpecifiedName(String name) {
+		String old = this.specifiedName;
+		this.specifiedName = name;
+		if (this.attributeValueHasChanged(old, name)) {
+			AbstractXmlTable resourceTable = this.getResourceTable();
+			if (resourceTable == null) {
+				resourceTable = this.addResourceTable();
+			}
+			resourceTable.setName(name);
+			if (resourceTable.isUnset()) {
+				this.removeResourceTable();
+			}
+			this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
+		}
+	}
+	
+	protected void setSpecifiedName_(String name) {
+		String old = this.specifiedName;
+		this.specifiedName = name;
+		this.firePropertyChanged(SPECIFIED_NAME_PROPERTY, old, name);
+	}
+
+	public String getDefaultName() {
+		return this.defaultName;
+	}
+
+	protected void setDefaultName(String name) {
+		String old = this.defaultName;
+		this.defaultName = name;
+		this.firePropertyChanged(DEFAULT_NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** schema **********
+
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		if (this.attributeValueHasChanged(old, schema)) {
+			AbstractXmlTable resourceTable = this.getResourceTable();
+			if (resourceTable == null) {
+				resourceTable = this.addResourceTable();
+			}
+			resourceTable.setSchema(schema);
+			if (resourceTable.isUnset()) {
+				this.removeResourceTable();
+			}
+			this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+		}
+	}
+	
+	protected void setSpecifiedSchema_(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+	
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+
+	// ********** catalog **********
+
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		if (this.attributeValueHasChanged(old, catalog)) {
+			AbstractXmlTable resourceTable = this.getResourceTable();
+			if (resourceTable == null) {
+				resourceTable = this.addResourceTable();
+			}
+			resourceTable.setCatalog(catalog);
+			if (resourceTable.isUnset()) {
+				this.removeResourceTable();
+			}
+			this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+		}
+	}
+
+	protected void setSpecifiedCatalog_(String newSpecifiedCatalog) {
+		String oldSpecifiedCatalog = this.specifiedCatalog;
+		this.specifiedCatalog = newSpecifiedCatalog;
+		firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, oldSpecifiedCatalog, newSpecifiedCatalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String newDefaultCatalog) {
+		String oldDefaultCatalog = this.defaultCatalog;
+		this.defaultCatalog = newDefaultCatalog;
+		firePropertyChanged(DEFAULT_CATALOG_PROPERTY, oldDefaultCatalog, newDefaultCatalog);
+	}
+
+
+	// ********** unique constraints **********
+	
+	public @SuppressWarnings("unchecked") ListIterator<OrmUniqueConstraint> uniqueConstraints() {
+		return new CloneListIterator<OrmUniqueConstraint>(this.uniqueConstraints);
+	}
+
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+	
+	public OrmUniqueConstraint addUniqueConstraint(int index) {
+		XmlUniqueConstraint resourceConstraint = OrmFactory.eINSTANCE.createXmlUniqueConstraint();
+		OrmUniqueConstraint contextConstraint =  this.buildUniqueConstraint(resourceConstraint);
+		this.uniqueConstraints.add(index, contextConstraint);
+		
+		AbstractXmlTable resourceTable = this.getResourceTable();
+		if (resourceTable == null) {
+			resourceTable = this.addResourceTable();
+		}
+		resourceTable.getUniqueConstraints().add(index, resourceConstraint);
+
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, contextConstraint);
+		return contextConstraint;
+	}
+
+	protected void addUniqueConstraint(int index, OrmUniqueConstraint uniqueConstraint) {
+		this.addItemToList(index, uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+	
+	protected void addUniqueConstraint(OrmUniqueConstraint uniqueConstraint) {
+		this.addUniqueConstraint(this.uniqueConstraints.size(), uniqueConstraint);
+	}
+	
+	public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
+		this.removeUniqueConstraint(this.uniqueConstraints.indexOf(uniqueConstraint));
+	}
+	
+	public void removeUniqueConstraint(int index) {
+		OrmUniqueConstraint removedUniqueConstraint = this.uniqueConstraints.remove(index);
+		this.getResourceTable().getUniqueConstraints().remove(index);
+		this.fireItemRemoved(UNIQUE_CONSTRAINTS_LIST, index, removedUniqueConstraint);
+	}
+	
+	protected void removeUniqueConstraint_(OrmUniqueConstraint uniqueConstraint) {
+		this.removeItemFromList(uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.uniqueConstraints, targetIndex, sourceIndex);
+		this.getResourceTable().getUniqueConstraints().move(targetIndex, sourceIndex);
+		this.fireItemMoved(UNIQUE_CONSTRAINTS_LIST, targetIndex, sourceIndex);		
+	}
+	
+
+	// ********** convenience methods **********
+
+	protected TextRange getTextRange(TextRange textRange) {
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
+	}
+
+	protected TextRange getNameTextRange() {
+		return this.getTextRange(this.getResourceTableNameTextRange());
+	}
+
+	protected TextRange getResourceTableNameTextRange() {
+		AbstractXmlTable resourceTable = this.getResourceTable();
+		return (resourceTable == null) ? null : resourceTable.getNameTextRange();
+	}
+
+	protected TextRange getSchemaTextRange() {
+		return this.getTextRange(this.getResourceTableSchemaTextRange());
+	}
+
+	protected TextRange getResourceTableSchemaTextRange() {
+		AbstractXmlTable resourceTable = this.getResourceTable();
+		return (resourceTable == null) ? null : resourceTable.getSchemaTextRange();
+	}
+
+	protected TextRange getCatalogTextRange() {
+		return this.getTextRange(this.getResourceTableCatalogTextRange());
+	}
+
+	protected TextRange getResourceTableCatalogTextRange() {
+		AbstractXmlTable resourceTable = this.getResourceTable();
+		return (resourceTable == null) ? null : resourceTable.getCatalogTextRange();
+	}
+
+	protected OrmUniqueConstraint buildUniqueConstraint(XmlUniqueConstraint resourceUniqueConstraint) {
+		return this.getXmlContextNodeFactory().buildOrmUniqueConstraint(this, this, resourceUniqueConstraint);
+	}
+
+
+	// ********** resource => context **********
+
+	protected void initialize(AbstractXmlTable xmlTable) {
+		this.defaultName = this.buildDefaultName();
+		this.specifiedName = this.getResourceTableName(xmlTable);
+
+		this.defaultSchema = this.buildDefaultSchema();
+		this.specifiedSchema = this.getResourceTableSchema(xmlTable);
+
+		this.defaultCatalog = this.buildDefaultCatalog();
+		this.specifiedCatalog = this.getResourceTableCatalog(xmlTable);
+
+		this.initializeUniqueContraints(xmlTable);
+	}
+	
+	protected void initializeUniqueContraints(AbstractXmlTable xmlTable) {
+		if (xmlTable == null) {
+			return;
+		}
+		for (XmlUniqueConstraint uniqueConstraint : xmlTable.getUniqueConstraints()) {
+			this.uniqueConstraints.add(this.buildUniqueConstraint(uniqueConstraint));
+		}
+	}
+
+	protected void update(AbstractXmlTable xmlTable) {
+		this.setDefaultName(this.buildDefaultName());
+		this.setSpecifiedName_(this.getResourceTableName(xmlTable));
+
+		this.setDefaultSchema(this.buildDefaultSchema());
+		this.setSpecifiedSchema_(this.getResourceTableSchema(xmlTable));
+
+		this.setDefaultCatalog(this.buildDefaultCatalog());
+		this.setSpecifiedCatalog_(this.getResourceTableCatalog(xmlTable));
+
+		this.updateUniqueConstraints(xmlTable);
+	}
+
+	protected String getResourceTableName(AbstractXmlTable xmlTable) {
+		return (xmlTable == null) ? null : xmlTable.getName();
+	}
+
+	protected String getResourceTableSchema(AbstractXmlTable xmlTable) {
+		return (xmlTable == null) ? null : xmlTable.getSchema();
+	}
+
+	protected String getResourceTableCatalog(AbstractXmlTable xmlTable) {
+		return (xmlTable == null) ? null : xmlTable.getCatalog();
+	}
+
+	protected void updateUniqueConstraints(AbstractXmlTable xmlTable) {
+		Iterator<XmlUniqueConstraint> xmlConstraints = this.xmlUniqueConstraints(xmlTable);
+
+		for (Iterator<OrmUniqueConstraint> contextConstraints = this.uniqueConstraints(); contextConstraints.hasNext(); ) {
+			OrmUniqueConstraint contextConstraint = contextConstraints.next();
+			if (xmlConstraints.hasNext()) {
+				contextConstraint.update(xmlConstraints.next());
+			} else {
+				this.removeUniqueConstraint_(contextConstraint);
+			}
+		}
+		
+		while (xmlConstraints.hasNext()) {
+			this.addUniqueConstraint(this.buildUniqueConstraint(xmlConstraints.next()));
+		}
+	}
+
+	protected Iterator<XmlUniqueConstraint> xmlUniqueConstraints(AbstractXmlTable xmlTable) {
+		// make a copy of the XML constraints (to prevent ConcurrentModificationException)
+		return (xmlTable == null) ? EmptyIterator.<XmlUniqueConstraint>instance()
+				: new CloneIterator<XmlUniqueConstraint>(xmlTable.getUniqueConstraints());
+	}
+
+	public void initializeFrom(Table oldTable) {
+		this.setSpecifiedName(oldTable.getSpecifiedName());
+		this.setSpecifiedCatalog(oldTable.getSpecifiedCatalog());
+		this.setSpecifiedSchema(oldTable.getSpecifiedSchema());
+	}
+
+
+	// ********** database stuff **********
+
+	public org.eclipse.jpt.db.Table getDbTable() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getName());
+	}
+
+	public Schema getDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDbSchemaContainer() {
+		String catalog = this.getCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDbCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+	public boolean isResolved() {
+		return this.getDbTable() != null;
+	}
+
+	public boolean hasResolvedSchema() {
+		return this.getDbSchema() != null;
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public boolean hasResolvedCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) || (this.getDbCatalog(catalog) != null);
+	}
+
+
+	// ********** UniqueConstraint.Owner implementation **********
+
+	public Iterator<String> candidateUniqueConstraintColumnNames() {
+		org.eclipse.jpt.db.Table dbTable = this.getDbTable();
+		return (dbTable != null) ? dbTable.getSortedColumnIdentifiers().iterator() : EmptyIterator.<String>instance();
+	}
+
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange() {
+		return this.getTextRange(this.getResourceTableValidationTextRange());
+	}
+
+	protected TextRange getResourceTableValidationTextRange() {
+		AbstractXmlTable resourceTable = this.getResourceTable();
+		return (resourceTable == null) ? null : resourceTable.getValidationTextRange();
+	}
+
+
+	// ********** misc **********
+
+	/**
+	 * covariant override
+	 */
+	@Override
+	public XmlContextNode getParent() {
+		return (XmlContextNode) super.getParent();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.getQualifiedName());
+	}
+
+	protected String getQualifiedName() {
+		return NameTools.buildQualifiedDatabaseObjectName(this.getCatalog(), this.getSchema(), this.getName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java
new file mode 100644
index 0000000..9b3eed9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmTypeMapping.java
@@ -0,0 +1,363 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmTypeMapping<T extends XmlTypeMapping>
+	extends AbstractOrmXmlContextNode 
+	implements OrmTypeMapping
+{
+	protected String class_;
+	
+	public boolean defaultMetadataComplete;
+	
+	protected Boolean specifiedMetadataComplete;
+	
+	protected final T resourceTypeMapping;
+	
+	
+	protected AbstractOrmTypeMapping(OrmPersistentType parent, T resourceMapping) {
+		super(parent);
+		this.resourceTypeMapping = resourceMapping;
+		this.class_ = this.getResourceClassName();
+		this.specifiedMetadataComplete = this.getResourceMetadataComplete();
+		this.defaultMetadataComplete = this.getPersistentType().isDefaultMetadataComplete();
+	}	
+	
+	// **************** Type Mapping implementation *****************************
+
+	@Override
+	public OrmPersistentType getParent() {
+		return (OrmPersistentType) super.getParent();
+	}
+
+	public OrmPersistentType getPersistentType() {
+		return this.getParent();
+	}
+	
+	protected JavaPersistentType getJavaPersistentType() {
+		return this.getPersistentType().getJavaPersistentType();
+	}
+	
+	public boolean isMapped() {
+		return true;
+	}
+	
+	/* default implementation */
+	public JavaPersistentType getIdClass() {
+		return null;
+	}
+	
+	public String getPrimaryTableName() {
+		return null;
+	}
+
+	public String getClass_() {
+		return this.class_;
+	}
+
+	public void setClass(String newClass) {
+		String oldClass = this.class_;
+		this.class_ = newClass;
+		this.resourceTypeMapping.setClassName(newClass);
+		firePropertyChanged(CLASS_PROPERTY, oldClass, newClass);
+		getPersistentType().classChanged(oldClass, newClass);
+	}
+	
+
+	public boolean isMetadataComplete() {
+		if (isDefaultMetadataComplete()) {
+			//entity-mappings/persistence-unit-metadata/xml-mapping-metadata-complete is specified, then it overrides
+			//anything set here
+			return true;
+		}
+		return (this.getSpecifiedMetadataComplete() == null) ? this.isDefaultMetadataComplete() : this.getSpecifiedMetadataComplete().booleanValue();
+	}
+
+	public boolean isDefaultMetadataComplete() {
+		return this.defaultMetadataComplete;
+	}
+	
+	protected void setDefaultMetadataComplete(boolean newDefaultMetadataComplete) {
+		boolean oldMetadataComplete = this.defaultMetadataComplete;
+		this.defaultMetadataComplete = newDefaultMetadataComplete;
+		firePropertyChanged(DEFAULT_METADATA_COMPLETE_PROPERTY, oldMetadataComplete, newDefaultMetadataComplete);
+	}
+	
+	public Boolean getSpecifiedMetadataComplete() {
+		return this.specifiedMetadataComplete;
+	}
+	
+	public void setSpecifiedMetadataComplete(Boolean newSpecifiedMetadataComplete) {
+		Boolean oldMetadataComplete = this.specifiedMetadataComplete;
+		this.specifiedMetadataComplete = newSpecifiedMetadataComplete;
+		this.resourceTypeMapping.setMetadataComplete(newSpecifiedMetadataComplete);
+		firePropertyChanged(SPECIFIED_METADATA_COMPLETE_PROPERTY, oldMetadataComplete, newSpecifiedMetadataComplete);
+	}
+
+	/**
+	 * ITypeMapping is changed and various ITypeMappings may have
+	 * common settings.  In this method initialize the new ITypeMapping (this)
+	 * fromthe old ITypeMapping (oldMapping)
+	 */
+	public void initializeFrom(OrmTypeMapping oldMapping) {
+		this.setClass(oldMapping.getClass_());
+		this.setSpecifiedMetadataComplete(oldMapping.getSpecifiedMetadataComplete());
+		this.setDefaultMetadataComplete(oldMapping.isDefaultMetadataComplete());
+	}
+	
+	public Table getPrimaryDbTable() {
+		return null;
+	}
+
+	public Table getDbTable(String tableName) {
+		return null;
+	}
+
+	public Schema getDbSchema() {
+		return null;
+	}
+
+	public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
+		return true;
+	}
+
+	public Iterator<OrmAttributeMapping> attributeMappings() {
+		return new TransformationIterator<OrmPersistentAttribute, OrmAttributeMapping>(getPersistentType().attributes()) {
+			@Override
+			protected OrmAttributeMapping transform(OrmPersistentAttribute attribute) {
+				return attribute.getMapping();
+			}
+		};
+	}
+	
+	public Iterable<OrmAttributeMapping> getAttributeMappings(final String mappingKey) {
+		return new FilteringIterable<OrmAttributeMapping>(CollectionTools.collection(attributeMappings())) {
+			@Override
+			protected boolean accept(OrmAttributeMapping o) {
+				return StringTools.stringsAreEqual(o.getKey(), mappingKey);
+			}
+		};
+	}
+
+	public Iterator<AttributeMapping> allAttributeMappings() {
+		return new CompositeIterator<AttributeMapping>(
+			new TransformationIterator<TypeMapping, Iterator<AttributeMapping>>(this.inheritanceHierarchy()) {
+				@Override
+				protected Iterator<AttributeMapping> transform(TypeMapping typeMapping) {
+					return typeMapping.attributeMappings();
+				}
+			});
+	}
+	
+	public Iterable<AttributeMapping> getAllAttributeMappings(final String mappingKey) {
+		return new FilteringIterable<AttributeMapping>(CollectionTools.collection(allAttributeMappings())) {
+			@Override
+			protected boolean accept(AttributeMapping o) {
+				return StringTools.stringsAreEqual(o.getKey(), mappingKey);
+			}
+		};
+	}
+	
+	public TypeMapping getSuperTypeMapping() {
+		return (getPersistentType().getSuperPersistentType() == null) ?
+				null 
+				: getPersistentType().getSuperPersistentType().getMapping();
+	}
+
+	/**
+	 * Return an iterator of TypeMappings, each which inherits from the one before,
+	 * and terminates at the root entity (or at the point of cyclicity).
+	 */
+	public Iterator<TypeMapping> inheritanceHierarchy() {
+		return new TransformationIterator<PersistentType, TypeMapping>(getPersistentType().inheritanceHierarchy()) {
+			@Override
+			protected TypeMapping transform(PersistentType type) {
+				return type.getMapping();
+			}
+		};
+	}
+	
+	public Iterator<String> overridableAttributeNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.attributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAttributeMappingNames();
+				}
+			});
+	}
+
+	public Iterator<String> allOverridableAttributeNames() {
+		return new CompositeIterator<String>(new TransformationIterator<TypeMapping, Iterator<String>>(this.inheritanceHierarchy()) {
+			@Override
+			protected Iterator<String> transform(TypeMapping mapping) {
+				return mapping.overridableAttributeNames();
+			}
+		});
+	}
+	
+	public Column resolveOverriddenColumn(String attributeName) {
+		for (AttributeMapping attributeMapping : CollectionTools.iterable(attributeMappings())) {
+			Column resolvedColumn = attributeMapping.resolveOverriddenColumn(attributeName);
+			if (resolvedColumn != null) {
+				return resolvedColumn;
+			}
+		}
+		if (!isMetadataComplete()) {
+			JavaPersistentType javaPersistentType = getJavaPersistentType();
+			if (javaPersistentType != null) {
+				return javaPersistentType.getMapping().resolveOverriddenColumn(attributeName);
+			}
+		}
+		return null;
+	}
+	
+	public Iterator<String> overridableAssociationNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.attributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAssociationMappingNames();
+				}
+			});
+	}
+
+	public Iterator<String> allOverridableAssociationNames() {
+		return new CompositeIterator<String>(new TransformationIterator<TypeMapping, Iterator<String>>(this.inheritanceHierarchy()) {
+			@Override
+			protected Iterator<String> transform(TypeMapping mapping) {
+				return mapping.overridableAssociationNames();
+			}
+		});
+	}
+	
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		for (AttributeMapping attributeMapping : CollectionTools.iterable(attributeMappings())) {
+			RelationshipReference resolvedRelationshipReference = attributeMapping.resolveRelationshipReference(attributeName);
+			if (resolvedRelationshipReference != null) {
+				return resolvedRelationshipReference;
+			}
+		}
+		if (!isMetadataComplete()) {
+			JavaPersistentType javaPersistentType = getJavaPersistentType();
+			if (javaPersistentType != null) {
+				return javaPersistentType.getMapping().resolveRelationshipReference(attributeName);
+			}
+		}
+		return null;
+	}
+
+	public T getResourceTypeMapping() {
+		return this.resourceTypeMapping;
+	}
+	
+	public void update() {
+		this.setClass(this.getResourceClassName());
+		this.setSpecifiedMetadataComplete(this.getResourceMetadataComplete());
+		this.setDefaultMetadataComplete(this.getPersistentType().isDefaultMetadataComplete());
+	}
+	
+	protected String getResourceClassName() {
+		return this.resourceTypeMapping.getClassName();
+	}
+	
+	protected Boolean getResourceMetadataComplete() {
+		return this.resourceTypeMapping.getMetadataComplete();
+	}
+
+	
+	// *************************************************************************
+	
+	public JpaStructureNode getStructureNode(int offset) {
+		if (this.resourceTypeMapping.containsOffset(offset)) {
+			return getPersistentType();
+		}
+		return null;
+	}
+	
+	public TextRange getSelectionTextRange() {
+		return this.resourceTypeMapping.getSelectionTextRange();
+	}
+	
+	public TextRange getClassTextRange() {
+		return this.resourceTypeMapping.getClassTextRange();
+	}
+	
+	public TextRange getAttributesTextRange() {
+		return this.resourceTypeMapping.getAttributesTextRange();
+	}
+
+	public boolean containsOffset(int textOffset) {
+		return (this.resourceTypeMapping != null)
+				&& this.resourceTypeMapping.containsOffset(textOffset);
+	}
+	
+	//************************* validation ************************
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateClass(messages);
+	}
+
+	protected void validateClass(List<IMessage> messages) {
+		if (StringTools.stringIsEmpty(this.class_)) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENT_TYPE_UNSPECIFIED_CLASS,
+					this, 
+					this.getClassTextRange()
+				)
+			);
+			return;
+		}
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return getPersistenceUnit().shouldValidateAgainstDatabase();
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.resourceTypeMapping.getValidationTextRange();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getPersistentType().getName());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmVersionMapping.java
new file mode 100644
index 0000000..609fb02
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmVersionMapping.java
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.context.orm.OrmColumnMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmVersionMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmVersionMapping<T extends XmlVersion>
+	extends AbstractOrmAttributeMapping<T>
+	implements OrmVersionMapping
+{
+	protected final OrmColumn column;
+
+	protected OrmConverter converter;
+	
+	protected final OrmConverter nullConverter;
+	
+	protected AbstractOrmVersionMapping(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.column = getXmlContextNodeFactory().buildOrmColumn(this, this);
+		this.column.initialize(this.getResourceColumn());//TODO pass in to constructor
+		this.nullConverter = this.getXmlContextNodeFactory().buildOrmNullConverter(this);
+		this.converter = this.buildConverter(this.getResourceConverterType());
+	}
+
+	public int getXmlSequence() {
+		return 30;
+	}
+
+	public String getKey() {
+		return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmVersionMapping(this);
+	}
+
+	@Override
+	public void initializeFromOrmColumnMapping(OrmColumnMapping oldMapping) {
+		super.initializeFromOrmColumnMapping(oldMapping);
+		getColumn().initializeFrom(oldMapping.getColumn());
+	}
+
+	public OrmColumn getColumn() {
+		return this.column;
+	}
+	
+	public OrmConverter getConverter() {
+		return this.converter;
+	}
+	
+	protected String getConverterType() {
+		return this.converter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		OrmConverter oldConverter = this.converter;
+		OrmConverter newConverter = buildConverter(converterType);
+		this.converter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.converter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(OrmConverter newConverter) {
+		OrmConverter oldConverter = this.converter;
+		this.converter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}	
+
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getVersions().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getVersions().remove(this.resourceAttributeMapping);
+	}
+
+	//************** NamedColumn.Owner implementation ***************
+
+	public String getDefaultColumnName() {		
+		return getName();
+	}
+
+	public Table getDbTable(String tableName) {
+		return getTypeMapping().getDbTable(tableName);
+	}
+
+	//************** BaseColumn.Owner implementation ***************
+
+	public String getDefaultTableName() {
+		return getTypeMapping().getPrimaryTableName();
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return getTypeMapping().associatedTableNamesIncludingInherited();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.column.update(this.getResourceColumn());
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update();
+		}
+		else {
+			setConverter(buildConverter(getResourceConverterType()));
+		}
+	}
+	
+	protected OrmConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmTemporalConverter(this, this.resourceAttributeMapping);
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.resourceAttributeMapping.getTemporal() != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		return Converter.NO_CONVERTER;
+	}
+
+	//***************** XmlColumn.Owner implementation ****************
+	
+	public XmlColumn getResourceColumn() {
+		return this.resourceAttributeMapping.getColumn();
+	}
+	
+	public void addResourceColumn() {
+		this.resourceAttributeMapping.setColumn(OrmFactory.eINSTANCE.createXmlColumn());
+	}
+	
+	public void removeResourceColumn() {
+		this.resourceAttributeMapping.setColumn(null);
+	}
+	
+	// ****************** validation ****************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		this.getColumn().validate(messages, reporter);
+	}
+
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		if (isVirtual()) {
+			return this.buildVirtualUnresolvedNameMessage(column, textRange);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+			new String[] {column.getName(), column.getDbTable().getName()}, 
+			column,
+			textRange
+		);
+	}
+
+	protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME,
+			new String[] {getName(), column.getName(), column.getDbTable().getName()},
+			column, 
+			textRange
+		);
+	}
+
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		if (isVirtual()) {
+			return this.buildVirtualTableNotValidMessage(column, textRange);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+			column, 
+			textRange
+		);
+	}
+	
+	public IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID,
+			new String[] {
+				getName(),
+				column.getTable(),
+				column.getName(),
+				JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+			column, 
+			textRange
+		);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlContextNode.java
new file mode 100644
index 0000000..a6441f7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlContextNode.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.context.orm.OrmXmlDefinition;
+import org.eclipse.jpt.core.internal.context.AbstractXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+
+/**
+ * Use this abstract class for context nodes that are part of an
+ * <code>orm.xml</code> file.
+ * This will not work for a pure {@link org.eclipse.jpt.core.context.MappingFile}
+ * implementation.
+ */
+public abstract class AbstractOrmXmlContextNode
+	extends AbstractXmlContextNode
+{
+	// ********** constructor **********
+
+	protected AbstractOrmXmlContextNode(JpaContextNode parent) {
+		super(parent);
+	}
+
+
+	// ********** convenience methods **********
+
+	protected OrmXmlDefinition getMappingFileDefinition() {
+		return (OrmXmlDefinition) this.getJpaPlatform().getResourceDefinition(this.getResourceType());
+	}
+
+	protected EFactory getResourceNodeFactory() {
+		return this.getMappingFileDefinition().getResourceNodeFactory();
+	}
+
+	protected OrmXml2_0ContextNodeFactory getXmlContextNodeFactory() {
+		return (OrmXml2_0ContextNodeFactory) this.getMappingFileDefinition().getContextNodeFactory();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
new file mode 100644
index 0000000..5fdcfc1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
@@ -0,0 +1,449 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmBaseJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.context.orm.OrmDiscriminatorColumn;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddable;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddedMapping;
+import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.context.orm.OrmGeneratedValue;
+import org.eclipse.jpt.core.context.orm.OrmGeneratorContainer;
+import org.eclipse.jpt.core.context.orm.OrmIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmMappedSuperclass;
+import org.eclipse.jpt.core.context.orm.OrmNamedColumn;
+import org.eclipse.jpt.core.context.orm.OrmNamedNativeQuery;
+import org.eclipse.jpt.core.context.orm.OrmNamedQuery;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmQuery;
+import org.eclipse.jpt.core.context.orm.OrmQueryContainer;
+import org.eclipse.jpt.core.context.orm.OrmQueryHint;
+import org.eclipse.jpt.core.context.orm.OrmSecondaryTable;
+import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator;
+import org.eclipse.jpt.core.context.orm.OrmTable;
+import org.eclipse.jpt.core.context.orm.OrmTableGenerator;
+import org.eclipse.jpt.core.context.orm.OrmTransientMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmUniqueConstraint;
+import org.eclipse.jpt.core.context.orm.OrmVersionMapping;
+import org.eclipse.jpt.core.context.orm.OrmXml;
+import org.eclipse.jpt.core.context.orm.PersistenceUnitMetadata;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericEntityMappings;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmAssociationOverride;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmAttributeOverride;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmBasicMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmDiscriminatorColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmEmbeddable;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmEmbeddedIdMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmEmbeddedMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmEntity;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmEnumeratedConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmGeneratedValue;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmGeneratorContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmIdMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmJoinColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmJoinTable;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmLobConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmManyToManyMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmManyToOneMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmMappedSuperclass;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmNamedNativeQuery;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmNamedQuery;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmNullAttributeMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmNullConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmOneToManyMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmOneToOneMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmOrderable;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmPersistentType;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmQueryContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmQueryHint;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmSecondaryTable;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmSequenceGenerator;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmTable;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmTableGenerator;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmTemporalConverter;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmTransientMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmUniqueConstraint;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmVersionMapping;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericPersistenceUnitDefaults;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericPersistenceUnitMetadata;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.UnsupportedOrmAttributeMapping;
+import org.eclipse.jpt.core.internal.jpa2.context.orm.GenericOrmOrderColumn2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.orm.NullOrmCacheable2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.orm.NullOrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.orm.NullOrmOrphanRemoval2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddable;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass;
+import org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlQueryContainer;
+import org.eclipse.jpt.core.resource.orm.XmlQueryHint;
+import org.eclipse.jpt.core.resource.orm.XmlSecondaryTable;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
+
+public abstract class AbstractOrmXmlContextNodeFactory
+	implements OrmXml2_0ContextNodeFactory
+{
+	public EntityMappings buildEntityMappings(OrmXml parent, XmlEntityMappings xmlEntityMappings) {
+		return new GenericEntityMappings(parent, xmlEntityMappings);
+	}
+	
+	public PersistenceUnitMetadata buildPersistenceUnitMetadata(EntityMappings parent) {
+		return new GenericPersistenceUnitMetadata(parent);
+	}
+	
+	public OrmPersistenceUnitDefaults buildPersistenceUnitDefaults(PersistenceUnitMetadata parent) {
+		return new GenericPersistenceUnitDefaults(parent);
+	}
+
+	public OrmPersistentType buildOrmPersistentType(EntityMappings parent, XmlTypeMapping resourceMapping) {
+		return new GenericOrmPersistentType(parent, resourceMapping);
+	}
+	
+	public OrmEntity buildOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping) {
+		return new GenericOrmEntity(parent, resourceMapping);
+	}
+	
+	public OrmMappedSuperclass buildOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping) {
+		return new GenericOrmMappedSuperclass(parent, resourceMapping);
+	}
+	
+	public OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
+		return new GenericOrmEmbeddable(parent, resourceMapping);
+	}
+	
+	public OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentType parent, OrmPersistentAttribute.Owner owner, XmlAttributeMapping resourceMapping) {
+		return new GenericOrmPersistentAttribute(parent, owner, resourceMapping);
+	}
+	
+	public OrmTable buildOrmTable(OrmEntity parent) {
+		return new GenericOrmTable(parent);
+	}
+	
+	public OrmSecondaryTable buildOrmSecondaryTable(OrmEntity parent, XmlSecondaryTable xmlSecondaryTable) {
+		return new GenericOrmSecondaryTable(parent, xmlSecondaryTable);
+	}
+	
+	public OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePkJoinColumn) {
+		return new GenericOrmPrimaryKeyJoinColumn(parent, owner, resourcePkJoinColumn);
+	}
+	
+	public OrmJoinTable buildOrmJoinTable(OrmJoinTableJoiningStrategy parent, XmlJoinTable resourceJoinTable) {
+		return new GenericOrmJoinTable(parent, resourceJoinTable);
+	}
+	
+	public OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn) {
+		return new GenericOrmJoinColumn(parent, owner, resourceJoinColumn);
+	}
+	
+	public OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner) {
+		return new GenericOrmAttributeOverrideContainer(parent, owner);
+	}
+	
+	public OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner) {
+		return new GenericOrmAssociationOverrideContainer(parent, owner);
+	}
+	
+	public OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(OrmEmbeddedMapping2_0 parent, OrmAssociationOverrideContainer.Owner owner) {
+		return new NullOrmAssociationOverrideContainer(parent, owner);
+	}
+	
+	public OrmAttributeOverride buildOrmAttributeOverride(OrmAttributeOverrideContainer parent, AttributeOverride.Owner owner, XmlAttributeOverride xmlAttributeOverride) {
+		return new GenericOrmAttributeOverride(parent, owner, xmlAttributeOverride);
+	}
+	
+	public OrmAssociationOverride buildOrmAssociationOverride(OrmAssociationOverrideContainer parent, AssociationOverride.Owner owner, XmlAssociationOverride xmlAssociationOverride) {
+		return new GenericOrmAssociationOverride(parent, owner, xmlAssociationOverride);
+	}
+	
+	public OrmAssociationOverrideRelationshipReference buildOrmAssociationOverrideRelationshipReference(OrmAssociationOverride parent, XmlAssociationOverride associationOverride) {
+		return new GenericOrmAssociationOverrideRelationshipReference(parent, associationOverride);
+	}
+	
+	public OrmDiscriminatorColumn buildOrmDiscriminatorColumn(OrmEntity parent, OrmDiscriminatorColumn.Owner owner) {
+		return new GenericOrmDiscriminatorColumn(parent, owner);
+	}
+	
+	public OrmColumn buildOrmColumn(XmlContextNode parent, OrmColumn.Owner owner) {
+		return new GenericOrmColumn(parent, owner);
+	}
+	
+	public OrmGeneratedValue buildOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue resourceGeneratedValue) {
+		return new GenericOrmGeneratedValue(parent, resourceGeneratedValue);
+	}
+	
+	public OrmGeneratorContainer buildOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer resourceGeneratorContainer) {
+		return new GenericOrmGeneratorContainer(parent, resourceGeneratorContainer);
+	}
+	
+	public OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator) {
+		return new GenericOrmSequenceGenerator(parent, resourceSequenceGenerator);
+	}
+	
+	public OrmTableGenerator buildOrmTableGenerator(XmlContextNode parent, XmlTableGenerator resourceTableGenerator) {
+		return new GenericOrmTableGenerator(parent, resourceTableGenerator);
+	}
+	
+	public OrmQueryContainer buildOrmQueryContainer(XmlContextNode parent, XmlQueryContainer resourceQueryContainer) {
+		return new GenericOrmQueryContainer(parent, resourceQueryContainer);
+	}
+	
+	public OrmNamedNativeQuery buildOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery resourceNamedNativeQuery) {
+		return new GenericOrmNamedNativeQuery(parent, resourceNamedNativeQuery);
+	}
+	
+	public OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
+		return new GenericOrmNamedQuery(parent, resourceNamedQuery);
+	}
+	
+	public OrmQueryHint buildOrmQueryHint(OrmQuery parent, XmlQueryHint resourceQueryHint) {
+		return new GenericOrmQueryHint(parent, resourceQueryHint);
+	}
+	
+	public OrmBasicMapping buildOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic resourceMapping) {
+		return new GenericOrmBasicMapping(parent, resourceMapping);
+	}
+	
+	public OrmEmbeddedMapping buildOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded resourceMapping) {
+		return new GenericOrmEmbeddedMapping(parent, resourceMapping);
+	}
+	
+	public OrmEmbeddedIdMapping buildOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId resourceMapping) {
+		return new GenericOrmEmbeddedIdMapping(parent, resourceMapping);
+	}
+	
+	public OrmIdMapping buildOrmIdMapping(OrmPersistentAttribute parent, XmlId resourceMapping) {
+		return new GenericOrmIdMapping(parent, resourceMapping);
+	}
+	
+	public OrmManyToManyMapping buildOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany resourceMapping) {
+		return new GenericOrmManyToManyMapping(parent, resourceMapping);
+	}
+	
+	public OrmManyToOneMapping buildOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping) {
+		return new GenericOrmManyToOneMapping(parent, resourceMapping);
+	}
+	
+	public OrmOneToManyMapping buildOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping) {
+		return new GenericOrmOneToManyMapping(parent, resourceMapping);
+	}
+	
+	public OrmOneToOneMapping buildOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping) {
+		return new GenericOrmOneToOneMapping(parent, resourceMapping);
+	}
+	
+	public OrmTransientMapping buildOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient resourceMapping) {
+		return new GenericOrmTransientMapping(parent, resourceMapping);
+	}
+	
+	public OrmVersionMapping buildOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion resourceMapping) {
+		return new GenericOrmVersionMapping(parent, resourceMapping);
+	}
+	
+	public OrmAttributeMapping buildOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping) {
+		return new GenericOrmNullAttributeMapping(parent, resourceMapping);
+	}
+	
+	public OrmAttributeMapping buildUnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping) {
+		return new UnsupportedOrmAttributeMapping(parent, resourceMapping);
+	}
+	
+	public OrmUniqueConstraint buildOrmUniqueConstraint(XmlContextNode parent, UniqueConstraint.Owner owner, XmlUniqueConstraint resourceUniqueConstraint) {
+		return new GenericOrmUniqueConstraint(parent, owner, resourceUniqueConstraint);
+	}
+	
+	public OrmConverter buildOrmEnumeratedConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping) {
+		return new GenericOrmEnumeratedConverter(parent, resourceMapping);
+	}
+	
+	public OrmConverter buildOrmLobConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping) {
+		return new GenericOrmLobConverter(parent, resourceMapping);
+	}
+	
+	public OrmConverter buildOrmTemporalConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping) {
+		return new GenericOrmTemporalConverter(parent, resourceMapping);
+	}
+	
+	public OrmConverter buildOrmNullConverter(OrmAttributeMapping parent) {
+		return new GenericOrmNullConverter(parent);
+	}
+	
+	public OrmOrderable2_0 buildOrmOrderable(OrmAttributeMapping parent, Orderable.Owner owner) {
+		return new GenericOrmOrderable(parent, owner);
+	}
+	
+	public OrmOrderColumn2_0 buildOrmOrderColumn(OrmOrderable2_0 parent, OrmNamedColumn.Owner owner) {
+		return new GenericOrmOrderColumn2_0(parent, owner);
+	}
+	
+	public OrmDerivedIdentity2_0 buildOrmDerivedIdentity(
+			OrmSingleRelationshipMapping2_0 parent, XmlSingleRelationshipMapping_2_0 resource) {
+		return new NullOrmDerivedIdentity2_0(parent);
+	}
+	
+	public OrmElementCollectionMapping2_0 buildOrmElementCollectionMapping2_0(
+			OrmPersistentAttribute parent, XmlElementCollection resourceMapping) {
+		
+		throw new UnsupportedOperationException();
+	}
+	
+	public OrmCacheable2_0 buildOrmCacheable(OrmCacheableHolder2_0 parent, XmlCacheable_2_0 resource) {
+		return new NullOrmCacheable2_0(parent);
+	}
+	
+	public OrmOrphanRemovable2_0 buildOrmOrphanRemoval(OrmOrphanRemovalHolder2_0 parent, XmlOrphanRemovable_2_0 resource) {
+		return new NullOrmOrphanRemoval2_0(parent);
+	}
+	
+	public OrmCollectionTable2_0 buildOrmCollectionTable(OrmElementCollectionMapping2_0 parent, XmlCollectionTable resource) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ********** ORM Virtual Resource Model **********
+
+	public XmlAssociationOverride buildVirtualXmlAssociationOverride(String name, OrmTypeMapping parent, JoiningStrategy joiningStrategy) {
+		return new VirtualXmlAssociationOverride(name, parent, joiningStrategy);		
+	}
+	
+	public XmlBasic buildVirtualXmlBasic(OrmTypeMapping ormTypeMapping, JavaBasicMapping javaBasicMapping) {
+		return new VirtualXmlBasic(ormTypeMapping, javaBasicMapping);
+	}
+
+	public XmlEmbeddedId buildVirtualXmlEmbeddedId(OrmTypeMapping ormTypeMapping, JavaEmbeddedIdMapping javaEmbeddedIdMapping) {
+		return new VirtualXmlEmbeddedId(ormTypeMapping, javaEmbeddedIdMapping);
+	}
+
+	public XmlEmbedded buildVirtualXmlEmbedded(OrmTypeMapping ormTypeMapping, JavaEmbeddedMapping javaEmbeddedMapping) {
+		return new VirtualXmlEmbedded(ormTypeMapping, javaEmbeddedMapping);
+	}
+
+	public XmlId buildVirtualXmlId(OrmTypeMapping ormTypeMapping, JavaIdMapping javaIdMapping) {
+		return new VirtualXmlId(ormTypeMapping, javaIdMapping);
+	}
+
+	public XmlManyToMany buildVirtualXmlManyToMany(OrmTypeMapping ormTypeMapping, JavaManyToManyMapping javaManyToManyMapping) {
+		return new VirtualXmlManyToMany(ormTypeMapping, javaManyToManyMapping);
+	}
+
+	public XmlManyToOne buildVirtualXmlManyToOne(OrmTypeMapping ormTypeMapping, JavaManyToOneMapping javaManyToOneMapping) {
+		return new VirtualXmlManyToOne(ormTypeMapping, javaManyToOneMapping);
+	}
+
+	public XmlOneToMany buildVirtualXmlOneToMany(OrmTypeMapping ormTypeMapping, JavaOneToManyMapping javaOneToManyMapping) {
+		return new VirtualXmlOneToMany(ormTypeMapping, javaOneToManyMapping);
+	}
+
+	public XmlOneToOne buildVirtualXmlOneToOne(OrmTypeMapping ormTypeMapping, JavaOneToOneMapping javaOneToOneMapping) {
+		return new VirtualXmlOneToOne(ormTypeMapping, javaOneToOneMapping);
+	}
+
+	public XmlTransient buildVirtualXmlTransient(OrmTypeMapping ormTypeMapping, JavaTransientMapping javaTransientMapping) {
+		return new VirtualXmlTransient(ormTypeMapping, javaTransientMapping);
+	}
+
+	public XmlVersion buildVirtualXmlVersion(OrmTypeMapping ormTypeMapping, JavaVersionMapping javaVersionMapping) {
+		return new VirtualXmlVersion(ormTypeMapping, javaVersionMapping);
+	}
+	
+	public XmlNullAttributeMapping buildVirtualXmlNullAttributeMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping) {
+		return new VirtualXmlNullAttributeMapping(ormTypeMapping, javaAttributeMapping);
+	}
+	
+	public XmlElementCollection buildVirtualXmlElementCollection2_0(OrmTypeMapping ormTypeMapping, JavaElementCollectionMapping2_0 javaMapping) {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlDefinition.java
new file mode 100644
index 0000000..367f38c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/AbstractOrmXmlDefinition.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.orm.OrmXmlDefinition;
+import org.eclipse.jpt.core.context.orm.UnsupportedOrmAttributeMappingDefinition;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.Tools;
+import org.eclipse.jpt.utility.internal.iterators.ArrayListIterator;
+
+/**
+ * All the state in the definition should be "static" (i.e. unchanging once it is initialized).
+ */
+public abstract class AbstractOrmXmlDefinition
+	implements OrmXmlDefinition
+{
+	private OrmTypeMappingDefinition[] ormTypeMappingDefinitions;
+	
+	private OrmAttributeMappingDefinition[] ormAttributeMappingDefinitions;
+	
+	private final OrmXmlContextNodeFactory factory;
+	
+	
+	/**
+	 * zero-argument constructor
+	 */
+	protected AbstractOrmXmlDefinition() {
+		super();
+		this.factory = buildContextNodeFactory();
+	}
+	
+	
+	protected abstract OrmXmlContextNodeFactory buildContextNodeFactory();
+	
+	public OrmXmlContextNodeFactory getContextNodeFactory() {
+		return this.factory;
+	}
+	
+	
+	// ********** ORM type mappings **********
+	
+	public OrmTypeMappingDefinition getOrmTypeMappingDefinition(String mappingKey) {
+		for (OrmTypeMappingDefinition definition : CollectionTools.iterable(ormTypeMappingDefinitions())) {
+			if (Tools.valuesAreEqual(definition.getKey(), mappingKey)) {
+				return definition;
+			}
+		}
+		throw new IllegalArgumentException("Illegal type mapping key: " + mappingKey); //$NON-NLS-1$
+	}
+	
+	public ListIterator<OrmTypeMappingDefinition> ormTypeMappingDefinitions() {
+		return new ArrayListIterator<OrmTypeMappingDefinition>(getOrmTypeMappingDefinitions());
+	}
+	
+	protected synchronized OrmTypeMappingDefinition[] getOrmTypeMappingDefinitions() {
+		if (this.ormTypeMappingDefinitions == null) {
+			this.ormTypeMappingDefinitions = this.buildOrmTypeMappingDefinitions();
+		}
+		return this.ormTypeMappingDefinitions;
+	}
+	
+	/**
+	 * Return an array of mapping definitions to use for types in mapping files of this type.  
+	 * The order is unimportant.
+	 */
+	protected abstract OrmTypeMappingDefinition[] buildOrmTypeMappingDefinitions();
+	
+	
+	// ********** ORM attribute mappings **********
+	
+	public OrmAttributeMappingDefinition getOrmAttributeMappingDefinition(String mappingKey) {
+		for (OrmAttributeMappingDefinition definition : CollectionTools.iterable(ormAttributeMappingDefinitions())) {
+			if (Tools.valuesAreEqual(definition.getKey(), mappingKey)) {
+				return definition;
+			}
+		}
+		return UnsupportedOrmAttributeMappingDefinition.instance();
+	}
+	
+	public ListIterator<OrmAttributeMappingDefinition> ormAttributeMappingDefinitions() {
+		return new ArrayListIterator<OrmAttributeMappingDefinition>(getOrmAttributeMappingDefinitions());
+	}
+	
+	protected synchronized OrmAttributeMappingDefinition[] getOrmAttributeMappingDefinitions() {
+		if (this.ormAttributeMappingDefinitions == null) {
+			this.ormAttributeMappingDefinitions = this.buildOrmAttributeMappingDefinitions();
+		}
+		return this.ormAttributeMappingDefinitions;
+	}
+	
+	/**
+	 * Return an array of mapping definitions to use for attributes in mapping files of this type.  
+	 * The order is unimportant.
+	 */
+	protected abstract OrmAttributeMappingDefinition[] buildOrmAttributeMappingDefinitions();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdClassReference.java
new file mode 100644
index 0000000..5b9a999
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmIdClassReference.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.java.JavaIdClassReference;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmIdClassReference;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.AbstractXmlContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlIdClassContainer;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmIdClassReference
+	extends AbstractXmlContextNode
+	implements OrmIdClassReference
+{
+	protected String specifiedIdClassName;
+	
+	protected String defaultIdClassName;
+
+	protected JavaPersistentType idClass;
+	
+	
+	public GenericOrmIdClassReference(OrmTypeMapping parent, JavaIdClassReference javaIdClassReference) {
+		super(parent);
+		this.specifiedIdClassName = buildSpecifiedIdClassName();
+		this.defaultIdClassName = buildDefaultIdClassName(javaIdClassReference);
+		this.idClass = buildIdClass();
+	}
+	
+	
+	protected OrmTypeMapping getTypeMapping() {
+		return (OrmTypeMapping) getParent();
+	}
+	
+	protected OrmPersistentType getPersistentType() {
+		return getTypeMapping().getPersistentType();
+	}
+	
+	
+	// **************** PersistentType.Owner impl *****************************
+	
+	public AccessType getOverridePersistentTypeAccess() {
+		return getPersistentType().getAccess();
+	}
+	
+	public AccessType getDefaultPersistentTypeAccess() {
+		// this shouldn't be needed, since we've specified an override access, but just to be safe ...
+		return getPersistentType().getAccess();
+	}
+	
+	
+	// **************** IdClassReference impl *********************************
+	
+	public String getSpecifiedIdClassName() {
+		return this.specifiedIdClassName;
+	}
+	
+	public void setSpecifiedIdClassName(String newClassName) {
+		String oldClassName = this.specifiedIdClassName;
+		this.specifiedIdClassName = newClassName;
+		if (valuesAreDifferent(oldClassName, newClassName)) {
+			if (getIdXmlClassRef() != null) {
+				getIdXmlClassRef().setClassName(newClassName);
+				if (getIdXmlClassRef().isUnset()) {
+					removeIdClassElement();
+				}
+			}
+			else if (newClassName != null) {
+				addIdClassElement();
+				getIdXmlClassRef().setClassName(newClassName);
+			}
+		}
+		firePropertyChanged(SPECIFIED_ID_CLASS_NAME_PROPERTY, oldClassName, newClassName);
+	}
+	
+	protected void setSpecifiedIdClassName_(String newClassName) {
+		String oldClassName = this.specifiedIdClassName;
+		this.specifiedIdClassName = newClassName;
+		firePropertyChanged(SPECIFIED_ID_CLASS_NAME_PROPERTY, oldClassName, newClassName);
+	}
+	
+	protected String buildSpecifiedIdClassName() {
+		XmlClassReference idXmlClassRef = this.getIdXmlClassRef();
+		return (idXmlClassRef == null) ? null : idXmlClassRef.getClassName();
+	}
+	
+	public String getDefaultIdClassName() {
+		return this.defaultIdClassName;
+	}
+	
+	protected void setDefaultIdClassName_(String newClassName) {
+		String oldClassName = this.defaultIdClassName;
+		this.defaultIdClassName = newClassName;
+		firePropertyChanged(DEFAULT_ID_CLASS_NAME_PROPERTY, oldClassName, newClassName);
+	}
+	
+	protected String buildDefaultIdClassName(JavaIdClassReference javaIdClassReference) {
+		return (javaIdClassReference == null) ? null : javaIdClassReference.getFullyQualifiedIdClassName();
+	}
+	
+	public String getIdClassName() {
+		return (this.specifiedIdClassName == null) ? this.defaultIdClassName : this.specifiedIdClassName;
+	}
+	
+	public boolean isSpecified() {
+		return getIdClassName() != null;
+	}
+	
+	public JavaPersistentType getIdClass() {
+		return this.idClass;
+	}
+	
+	protected void setIdClass_(JavaPersistentType newIdClass) {
+		JavaPersistentType oldIdClass = this.idClass;
+		this.idClass = newIdClass;
+		firePropertyChanged(ID_CLASS_PROPERTY, oldIdClass, newIdClass);
+	}
+	
+	protected JavaPersistentType buildIdClass() {
+		JavaResourcePersistentType resourceIdClass = getResourceIdClass();
+		return (resourceIdClass == null) ? 
+				null : this.buildIdClass(resourceIdClass);
+	}
+	
+	protected JavaPersistentType buildIdClass(JavaResourcePersistentType resourceClass) {
+		return getJpaFactory().buildJavaPersistentType(this, resourceClass);
+	}
+	
+	protected XmlTypeMapping getResourceTypeMapping() {
+		return getTypeMapping().getResourceTypeMapping();
+	}
+	
+	protected XmlIdClassContainer getResourceIdClassContainer() {
+		return (XmlIdClassContainer) getResourceTypeMapping();
+	}
+	
+	protected XmlClassReference getIdXmlClassRef() {
+		return this.getResourceIdClassContainer().getIdClass();
+	}
+	
+	protected void addIdClassElement() {
+		getResourceIdClassContainer().setIdClass(OrmFactory.eINSTANCE.createXmlClassReference());		
+	}
+	
+	protected void removeIdClassElement() {
+		getResourceIdClassContainer().setIdClass(null);
+	}
+	
+	protected JavaResourcePersistentType getResourceIdClass() {
+		XmlClassReference idXmlClassRef = this.getIdXmlClassRef();
+		if (idXmlClassRef == null) {
+			return null;
+		}
+
+		String className = idXmlClassRef.getClassName();
+		if (className == null) {
+			return null;
+		}
+		
+		return this.getEntityMappings().resolveJavaResourcePersistentType(className);
+	}
+	
+	protected EntityMappings getEntityMappings() {
+		return (EntityMappings) getMappingFileRoot();
+	}
+
+	public char getIdClassEnclosingTypeSeparator() {
+		return '$';
+	}
+	
+	public void update(JavaIdClassReference javaIdClassReference) {
+		setDefaultIdClassName_(buildDefaultIdClassName(javaIdClassReference));
+		setSpecifiedIdClassName_(buildSpecifiedIdClassName());
+		updateIdClass();
+	}
+	
+	protected void updateIdClass() {
+		JavaResourcePersistentType resourceIdClass = getResourceIdClass();
+		if (resourceIdClass == null) {
+			setIdClass_(null);
+		}
+		else { 
+			if (this.idClass == null || this.idClass.getResourcePersistentType() != resourceIdClass) {
+				setIdClass_(buildIdClass(resourceIdClass));
+			}
+			else {
+				this.idClass.update(resourceIdClass);
+			}
+		}
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	public TextRange getValidationTextRange() {
+		XmlClassReference idXmlClassRef = getIdXmlClassRef();
+		return (idXmlClassRef == null) ?
+				this.getTypeMapping().getValidationTextRange() :
+				idXmlClassRef.getClassNameTextRange();
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		// most validation is done "holistically" from the type mapping level
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.java
new file mode 100644
index 0000000..d82061c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnInAssociationOverrideJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn.Owner;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class GenericOrmJoinColumnInAssociationOverrideJoiningStrategy 
+	extends AbstractOrmJoinColumnJoiningStrategy
+	implements OrmJoinColumnInAssociationOverrideJoiningStrategy
+{
+	
+	public GenericOrmJoinColumnInAssociationOverrideJoiningStrategy(OrmAssociationOverrideRelationshipReference parent, XmlAssociationOverride xao) {
+		super(parent, xao);
+	}
+	
+	@Override
+	protected Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		RelationshipMapping relationshipMapping = getRelationshipMapping();
+		if (relationshipMapping != null) {
+			return relationshipMapping.getRelationshipReference().isTargetForeignKeyRelationship();
+		}
+		return false;
+	}
+
+	public TypeMapping getRelationshipSource() {
+		if (isTargetForeignKeyRelationship()) {
+			return getRelationshipMapping().getResolvedTargetEntity();
+		}
+		return getAssociationOverrideOwner().getTypeMapping();
+	}
+	
+	public TypeMapping getRelationshipTarget() {
+		if (isTargetForeignKeyRelationship()) {
+			return getAssociationOverrideOwner().getTypeMapping();
+		}
+		RelationshipMapping relationshipMapping = getRelationshipMapping();
+		return relationshipMapping == null ? null : relationshipMapping.getResolvedTargetEntity();
+	}
+
+	protected Entity getRelationshipTargetEntity() {
+		TypeMapping relationshipTarget = getRelationshipTarget();
+		return (relationshipTarget != null) && (relationshipTarget.getKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY) ? (Entity) relationshipTarget : null;
+	}
+	
+	@Override
+	public RelationshipMapping getRelationshipMapping() {
+		return getAssociationOverrideOwner().getRelationshipMapping(getAttributeName());
+	}
+	
+	protected String getAttributeName() {
+		return this.getAssociationOverride().getName();
+	}
+	
+	@Override
+	public String getTableName() {
+		if (isTargetForeignKeyRelationship()) {
+			return super.getTableName();
+		}
+		return getAssociationOverrideOwner().getDefaultTableName();
+	}
+
+	@Override
+	public Table getDbTable(String tableName) {
+		if (isTargetForeignKeyRelationship()) {
+			return super.getDbTable(tableName);
+		}
+		return getAssociationOverrideOwner().getDbTable(tableName);
+	}
+
+	@Override
+	public boolean tableNameIsInvalid(String tableName) {
+		if (isTargetForeignKeyRelationship()) {
+			return super.tableNameIsInvalid(tableName);
+		}
+		return getAssociationOverrideOwner().tableNameIsInvalid(tableName);
+	}
+
+	@Override
+	public Iterator<String> candidateTableNames() {
+		if (isTargetForeignKeyRelationship()) {
+			return super.candidateTableNames();
+		}
+		return getAssociationOverrideOwner().candidateTableNames();
+	}
+
+	public String getColumnTableNotValidDescription() {
+		return null;
+	}
+
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	protected OrmAssociationOverride getAssociationOverride() {
+		return this.getRelationshipReference().getAssociationOverride();
+	}
+	
+	protected OrmAssociationOverride.Owner getAssociationOverrideOwner() {
+		return getAssociationOverride().getOwner();
+	}
+
+	@Override
+	public OrmAssociationOverrideRelationshipReference getRelationshipReference() {
+		return (OrmAssociationOverrideRelationshipReference) super.getRelationshipReference();
+	}
+
+	public TextRange getValidationTextRange() {
+		return getRelationshipReference().getValidationTextRange();
+	}
+	
+	public void update(XmlAssociationOverride xao) {
+		//TODO can we make resource final and then just have an update() method?
+		//would need to update the association overrides with the same resource association override
+		this.resource = xao;
+		super.update();
+	}
+	
+	
+
+	// ********** join column owner adapter **********
+
+	protected class JoinColumnOwner
+		implements OrmJoinColumn.Owner
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+		
+		public String getDefaultTableName() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getTableName();
+		}
+		
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public String getAttributeName() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getAttributeName();
+		}
+		
+		public PersistentAttribute getPersistentAttribute() {
+			RelationshipMapping relationshipMapping = getRelationshipMapping();
+			return relationshipMapping == null ? null : relationshipMapping.getPersistentAttribute();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getRelationshipSource();
+		}
+
+		public Entity getRelationshipTarget() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getRelationshipTargetEntity();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.tableNameIsInvalid(tableName);
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.candidateTableNames();
+		}
+
+		public Table getDbTable(String tableName) {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getDbTable(tableName);
+		}
+
+		public Table getReferencedColumnDbTable() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getReferencedColumnDbTable();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return false;
+		}
+
+		public int joinColumnsSize() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.joinColumnsSize();
+		}
+		
+		public TextRange getValidationTextRange() {
+			return GenericOrmJoinColumnInAssociationOverrideJoiningStrategy.this.getValidationTextRange();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildColumnTableNotValidMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildColumnUnresolvedNameMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildColumnUnresolvedReferencedColumnNameMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(getAssociationOverride(), column, textRange);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return getAssociationOverrideOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(getAssociationOverride(), column, textRange);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..3f57751
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinColumnJoiningStrategy.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping;
+
+public class GenericOrmJoinColumnJoiningStrategy 
+	extends AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy
+{
+	
+	public GenericOrmJoinColumnJoiningStrategy(
+			OrmJoinColumnEnabledRelationshipReference parent,
+			XmlJoinColumnsMapping resource) {
+		super(parent, resource);
+	}
+
+	public TypeMapping getRelationshipSource() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		return getRelationshipTargetEntity();
+	}
+
+	@Override
+	protected Entity getRelationshipTargetEntity() {
+		return getRelationshipMapping().getResolvedTargetEntity();
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..bb0882b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmJoinTableJoiningStrategy.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmJoinTableJoiningStrategy 
+	extends AbstractOrmJoinTableJoiningStrategy
+{
+	protected XmlJoinTableMapping resource;
+	
+	
+	public GenericOrmJoinTableJoiningStrategy(
+			OrmJoinTableEnabledRelationshipReference parent,
+			XmlJoinTableMapping resource) {
+		super(parent);
+		this.resource = resource;
+		this.initialize();
+	}
+	
+	
+	@Override
+	public OrmJoinTableEnabledRelationshipReference getParent() {
+		return (OrmJoinTableEnabledRelationshipReference) super.getParent();
+	}
+	
+	@Override
+	public OrmJoinTableEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	@Override
+	protected void setResourceJoinTable(XmlJoinTable resourceJoinTable) {
+		this.resource.setJoinTable(resourceJoinTable);
+	}
+	
+	public boolean isOverridableAssociation() {
+		return getJpaPlatformVariation().isJoinTableOverridable();
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return getRelationshipMapping().shouldValidateAgainstDatabase();
+	}
+	
+	// **************** join table *********************************************
+	
+	public void removeResourceJoinTable() {
+		this.resource.setJoinTable(null);
+	}
+	
+	public XmlJoinTable getResourceJoinTable() {
+		return this.resource.getJoinTable();
+	}
+
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange() {
+		return getRelationshipReference().getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java
new file mode 100644
index 0000000..177b534
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToManyRelationshipReference.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmManyToManyRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOwnableRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmManyToManyRelationshipReference
+	extends AbstractOrmRelationshipReference
+	implements OrmManyToManyRelationshipReference
+{
+	protected OrmMappedByJoiningStrategy mappedByJoiningStrategy;
+	
+	protected OrmJoinTableJoiningStrategy joinTableJoiningStrategy;
+	
+	
+	public GenericOrmManyToManyRelationshipReference(
+			OrmManyToManyMapping parent, XmlManyToMany resource) {
+		super(parent, resource);
+	}
+	
+	
+	@Override
+	protected void initializeJoiningStrategies() {
+		this.mappedByJoiningStrategy = buildMappedByJoiningStrategy();
+		
+		// initialize join table last, as the existence of a default join 
+		// table is dependent on the other mechanisms (mappedBy)
+		// not being specified
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+	}
+	
+	protected OrmMappedByJoiningStrategy buildMappedByJoiningStrategy() {
+		return new GenericOrmMappedByJoiningStrategy(this, getResourceMapping());
+	}
+	
+	protected OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return 	new GenericOrmJoinTableJoiningStrategy(this, getResourceMapping());
+	}
+	
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		newRelationshipReference.initializeFromOwnableRelationshipReference(this);
+		newRelationshipReference.initializeFromJoinTableEnabledRelationshipReference(this);
+	}
+	
+	@Override
+	public void initializeFromOwnableRelationshipReference(
+			OrmOwnableRelationshipReference oldRelationshipReference) {
+		super.initializeFromOwnableRelationshipReference(oldRelationshipReference);
+		this.mappedByJoiningStrategy.setMappedByAttribute(
+			oldRelationshipReference.getMappedByJoiningStrategy().getMappedByAttribute());
+	}
+	
+	@Override
+	public void initializeFromJoinTableEnabledRelationshipReference(
+			OrmJoinTableEnabledRelationshipReference oldRelationshipReference) {
+		super.initializeFromJoinTableEnabledRelationshipReference(oldRelationshipReference);
+		OrmJoinTable oldTable = 
+			oldRelationshipReference.getJoinTableJoiningStrategy().getJoinTable();
+		if (oldTable != null) {
+			this.joinTableJoiningStrategy.addJoinTable().initializeFrom(oldTable);
+		}
+	}
+	
+	
+	@Override
+	public OrmManyToManyMapping getRelationshipMapping() {
+		return (OrmManyToManyMapping) super.getRelationshipMapping();
+	}
+	
+	public XmlManyToMany getResourceMapping() {
+		return getRelationshipMapping().getResourceAttributeMapping();
+	}
+	
+	public boolean isRelationshipOwner() {
+		return this.mappedByJoiningStrategy.getMappedByAttribute() == null;
+	}
+	
+	public boolean isOwnedBy(RelationshipMapping mapping) {
+		return this.mappedByJoiningStrategy.relationshipIsOwnedBy(mapping);
+	}
+	
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+	
+	
+	// **************** mapped by **********************************************
+	
+	public OrmMappedByJoiningStrategy getMappedByJoiningStrategy() {
+		return this.mappedByJoiningStrategy;
+	}
+	
+	public boolean usesMappedByJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.mappedByJoiningStrategy;
+	}
+	
+	public void setMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.addStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetMappedByJoiningStrategy() {
+		this.mappedByJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return mappedByMapping.getKey() == MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** join table joining strategy  ***************************
+	
+	public OrmJoinTableJoiningStrategy getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public void setJoinTableJoiningStrategy() {
+		// join table is the default strategy, so no need to add to resource
+		this.mappedByJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return getMappedByJoiningStrategy().getMappedByAttribute() == null;
+	}
+	
+	
+	// **************** resource => context ************************************
+	
+	@Override
+	protected void updateJoiningStrategies() {
+		this.mappedByJoiningStrategy.update();
+		
+		// update join table last, as the existence of a default join 
+		// table is dependent on the other mechanisms (mappedBy)
+		// not being specified
+		this.joinTableJoiningStrategy.update();
+	}
+	
+	
+	// **************** Validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.mappedByJoiningStrategy.validate(messages, reporter);
+		this.joinTableJoiningStrategy.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToOneRelationshipReference.java
new file mode 100644
index 0000000..26b5d5f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmManyToOneRelationshipReference.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+public class GenericOrmManyToOneRelationshipReference
+	extends AbstractOrmManyToOneRelationshipReference
+{
+	
+	public GenericOrmManyToOneRelationshipReference(
+			OrmManyToOneMapping parent, XmlManyToOne resource) {
+		super(parent, resource);
+	}
+
+	@Override
+	protected OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new NullOrmJoinTableJoiningStrategy(this);
+	}
+
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		// the only joining strategy
+		return this.joinColumnJoiningStrategy;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedByJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedByJoiningStrategy.java
new file mode 100644
index 0000000..a637ac4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmMappedByJoiningStrategy.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.orm.OrmMappedByJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOwnableRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.XmlMappedByMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmMappedByJoiningStrategy 
+	extends AbstractOrmXmlContextNode
+	implements OrmMappedByJoiningStrategy
+{
+	protected XmlMappedByMapping resource;
+	
+	protected String mappedByAttribute;
+	
+	
+	public GenericOrmMappedByJoiningStrategy(
+			OrmOwnableRelationshipReference parent,
+			XmlMappedByMapping resource) {
+		super(parent);
+		this.resource = resource;
+		this.mappedByAttribute = this.resource.getMappedBy();
+	}
+	
+	
+	@Override
+	public OrmOwnableRelationshipReference getParent() {
+		return (OrmOwnableRelationshipReference) super.getParent();
+	}
+	
+	public OrmOwnableRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public String getTableName() {
+		RelationshipMapping owner = getRelationshipOwner();
+		return owner == null ? null : owner.getRelationshipReference().getPredominantJoiningStrategy().getTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		RelationshipMapping owner = getRelationshipOwner();
+		return owner == null ? null : owner.getRelationshipReference().getPredominantJoiningStrategy().getDbTable(tableName);
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		RelationshipMapping owner = getRelationshipOwner();
+		return owner == null ? false : owner.getRelationshipReference().getPredominantJoiningStrategy().tableNameIsInvalid(tableName);
+	}
+
+	public String getColumnTableNotValidDescription() {
+		//this will not be called if getRelationshipOwner() is null
+		return getRelationshipOwner().getRelationshipReference().getPredominantJoiningStrategy().getColumnTableNotValidDescription();
+	}
+
+	protected RelationshipMapping getRelationshipOwner() {
+		return getRelationshipMapping().getRelationshipOwner();
+	}
+
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+
+	public OrmRelationshipMapping getRelationshipMapping() {
+		return getParent().getRelationshipMapping();
+	}
+	
+	public boolean relationshipIsOwnedBy(RelationshipMapping otherMapping) {
+		String thisEntity = 
+			(getRelationshipReference().getEntity()) == null ?
+				null : getRelationshipReference().getEntity().getName();
+		String targetEntity = 
+			(otherMapping.getResolvedTargetEntity() == null) ?
+				null : otherMapping.getResolvedTargetEntity().getName();
+		return StringTools.stringsAreEqual(
+				thisEntity,
+				targetEntity)
+			&& StringTools.stringsAreEqual(
+				getMappedByAttribute(), 
+				otherMapping.getName());
+	}
+	
+	public String getMappedByAttribute() {
+		return this.mappedByAttribute;
+	}
+	
+	public void setMappedByAttribute(String newMappedByAttribute) {
+		String oldMappedByAttribute = this.mappedByAttribute;
+		this.mappedByAttribute = newMappedByAttribute;
+		this.resource.setMappedBy(newMappedByAttribute);
+		firePropertyChanged(MAPPED_BY_ATTRIBUTE_PROPERTY, oldMappedByAttribute, newMappedByAttribute);
+	}
+	
+	protected void setMappedByAttribute_(String newMappedByAttribute) {
+		String oldMappedByAttribute = this.mappedByAttribute;
+		this.mappedByAttribute = newMappedByAttribute;
+		firePropertyChanged(MAPPED_BY_ATTRIBUTE_PROPERTY, oldMappedByAttribute, newMappedByAttribute);
+	}
+	
+	public void addStrategy() {
+		if (this.mappedByAttribute == null) {
+			setMappedByAttribute(""); //$NON-NLS-1$
+		}
+	}
+	
+	public void removeStrategy() {
+		if (this.mappedByAttribute != null) {
+			setMappedByAttribute(null);
+		}
+	}
+	
+	public void update() {
+		setMappedByAttribute_(this.resource.getMappedBy());
+	}
+	
+	public Iterator<String> candidateMappedByAttributeNames() {
+		return getRelationshipMapping().allTargetEntityAttributeNames();	
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange() {
+		TextRange mappedByTextRange = this.resource.getMappedByTextRange();
+		return mappedByTextRange != null ? mappedByTextRange : getRelationshipReference().getValidationTextRange();
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		if (getMappedByAttribute() == null) {
+			return;
+		}
+		
+		Entity targetEntity = this.getRelationshipMapping().getResolvedTargetEntity();
+		if (targetEntity == null) {
+			return;  // null target entity is validated elsewhere
+		}
+		
+		AttributeMapping mappedByMapping = targetEntity.resolveAttributeMapping(this.mappedByAttribute);
+		
+		if (mappedByMapping == null) {
+			messages.add(
+				buildMessage(
+					JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
+					new String[] {this.mappedByAttribute}));
+			return;
+		}
+		
+		if (! this.getRelationshipReference().mayBeMappedBy(mappedByMapping)) {
+			messages.add(
+				buildMessage(
+					JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
+					new String[] {this.mappedByAttribute}));
+			return;
+		}
+		
+		// if mappedByMapping is not a relationship owner, then it should have 
+		// been flagged in above rule (mappedByIsValid)
+		if (! ((RelationshipMapping) mappedByMapping).isRelationshipOwner()) {
+			messages.add(buildMessage(
+					JpaValidationMessages.MAPPING_MAPPED_BY_ON_BOTH_SIDES,
+					new String[] {this.mappedByAttribute}));
+		}
+	}
+	
+	protected IMessage buildMessage(String msgID, String[] params) {
+		String attributeDescString;
+		PersistentAttribute attribute = getRelationshipMapping().getPersistentAttribute();
+		if (attribute.isVirtual()) {
+			attributeDescString = NLS.bind(JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC, attribute.getName());
+		}
+		else {
+			attributeDescString = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY, msgID, ArrayTools.add(params, 0, attributeDescString), this, getValidationTextRange());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java
new file mode 100644
index 0000000..8667356
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmOneToOneRelationshipReference.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+public class GenericOrmOneToOneRelationshipReference
+	extends AbstractOrmOneToOneRelationshipReference
+{
+	
+	
+	public GenericOrmOneToOneRelationshipReference(
+			OrmOneToOneMapping parent, XmlOneToOne resource) {
+		super(parent, resource);
+	}
+	
+
+	@Override
+	protected OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new NullOrmJoinTableJoiningStrategy(this);
+	}
+
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		else if (this.primaryKeyJoinColumnJoiningStrategy.primaryKeyJoinColumnsSize() > 0) {
+			return this.primaryKeyJoinColumnJoiningStrategy;
+		}
+		return this.joinColumnJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..f1a1758
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class GenericOrmPrimaryKeyJoinColumnJoiningStrategy
+	extends AbstractOrmXmlContextNode
+	implements OrmPrimaryKeyJoinColumnJoiningStrategy
+{
+	protected XmlOneToOne resource;
+	
+	protected final Vector<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns = new Vector<OrmPrimaryKeyJoinColumn>();
+	
+	protected final OrmJoinColumn.Owner joinColumnOwner;
+	
+	
+	public GenericOrmPrimaryKeyJoinColumnJoiningStrategy(
+			OrmPrimaryKeyJoinColumnEnabledRelationshipReference parent,
+			XmlOneToOne resource) {
+		super(parent);
+		this.resource = resource;
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+		this.initializePrimaryKeyJoinColumns();
+	}
+	
+	protected OrmJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	protected void initializePrimaryKeyJoinColumns() {
+		if (this.resource != null) {
+			for (XmlPrimaryKeyJoinColumn resourceJoinColumn : this.resource.getPrimaryKeyJoinColumns()) {
+				this.primaryKeyJoinColumns.add(buildPrimaryKeyJoinColumn(resourceJoinColumn));
+			}
+		}
+	}
+	
+	protected OrmPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(
+			XmlPrimaryKeyJoinColumn resourceJoinColumn) {
+		return this.getXmlContextNodeFactory().buildOrmPrimaryKeyJoinColumn(this, this.joinColumnOwner, resourceJoinColumn);
+	}
+	
+	@Override
+	public OrmJoinColumnEnabledRelationshipReference getParent() {
+		return (OrmJoinColumnEnabledRelationshipReference) super.getParent();
+	}
+	
+	public OrmJoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public OrmRelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+
+	public String getTableName() {
+		return getTypeMapping().getPrimaryTableName();
+	}
+
+	public Table getDbTable(String tableName) {
+		return getTypeMapping().getDbTable(tableName);
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		return getTypeMapping().tableNameIsInvalid(tableName);
+	}
+
+	public String getColumnTableNotValidDescription() {
+		return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
+	}
+
+	protected TypeMapping getTypeMapping() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	public void addStrategy() {
+		if (primaryKeyJoinColumnsSize() == 0) {
+			addPrimaryKeyJoinColumn(0);
+		}
+	}
+	
+	public void removeStrategy() {
+		for (PrimaryKeyJoinColumn each : CollectionTools.iterable(primaryKeyJoinColumns())) {
+			removePrimaryKeyJoinColumn(each);
+		}
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	
+	// **************** primary key join columns *******************************
+	
+	public ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns() {
+		return new CloneListIterator<OrmPrimaryKeyJoinColumn>(this.primaryKeyJoinColumns);
+	}
+	
+	public int primaryKeyJoinColumnsSize() {
+		return this.primaryKeyJoinColumns.size();
+	}
+	
+	public boolean hasPrimaryKeyJoinColumns() {
+		return ! this.primaryKeyJoinColumns.isEmpty();
+	}
+	
+	public OrmPrimaryKeyJoinColumn addPrimaryKeyJoinColumn(int index) {
+		XmlPrimaryKeyJoinColumn resourcePkJoinColumn = 
+			OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn();
+		OrmPrimaryKeyJoinColumn contextPkJoinColumn = 
+			this.buildPrimaryKeyJoinColumn(resourcePkJoinColumn);
+		this.primaryKeyJoinColumns.add(index, contextPkJoinColumn);
+		this.resource.getPrimaryKeyJoinColumns().add(index, resourcePkJoinColumn);
+		this.fireItemAdded(PRIMARY_KEY_JOIN_COLUMNS_LIST, index, contextPkJoinColumn);
+		return contextPkJoinColumn;
+	}
+	
+	protected void addPrimaryKeyJoinColumn(int index, OrmPrimaryKeyJoinColumn joinColumn) {
+		this.addItemToList(index, joinColumn, this.primaryKeyJoinColumns, PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	protected void addPrimaryKeyJoinColumn(OrmPrimaryKeyJoinColumn joinColumn) {
+		this.addPrimaryKeyJoinColumn(this.primaryKeyJoinColumns.size(), joinColumn);
+	}
+	
+	public void removePrimaryKeyJoinColumn(PrimaryKeyJoinColumn pkJoinColumn) {
+		this.removePrimaryKeyJoinColumn(this.primaryKeyJoinColumns.indexOf(pkJoinColumn));
+	}
+	
+	public void removePrimaryKeyJoinColumn(int index) {
+		OrmPrimaryKeyJoinColumn removedPkJoinColumn = this.primaryKeyJoinColumns.remove(index);
+		this.resource.getPrimaryKeyJoinColumns().remove(index);
+		this.fireItemRemoved(PRIMARY_KEY_JOIN_COLUMNS_LIST, index, removedPkJoinColumn);
+	}
+	
+	protected void removePrimaryKeyJoinColumn_(OrmPrimaryKeyJoinColumn joinColumn) {
+		removeItemFromList(joinColumn, this.primaryKeyJoinColumns, PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public void movePrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.primaryKeyJoinColumns, targetIndex, sourceIndex);
+		this.resource.getPrimaryKeyJoinColumns().move(targetIndex, sourceIndex);
+		fireItemMoved(PRIMARY_KEY_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	public void update() {
+		updatePrimaryKeyJoinColumns();
+	}
+	
+	protected void updatePrimaryKeyJoinColumns() {
+		// make a copy of the XML PK join columns (to prevent ConcurrentModificationException)
+		Iterator<XmlPrimaryKeyJoinColumn> xmlPkJoinColumns = 
+			new CloneIterator<XmlPrimaryKeyJoinColumn>(this.resource.getPrimaryKeyJoinColumns());
+		
+		for (Iterator<OrmPrimaryKeyJoinColumn> contextPkJoinColumns = primaryKeyJoinColumns(); 
+				contextPkJoinColumns.hasNext(); ) {
+			OrmPrimaryKeyJoinColumn contextPkJoinColumn = contextPkJoinColumns.next();
+			if (xmlPkJoinColumns.hasNext()) {
+				contextPkJoinColumn.update(xmlPkJoinColumns.next());
+			}
+			else {
+				removePrimaryKeyJoinColumn_(contextPkJoinColumn);
+			}
+		}
+		
+		while (xmlPkJoinColumns.hasNext()) {
+			addPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(xmlPkJoinColumns.next()));
+		}
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.getRelationshipReference().getValidationTextRange();
+	}
+	
+
+	// ********** join column owner adapter **********
+
+	protected class JoinColumnOwner
+		implements OrmJoinColumn.Owner 
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+		
+		/**
+		 * by default, the join column is in the type mapping's primary table
+		 */
+		public String getDefaultTableName() {
+			return GenericOrmPrimaryKeyJoinColumnJoiningStrategy.this.getTableName();
+		}
+		
+		public Entity getRelationshipTarget() {
+			return getRelationshipMapping().getResolvedTargetEntity();
+		}
+		
+		public String getAttributeName() {
+			return getRelationshipMapping().getName();
+		}
+		
+		public PersistentAttribute getPersistentAttribute() {
+			return getRelationshipMapping().getPersistentAttribute();
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return getTypeMapping().tableNameIsInvalid(tableName);
+		}
+		
+		/**
+		 * the join column can be on a secondary table
+		 */
+		public boolean tableIsAllowed() {
+			return true;
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return getTypeMapping().associatedTableNamesIncludingInherited();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return GenericOrmPrimaryKeyJoinColumnJoiningStrategy.this.getTypeMapping();
+		}
+		
+		public Table getDbTable(String tableName) {
+			return getTypeMapping().getDbTable(tableName);
+		}
+		
+		public Table getReferencedColumnDbTable() {
+			Entity relationshipTarget = getRelationshipTarget();
+			return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return false;
+		}
+		
+		public String getDefaultColumnName() {
+			return null;
+		}
+
+		public int joinColumnsSize() {
+			return GenericOrmPrimaryKeyJoinColumnJoiningStrategy.this.primaryKeyJoinColumnsSize();
+		}
+		
+		public TextRange getValidationTextRange() {
+			return GenericOrmPrimaryKeyJoinColumnJoiningStrategy.this.getValidationTextRange();
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			throw new UnsupportedOperationException("validation not supported yet"); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java
new file mode 100644
index 0000000..26b83ea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/GenericOrmXmlContextNodeFactory.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+
+public class GenericOrmXmlContextNodeFactory extends AbstractOrmXmlContextNodeFactory
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/NullOrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/NullOrmAssociationOverrideContainer.java
new file mode 100644
index 0000000..10dd335
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/NullOrmAssociationOverrideContainer.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+
+public class NullOrmAssociationOverrideContainer extends AbstractOrmXmlContextNode
+	implements OrmAssociationOverrideContainer
+{
+
+	protected final OrmAssociationOverrideContainer.Owner owner;
+	
+	public NullOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner) {
+		super(parent);
+		this.owner = owner;
+	}
+
+	protected Owner getOwner() {
+		return this.owner;
+	}
+	
+	public ListIterator<OrmAssociationOverride> associationOverrides() {
+		return EmptyListIterator.instance();
+	}
+	
+	public int associationOverridesSize() {
+		return 0;
+	}
+
+	public ListIterator<OrmAssociationOverride> virtualAssociationOverrides() {
+		return EmptyListIterator.instance();
+	}
+	
+	public int virtualAssociationOverridesSize() {
+		return 0;
+	}
+
+	public ListIterator<OrmAssociationOverride> specifiedAssociationOverrides() {
+		return EmptyListIterator.instance();
+	}
+
+	public int specifiedAssociationOverridesSize() {
+		return 0;
+	}
+	
+	public void moveSpecifiedAssociationOverride(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public OrmAssociationOverride getAssociationOverrideNamed(String name) {
+		return null;
+	}
+
+	public void update() {
+		//no-op
+	}
+
+
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/NullOrmJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/NullOrmJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..1c65fa9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/NullOrmJoinTableJoiningStrategy.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class NullOrmJoinTableJoiningStrategy 
+	extends AbstractOrmJoinTableJoiningStrategy
+{
+
+	
+	public NullOrmJoinTableJoiningStrategy(OrmJoinTableEnabledRelationshipReference parent) {
+		super(parent);
+		this.initialize();
+	}
+	
+	
+	@Override
+	public OrmJoinTableEnabledRelationshipReference getParent() {
+		return (OrmJoinTableEnabledRelationshipReference) super.getParent();
+	}
+	
+	@Override
+	public OrmJoinTableEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	@Override
+	public OrmRelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+
+	@Override
+	protected void setResourceJoinTable(XmlJoinTable resourceJoinTable) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+	
+	// **************** join table *********************************************
+
+	
+	public void removeResourceJoinTable() {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	protected boolean mayHaveJoinTable() {
+		return false;
+	}
+	
+	public XmlJoinTable getResourceJoinTable() {
+		return null;
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmBasicMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmBasicMappingDefinition.java
new file mode 100644
index 0000000..210c6e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmBasicMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmBasicMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmBasicMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmBasicMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlBasic(), 
+				XmlBasic.class);
+	}
+	
+	public OrmBasicMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmBasicMapping(parent, (XmlBasic) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlBasic(ormTypeMapping, (JavaBasicMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddableDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddableDefinition.java
new file mode 100644
index 0000000..d908024
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddableDefinition.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddable;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddable;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+/**
+ * default ORM Embeddable provider
+ */
+public class OrmEmbeddableDefinition
+	implements OrmTypeMappingDefinition
+{
+	// singleton
+	private static final OrmEmbeddableDefinition INSTANCE = 
+			new OrmEmbeddableDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmEmbeddableDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
+	}
+	
+	public XmlTypeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlEmbeddable(), 
+				XmlEmbeddable.class);
+	}
+	
+	public OrmEmbeddable buildContextMapping(
+			OrmPersistentType parent, 
+			XmlTypeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmEmbeddable(parent, (XmlEmbeddable) resourceMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java
new file mode 100644
index 0000000..133bd4f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddedIdMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmEmbeddedIdMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmEmbeddedIdMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmEmbeddedIdMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlEmbeddedId(), 
+				XmlEmbeddedId.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmEmbeddedIdMapping(parent, (XmlEmbeddedId) resourceMapping);
+	}
+
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlEmbeddedId(ormTypeMapping, (JavaEmbeddedIdMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddedMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddedMappingDefinition.java
new file mode 100644
index 0000000..26cd121
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEmbeddedMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmEmbeddedMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmEmbeddedMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmEmbeddedMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlEmbedded(), 
+				XmlEmbedded.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmEmbeddedMapping(parent, (XmlEmbedded) resourceMapping);
+	}
+
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlEmbedded(ormTypeMapping, (JavaEmbeddedMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEntityDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEntityDefinition.java
new file mode 100644
index 0000000..cf734f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEntityDefinition.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+/**
+ * default ORM Entity provider
+ */
+public class OrmEntityDefinition
+	implements OrmTypeMappingDefinition
+{	
+	// singleton
+	private static final OrmEntityDefinition INSTANCE = 
+			new OrmEntityDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmEntityDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
+	}
+	
+	public XmlTypeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlEntity(), 
+				XmlEntity.class);
+	}
+	
+	public OrmEntity buildContextMapping(
+			OrmPersistentType parent, 
+			XmlTypeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmEntity(parent, (XmlEntity) resourceMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEntityTextRangeResolver.java
new file mode 100644
index 0000000..76f6fad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmEntityTextRangeResolver.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class OrmEntityTextRangeResolver
+	implements PrimaryKeyTextRangeResolver
+{
+	private OrmEntity entity;
+	
+	
+	public OrmEntityTextRangeResolver(OrmEntity entity) {
+		this.entity = entity;
+	}
+	
+	
+	public TextRange getTypeMappingTextRange() {
+		return this.entity.getValidationTextRange();
+	}
+	
+	public TextRange getIdClassTextRange() {
+		return this.entity.getIdClassReference().getValidationTextRange();
+	}
+	
+	public TextRange getAttributeMappingTextRange(String attributeName) {
+		return this.entity.getPersistentType().
+				getAttributeNamed(attributeName).getMapping().getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmIdMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmIdMappingDefinition.java
new file mode 100644
index 0000000..afedc49
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmIdMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmIdMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmIdMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmIdMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlId(), 
+				XmlId.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmIdMapping(parent, (XmlId) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlId(ormTypeMapping, (JavaIdMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmManyToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmManyToManyMappingDefinition.java
new file mode 100644
index 0000000..c719454
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmManyToManyMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmManyToManyMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmManyToManyMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmManyToManyMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlManyToMany(), 
+				XmlManyToMany.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmManyToManyMapping(parent, (XmlManyToMany) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlManyToMany(ormTypeMapping, (JavaManyToManyMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmManyToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmManyToOneMappingDefinition.java
new file mode 100644
index 0000000..2098c67
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmManyToOneMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmManyToOneMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmManyToOneMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmManyToOneMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlManyToOne(), 
+				XmlManyToOne.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmManyToOneMapping(parent, (XmlManyToOne) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlManyToOne(ormTypeMapping, (JavaManyToOneMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmMappedSuperclassDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmMappedSuperclassDefinition.java
new file mode 100644
index 0000000..c0e2f67
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmMappedSuperclassDefinition.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmMappedSuperclass;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+/**
+ * default ORM MappedSuperclass definition
+ */
+public class OrmMappedSuperclassDefinition
+	implements OrmTypeMappingDefinition
+{	
+	// singleton
+	private static final OrmMappedSuperclassDefinition INSTANCE = 
+			new OrmMappedSuperclassDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmTypeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmMappedSuperclassDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
+	}
+	
+	public XmlTypeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlMappedSuperclass(), 
+				XmlMappedSuperclass.class);
+	}
+	
+	public OrmMappedSuperclass buildContextMapping(
+			OrmPersistentType parent, 
+			XmlTypeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmMappedSuperclass(parent, (XmlMappedSuperclass) resourceMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java
new file mode 100644
index 0000000..bb107bb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmMappedSuperclass;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class OrmMappedSuperclassTextRangeResolver
+	implements PrimaryKeyTextRangeResolver
+{
+	private OrmMappedSuperclass mappedSuperclass;
+	
+	
+	public OrmMappedSuperclassTextRangeResolver(OrmMappedSuperclass mappedSuperclass) {
+		this.mappedSuperclass = mappedSuperclass;
+	}
+	
+	
+	public TextRange getTypeMappingTextRange() {
+		return this.mappedSuperclass.getValidationTextRange();
+	}
+	
+	public TextRange getIdClassTextRange() {
+		return this.mappedSuperclass.getIdClassReference().getValidationTextRange();
+	}
+	
+	public TextRange getAttributeMappingTextRange(String attributeName) {
+		return this.mappedSuperclass.getPersistentType().
+				getAttributeNamed(attributeName).getMapping().getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmOneToManyMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmOneToManyMappingDefinition.java
new file mode 100644
index 0000000..f7ea7d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmOneToManyMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmOneToManyMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmOneToManyMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmOneToManyMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlOneToMany(), 
+				XmlOneToMany.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmOneToManyMapping(parent, (XmlOneToMany) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlOneToMany(ormTypeMapping, (JavaOneToManyMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmOneToOneMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmOneToOneMappingDefinition.java
new file mode 100644
index 0000000..487b049
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmOneToOneMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmOneToOneMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmOneToOneMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmOneToOneMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlOneToOne(), 
+				XmlOneToOne.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmOneToOneMapping(parent, (XmlOneToOne) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlOneToOne(ormTypeMapping, (JavaOneToOneMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmTransientMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmTransientMappingDefinition.java
new file mode 100644
index 0000000..6177649
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmTransientMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmTransientMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmTransientMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmTransientMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlTransient(), 
+				XmlTransient.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmTransientMapping(parent, (XmlTransient) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlTransient(ormTypeMapping, (JavaTransientMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmVersionMappingDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmVersionMappingDefinition.java
new file mode 100644
index 0000000..abc841d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/OrmVersionMappingDefinition.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmVersionMappingDefinition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmVersionMappingDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmVersionMappingDefinition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlVersion(), 
+				XmlVersion.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildOrmVersionMapping(parent, (XmlVersion) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return factory.buildVirtualXmlVersion(ormTypeMapping, (JavaVersionMapping) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualCascadeType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualCascadeType.java
new file mode 100644
index 0000000..6ecb0da
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualCascadeType.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Cascade;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+
+public class VirtualCascadeType extends CascadeType
+{
+	protected Cascade javaCascade;
+	
+	
+	public VirtualCascadeType(Cascade javaCascade) {
+		super();
+		this.javaCascade = javaCascade;
+	}
+
+	@Override
+	public boolean isCascadeAll() {
+		return this.javaCascade.isAll();
+	}
+
+	@Override
+	public void setCascadeAll(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean isCascadeMerge() {
+		return this.javaCascade.isMerge();
+	}
+
+	@Override
+	public void setCascadeMerge(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean isCascadePersist() {
+		return this.javaCascade.isPersist();
+	}
+
+	@Override
+	public void setCascadePersist(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean isCascadeRefresh() {
+		return this.javaCascade.isRefresh();
+	}
+
+	@Override
+	public void setCascadeRefresh(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean isCascadeRemove() {
+		return this.javaCascade.isRemove();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualMapKey.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualMapKey.java
new file mode 100644
index 0000000..0b75a5c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualMapKey.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.CollectionMapping;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+
+public class VirtualMapKey extends MapKey
+{
+	CollectionMapping javaCollectionMapping;
+	
+	public VirtualMapKey(CollectionMapping collectionMapping) {
+		super();
+		this.javaCollectionMapping = collectionMapping;
+	}
+
+	@Override
+	public String getName() {
+		return this.javaCollectionMapping.getSpecifiedMapKey();
+	}
+
+	@Override
+	public void setName(String newName) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAssociationOverride.java
new file mode 100644
index 0000000..6f4af8e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAssociationOverride.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c)2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public class VirtualXmlAssociationOverride extends XmlAssociationOverride
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JoiningStrategy joiningStrategy;
+	
+
+	public VirtualXmlAssociationOverride(String name, OrmTypeMapping ormTypeMapping, JoiningStrategy joiningStrategy) {
+		super();
+		this.name = name;
+		this.ormTypeMapping = ormTypeMapping;
+		this.joiningStrategy = joiningStrategy;
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		EList<XmlJoinColumn> joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS);
+		if (this.joiningStrategy instanceof JoinColumnJoiningStrategy) {
+			for (JoinColumn joinColumn : 
+					CollectionTools.iterable(((JoinColumnJoiningStrategy) this.joiningStrategy).joinColumns())) {
+				XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, this.isOrmMetadataComplete());
+				joinColumns.add(xmlJoinColumn);
+			}
+		}
+		return joinColumns;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java
new file mode 100644
index 0000000..a071e1c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeMapping.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlAttributeMapping extends AbstractJpaEObject implements XmlAttributeMapping
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaAttributeMapping javaAttributeMapping;
+	
+	
+	public VirtualXmlAttributeMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaAttributeMapping;
+	}
+	
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	public String getMappingKey() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getPersistentAttribute().getDefaultMappingKey();
+		}
+		return this.javaAttributeMapping.getKey();
+	}
+	
+	public String getName() {
+		return this.javaAttributeMapping.getPersistentAttribute().getName();
+	}
+	
+	public void setName(String newName) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(
+				this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeOverride.java
new file mode 100644
index 0000000..86e3490
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeOverride.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+
+public class VirtualXmlAttributeOverride extends XmlAttributeOverride
+{
+
+	public VirtualXmlAttributeOverride(String name, XmlColumn xmlColumn) {
+		super();
+		this.name = name;
+		this.column = xmlColumn;
+	}
+	
+	@Override
+	public String getName() {
+		return this.name;
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.column;
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeOverrideColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeOverrideColumn.java
new file mode 100644
index 0000000..d1383f2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlAttributeOverrideColumn.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Column;
+
+/**
+ * javax.persistence.Column
+ */
+public class VirtualXmlAttributeOverrideColumn
+	extends VirtualXmlColumn
+{
+
+	public VirtualXmlAttributeOverrideColumn(Column column) {
+		super(null, column);
+	}
+
+	@Override
+	public String getName() {
+		return this.column.getSpecifiedName();
+	}
+
+	@Override
+	public String getColumnDefinition() {
+		return this.column.getColumnDefinition();
+	}
+
+	@Override
+	public String getTable() {
+		return this.column.getSpecifiedTable();
+	}
+
+	@Override
+	public Boolean getInsertable() {
+		return this.column.getSpecifiedInsertable();
+	}
+
+	@Override
+	public Boolean getUpdatable() {
+		return this.column.getSpecifiedUpdatable();
+	}
+
+	@Override
+	public Boolean getNullable() {
+		return this.column.getSpecifiedNullable();
+	}
+
+	@Override
+	public Boolean getUnique() {
+		return this.column.getSpecifiedUnique();
+	}
+
+	@Override
+	public Integer getLength() {
+		return this.column.getSpecifiedLength();
+	}
+
+	@Override
+	public Integer getScale() {
+		return this.column.getSpecifiedScale();
+	}
+
+	@Override
+	public Integer getPrecision() {
+		return this.column.getSpecifiedPrecision();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java
new file mode 100644
index 0000000..f9d5c52
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlBasic.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.EnumeratedConverter;
+import org.eclipse.jpt.core.context.TemporalConverter;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlBasic extends XmlBasic
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaBasicMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualXmlColumn column;
+	
+	public VirtualXmlBasic(OrmTypeMapping ormTypeMapping, JavaBasicMapping javaBasicMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaBasicMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaBasicMapping);
+		this.column = new VirtualXmlColumn(ormTypeMapping, javaBasicMapping.getColumn());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.column;
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		if (this.isOrmMetadataComplete()) {
+			return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch());
+		}
+		return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getFetch());
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getOptional() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.javaAttributeMapping.isDefaultOptional());
+		}
+		return Boolean.valueOf(this.javaAttributeMapping.isOptional());
+	}
+
+	@Override
+	public void setOptional(Boolean newOptional) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public boolean isLob() {
+		if (this.isOrmMetadataComplete()) {
+			return false;
+		}
+		return this.javaAttributeMapping.getConverter().getType() == Converter.LOB_CONVERTER;
+	}
+
+	@Override
+	public void setLob(boolean newLob) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TemporalType getTemporal() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getConverter().getType() == Converter.TEMPORAL_CONVERTER) {
+			org.eclipse.jpt.core.context.TemporalType javaTemporalType = ((TemporalConverter) this.javaAttributeMapping.getConverter()).getTemporalType();
+			return org.eclipse.jpt.core.context.TemporalType.toOrmResourceModel(javaTemporalType);
+		}
+		return null;
+	}
+
+	@Override
+	public void setTemporal(TemporalType newTemporal){
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EnumType getEnumerated() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getConverter().getType() == Converter.ENUMERATED_CONVERTER) {
+			org.eclipse.jpt.core.context.EnumType javaEnumeratedType = ((EnumeratedConverter) this.javaAttributeMapping.getConverter()).getEnumType();
+			return org.eclipse.jpt.core.context.EnumType.toOrmResourceModel(javaEnumeratedType);
+		}
+		return null;
+	}
+
+	@Override
+	public void setEnumerated(EnumType newEnumerated) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getEnumeratedTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getLobTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTemporalTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java
new file mode 100644
index 0000000..fea2148
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlColumn.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * A virtual column is used to represent the XmlColumn resource object
+ * within a virtual mapping.  A virtual mapping is one which is not specified
+ * in the orm.xml file, but is implied from the underlying java.  Virtual column
+ * is not used when the mapping is specified in the orm.xml, but the column tag does not exist.
+ * 
+ * A virtual column delegates to the underlying java column for its state.  The metadataComplete
+ * flag determines whether it will get specified or default information from the java column
+ *
+ */
+public class VirtualXmlColumn extends XmlColumn
+{
+	
+	protected Column column;
+
+	protected OrmTypeMapping ormTypeMapping;
+	
+	
+	public VirtualXmlColumn(OrmTypeMapping ormTypeMapping, Column column) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.column = column;
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+
+	@Override
+	public String getColumnDefinition() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.column.getColumnDefinition();
+	}
+
+	@Override
+	public void setColumnDefinition(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getInsertable() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.column.isDefaultInsertable());
+		}
+		return Boolean.valueOf(this.column.isInsertable());
+	}
+
+	@Override
+	public void setInsertable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Integer getLength() {
+		if (this.isOrmMetadataComplete()) {
+			return Integer.valueOf(this.column.getDefaultLength());
+		}
+		return Integer.valueOf(this.column.getLength());
+	}
+
+	@Override
+	public void setLength(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getName() {
+		if (this.isOrmMetadataComplete()) {
+			return this.column.getDefaultName();
+		}
+		return this.column.getName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getNullable() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.column.isDefaultNullable());
+		}
+		return Boolean.valueOf(this.column.isNullable());
+	}
+
+	@Override
+	public void setNullable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Integer getPrecision() {
+		if (this.isOrmMetadataComplete()) {
+			return Integer.valueOf(this.column.getDefaultPrecision());
+		}
+		return Integer.valueOf(this.column.getPrecision());
+	}
+
+	@Override
+	public void setPrecision(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Integer getScale() {
+		if (this.isOrmMetadataComplete()) {
+			return Integer.valueOf(this.column.getDefaultScale());
+		}
+		return Integer.valueOf(this.column.getScale());
+	}
+
+	@Override
+	public void setScale(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getTable() {
+		if (this.isOrmMetadataComplete()) {
+			return this.column.getDefaultTable();
+		}
+		return this.column.getTable();
+	}
+
+	@Override
+	public void setTable(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getUnique() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.column.isDefaultUnique());
+		}
+		return Boolean.valueOf(this.column.isUnique());
+	}
+
+	@Override
+	public void setUnique(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getUpdatable() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.column.isDefaultUpdatable());
+		}
+		return Boolean.valueOf(this.column.isUpdatable());
+	}
+
+	@Override
+	public void setUpdatable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTableTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java
new file mode 100644
index 0000000..2065983
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbedded.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualEmbedded is an implementation of Embedded used when there is 
+ * no tag in the orm.xml and an underlying javaEmbeddedMapping exists.
+ */
+public class VirtualXmlEmbedded extends XmlEmbedded
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaEmbeddedMapping javaAttributeMapping;
+	
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	public VirtualXmlEmbedded(OrmTypeMapping ormTypeMapping, JavaEmbeddedMapping javaEmbeddedMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaEmbeddedMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaEmbeddedMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+	
+	@Override
+	public EList<XmlAttributeOverride> getAttributeOverrides() {
+		EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_EMBEDDED__ATTRIBUTE_OVERRIDES);
+		ListIterator<JavaAttributeOverride> javaAttributeOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAttributeOverrides = this.javaAttributeMapping.getAttributeOverrideContainer().attributeOverrides();
+		}
+		else {
+			javaAttributeOverrides = this.javaAttributeMapping.getAttributeOverrideContainer().virtualAttributeOverrides();
+		}
+		for (JavaAttributeOverride javaAttributeOverride : CollectionTools.iterable(javaAttributeOverrides)) {
+			XmlColumn xmlColumn = new VirtualXmlColumn(this.ormTypeMapping, javaAttributeOverride.getColumn());
+			XmlAttributeOverride xmlAttributeOverride = new VirtualXmlAttributeOverride(javaAttributeOverride.getName(), xmlColumn);
+			attributeOverrides.add(xmlAttributeOverride);
+		}
+		return attributeOverrides;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java
new file mode 100644
index 0000000..4dae7d0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlEmbeddedId.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualEmbeddedId is an implementation of EmbeddedId used when there is 
+ * no tag in the orm.xml and an underlying javaEmbeddedIdMapping exists.
+ */
+public class VirtualXmlEmbeddedId extends XmlEmbeddedId
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaEmbeddedIdMapping javaAttributeMapping;
+		
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	public VirtualXmlEmbeddedId(OrmTypeMapping ormTypeMapping, JavaEmbeddedIdMapping javaEmbeddedIdMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaEmbeddedIdMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaEmbeddedIdMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+	
+	@Override
+	public EList<XmlAttributeOverride> getAttributeOverrides() {
+		EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_EMBEDDED_ID__ATTRIBUTE_OVERRIDES);
+		ListIterator<JavaAttributeOverride> javaAttributeOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAttributeOverrides = this.javaAttributeMapping.getAttributeOverrideContainer().attributeOverrides();
+		}
+		else {
+			javaAttributeOverrides = this.javaAttributeMapping.getAttributeOverrideContainer().virtualAttributeOverrides();
+		}
+		for (JavaAttributeOverride javaAttributeOverride : CollectionTools.iterable(javaAttributeOverrides)) {
+			XmlColumn xmlColumn = new VirtualXmlColumn(this.ormTypeMapping, javaAttributeOverride.getColumn());
+			XmlAttributeOverride xmlAttributeOverride = new VirtualXmlAttributeOverride(javaAttributeOverride.getName(), xmlColumn);
+			attributeOverrides.add(xmlAttributeOverride);
+		}
+		return attributeOverrides;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlGeneratedValue.java
new file mode 100644
index 0000000..828999c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlGeneratedValue.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaGeneratedValue;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.resource.orm.GenerationType;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlGeneratedValue extends XmlGeneratedValue
+{
+	JavaIdMapping javaIdMapping;
+
+	protected boolean metadataComplete;
+	
+		
+	public VirtualXmlGeneratedValue(JavaIdMapping javaIdMapping, boolean metadataComplete) {
+		super();
+		this.javaIdMapping = javaIdMapping;
+		this.metadataComplete = metadataComplete;
+	}
+
+	protected JavaGeneratedValue getJavaGeneratedValue() {
+		return this.javaIdMapping.getGeneratedValue();
+	}
+
+
+	@Override
+	public String getGenerator() {
+		return this.metadataComplete ? null : this.getJavaGeneratedValue().getGenerator();
+	}
+
+	@Override
+	public GenerationType getStrategy() {
+		return this.metadataComplete ? null : org.eclipse.jpt.core.context.GenerationType.toOrmResourceModel(this.getJavaGeneratedValue().getStrategy());
+	}
+
+	@Override
+	public void setGenerator(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void setStrategy(GenerationType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TextRange getGeneratorTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java
new file mode 100644
index 0000000..00743c7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlId.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.TemporalConverter;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualId is an implementation of Id used when there is 
+ * no tag in the orm.xml and an underlying javaIdMapping exists.
+ */
+public class VirtualXmlId extends XmlId
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaIdMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualXmlColumn column;
+
+	protected final VirtualXmlGeneratedValue virtualGeneratedValue;
+	
+	protected final VirtualXmlTableGenerator virtualTableGenerator;
+	
+	protected final VirtualXmlSequenceGenerator virtualSequenceGenerator;
+	
+		
+	public VirtualXmlId(OrmTypeMapping ormTypeMapping, JavaIdMapping javaIdMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaIdMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaIdMapping);
+		this.column = new VirtualXmlColumn(ormTypeMapping, javaIdMapping.getColumn());
+		this.virtualGeneratedValue = new VirtualXmlGeneratedValue(javaIdMapping, this.isOrmMetadataComplete());
+		this.virtualTableGenerator = new VirtualXmlTableGenerator(javaIdMapping.getGeneratorContainer(), this.isOrmMetadataComplete());
+		this.virtualSequenceGenerator = new VirtualXmlSequenceGenerator(javaIdMapping.getGeneratorContainer(), this.isOrmMetadataComplete());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.column;
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TemporalType getTemporal() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getConverter().getType() == Converter.TEMPORAL_CONVERTER) {
+			org.eclipse.jpt.core.context.TemporalType javaTemporalType = ((TemporalConverter) this.javaAttributeMapping.getConverter()).getTemporalType();
+			return  org.eclipse.jpt.core.context.TemporalType.toOrmResourceModel(javaTemporalType);
+		}
+		return null;
+	}
+
+	@Override
+	public void setTemporal(TemporalType newTemporal){
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+
+	@Override
+	public XmlGeneratedValue getGeneratedValue() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getGeneratedValue() != null) {
+			return this.virtualGeneratedValue;
+		}
+		return null;
+	}
+	
+	@Override
+	public void setGeneratedValue(XmlGeneratedValue value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlSequenceGenerator getSequenceGenerator() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getGeneratorContainer().getSequenceGenerator() != null) {
+			return this.virtualSequenceGenerator;
+		}
+		return null;
+	}
+
+	@Override
+	public void setSequenceGenerator(XmlSequenceGenerator value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlTableGenerator getTableGenerator() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getGeneratorContainer().getTableGenerator() != null) {
+			return this.virtualTableGenerator;
+		}
+		return null;
+	}
+
+	@Override
+	public void setTableGenerator(XmlTableGenerator value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//see eclipselink bug 247078 for info one why I made the interface XmlConvertibleMapping
+	@Override
+	public EnumType getEnumerated() {
+		throw new UnsupportedOperationException("enumerated not supported on id mappings"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void setEnumerated(EnumType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//see eclipselink bug 247078 for info one why I made the interface XmlConvertibleMapping
+	@Override
+	public boolean isLob() {
+		throw new UnsupportedOperationException("lob not supported on id mappings"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void setLob(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getEnumeratedTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getLobTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTemporalTextRange() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlJoinColumn.java
new file mode 100644
index 0000000..0e862c7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlJoinColumn.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlJoinColumn extends XmlJoinColumn
+{	
+	protected JoinColumn javaJoinColumn;
+
+	protected boolean metadataComplete;
+
+	public VirtualXmlJoinColumn(JoinColumn javaJoinColumn, boolean metadataComplete) {
+		super();
+		this.javaJoinColumn = javaJoinColumn;
+		this.metadataComplete = metadataComplete;
+	}
+	
+	@Override
+	public String getColumnDefinition() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.javaJoinColumn.getColumnDefinition();
+	}
+
+	@Override
+	public void setColumnDefinition(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getInsertable() {
+		if (this.metadataComplete) {
+			return Boolean.valueOf(this.javaJoinColumn.isDefaultInsertable());
+		}
+		return Boolean.valueOf(this.javaJoinColumn.isInsertable());
+	}
+
+	@Override
+	public void setInsertable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getName() {
+		if (this.metadataComplete) {
+			return this.javaJoinColumn.getDefaultName();
+		}
+		return this.javaJoinColumn.getName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getReferencedColumnName() {
+		if (this.metadataComplete) {
+			return this.javaJoinColumn.getDefaultReferencedColumnName();
+		}
+		return this.javaJoinColumn.getReferencedColumnName();
+	}
+
+	@Override
+	public void setReferencedColumnName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public Boolean getNullable() {
+		if (this.metadataComplete) {
+			return Boolean.valueOf(this.javaJoinColumn.isDefaultNullable());
+		}
+		return Boolean.valueOf(this.javaJoinColumn.isNullable());
+	}
+
+	@Override
+	public void setNullable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getTable() {
+		if (this.metadataComplete) {
+			return this.javaJoinColumn.getDefaultTable();
+		}
+		return this.javaJoinColumn.getTable();
+	}
+
+	@Override
+	public void setTable(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getUnique() {
+		if (this.metadataComplete) {
+			return Boolean.valueOf(this.javaJoinColumn.isDefaultUnique());
+		}
+		return Boolean.valueOf(this.javaJoinColumn.isUnique());
+	}
+
+	@Override
+	public void setUnique(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getUpdatable() {
+		if (this.metadataComplete) {
+			return Boolean.valueOf(this.javaJoinColumn.isDefaultUpdatable());
+		}
+		return Boolean.valueOf(this.javaJoinColumn.isUpdatable());
+	}
+
+	@Override
+	public void setUpdatable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTableTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getReferencedColumnNameTextRange() {
+		return null;
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlJoinTable.java
new file mode 100644
index 0000000..1e1fee7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlJoinTable.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public class VirtualXmlJoinTable 
+	extends XmlJoinTable
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected JoinTable joinTable;	
+	
+	
+	public VirtualXmlJoinTable(OrmTypeMapping ormTypeMapping, JoinTable joinTable) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.joinTable = joinTable;
+	}
+	
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getName() {
+		if (this.isOrmMetadataComplete()) {
+			return this.joinTable.getDefaultName();
+		}
+		return this.joinTable.getName();		
+	}
+	
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getCatalog() {
+		if (this.isOrmMetadataComplete()) {
+			return this.joinTable.getDefaultCatalog();
+		}
+		return this.joinTable.getCatalog();
+	}
+	
+	@Override
+	public void setCatalog(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getSchema() {
+		if (this.isOrmMetadataComplete()) {
+			return this.joinTable.getDefaultSchema();
+		}
+		return this.joinTable.getSchema();
+	}
+	
+	@Override
+	public void setSchema(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//VirtualXmlJoinTable is rebuilt every time, so just rebuilding the joinColumns list as well
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		EList<XmlJoinColumn> joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_JOIN_TABLE__JOIN_COLUMNS);
+		if (this.joinTable == null || isOrmMetadataComplete()) {
+			return joinColumns;
+		}
+		for (JoinColumn joinColumn : CollectionTools.iterable(this.joinTable.specifiedJoinColumns())) {
+			XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, isOrmMetadataComplete());
+			joinColumns.add(xmlJoinColumn);
+		}
+		return joinColumns;
+	}
+	
+	//VirtualXmlJoinTable is rebuilt every time, so just rebuilding the joinColumns list as well
+	@Override
+	public EList<XmlJoinColumn> getInverseJoinColumns() {
+		EList<XmlJoinColumn> inverseJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS);
+		if (this.joinTable == null || isOrmMetadataComplete()) {
+			return inverseJoinColumns;
+		}
+		for (JoinColumn joinColumn : CollectionTools.iterable(this.joinTable.specifiedInverseJoinColumns())) {
+			XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, isOrmMetadataComplete());
+			inverseJoinColumns.add(xmlJoinColumn);
+		}
+
+		return inverseJoinColumns;
+	}
+	
+	@Override
+	public EList<XmlUniqueConstraint> getUniqueConstraints() {
+		EList<XmlUniqueConstraint> xmlUniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.XML_JOIN_TABLE__UNIQUE_CONSTRAINTS);
+		if (this.joinTable == null || isOrmMetadataComplete()) {
+			return xmlUniqueConstraints;
+		}
+		for (UniqueConstraint uniqueConstraint : CollectionTools.iterable(this.joinTable.uniqueConstraints())) {
+			XmlUniqueConstraint xmlUniqueConstraint = new VirtualXmlUniqueConstraint(uniqueConstraint, isOrmMetadataComplete());
+			xmlUniqueConstraints.add(xmlUniqueConstraint);
+		}
+		
+		return xmlUniqueConstraints;
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getCatalogTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getSchemaTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java
new file mode 100644
index 0000000..3364c3c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToMany.java
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualManyToMany is an implementation of ManyToMany used when there is 
+ * no tag in the orm.xml and an underlying javaManyToManyMapping exists.
+ */
+public class VirtualXmlManyToMany 
+	extends XmlManyToMany
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaManyToManyMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualCascadeType virtualCascadeType;
+	
+	protected final MapKey mapKey;
+	
+	
+	public VirtualXmlManyToMany(
+			OrmTypeMapping ormTypeMapping, 
+			JavaManyToManyMapping javaManyToManyMapping) {
+		
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaManyToManyMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaManyToManyMapping);
+		this.virtualCascadeType = new VirtualCascadeType(javaManyToManyMapping.getCascade());
+		this.mapKey = new VirtualMapKey(javaManyToManyMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		if (this.isOrmMetadataComplete()) {
+			return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch());
+		}
+		return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getFetch());
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		if (this.javaAttributeMapping.getRelationshipReference().getJoinTableJoiningStrategy().getJoinTable() != null) {
+			return 	new VirtualXmlJoinTable(
+				this.ormTypeMapping, 
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinTableJoiningStrategy().getJoinTable());
+		}
+		return null;
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getDefaultTargetEntity();
+		}
+		return this.javaAttributeMapping.getFullyQualifiedTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getMappedBy() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaAttributeMapping.getRelationshipReference().getMappedByJoiningStrategy().getMappedByAttribute();
+	}
+	
+	@Override
+	public void setMappedBy(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	
+	@Override
+	public MapKey getMapKey() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.isNoMapKey()) {
+			return null;
+		}
+		return this.mapKey;
+	}
+	
+	@Override
+	public void setMapKey(MapKey value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getOrderBy() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaAttributeMapping.getOrderable().getSpecifiedOrderBy();
+	}
+	
+	@Override
+	public void setOrderBy(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getMappedByTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java
new file mode 100644
index 0000000..e14c5aa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlManyToOne.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualManyToOne is an implementation of ManyToOne used when there is 
+ * no tag in the orm.xml and an underlying javaManyToOneMapping exists.
+ */
+public class VirtualXmlManyToOne 
+	extends XmlManyToOne
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaManyToOneMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualCascadeType virtualCascadeType;
+	
+	
+	public VirtualXmlManyToOne(
+		OrmTypeMapping ormTypeMapping, JavaManyToOneMapping javaManyToOneMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaManyToOneMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaManyToOneMapping);
+		this.virtualCascadeType = new VirtualCascadeType(javaManyToOneMapping.getCascade());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+
+	@Override
+	public FetchType getFetch() {
+		if (this.isOrmMetadataComplete()) {
+			return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch());
+		}
+		return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getFetch());
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getOptional() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.javaAttributeMapping.isDefaultOptional());
+		}
+		return Boolean.valueOf(this.javaAttributeMapping.isOptional());
+	}
+
+	@Override
+	public void setOptional(Boolean newOptional) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		EList<XmlJoinColumn> joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_MANY_TO_ONE__JOIN_COLUMNS);
+		if (isOrmMetadataComplete()) {
+			return joinColumns;
+		}
+		for (JoinColumn joinColumn : 
+			CollectionTools.iterable(
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinColumnJoiningStrategy().specifiedJoinColumns())) {
+			XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, isOrmMetadataComplete());
+			joinColumns.add(xmlJoinColumn);
+		}
+		return joinColumns;
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		return null;
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getDefaultTargetEntity();
+		}
+		return this.javaAttributeMapping.getFullyQualifiedTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java
new file mode 100644
index 0000000..0cc0cd8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlNullAttributeMapping.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualVersion is an implementation of Version used when there is 
+ * no tag in the orm.xml and an underlying javaVersionMapping exists.
+ */
+public class VirtualXmlNullAttributeMapping extends XmlNullAttributeMapping
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaAttributeMapping javaAttributeMapping;
+	
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	public VirtualXmlNullAttributeMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaAttributeMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaAttributeMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	public String getMappingKey() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getPersistentAttribute().getDefaultMappingKey();
+		}
+		return this.javaAttributeMapping.getKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.javaAttributeMapping.getPersistentAttribute().getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java
new file mode 100644
index 0000000..4b5eb5a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToMany.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualOneToMany is an implementation of OneToMany used when there is 
+ * no tag in the orm.xml and an underlying javaOneToManyMapping exists.
+ */
+public class VirtualXmlOneToMany
+	extends XmlOneToMany
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaOneToManyMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualCascadeType virtualCascadeType;
+	
+	protected final MapKey mapKey;
+	
+	public VirtualXmlOneToMany(
+			OrmTypeMapping ormTypeMapping, JavaOneToManyMapping javaOneToManyMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaOneToManyMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaOneToManyMapping);
+		this.virtualCascadeType = new VirtualCascadeType(javaOneToManyMapping.getCascade());
+		this.mapKey = new VirtualMapKey(javaOneToManyMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+		
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		if (this.isOrmMetadataComplete()) {
+			return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch());
+		}
+		return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getFetch());
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		return null;
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+
+	@Override
+	public Boolean getOrphanRemoval() {
+		throw new UnsupportedOperationException("operation not supported in JPA 1.0"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void setOrphanRemoval(Boolean newOrphanRemoval) {
+		throw new UnsupportedOperationException("operation not supported in JPA 1.0"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		if (this.javaAttributeMapping.getRelationshipReference().getJoinTableJoiningStrategy().getJoinTable() != null) {
+			return 	new VirtualXmlJoinTable(
+				this.ormTypeMapping, 
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinTableJoiningStrategy().getJoinTable());
+		}
+		return null;
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getDefaultTargetEntity();
+		}
+		return this.javaAttributeMapping.getFullyQualifiedTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getMappedBy() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaAttributeMapping.getRelationshipReference().
+			getMappedByJoiningStrategy().getMappedByAttribute();
+	}
+	
+	@Override
+	public void setMappedBy(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	
+	@Override
+	public MapKey getMapKey() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.isNoMapKey()) {
+			return null;
+		}
+		return this.mapKey;
+	}
+	
+	@Override
+	public void setMapKey(MapKey value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getOrderBy() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaAttributeMapping.getOrderable().getSpecifiedOrderBy();
+	}
+	
+	@Override
+	public void setOrderBy(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getMappedByTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java
new file mode 100644
index 0000000..db5947d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOneToOne.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualOneToOne is an implementation of OneToOne used when there is 
+ * no tag in the orm.xml and an underlying javaOneToOneMapping exists.
+ */
+public class VirtualXmlOneToOne extends XmlOneToOne
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaOneToOneMapping javaAttributeMapping;
+	
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualCascadeType virtualCascadeType;
+	
+	
+	public VirtualXmlOneToOne(
+			OrmTypeMapping ormTypeMapping, JavaOneToOneMapping javaOneToOneMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaOneToOneMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaOneToOneMapping);
+		this.virtualCascadeType = new VirtualCascadeType(javaOneToOneMapping.getCascade());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		if (this.isOrmMetadataComplete()) {
+			return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch());
+		}
+		return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getFetch());
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getOptional() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.javaAttributeMapping.isDefaultOptional());
+		}
+		return Boolean.valueOf(this.javaAttributeMapping.isOptional());
+	}
+
+	@Override
+	public void setOptional(Boolean newOptional) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		EList<XmlJoinColumn> joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ONE_TO_ONE__JOIN_COLUMNS);
+		if (isOrmMetadataComplete()) {
+			return joinColumns;
+		}
+		for (JoinColumn joinColumn : 
+			CollectionTools.iterable(
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinColumnJoiningStrategy().specifiedJoinColumns())) {
+			XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, isOrmMetadataComplete());
+			joinColumns.add(xmlJoinColumn);
+		}
+		return joinColumns;
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getOrphanRemoval() {
+		throw new UnsupportedOperationException("operation not supported in JPA 1.0"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void setOrphanRemoval(Boolean newOrphanRemoval) {
+		throw new UnsupportedOperationException("operation not supported in JPA 1.0"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		return null;
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getDefaultTargetEntity();
+		}
+		return this.javaAttributeMapping.getFullyQualifiedTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getMappedBy() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaAttributeMapping.getRelationshipReference().
+			getMappedByJoiningStrategy().getMappedByAttribute();
+	}
+
+	@Override
+	public void setMappedBy(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
+		EList<XmlPrimaryKeyJoinColumn> joinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS);
+		if (!this.isOrmMetadataComplete()) {
+			for (JavaPrimaryKeyJoinColumn joinColumn : 
+					CollectionTools.iterable(
+						this.javaAttributeMapping.getRelationshipReference().
+							getPrimaryKeyJoinColumnJoiningStrategy().primaryKeyJoinColumns())) {
+				XmlPrimaryKeyJoinColumn xmlJoinColumn = new VirtualXmlPrimaryKeyJoinColumn(joinColumn/*, this.metadataComplete*/);
+				joinColumns.add(xmlJoinColumn);
+			}
+		}
+		return joinColumns;
+	}
+	
+	@Override
+	public TextRange getMappedByTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOrderColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOrderColumn.java
new file mode 100644
index 0000000..371d08a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlOrderColumn.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.jpa2.context.OrderColumn2_0;
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlOrderColumn extends XmlOrderColumn
+{	
+	protected OrderColumn2_0 javaOrderColumn;
+
+	protected OrmTypeMapping ormTypeMapping;
+
+	public VirtualXmlOrderColumn(OrderColumn2_0 javaOrderColumn, OrmTypeMapping ormTypeMapping) {
+		super();
+		this.javaOrderColumn = javaOrderColumn;
+		this.ormTypeMapping = ormTypeMapping;
+	}
+
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+
+	@Override
+	public String getColumnDefinition() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaOrderColumn.getColumnDefinition();
+	}
+
+	@Override
+	public void setColumnDefinition(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getInsertable() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.javaOrderColumn.isDefaultInsertable());
+		}
+		return Boolean.valueOf(this.javaOrderColumn.isInsertable());
+	}
+
+	@Override
+	public void setInsertable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getName() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaOrderColumn.getDefaultName();
+		}
+		return this.javaOrderColumn.getName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	
+	@Override
+	public Boolean getNullable() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.javaOrderColumn.isDefaultNullable());
+		}
+		return Boolean.valueOf(this.javaOrderColumn.isNullable());
+	}
+
+	@Override
+	public void setNullable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Boolean getUpdatable() {
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(this.javaOrderColumn.isDefaultUpdatable());
+		}
+		return Boolean.valueOf(this.javaOrderColumn.isUpdatable());
+	}
+
+	@Override
+	public void setUpdatable(Boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..34127e1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlPrimaryKeyJoinColumn.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * A virtual primary key join column is used to represent the XmlPrimaryKeyJoinColumn resource object
+ * within a virtual secondary table.  A virtual secondary table is one which is not specified
+ * in the orm.xml file, but is implied from the underlying java.  Virtual pk join column
+ * is not used when the secondary table is specified in the orm.xml.
+ * 
+ * A virtual pk join column delegates to the underlying java pk join column for its state.
+ */
+public class VirtualXmlPrimaryKeyJoinColumn extends XmlPrimaryKeyJoinColumn
+{
+	
+	protected JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn;
+
+	
+	protected VirtualXmlPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn) {
+		super();
+		this.javaPrimaryKeyJoinColumn = javaPrimaryKeyJoinColumn;
+	}
+
+	@Override
+	public String getName() {
+		return this.javaPrimaryKeyJoinColumn.getName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getColumnDefinition() {
+		return this.javaPrimaryKeyJoinColumn.getColumnDefinition();
+	}
+	
+	@Override
+	public void setColumnDefinition(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getReferencedColumnName() {
+		return this.javaPrimaryKeyJoinColumn.getReferencedColumnName();
+	}
+	
+	@Override
+	public void setReferencedColumnName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getReferencedColumnNameTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlSecondaryTable.java
new file mode 100644
index 0000000..b25ddcb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlSecondaryTable.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaSecondaryTable;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlSecondaryTable;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * A virtual secondary table is used to represent the XmlSecondaryTable resource object.
+ * A virtual secondary table is one which is not specified in the orm.xml file, 
+ * but is implied from the underlying java.  Virtual secondary table
+ * is not used when the secondary table is specified in the orm.xml.
+ * 
+ * A virtual secondary table delegates to the underlying java secondary table for its state. 
+ */
+public class VirtualXmlSecondaryTable extends XmlSecondaryTable
+{
+	
+	protected JavaSecondaryTable javaSecondaryTable;
+	
+	protected VirtualXmlSecondaryTable(JavaSecondaryTable javaSecondaryTable) {
+		super();
+		this.javaSecondaryTable = javaSecondaryTable;
+	}
+
+	@Override
+	public String getName() {
+		return this.javaSecondaryTable.getSpecifiedName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getCatalog() {
+		return this.javaSecondaryTable.getSpecifiedCatalog();
+	}
+	
+	@Override
+	public void setCatalog(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getSchema() {
+		return this.javaSecondaryTable.getSpecifiedSchema();
+	}
+	
+	@Override
+	public void setSchema(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//VirtualXmlSecondaryTable is rebuilt everytime, so rebuilding the joinColumns list as well
+	@Override
+	public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
+		EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS);
+		
+		for (JavaPrimaryKeyJoinColumn pkJoinColumn : CollectionTools.iterable(this.javaSecondaryTable.specifiedPrimaryKeyJoinColumns())) {
+			XmlPrimaryKeyJoinColumn xmlPkJoinColumn = new VirtualXmlPrimaryKeyJoinColumn(pkJoinColumn);
+			primaryKeyJoinColumns.add(xmlPkJoinColumn);
+		}
+		
+		return primaryKeyJoinColumns;
+	}
+	
+	@Override
+	public EList<XmlUniqueConstraint> getUniqueConstraints() {
+		EList<XmlUniqueConstraint> xmlUniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.XML_SECONDARY_TABLE__UNIQUE_CONSTRAINTS);
+
+		for (JavaUniqueConstraint uniqueConstraint : CollectionTools.iterable(this.javaSecondaryTable.uniqueConstraints())) {
+			XmlUniqueConstraint xmlUniqueConstraint = new VirtualXmlUniqueConstraint(uniqueConstraint, true);
+			xmlUniqueConstraints.add(xmlUniqueConstraint);
+		}
+
+		return xmlUniqueConstraints;
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getCatalogTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getSchemaTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlSequenceGenerator.java
new file mode 100644
index 0000000..06a8ffb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlSequenceGenerator.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlSequenceGenerator extends XmlSequenceGenerator
+{
+	JavaGeneratorContainer javaGeneratorHolder;
+
+	protected boolean metadataComplete;
+	
+		
+	public VirtualXmlSequenceGenerator(JavaGeneratorContainer javaGeneratorHolder, boolean metadataComplete) {
+		super();
+		this.javaGeneratorHolder = javaGeneratorHolder;
+		this.metadataComplete = metadataComplete;
+	}
+
+	protected JavaSequenceGenerator getJavaSequenceGenerator() {
+		return this.javaGeneratorHolder.getSequenceGenerator();
+	}
+
+	@Override
+	public String getSequenceName() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaSequenceGenerator().getSequenceName();
+	}
+
+	@Override
+	public void setSequenceName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public Integer getAllocationSize() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return Integer.valueOf(this.getJavaSequenceGenerator().getAllocationSize());
+	}
+
+	@Override
+	public void setAllocationSize(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Integer getInitialValue() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return Integer.valueOf(this.getJavaSequenceGenerator().getInitialValue());
+	}
+
+	@Override
+	public void setInitialValue(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getName() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaSequenceGenerator().getName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return getValidationTextRange();
+	}
+	
+	@Override
+	public boolean isVirtual() {
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTableGenerator.java
new file mode 100644
index 0000000..26121e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTableGenerator.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaTableGenerator;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public class VirtualXmlTableGenerator extends XmlTableGenerator
+{
+	JavaGeneratorContainer javaGeneratorHolder;
+
+	protected boolean metadataComplete;
+	
+		
+	public VirtualXmlTableGenerator(JavaGeneratorContainer javaGeneratorHolder, boolean metadataComplete) {
+		super();
+		this.javaGeneratorHolder = javaGeneratorHolder;
+		this.metadataComplete = metadataComplete;
+	}
+
+	protected JavaTableGenerator getJavaTableGenerator() {
+		return this.javaGeneratorHolder.getTableGenerator();
+	}
+	
+	@Override
+	public String getCatalog() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getCatalog();
+	}
+
+	@Override
+	public void setCatalog(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getPkColumnName() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getPkColumnName();
+	}
+
+	@Override
+	public void setPkColumnName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getPkColumnValue() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getPkColumnValue();
+	}
+
+	@Override
+	public void setPkColumnValue(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getSchema() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getSchema();
+	}
+
+	@Override
+	public void setSchema(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getTable() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getTable();
+	}
+
+	@Override
+	public void setTable(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getValueColumnName() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getValueColumnName();
+	}
+
+	@Override
+	public void setValueColumnName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Integer getAllocationSize() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return Integer.valueOf(this.getJavaTableGenerator().getAllocationSize());
+	}
+
+	@Override
+	public void setAllocationSize(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public Integer getInitialValue() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return Integer.valueOf(this.getJavaTableGenerator().getInitialValue());
+	}
+
+	@Override
+	public void setInitialValue(Integer value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getName() {
+		if (this.metadataComplete) {
+			return null;
+		}
+		return this.getJavaTableGenerator().getName();
+	}
+
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public EList<XmlUniqueConstraint> getUniqueConstraints() {
+		EList<XmlUniqueConstraint> xmlUniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
+
+		for (JavaUniqueConstraint uniqueConstraint : CollectionTools.iterable(this.getJavaTableGenerator().uniqueConstraints())) {
+			XmlUniqueConstraint xmlUniqueConstraint = new VirtualXmlUniqueConstraint(uniqueConstraint, this.metadataComplete);
+			xmlUniqueConstraints.add(xmlUniqueConstraint);
+		}
+
+		return xmlUniqueConstraints;
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return getValidationTextRange();
+	}
+	
+	@Override
+	public boolean isVirtual() {
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java
new file mode 100644
index 0000000..e80ebe5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlTransient.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualTransient is an implementation of Transient used when there is 
+ * no tag in the orm.xml and an underlying javaTransientMapping exists.
+ */
+public class VirtualXmlTransient extends XmlTransient
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaTransientMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	public VirtualXmlTransient(OrmTypeMapping ormTypeMapping, JavaTransientMapping javaTransientMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaTransientMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaTransientMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlUniqueConstraint.java
new file mode 100644
index 0000000..2be593c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlUniqueConstraint.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EDataTypeEList;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public class VirtualXmlUniqueConstraint extends XmlUniqueConstraint
+{	
+	protected UniqueConstraint uniqueConstraint;
+
+	protected boolean metadataComplete;
+
+	public VirtualXmlUniqueConstraint(UniqueConstraint uniqueConstraint, boolean metadataComplete) {
+		super();
+		this.uniqueConstraint = uniqueConstraint;
+		this.metadataComplete = metadataComplete;
+	}
+
+	@Override
+	public EList<String> getColumnNames() {
+		EList<String> columnNames = new EDataTypeEList<String>(String.class, this, OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES);
+
+		for (String columnName : CollectionTools.iterable(this.uniqueConstraint.columnNames())) {
+			columnNames.add(columnName);
+		}
+		return columnNames;
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java
new file mode 100644
index 0000000..14be7a4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/orm/VirtualXmlVersion.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.TemporalConverter;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualVersion is an implementation of Version used when there is 
+ * no tag in the orm.xml and an underlying javaVersionMapping exists.
+ */
+public class VirtualXmlVersion extends XmlVersion
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaVersionMapping javaAttributeMapping;
+
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+
+	protected final VirtualXmlColumn column;
+	
+	public VirtualXmlVersion(OrmTypeMapping ormTypeMapping, JavaVersionMapping javaVersionMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaVersionMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaVersionMapping);
+		this.column = new VirtualXmlColumn(ormTypeMapping, javaVersionMapping.getColumn());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.column;
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TemporalType getTemporal() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getConverter().getType() == Converter.TEMPORAL_CONVERTER) {
+			org.eclipse.jpt.core.context.TemporalType javaTemporalType = ((TemporalConverter) this.javaAttributeMapping.getConverter()).getTemporalType();
+			return  org.eclipse.jpt.core.context.TemporalType.toOrmResourceModel(javaTemporalType);
+		}
+		return null;
+	}
+
+	@Override
+	public void setTemporal(TemporalType newTemporal){
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//see eclipselink bug 247078 for info one why I made the interface XmlConvertibleMapping
+	@Override
+	public EnumType getEnumerated() {
+		throw new UnsupportedOperationException("enumerated not supported on version mappings"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void setEnumerated(EnumType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//see eclipselink bug 247078 for info one why I made the interface XmlConvertibleMapping
+	@Override
+	public boolean isLob() {
+		throw new UnsupportedOperationException("lob not supported on version mappings"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void setLob(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}	
+	
+	@Override
+	public TextRange getEnumeratedTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getLobTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getTemporalTextRange() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractJarFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractJarFileRef.java
new file mode 100644
index 0000000..6dcf105
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractJarFileRef.java
@@ -0,0 +1,310 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JarFile;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.persistence.JarFileRef;
+import org.eclipse.jpt.core.context.persistence.PersistenceStructureNodes;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJarFileRef
+	extends AbstractPersistenceXmlContextNode
+	implements JarFileRef
+{
+	protected XmlJarFileRef xmlJarFileRef;
+	
+	protected String fileName;
+	
+	protected JarFile jarFile;
+	
+	
+	// **************** construction/initialization ****************************
+	
+	public AbstractJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef) {
+		super(parent);
+		this.xmlJarFileRef = xmlJarFileRef;
+		this.fileName = xmlJarFileRef.getFileName();
+		this.jarFile = this.buildJarFile();
+	}
+	
+	protected JarFile buildJarFile() {
+		if (StringTools.stringIsEmpty(this.fileName)) {
+			return null;
+		}
+		JavaResourcePackageFragmentRoot jrpfr = this.getJpaProject().getJavaResourcePackageFragmentRoot(this.getFileName());
+		return (jrpfr == null) ? null : this.buildJarFile(jrpfr);
+	}
+	
+	@Override
+	public PersistenceUnit getParent() {
+		return (PersistenceUnit) super.getParent();
+	}
+	
+	
+	// **************** file name **********************************************
+	
+	public String getFileName() {
+		return this.fileName;
+	}
+	
+	public void setFileName(String newFileName) {
+		String old = this.fileName;
+		this.fileName = newFileName;
+		this.xmlJarFileRef.setFileName(newFileName);
+		this.firePropertyChanged(FILE_NAME_PROPERTY, old, newFileName);
+	}
+	
+	protected void setFileName_(String newFileName) {
+		String old = this.fileName;
+		this.fileName = newFileName;
+		this.firePropertyChanged(FILE_NAME_PROPERTY, old, newFileName);
+	}
+	
+	
+	// **************** JAR file ***********************************************
+	
+	public JarFile getJarFile() {
+		return this.jarFile;
+	}
+	
+	protected void setJarFile(JarFile jarFile) {
+		JarFile old = this.jarFile;
+		this.jarFile = jarFile;
+		this.firePropertyChanged(JAR_FILE_PROPERTY, old, jarFile);
+	}
+	
+	
+	// ********** JarFileRef implementation **********
+	
+	public PersistentType getPersistentType(String typeName) {
+		return (this.jarFile == null) ? null : this.jarFile.getPersistentType(typeName);
+	}
+	
+	public boolean containsOffset(int textOffset) {
+		return (this.xmlJarFileRef != null) && this.xmlJarFileRef.containsOffset(textOffset);
+	}
+	
+	
+	// ********** PersistentTypeContainer implementation **********
+	
+	public Iterable<? extends PersistentType> getPersistentTypes() {
+		return (this.jarFile != null) ? this.jarFile.getPersistentTypes() : EmptyIterable.<JavaPersistentType>instance();
+	}
+	
+	
+	// **************** JpaStructureNode impl **********************************
+	
+	public String getId() {
+		return PersistenceStructureNodes.JAR_FILE_REF_ID;
+	}
+	
+	public JpaStructureNode getStructureNode(int textOffset) {
+		return this;
+	}
+
+	public TextRange getSelectionTextRange() {
+		return (this.xmlJarFileRef == null) ? null : this.xmlJarFileRef.getSelectionTextRange();
+	}
+
+	public void dispose() {
+		if (this.jarFile != null) {
+			this.jarFile.dispose();
+		}
+	}
+	
+	
+	// **************** XmlContextNode impl ************************************
+	
+	public TextRange getValidationTextRange() {
+		return (this.xmlJarFileRef == null) ? null : this.xmlJarFileRef.getValidationTextRange();
+	}
+	
+	
+	// **************** updating ***********************************************
+
+	public void update(XmlJarFileRef xjfr) {
+		this.xmlJarFileRef = xjfr;
+		this.setFileName_(xjfr.getFileName());
+		this.updateJarFile();
+	}
+
+	protected void updateJarFile() {
+		JavaResourcePackageFragmentRoot jrpfr = null;
+		
+		if (! StringTools.stringIsEmpty(this.fileName)) {
+			
+			// first, attempt to resolve location specifically
+			jrpfr = javaPackageRoot_specifically();
+			
+			// then ... guess, basically
+			if (jrpfr == null) {
+				jrpfr = javaPackageRoot_guess();
+			}
+		}
+		
+		if (jrpfr == null) {
+			if (this.jarFile != null) {
+				this.jarFile.dispose();
+				this.setJarFile(null);
+			}
+		} else { 
+			if (this.jarFile == null) {
+				this.setJarFile(this.buildJarFile(jrpfr));
+			} else {
+				this.jarFile.update(jrpfr);
+			}
+		}
+	}
+	
+	private JavaResourcePackageFragmentRoot javaPackageRoot_specifically() {
+		for (IPath deploymentPath : resolveDeploymentJarFilePath(new Path(this.fileName))) {
+			IVirtualFile virtualJar = ComponentCore.createFile(this.getProject(), deploymentPath);
+			IFile realJar = virtualJar.getUnderlyingFile();
+			if (realJar.exists() && realJar.getProject().equals(this.getProject())) {
+				return getJpaProject().getJavaResourcePackageFragmentRoot(realJar.getProjectRelativePath().toString());
+			}
+		}
+		
+		return null;
+	}
+	
+	private JavaResourcePackageFragmentRoot javaPackageRoot_guess() {
+		String jarFileName = new Path(this.fileName).lastSegment();
+		for (JpaFile jpaFile : CollectionTools.iterable(getJpaProject().jpaFiles())) {
+			if (jpaFile.getFile().getName().equals(jarFileName)
+					&& JptCorePlugin.JAR_CONTENT_TYPE.equals(jpaFile.getContentType())) {
+				return (JavaResourcePackageFragmentRoot) jpaFile.getResourceModel();
+			}
+		}
+		
+		return null;
+	}
+
+	/**
+	 * Return an array of deployment paths that may correspond
+	 * to the given persistence.xml jar file entry
+	 */
+	protected IPath[] resolveDeploymentJarFilePath(IPath jarFilePath) {
+		IPath root = this.getJarDeploymentRootPath();
+		return this.projectHasWebFacet() ?
+				this.resolveDeploymentJarFilePathWeb(root, jarFilePath) :
+				this.resolveDeploymentJarFilePathNonWeb(root, jarFilePath);
+	}
+
+	protected IPath getJarDeploymentRootPath() {
+		return JptCorePlugin.getJarDeploymentRootPath(this.getProject());
+	}
+
+	protected boolean projectHasWebFacet() {
+		return JptCorePlugin.projectHasWebFacet(this.getProject());
+	}
+
+	protected IPath[] resolveDeploymentJarFilePathWeb(IPath root, IPath jarFilePath) {
+		return new IPath[] {
+				// first path entry assumes form "../lib/other.jar"
+				root.append(jarFilePath.removeFirstSegments(1)),
+				// second path entry assumes form of first, without ".." ("lib/other.jar")
+				root.append(jarFilePath)
+			};
+	}
+
+	protected IPath[] resolveDeploymentJarFilePathNonWeb(IPath root, IPath jarFilePath) {
+		return new IPath[] {
+				// assumes form "../lib/other.jar"
+				root.append(jarFilePath)
+			};
+	}
+
+
+	protected JarFile buildJarFile(JavaResourcePackageFragmentRoot jrpfr) {
+		return this.getContextNodeFactory().buildJarFile(this, jrpfr);
+	}
+
+	protected IProject getProject() {
+		return this.getJpaProject().getProject();
+	}
+	
+	
+	// **************** validation *********************************************
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+
+		if (StringTools.stringIsEmpty(this.xmlJarFileRef.getFileName())) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE,
+					this,
+					this.getValidationTextRange()
+				)
+			);
+			return;
+		}
+		
+		messages.add(
+			DefaultJpaValidationMessages.buildMessage(
+				IMessage.NORMAL_SEVERITY,
+				JpaValidationMessages.PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING,
+				this,
+				this.getValidationTextRange()
+			)
+		);
+
+		if (this.jarFile == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE,
+					new String[] {this.xmlJarFileRef.getFileName()},
+					this,
+					this.getValidationTextRange()
+				)
+			);
+			return;
+		}
+
+		this.jarFile.validate(messages, reporter);
+	}
+	
+	
+	// **************** misc ***************************************************
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.getFileName());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractMappingFileRef.java
new file mode 100644
index 0000000..c38e23e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractMappingFileRef.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.context.MappingFile;
+import org.eclipse.jpt.core.context.MappingFilePersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.MappingFileRoot;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.PersistenceStructureNodes;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * <code>persistence.xml</code> file
+ * <br>
+ * <code>mapping-file</code> element
+ */
+public abstract class AbstractMappingFileRef
+	extends AbstractPersistenceXmlContextNode
+	implements MappingFileRef
+{
+	protected String fileName;
+
+	/**
+	 * the mapping file corresponding to the ref's file name;
+	 * this can be null if the name is invalid
+	 */
+	protected MappingFile mappingFile;
+
+
+	// ********** construction/initialization **********
+
+	protected AbstractMappingFileRef(PersistenceUnit parent, String resourceFileName) {
+		super(parent);
+		this.fileName = resourceFileName;
+		this.mappingFile = this.buildMappingFile();
+	}
+
+
+	// ********** overrides **********
+
+	@Override
+	public PersistenceUnit getParent() {
+		return (PersistenceUnit) super.getParent();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.fileName);
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return PersistenceStructureNodes.MAPPING_FILE_REF_ID;
+	}
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		return this;
+	}
+
+	public void dispose() {
+		if (this.mappingFile != null) {
+			this.mappingFile.dispose();
+		}
+	}
+
+
+	// ********** queries **********
+
+	public boolean persistenceUnitDefaultsExists() {
+		MappingFilePersistenceUnitDefaults defaults = this.getPersistenceUnitDefaults();
+		return (defaults != null) && defaults.resourceExists();
+	}
+
+	public MappingFilePersistenceUnitDefaults getPersistenceUnitDefaults() {
+		MappingFileRoot root = this.getChildMappingFileRoot();
+		return (root == null) ? null : root.getPersistenceUnitDefaults();
+	}
+
+	/**
+	 * The method {@link #getMappingFileRoot()} is already defined by
+	 * {@link org.eclipse.jpt.core.internal.context.AbstractJpaContextNode}
+	 * for getting what would be the "mapping file root" that <em>contains</em>
+	 * the context node. We want something slightly different here: i.e. the
+	 * "mapping file root" contained by the mapping file ref (since, actually,
+	 * the mapping file ref is not even contained by a "mapping file root").
+	 */
+	protected MappingFileRoot getChildMappingFileRoot() {
+		return (this.mappingFile == null) ? null : this.mappingFile.getRoot();
+	}
+
+	public PersistentType getPersistentType(String typeName) {
+		return (this.mappingFile == null) ? null : this.mappingFile.getPersistentType(typeName);
+	}
+
+
+	// ********** file name **********
+
+	public String getFileName() {
+		return this.fileName;
+	}
+
+
+	// ********** mapping file **********
+
+	public MappingFile getMappingFile() {
+		return this.mappingFile;
+	}
+
+	protected void setMappingFile(MappingFile mappingFile) {
+		MappingFile old = this.mappingFile;
+		this.mappingFile = mappingFile;
+		this.firePropertyChanged(MAPPING_FILE_PROPERTY, old, mappingFile);
+	}
+
+	protected MappingFile buildMappingFile() {
+		JpaXmlResource xmlResource = this.resolveMappingFileXmlResource();
+		return (xmlResource == null) ? null : this.buildMappingFile(xmlResource);
+	}
+
+	protected void updateMappingFile() {
+		JpaXmlResource xmlResource = this.resolveMappingFileXmlResource();
+		
+		if (xmlResource == null) {
+			if (this.mappingFile != null) {
+				this.mappingFile.dispose();
+				this.setMappingFile(null);
+			}
+		} else {
+			if (this.mappingFile == null) {
+				this.setMappingFile(this.buildMappingFile(xmlResource));
+			} else {
+				if (this.mappingFile.getXmlResource() == xmlResource) {
+					this.mappingFile.update();
+				} else {
+					// if the resource's content type has changed, we completely rebuild the mapping file
+					this.mappingFile.dispose();
+					this.setMappingFile(this.buildMappingFile(xmlResource));
+				}
+			}
+		}
+	}
+
+	/**
+	 * The mapping file ref resource is in the persistence xml resource
+	 * (<code>persistence.xml</code>). This returns the resource of
+	 * the mapping file itself (<code>orm.xml</code>).
+	 */
+	protected JpaXmlResource resolveMappingFileXmlResource() {
+		if (this.fileName == null) {
+			return null;
+		}
+		JpaXmlResource xmlResource = this.getJpaProject().getMappingFileXmlResource(this.fileName);
+		if (xmlResource == null) {
+			return null;
+		}
+		if (xmlResource.isReverting()) {
+			// 308254 - this can happen when orm.xml is closed without saving;
+			// the model is completely whacked in another thread - so wipe our model(?)
+			return null;
+		}
+		JpaResourceType resourceType = xmlResource.getResourceType();
+		if (resourceType == null) {
+			return null;
+		}
+		if ( ! this.getJpaPlatform().supportsResourceType(resourceType)) {
+			return null;
+		}
+		return xmlResource;
+	}
+
+	/**
+	 * pre-condition: 'resource' is not null
+	 */
+	protected MappingFile buildMappingFile(JpaXmlResource resource) {
+		return this.getJpaFactory().buildMappingFile(this, resource);
+	}
+
+
+	// ********** PersistentTypeContainer implementation **********
+
+	public Iterable<? extends PersistentType> getPersistentTypes() {
+		return (this.mappingFile != null) ? this.mappingFile.getPersistentTypes() : EmptyIterable.<JavaPersistentType>instance();
+	}
+
+	// ********** updating **********
+
+	protected void update() {
+		this.updateMappingFile();
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.mappingFile != null) {
+			this.mappingFile.postUpdate();
+		}
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		if (StringTools.stringIsEmpty(this.fileName)) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE,
+					this,
+					this.getValidationTextRange()));
+			return;
+		}
+		
+		if (this.mappingFile == null) {
+			messages.add(buildMappingFileValidationMessage());
+			return;
+		}
+		
+		this.mappingFile.validate(messages, reporter);
+	}
+	
+	protected IMessage buildMappingFileValidationMessage() {
+		int severity = IMessage.HIGH_SEVERITY;
+		IFile file = getPlatformFile();
+		if (file.exists()) {
+			JpaXmlResource xmlResource = getJpaProject().getMappingFileXmlResource(this.fileName);
+			if (xmlResource != null 
+					&& ! getJpaPlatform().supportsResourceType(xmlResource.getResourceType())) {
+				return DefaultJpaValidationMessages.buildMessage(
+					severity,
+					JpaValidationMessages.PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT,
+					new String[] {file.getName()},
+					file);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				severity,
+				JpaValidationMessages.PERSISTENCE_UNIT_INVALID_MAPPING_FILE,
+				new String[] {file.getName()},
+				file);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			severity,
+			JpaValidationMessages.PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE,
+			new String[] {this.fileName},
+			this,
+			getValidationTextRange());
+	}
+	
+	protected IFile getPlatformFile() {
+		return this.getJpaProject().convertToPlatformFile(this.fileName);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceUnit.java
new file mode 100644
index 0000000..0a593ce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceUnit.java
@@ -0,0 +1,1940 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.MappingFilePersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.persistence.ClassRef;
+import org.eclipse.jpt.core.context.persistence.JarFileRef;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceStructureNodes;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitProperties;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitTransactionType;
+import org.eclipse.jpt.core.context.persistence.PersistentTypeContainer;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.core.jpa2.context.MappingFilePersistenceUnitDefaults2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.context.PersistentType2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.SharedCacheMode;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.ValidationMode;
+import org.eclipse.jpt.core.jpa2.resource.java.JavaResourcePersistentType2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.persistence.PersistenceFactory;
+import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
+import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.core.resource.persistence.XmlProperties;
+import org.eclipse.jpt.core.resource.persistence.XmlProperty;
+import org.eclipse.jpt.core.utility.BodySourceWriter;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.HashBag;
+import org.eclipse.jpt.utility.internal.NotNullFilter;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.CompositeListIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.ListIterable;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneListIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * <code>persistence.xml</code> file
+ * <br>
+ * <code>persistence-unit</code> element
+ */
+public abstract class AbstractPersistenceUnit
+	extends AbstractPersistenceXmlContextNode
+	implements PersistenceUnit2_0
+{
+	protected XmlPersistenceUnit xmlPersistenceUnit;
+
+	protected String name;
+
+	protected PersistenceUnitTransactionType specifiedTransactionType;
+	protected PersistenceUnitTransactionType defaultTransactionType;
+
+	protected String description;
+
+	protected String provider;
+
+	protected String jtaDataSource;
+	protected String nonJtaDataSource;
+
+	protected final Vector<MappingFileRef> specifiedMappingFileRefs = new Vector<MappingFileRef>();
+	protected MappingFileRef impliedMappingFileRef;
+
+	protected final Vector<JarFileRef> jarFileRefs = new Vector<JarFileRef>();
+
+	protected final Vector<ClassRef> specifiedClassRefs = new Vector<ClassRef>();
+	protected final Vector<ClassRef> impliedClassRefs = new Vector<ClassRef>();
+
+	protected Boolean specifiedExcludeUnlistedClasses;
+
+	protected final Vector<Property> properties = new Vector<Property>();
+
+	/* global generator definitions, defined elsewhere in model */
+	protected final Vector<Generator> generators = new Vector<Generator>();
+
+	/* global query definitions, defined elsewhere in model */
+	protected final Vector<Query> queries = new Vector<Query>();
+
+	protected final Set<String> rootEntityNames = Collections.synchronizedSet(new HashSet<String>());
+
+	protected AccessType defaultAccess;
+	protected String defaultCatalog;
+	protected String defaultSchema;
+	protected boolean defaultCascadePersist;
+	protected boolean defaultDelimitedIdentifiers;
+
+	//****** PersistenceUnit2_0 features
+	private PersistenceUnitProperties connection;
+	private PersistenceUnitProperties options;
+	
+	protected SharedCacheMode specifiedSharedCacheMode;
+	protected SharedCacheMode defaultSharedCacheMode;
+	
+	protected ValidationMode specifiedValidationMode;
+	protected ValidationMode defaultValidationMode;
+
+	protected final Set<IFile> metamodelFiles = Collections.synchronizedSet(new HashSet<IFile>());
+
+
+	// ********** construction/initialization **********
+
+	/**
+	 * NB: Be careful changing the order of the statements in this method
+	 * (bug 258701 is one reason).
+	 */
+	protected AbstractPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) {
+		super(parent);
+		this.xmlPersistenceUnit = xmlPersistenceUnit;
+		this.name = xmlPersistenceUnit.getName();
+		this.specifiedExcludeUnlistedClasses = xmlPersistenceUnit.getExcludeUnlistedClasses();
+		this.specifiedTransactionType = this.buildSpecifiedTransactionType();
+		this.defaultTransactionType = this.buildDefaultTransactionType();
+		this.description = xmlPersistenceUnit.getDescription();
+		this.provider = xmlPersistenceUnit.getProvider();
+		this.jtaDataSource = xmlPersistenceUnit.getJtaDataSource();
+		this.nonJtaDataSource = xmlPersistenceUnit.getNonJtaDataSource();
+		this.specifiedExcludeUnlistedClasses = xmlPersistenceUnit.getExcludeUnlistedClasses();
+
+		// initialize the properties before building the entities because the
+		// entities will need the properties
+		this.initializeProperties();
+
+		this.initializeJarFileRefs();
+
+		//initialize specified classRefs before mappingFileRefs because of 
+		//JpaFile rootStructureNode, we want the mapping file to "win",
+		//as it would in a Jpa runtime implementation
+		this.initializeSpecifiedClassRefs();
+		this.initializeMappingFileRefs();
+		//initialize implied classRefs last since they depend on both
+		//specified classRefs and mappingFileRefs
+		this.initializeImpliedClassRefs();
+		this.initializePersistenceUnitDefaults();
+
+		this.specifiedSharedCacheMode = this.buildSpecifiedSharedCacheMode();
+		this.defaultSharedCacheMode = this.buildDefaultSharedCacheMode();
+
+		this.specifiedValidationMode = this.buildSpecifiedValidationMode();
+		this.defaultValidationMode = this.buildDefaultValidationMode();
+
+		this.initializeMetamodelFiles();
+	}
+
+	/**
+	 * These lists are just copies of what is distributed across the context
+	 * model; so, if they have (virtually) changed, the resulting update has
+	 * already been triggered. We don't need to trigger another one here.
+	 */
+	@Override
+	protected void addNonUpdateAspectNamesTo(Set<String> nonUpdateAspectNames) {
+		super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
+		nonUpdateAspectNames.add(GENERATORS_LIST);
+		nonUpdateAspectNames.add(QUERIES_LIST);
+	}
+
+	
+	// ********** updating **********
+
+	public void update(XmlPersistenceUnit xpu) {
+		this.xmlPersistenceUnit = xpu;
+
+		// the 'generators' and 'queries' lists are simply cleared out with each
+		// "update" and completely rebuilt as the "update" cascades through
+		// the persistence unit. When the persistence unit's "update" is
+		// complete, the lists have been populated and we fire the change event.
+		// @see #addGenerator(Generator) (and references)
+		// @see #addQuery(Query) (and references)
+		this.generators.clear();
+		this.queries.clear();
+
+		this.rootEntityNames.clear();
+		
+		this.setName(xpu.getName());
+		this.setSpecifiedTransactionType(this.buildSpecifiedTransactionType());
+		this.setDefaultTransactionType(this.buildDefaultTransactionType());
+		this.setDescription(xpu.getDescription());
+		this.setProvider(xpu.getProvider());
+		this.setJtaDataSource(xpu.getJtaDataSource());
+		this.setNonJtaDataSource(xpu.getNonJtaDataSource());
+		this.updateJarFileRefs();
+
+		// update 'specifiedClassRefs' before 'mappingFileRefs' because of 
+		// JpaFile rootStructureNode, we want the mapping file to "win",
+		// as it would in a JPA runtime implementation
+		this.updateSpecifiedClassRefs();
+		this.updateMappingFileRefs();
+
+		// update 'impliedClassRefs' last since it depends on the contents of
+		// both 'specifiedClassRefs' and 'mappingFileRefs'
+		this.updateImpliedClassRefs();
+
+		this.setSpecifiedExcludeUnlistedClasses(xpu.getExcludeUnlistedClasses());
+		this.updateProperties();
+		this.updatePersistenceUnitDefaults();
+		
+		this.setSpecifiedSharedCacheMode(this.buildSpecifiedSharedCacheMode());
+		this.setDefaultSharedCacheMode(this.buildDefaultSharedCacheMode());
+		this.setSpecifiedValidationMode(this.buildSpecifiedValidationMode());
+		this.setDefaultValidationMode(this.buildDefaultValidationMode());
+
+		// see comment at top of method
+		this.fireListChanged(GENERATORS_LIST, this.generators);
+		this.fireListChanged(QUERIES_LIST, this.queries);
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		for (ClassRef classRef : this.getSpecifiedClassRefs()) {
+			classRef.postUpdate();
+		}
+		for (ClassRef classRef : this.getImpliedClassRefs()) {
+			classRef.postUpdate();
+		}
+		for (MappingFileRef mappingFileRef : CollectionTools.iterable(this.specifiedMappingFileRefs())) {
+			mappingFileRef.postUpdate();
+		}
+		if (this.impliedMappingFileRef != null) {
+			this.impliedMappingFileRef.postUpdate();
+		}
+	}
+	
+
+	// ********** JpaContextNode implementation **********
+
+	@Override
+	public Persistence getParent() {
+		return (Persistence) super.getParent();
+	}
+
+	@Override
+	public PersistenceUnit getPersistenceUnit() {
+		return this;
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return PersistenceStructureNodes.PERSISTENCE_UNIT_ID;
+	}
+
+	public TextRange getSelectionTextRange() {
+		return this.xmlPersistenceUnit.getSelectionTextRange();
+	}
+
+	public void dispose() {
+		for (ClassRef classRef : this.getClassRefs()) {
+			classRef.dispose();
+		}
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			mappingFileRef.dispose();
+		}
+	}
+
+
+	// ********** name **********
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.xmlPersistenceUnit.setName(name);
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** transaction type **********
+
+	public PersistenceUnitTransactionType getTransactionType() {
+		return (this.specifiedTransactionType != null) ? this.specifiedTransactionType : this.defaultTransactionType;
+	}
+
+	public PersistenceUnitTransactionType getSpecifiedTransactionType() {
+		return this.specifiedTransactionType;
+	}
+
+	public void setSpecifiedTransactionType(PersistenceUnitTransactionType specifiedTransactionType) {
+		PersistenceUnitTransactionType old = this.specifiedTransactionType;
+		this.specifiedTransactionType = specifiedTransactionType;
+		this.xmlPersistenceUnit.setTransactionType(PersistenceUnitTransactionType.toXmlResourceModel(specifiedTransactionType));
+		this.firePropertyChanged(SPECIFIED_TRANSACTION_TYPE_PROPERTY, old, specifiedTransactionType);
+	}
+
+	public PersistenceUnitTransactionType getDefaultTransactionType() {
+		return this.defaultTransactionType;
+	}
+
+	protected void setDefaultTransactionType(PersistenceUnitTransactionType defaultTransactionType) {
+		PersistenceUnitTransactionType old = this.defaultTransactionType;
+		this.defaultTransactionType = defaultTransactionType;
+		this.firePropertyChanged(DEFAULT_TRANSACTION_TYPE_PROPERTY, old, defaultTransactionType);
+	}
+
+	protected PersistenceUnitTransactionType buildSpecifiedTransactionType() {
+		return PersistenceUnitTransactionType.fromXmlResourceModel(this.xmlPersistenceUnit.getTransactionType());
+	}
+
+	/**
+	 * TODO - calculate default
+	 * From the JPA spec: "In a Java EE environment, if this element is not
+	 * specified, the default is JTA. In a Java SE environment, if this element
+	 * is not specified, a default of RESOURCE_LOCAL may be assumed."
+	 */
+	protected PersistenceUnitTransactionType buildDefaultTransactionType() {
+		return PersistenceUnitTransactionType.JTA; //return JTA for now, fixing regression in bug 277524
+	}
+
+
+	// ********** description **********
+
+	public String getDescription() {
+		return this.description;
+	}
+
+	public void setDescription(String description) {
+		String old = this.description;
+		this.description = description;
+		this.xmlPersistenceUnit.setDescription(description);
+		this.firePropertyChanged(DESCRIPTION_PROPERTY, old, description);
+	}
+
+
+	// ********** provider **********
+
+	public String getProvider() {
+		return this.provider;
+	}
+
+	public void setProvider(String provider) {
+		String old = this.provider;
+		this.provider = provider;
+		this.xmlPersistenceUnit.setProvider(provider);
+		this.firePropertyChanged(PROVIDER_PROPERTY, old, provider);
+	}
+
+
+	// ********** JTA/non-JTA data source **********
+
+	public String getJtaDataSource() {
+		return this.jtaDataSource;
+	}
+
+	public void setJtaDataSource(String jtaDataSource) {
+		String old = this.jtaDataSource;
+		this.jtaDataSource = jtaDataSource;
+		this.xmlPersistenceUnit.setJtaDataSource(jtaDataSource);
+		this.firePropertyChanged(JTA_DATA_SOURCE_PROPERTY, old, jtaDataSource);
+	}
+
+	public String getNonJtaDataSource() {
+		return this.nonJtaDataSource;
+	}
+
+	public void setNonJtaDataSource(String nonJtaDataSource) {
+		String old = this.nonJtaDataSource;
+		this.nonJtaDataSource = nonJtaDataSource;
+		this.xmlPersistenceUnit.setNonJtaDataSource(nonJtaDataSource);
+		this.firePropertyChanged(NON_JTA_DATA_SOURCE_PROPERTY, old, nonJtaDataSource);
+	}
+
+
+	// ********** mapping file refs **********
+
+	public ListIterator<MappingFileRef> mappingFileRefs() {
+		return this.getMappingFileRefs().iterator();
+	}
+
+	protected ListIterable<MappingFileRef> getMappingFileRefs() {
+		return (this.impliedMappingFileRef == null) ? this.getSpecifiedMappingFileRefs() : this.getCombinedMappingFileRefs();
+	}
+
+	protected ListIterator<MappingFileRef> combinedMappingFileRefs() {
+		return getCombinedMappingFileRefs().iterator();
+	}
+
+	protected ListIterable<MappingFileRef> getCombinedMappingFileRefs() {
+		return new CompositeListIterable<MappingFileRef>(this.getSpecifiedMappingFileRefs(), this.impliedMappingFileRef);
+	}
+
+	public int mappingFileRefsSize() {
+		return (this.impliedMappingFileRef == null) ? this.specifiedMappingFileRefsSize() : this.combinedMappingFileRefsSize();
+	}
+
+	protected int combinedMappingFileRefsSize() {
+		return this.specifiedMappingFileRefsSize() + 1;
+	}
+
+	public Iterator<MappingFileRef> mappingFileRefsContaining(final String typeName) {
+		return new FilteringIterator<MappingFileRef> (this.mappingFileRefs()) {
+			@Override
+			protected boolean accept(MappingFileRef mappingFileRef) {
+				return mappingFileRef.getPersistentType(typeName) != null;
+			}
+		};
+	}
+
+	protected void initializeMappingFileRefs() {
+		for (XmlMappingFileRef xmlMappingFileRef : this.xmlPersistenceUnit.getMappingFiles()) {
+			this.specifiedMappingFileRefs.add(this.buildSpecifiedMappingFileRef(xmlMappingFileRef));
+		}
+		if ( ! this.impliedMappingFileIsSpecified() && this.impliedMappingFileExists()) {
+			this.impliedMappingFileRef = this.buildImpliedMappingFileRef();
+		}
+	}
+
+	/**
+	 * Since this is a *list*, we simply loop through the elements and match
+	 * the context to the resource element by index, not by name like we do
+	 * with 'impliedClassRefs'.
+	 */
+	protected void updateMappingFileRefs() {
+		// first update the specified mapping file refs...
+		// make a copy of the XML file refs (to prevent ConcurrentModificationException)
+		Iterator<XmlMappingFileRef> xmlFileRefs = new CloneIterator<XmlMappingFileRef>(this.xmlPersistenceUnit.getMappingFiles());
+
+		for (Iterator<MappingFileRef> contextFileRefs = this.specifiedMappingFileRefs(); contextFileRefs.hasNext(); ) {
+			MappingFileRef contextFileRef = contextFileRefs.next();
+			if (xmlFileRefs.hasNext()) {
+				contextFileRef.update(xmlFileRefs.next());
+			} else {
+				this.removeSpecifiedMappingFileRef_(contextFileRef);
+			}
+		}
+
+		while (xmlFileRefs.hasNext()) {
+			this.addSpecifiedMappingFileRef_(this.buildSpecifiedMappingFileRef(xmlFileRefs.next()));
+		}
+
+		// ...then update the implied mapping file ref
+		if (this.impliedMappingFileIsSpecified()) {
+			if (this.impliedMappingFileRef != null) {
+				this.unsetImpliedMappingFileRef();
+			}
+		} else {
+			if (this.impliedMappingFileExists()) {
+				if (this.impliedMappingFileRef == null) {
+					this.setImpliedMappingFileRef();
+				}
+				this.impliedMappingFileRef.update(null);
+			} else {
+				if (this.impliedMappingFileRef != null) {
+					this.unsetImpliedMappingFileRef();
+				}
+			}
+		}
+	}
+
+	protected MappingFileRef buildSpecifiedMappingFileRef(XmlMappingFileRef xmlMappingFileRef) {
+		return this.getContextNodeFactory().buildMappingFileRef(this, xmlMappingFileRef);
+	}
+
+	protected boolean impliedMappingFileIsSpecified() {
+		String impliedMappingFileName = JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH;
+		for (Iterator<MappingFileRef> stream = this.specifiedMappingFileRefs(); stream.hasNext(); ) {
+			if (impliedMappingFileName.equals(stream.next().getFileName())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	protected boolean impliedMappingFileExists() {
+		return getJpaProject().getDefaultOrmXmlResource() != null;
+	}
+
+
+	// ********** specified mapping file refs **********
+
+	public ListIterator<MappingFileRef> specifiedMappingFileRefs() {
+		return this.getSpecifiedMappingFileRefs().iterator();
+	}
+
+	protected ListIterable<MappingFileRef> getSpecifiedMappingFileRefs() {
+		return new LiveCloneListIterable<MappingFileRef>(this.specifiedMappingFileRefs);
+	}
+
+	public int specifiedMappingFileRefsSize() {
+		return this.specifiedMappingFileRefs.size();
+	}
+
+	public MappingFileRef addSpecifiedMappingFileRef() {
+		return this.addSpecifiedMappingFileRef(this.specifiedMappingFileRefs.size());
+	}
+
+	public MappingFileRef addSpecifiedMappingFileRef(int index) {
+		XmlMappingFileRef xmlMappingFileRef = this.buildXmlMappingFileRef();
+		MappingFileRef mappingFileRef = this.buildSpecifiedMappingFileRef(xmlMappingFileRef);
+		this.specifiedMappingFileRefs.add(index, mappingFileRef);
+		this.xmlPersistenceUnit.getMappingFiles().add(index, xmlMappingFileRef);
+		this.fireItemAdded(SPECIFIED_MAPPING_FILE_REFS_LIST, index, mappingFileRef);
+		return mappingFileRef;
+	}
+
+	protected XmlMappingFileRef buildXmlMappingFileRef() {
+		return PersistenceFactory.eINSTANCE.createXmlMappingFileRef();
+	}
+
+	public void removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef) {
+		this.removeSpecifiedMappingFileRef(this.specifiedMappingFileRefs.indexOf(mappingFileRef));
+	}
+
+	public void removeSpecifiedMappingFileRef(int index) {
+		MappingFileRef mappingFileRef = this.specifiedMappingFileRefs.remove(index);
+		mappingFileRef.dispose();
+		this.xmlPersistenceUnit.getMappingFiles().remove(index);
+		this.fireItemRemoved(SPECIFIED_MAPPING_FILE_REFS_LIST, index, mappingFileRef);
+	}
+
+	protected void addSpecifiedMappingFileRef_(MappingFileRef mappingFileRef) {
+		this.addItemToList(mappingFileRef, this.specifiedMappingFileRefs, SPECIFIED_MAPPING_FILE_REFS_LIST);
+	}
+
+	protected void removeSpecifiedMappingFileRef_(MappingFileRef mappingFileRef) {
+		mappingFileRef.dispose();
+		this.removeItemFromList(mappingFileRef, this.specifiedMappingFileRefs, SPECIFIED_MAPPING_FILE_REFS_LIST);
+	}
+
+
+	// ********** implied mapping file ref **********
+
+	public MappingFileRef getImpliedMappingFileRef() {
+		return this.impliedMappingFileRef;
+	}
+
+	protected MappingFileRef setImpliedMappingFileRef() {
+		if (this.impliedMappingFileRef != null) {
+			throw new IllegalStateException("The implied mapping file ref is already set."); //$NON-NLS-1$
+		}
+		this.impliedMappingFileRef = this.buildImpliedMappingFileRef();
+		this.firePropertyChanged(IMPLIED_MAPPING_FILE_REF_PROPERTY, null, this.impliedMappingFileRef);
+		return this.impliedMappingFileRef;
+	}
+
+	protected MappingFileRef buildImpliedMappingFileRef() {
+		return this.getContextNodeFactory().buildImpliedMappingFileRef(this);
+	}
+
+	protected void unsetImpliedMappingFileRef() {
+		if (this.impliedMappingFileRef == null) {
+			throw new IllegalStateException("The implied mapping file ref is already unset."); //$NON-NLS-1$
+		}
+		MappingFileRef old = this.impliedMappingFileRef;
+		this.impliedMappingFileRef.dispose();
+		this.impliedMappingFileRef = null;
+		this.firePropertyChanged(IMPLIED_MAPPING_FILE_REF_PROPERTY, old, null);
+	}
+
+
+	// ********** JAR file refs **********
+
+	public ListIterator<JarFileRef> jarFileRefs() {
+		return new CloneListIterator<JarFileRef>(this.jarFileRefs);
+	}
+
+	protected Iterable<JarFileRef> getJarFileRefs() {
+		return new LiveCloneIterable<JarFileRef>(this.jarFileRefs);
+	}
+
+	public int jarFileRefsSize() {
+		return this.jarFileRefs.size();
+	}
+
+	public JarFileRef addJarFileRef() {
+		return this.addJarFileRef(this.jarFileRefs.size());
+	}
+
+	public JarFileRef addJarFileRef(int index) {
+		XmlJarFileRef xmlJarFileRef = this.buildXmlJarFileRef();
+		JarFileRef jarFileRef = this.buildJarFileRef(xmlJarFileRef);
+		this.jarFileRefs.add(index, jarFileRef);
+		this.xmlPersistenceUnit.getJarFiles().add(index, xmlJarFileRef);
+		this.fireItemAdded(JAR_FILE_REFS_LIST, index, jarFileRef);
+		return jarFileRef;
+	}
+
+	protected XmlJarFileRef buildXmlJarFileRef() {
+		return PersistenceFactory.eINSTANCE.createXmlJarFileRef();
+	}
+
+	public void removeJarFileRef(JarFileRef jarFileRef) {
+		this.removeJarFileRef(this.jarFileRefs.indexOf(jarFileRef));
+	}
+
+	public void removeJarFileRef(int index) {
+		JarFileRef jarFileRef = this.jarFileRefs.remove(index);
+		jarFileRef.dispose();
+		this.xmlPersistenceUnit.getJarFiles().remove(index);
+		this.fireItemRemoved(JAR_FILE_REFS_LIST, index, jarFileRef);
+	}
+
+	protected void addJarFileRef_(JarFileRef jarFileRef) {
+		this.addItemToList(jarFileRef, this.jarFileRefs, JAR_FILE_REFS_LIST);
+	}
+
+	protected void removeJarFileRef_(JarFileRef jarFileRef) {
+		jarFileRef.dispose();
+		this.removeItemFromList(jarFileRef, this.jarFileRefs, JAR_FILE_REFS_LIST);
+	}
+
+	protected void initializeJarFileRefs() {
+		for (XmlJarFileRef xmlJarFileRef : this.xmlPersistenceUnit.getJarFiles()) {
+			this.jarFileRefs.add(this.buildJarFileRef(xmlJarFileRef));
+		}
+	}
+
+	/**
+	 * Since this is a *list*, we simply loop through the elements and match
+	 * the context to the resource element by index, not by name like we do
+	 * with 'impliedClassRefs'.
+	 */
+	protected void updateJarFileRefs() {
+		// make a copy of the XML file refs (to prevent ConcurrentModificationException)
+		Iterator<XmlJarFileRef> xmlFileRefs = new CloneIterator<XmlJarFileRef>(this.xmlPersistenceUnit.getJarFiles());
+
+		for (Iterator<JarFileRef> contextFileRefs = this.jarFileRefs(); contextFileRefs.hasNext(); ) {
+			JarFileRef contextFileRef = contextFileRefs.next();
+			if (xmlFileRefs.hasNext()) {
+				contextFileRef.update(xmlFileRefs.next());
+			} else {
+				this.removeJarFileRef_(contextFileRef);
+			}
+		}
+
+		while (xmlFileRefs.hasNext()) {
+			this.addJarFileRef_(this.buildJarFileRef(xmlFileRefs.next()));
+		}
+	}
+
+	protected JarFileRef buildJarFileRef(XmlJarFileRef xmlJarFileRef) {
+		return this.getContextNodeFactory().buildJarFileRef(this, xmlJarFileRef);
+	}
+
+
+	// ********** class refs **********
+
+	public Iterator<ClassRef> classRefs() {
+		return this.getClassRefs().iterator();
+	}
+
+	@SuppressWarnings("unchecked")
+	protected Iterable<ClassRef> getClassRefs() {
+		return new CompositeIterable<ClassRef>(
+						this.getSpecifiedClassRefs(),
+						this.getImpliedClassRefs()
+					);
+	}
+
+	public int classRefsSize() {
+		return this.specifiedClassRefs.size() + this.impliedClassRefs.size();
+	}
+
+	protected Iterable<PersistentType> getNonNullClassRefPersistentTypes() {
+		return new FilteringIterable<PersistentType>(this.getClassRefPersistentTypes(), NotNullFilter.<PersistentType>instance());
+	}
+
+	protected Iterable<PersistentType> getClassRefPersistentTypes() {
+		return new TransformationIterable<ClassRef, PersistentType>(this.getClassRefs()) {
+			@Override
+			protected PersistentType transform(ClassRef classRef) {
+				return classRef.getJavaPersistentType();
+			}
+		};
+	}
+
+
+	// ********** specified class refs **********
+
+	public ListIterator<ClassRef> specifiedClassRefs() {
+		return new CloneListIterator<ClassRef>(this.specifiedClassRefs);
+	}
+
+	protected Iterable<ClassRef> getSpecifiedClassRefs() {
+		return new LiveCloneIterable<ClassRef>(this.specifiedClassRefs);
+	}
+
+	public int specifiedClassRefsSize() {
+		return this.specifiedClassRefs.size();
+	}
+
+	public ClassRef addSpecifiedClassRef() {
+		return this.addSpecifiedClassRef(this.specifiedClassRefs.size());
+	}
+
+	public ClassRef addSpecifiedClassRef(int index) {
+		XmlJavaClassRef xmlClassRef = this.buildXmlJavaClassRef();
+		ClassRef classRef = this.buildClassRef(xmlClassRef);
+		this.specifiedClassRefs.add(index, classRef);
+		this.xmlPersistenceUnit.getClasses().add(index, xmlClassRef);
+		this.fireItemAdded(SPECIFIED_CLASS_REFS_LIST, index, classRef);
+		return classRef;
+	}
+
+	protected XmlJavaClassRef buildXmlJavaClassRef() {
+		return PersistenceFactory.eINSTANCE.createXmlJavaClassRef();
+	}
+
+	public void removeSpecifiedClassRef(ClassRef classRef) {
+		this.removeSpecifiedClassRef(this.specifiedClassRefs.indexOf(classRef));
+	}
+
+	public void removeSpecifiedClassRef(int index) {
+		ClassRef classRef = this.specifiedClassRefs.remove(index);
+		classRef.dispose();
+		this.xmlPersistenceUnit.getClasses().remove(index);
+		this.fireItemRemoved(SPECIFIED_CLASS_REFS_LIST, index, classRef);
+	}
+
+	protected void addSpecifiedClassRef_(int index, ClassRef classRef) {
+		this.addItemToList(index, classRef, this.specifiedClassRefs, SPECIFIED_CLASS_REFS_LIST);
+	}
+
+	protected void removeSpecifiedClassRef_(ClassRef classRef) {
+		classRef.dispose();
+		this.removeItemFromList(classRef, this.specifiedClassRefs, SPECIFIED_CLASS_REFS_LIST);
+	}
+
+	private void moveSpecifiedClassRef_(int index, ClassRef classRef) {
+		this.moveItemInList(index, this.specifiedClassRefs.indexOf(classRef), this.specifiedClassRefs, SPECIFIED_CLASS_REFS_LIST);
+	}
+
+	protected void initializeSpecifiedClassRefs() {
+		for (XmlJavaClassRef xmlJavaClassRef : this.xmlPersistenceUnit.getClasses()) {
+			this.specifiedClassRefs.add(this.buildClassRef(xmlJavaClassRef));
+		}
+	}
+
+	/**
+	 * Since this is a *list*, we simply loop through the elements and match
+	 * the context to the resource element by index, not by name like we do
+	 * with 'impliedClassRefs'.
+	 */
+	protected void updateSpecifiedClassRefs() {
+		HashBag<ClassRef> contextClassRefsToRemove = CollectionTools.bag(this.specifiedClassRefs(), this.specifiedClassRefsSize());
+		ArrayList<ClassRef> contextClassRefsToUpdate = new ArrayList<ClassRef>(this.specifiedClassRefsSize());
+		int resourceIndex = 0;
+
+		for (Iterator<XmlJavaClassRef> xmlClassRefs = new CloneIterator<XmlJavaClassRef>(this.xmlPersistenceUnit.getClasses()); xmlClassRefs.hasNext(); ) {
+			XmlJavaClassRef resourceClassRef = xmlClassRefs.next();
+			boolean match = false;
+			for (Iterator<ClassRef> contextClassRefs = contextClassRefsToRemove.iterator(); contextClassRefs.hasNext(); ) {
+				ClassRef contextClassRef = contextClassRefs.next();
+				if (contextClassRef.getResourceClassRef() == resourceClassRef) {
+					this.moveSpecifiedClassRef_(resourceIndex, contextClassRef);
+					contextClassRefs.remove();
+					contextClassRefsToUpdate.add(contextClassRef);
+					match = true;
+					break;
+				}
+			}
+			if ( ! match) {
+				this.addSpecifiedClassRef_(resourceIndex, this.buildClassRef(resourceClassRef));
+			}
+			resourceIndex++;
+		}
+		for (ClassRef contextClassRef : contextClassRefsToRemove) {
+			this.removeSpecifiedClassRef_(contextClassRef);
+		}
+		// handle adding and removing class refs first, update the
+		// remaining class refs last; this reduces the churn during "update"
+		for (ClassRef contextClassRef : contextClassRefsToUpdate) {
+			contextClassRef.update();
+		}
+	}
+
+	protected ClassRef buildClassRef(XmlJavaClassRef xmlClassRef) {
+		return this.getContextNodeFactory().buildClassRef(this, xmlClassRef);
+	}
+
+
+	// ********** implied class refs **********
+
+	public Iterator<ClassRef> impliedClassRefs() {
+		return new CloneIterator<ClassRef>(this.impliedClassRefs);
+	}
+
+	protected Iterable<ClassRef> getImpliedClassRefs() {
+		return new LiveCloneIterable<ClassRef>(this.impliedClassRefs);
+	}
+
+	public int impliedClassRefsSize() {
+		return this.impliedClassRefs.size();
+	}
+
+	protected ClassRef addImpliedClassRef(String className) {
+		ClassRef classRef = this.buildClassRef(className);
+		this.addItemToCollection(classRef, this.impliedClassRefs, IMPLIED_CLASS_REFS_COLLECTION);
+		return classRef;
+	}
+
+	protected ClassRef buildClassRef(String className) {
+		return this.getContextNodeFactory().buildClassRef(this, className);
+	}
+
+	protected void removeImpliedClassRef(ClassRef classRef) {
+		classRef.dispose();
+		this.removeItemFromCollection(classRef, this.impliedClassRefs, IMPLIED_CLASS_REFS_COLLECTION);
+	}
+
+	protected void initializeImpliedClassRefs() {
+		if ( ! this.excludesUnlistedClasses()) {
+			this.initializeImpliedClassRefs_();
+		}
+	}
+
+	protected void initializeImpliedClassRefs_() {
+		for (Iterator<String> stream = this.getJpaProject().mappedJavaSourceClassNames(); stream.hasNext(); ) {
+			String typeName = stream.next();
+			if ( ! this.specifiesPersistentType(typeName)) {
+				this.impliedClassRefs.add(this.buildClassRef(typeName));
+			}
+		}
+	}
+
+	protected void updateImpliedClassRefs() {
+		if (this.excludesUnlistedClasses()) {
+			this.clearImpliedClassRefs_();
+		} else {
+			this.updateImpliedClassRefs_();
+		}
+	}
+
+	protected void updateImpliedClassRefs_() {
+		HashBag<ClassRef> impliedRefsToRemove = CollectionTools.bag(this.impliedClassRefs(), this.impliedClassRefsSize());
+		ArrayList<ClassRef> impliedRefsToUpdate = new ArrayList<ClassRef>(this.impliedClassRefsSize());
+
+		for (Iterator<String> mappedClassNames = this.getJpaProject().mappedJavaSourceClassNames(); mappedClassNames.hasNext(); ) {
+			String mappedClassName = mappedClassNames.next();
+			if ( ! this.specifiesPersistentType(mappedClassName)) {
+				boolean match = false;
+				for (Iterator<ClassRef> classRefs = impliedRefsToRemove.iterator(); classRefs.hasNext(); ) {
+					ClassRef classRef = classRefs.next();
+					if (mappedClassName.equals(classRef.getClassName())) {
+						classRefs.remove();
+						impliedRefsToUpdate.add(classRef);
+						match = true;
+						break;
+					}
+				}
+				if ( ! match) {
+					this.addImpliedClassRef(mappedClassName);
+				}
+			}
+		}
+		for (ClassRef classRef : impliedRefsToRemove) {
+			this.removeImpliedClassRef(classRef);
+		}
+		// handle adding and removing implied class refs first, update the
+		// remaining implied class refs last; this reduces the churn during "update"
+		for (ClassRef classRef : impliedRefsToUpdate) {
+			classRef.update(classRef.getClassName());
+		}
+	}
+
+	protected void clearImpliedClassRefs_() {
+		for (ClassRef classRef : this.getImpliedClassRefs()) {
+			this.removeImpliedClassRef(classRef);
+		}
+	}
+
+
+	// ********** exclude unlisted classes **********
+
+	public boolean excludesUnlistedClasses() {
+		return (this.specifiedExcludeUnlistedClasses != null) ? this.specifiedExcludeUnlistedClasses.booleanValue() : this.getDefaultExcludeUnlistedClasses();
+	}
+
+	public Boolean getSpecifiedExcludeUnlistedClasses() {
+		return this.specifiedExcludeUnlistedClasses;
+	}
+
+	public void setSpecifiedExcludeUnlistedClasses(Boolean specifiedExcludeUnlistedClasses) {
+		Boolean old = this.specifiedExcludeUnlistedClasses;
+		this.specifiedExcludeUnlistedClasses = specifiedExcludeUnlistedClasses;
+		this.xmlPersistenceUnit.setExcludeUnlistedClasses(this.specifiedExcludeUnlistedClasses);
+		this.firePropertyChanged(SPECIFIED_EXCLUDE_UNLISTED_CLASSES_PROPERTY, old, specifiedExcludeUnlistedClasses);
+	}
+
+	public boolean getDefaultExcludeUnlistedClasses() {
+		return false;  // ???
+	}
+
+
+	// ********** properties **********
+
+	public ListIterator<Property> properties() {
+		return new CloneListIterator<Property>(this.properties);
+	}
+
+	protected Iterable<Property> getProperties() {
+		return new LiveCloneIterable<Property>(this.properties);
+	}
+
+	public int propertiesSize() {
+		return this.properties.size();
+	}
+
+	public Property getProperty(String propertyName) {
+		if (propertyName == null) {
+			throw new NullPointerException();
+		}
+		for (Property property : this.getProperties()) {
+			if (propertyName.equals(property.getName())) {
+				return property;
+			}
+		}
+		return null;
+	}
+
+	public Iterator<Property> propertiesWithNamePrefix(final String propertyNamePrefix) {
+		if (propertyNamePrefix == null) {
+			throw new NullPointerException();
+		}
+		return new FilteringIterator<Property>(this.properties()) {
+			@Override
+			protected boolean accept(Property property) {
+				String pName = property.getName();
+				return (pName != null) && pName.startsWith(propertyNamePrefix);
+			}
+		};
+	}
+
+	public Property addProperty() {
+		return this.addProperty(this.properties.size());
+	}
+
+	public Property addProperty(int index) {
+		return this.addProperty(this.buildXmlProperty(), index);
+	}
+
+	protected XmlProperty buildXmlProperty() {
+		return PersistenceFactory.eINSTANCE.createXmlProperty();
+	}
+
+	protected Property addProperty(XmlProperty xmlProperty, int index) {
+		Property property = this.buildProperty(xmlProperty);
+
+		XmlProperties xmlProperties = this.xmlPersistenceUnit.getProperties();
+		if (xmlProperties == null) {
+			xmlProperties = this.buildXmlProperties();
+			this.xmlPersistenceUnit.setProperties(xmlProperties);
+		}
+
+		this.properties.add(index, property);
+		xmlProperties.getProperties().add(index, xmlProperty);
+		this.fireItemAdded(PROPERTIES_LIST, index, property);
+		if (property.getName() != null) {
+			this.propertyAdded(property.getName(), property.getValue());
+		}
+		return property;
+	}
+
+	protected Property buildProperty(XmlProperty xmlProperty) {
+		return this.getContextNodeFactory().buildProperty(this, xmlProperty);
+	}
+
+	protected XmlProperties buildXmlProperties() {
+		return PersistenceFactory.eINSTANCE.createXmlProperties();
+	}
+
+	public void setProperty(String propertyName, String value) {
+		this.setProperty(propertyName, value, false);
+	}
+
+	public void setProperty(String propertyName, String value, boolean duplicatePropertyNamesAllowed) {
+		Property prev = this.getProperty(propertyName);
+		if (prev == null) {
+			if (value != null) {
+				this.addProperty(propertyName, value);  // add [first] property
+			}
+		} else {
+			if (duplicatePropertyNamesAllowed) {
+				if (value == null) {
+					// do nothing?
+				} else {
+					this.addProperty(propertyName, value);  // add [duplicate] property
+				}
+			} else {
+				if (value == null) {
+					this.removeProperty(prev);  // remove existing property
+				} else {
+					prev.setValue(value);  // change existing property
+				}
+			}
+		}
+	}
+
+	protected void addProperty(String propertyName, String value) {
+		Property property = this.addProperty();
+		property.setName(propertyName);
+		property.setValue(value);
+	}
+
+	public void removeProperty(Property property) {
+		this.removeProperty(this.properties.indexOf(property));
+	}
+
+	public void removeProperty(String propertyName) {
+		if (propertyName == null) {
+			throw new NullPointerException();
+		}
+		for (ListIterator<Property> stream = this.properties.listIterator(); stream.hasNext(); ) {
+			Property property = stream.next();
+			if (propertyName.equals(property.getName())) {
+				this.removeProperty(stream.previousIndex());
+				return;
+			}
+		}
+		throw new IllegalArgumentException("invalid property name: " + propertyName); //$NON-NLS-1$
+	}
+
+	public void removeProperty(String propertyName, String value) {
+		if ((propertyName == null) || (value == null)) {
+			throw new NullPointerException();
+		}
+		for (ListIterator<Property> stream = this.properties.listIterator(); stream.hasNext(); ) {
+			Property property = stream.next();
+			if (propertyName.equals(property.getName()) && value.equals(property.getValue())) {
+				this.removeProperty(stream.previousIndex());
+				return;
+			}
+		}
+		throw new IllegalArgumentException("invalid property name/value pair: " + propertyName + " = " + value); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	protected void removeProperty(int index) {
+		Property removedProperty = this.properties.remove(index);
+		this.xmlPersistenceUnit.getProperties().getProperties().remove(index);
+
+		if (this.xmlPersistenceUnit.getProperties().getProperties().isEmpty()) {
+			this.xmlPersistenceUnit.setProperties(null);
+		}
+
+		this.fireItemRemoved(PROPERTIES_LIST, index, removedProperty);
+		if (removedProperty.getName() != null) {
+			this.propertyRemoved(removedProperty.getName());
+		}
+	}
+
+	protected void addProperty_(int index, Property property) {
+		this.addItemToList(index, property, this.properties, PROPERTIES_LIST);
+		if (property.getName() != null) {
+			this.propertyAdded(property.getName(), property.getValue());
+		}
+	}
+	
+	protected void removeProperty_(int index) {
+		removeProperty_(this.properties.get(index));
+	}
+
+	protected void removeProperty_(Property property) {
+		this.removeItemFromList(property, this.properties, PROPERTIES_LIST);
+		if (property.getName() != null) {
+			this.propertyRemoved(property.getName());
+		}
+	}
+	
+	protected void moveProperty_(int index, Property property) {
+		this.moveItemInList(index, this.properties.indexOf(property), this.properties, PROPERTIES_LIST);
+	}
+	
+	public void propertyNameChanged(String oldPropertyName, String newPropertyName, String value) {
+		if (oldPropertyName == null && value == null) {
+			//this is a property that is currently being added, we don't need to deal with it until the value is set
+			return;
+		}
+		if (oldPropertyName != null) {
+			this.propertyRemoved(oldPropertyName);
+		}
+		if (newPropertyName != null) {
+			this.propertyAdded(newPropertyName, value);
+		}
+	}
+	
+	public void propertyValueChanged(String propertyName, String newValue) {
+		this.connection.propertyValueChanged(propertyName, newValue);
+		this.options.propertyValueChanged(propertyName, newValue);
+	}
+
+	public void propertyAdded(String propertyName, String value) {
+		this.propertyValueChanged(propertyName, value);
+	}
+	
+	public void propertyRemoved(String propertyName) {
+		this.connection.propertyRemoved(propertyName);
+		this.options.propertyRemoved(propertyName);
+	}
+	
+	protected void initializeProperties() {
+		XmlProperties xmlProperties = this.xmlPersistenceUnit.getProperties();
+		if (xmlProperties != null) {
+			for (XmlProperty xmlProperty : xmlProperties.getProperties()) {
+				this.properties.add(this.buildProperty(xmlProperty));
+			}
+		}
+		this.connection = this.getContextNodeFactory().buildConnection(this);
+		this.options = this.getContextNodeFactory().buildOptions(this);
+	}
+
+	/**
+	 * Match the elements based on the XmlProperty resource object and also keep the order
+	 * the same as the source.
+	 */
+	protected void updateProperties() {		
+		HashBag<Property> contextPropertiesToRemove = CollectionTools.bag(this.properties(), this.propertiesSize());
+		int resourceIndex = 0;
+		
+		for (Iterator<XmlProperty> xmlProperties = this.xmlProperties(); xmlProperties.hasNext(); ) {
+			XmlProperty xmlProperty = xmlProperties.next();
+			boolean match = false;
+			for (Iterator<Property> contextProperties = contextPropertiesToRemove.iterator(); contextProperties.hasNext();) {
+				Property contextProperty = contextProperties.next();
+				if (contextProperty.getXmlProperty() == xmlProperty) {
+					contextProperties.remove();
+					this.moveProperty_(resourceIndex, contextProperty);
+					contextProperty.update();
+					match = true;
+					break;
+				}
+			}
+			if ( ! match) {
+				this.addProperty_(resourceIndex, this.buildProperty(xmlProperty));
+			}
+			resourceIndex++;
+		}
+		for (Property contextProperty : contextPropertiesToRemove) {
+			this.removeProperty_(contextProperty);
+		}
+	}
+
+	protected Iterator<XmlProperty> xmlProperties() {
+		XmlProperties xmlProperties = this.xmlPersistenceUnit.getProperties();
+		// make a copy of the XML properties (to prevent ConcurrentModificationException)
+		return (xmlProperties != null) ? new CloneIterator<XmlProperty>(xmlProperties.getProperties()) : EmptyIterator.<XmlProperty>instance();
+	}
+	
+	protected int xmlPropertiesSize() {
+		XmlProperties xmlProperties = this.xmlPersistenceUnit.getProperties();
+		return xmlProperties == null ? 0 : xmlProperties.getProperties().size();
+	}
+
+
+	// ********** ORM persistence unit defaults **********
+
+	public AccessType getDefaultAccess() {
+		return this.defaultAccess;
+	}
+
+	protected void setDefaultAccess(AccessType defaultAccess) {
+		AccessType old = this.defaultAccess;
+		this.defaultAccess = defaultAccess;
+		this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, defaultAccess);
+	}
+
+	protected AccessType buildDefaultAccess(MappingFilePersistenceUnitDefaults defaults) {
+		return (defaults == null) ? null : defaults.getAccess();
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String defaultCatalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = defaultCatalog;
+		this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, defaultCatalog);
+	}
+
+	protected String buildDefaultCatalog(MappingFilePersistenceUnitDefaults defaults) {
+		String catalog = (defaults == null) ? null : defaults.getCatalog();
+		return (catalog != null) ? catalog : this.getJpaProject().getDefaultCatalog();
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String defaultSchema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = defaultSchema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, defaultSchema);
+	}
+
+	protected String buildDefaultSchema(MappingFilePersistenceUnitDefaults defaults) {
+		String schema = (defaults == null) ? null : defaults.getSchema();
+		return (schema != null) ? schema : this.getJpaProject().getDefaultSchema();
+	}
+
+	public boolean getDefaultCascadePersist() {
+		return this.defaultCascadePersist;
+	}
+
+	protected void setDefaultCascadePersist(boolean defaultCascadePersist) {
+		boolean old = this.defaultCascadePersist;
+		this.defaultCascadePersist = defaultCascadePersist;
+		this.firePropertyChanged(DEFAULT_CASCADE_PERSIST_PROPERTY, old, defaultCascadePersist);
+	}
+
+	protected boolean buildDefaultCascadePersist(MappingFilePersistenceUnitDefaults defaults) {
+		return (defaults == null) ? false : defaults.isCascadePersist();
+	}
+
+	public boolean getDefaultDelimitedIdentifiers() {
+		return this.defaultDelimitedIdentifiers;
+	}
+
+	protected void setDefaultDelimitedIdentifiers(boolean defaultDelimitedIdentifiers) {
+		boolean old = this.defaultDelimitedIdentifiers;
+		this.defaultDelimitedIdentifiers = defaultDelimitedIdentifiers;
+		this.firePropertyChanged(DEFAULT_DELIMITED_IDENTIFIERS_PROPERTY, old, defaultDelimitedIdentifiers);
+	}
+
+	protected boolean buildDefaultDelimitedIdentifiers(MappingFilePersistenceUnitDefaults defaults) {
+		return ( ! this.isJpa2_0Compatible()) ? false :
+				(defaults == null) ? false : ((MappingFilePersistenceUnitDefaults2_0) defaults).isDelimitedIdentifiers();
+	}
+
+	protected void initializePersistenceUnitDefaults() {
+		MappingFilePersistenceUnitDefaults defaults = this.getDefaults();
+		this.defaultAccess = this.buildDefaultAccess(defaults);
+		this.defaultCatalog = this.buildDefaultCatalog(defaults);
+		this.defaultSchema = this.buildDefaultSchema(defaults);
+		this.defaultCascadePersist = this.buildDefaultCascadePersist(defaults);
+		this.defaultDelimitedIdentifiers = this.buildDefaultDelimitedIdentifiers(defaults);
+	}
+
+	protected void updatePersistenceUnitDefaults() {
+		MappingFilePersistenceUnitDefaults defaults = this.getDefaults();
+		this.setDefaultAccess(this.buildDefaultAccess(defaults));
+		this.setDefaultCatalog(this.buildDefaultCatalog(defaults));
+		this.setDefaultSchema(this.buildDefaultSchema(defaults));
+		this.setDefaultDelimitedIdentifiers(this.buildDefaultDelimitedIdentifiers(defaults));
+	}
+
+	/**
+	 * return the first persistence unit defaults we encounter in a mapping file
+	 */
+	protected MappingFilePersistenceUnitDefaults getDefaults() {
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			if (mappingFileRef.persistenceUnitDefaultsExists()) {
+				return mappingFileRef.getPersistenceUnitDefaults();
+			}
+		}
+		return null;
+	}
+
+	
+	//************** PersistenceUnit2_0 implementation ***********
+
+	public PersistenceUnitProperties getConnection() {
+		return this.connection;
+	}
+
+	public PersistenceUnitProperties getOptions() {
+		return this.options;
+	}
+
+	// ********** shared cache mode **********
+
+	public SharedCacheMode getSharedCacheMode() {
+		return (this.specifiedSharedCacheMode != null) ? this.specifiedSharedCacheMode : this.defaultSharedCacheMode;
+	}
+
+	public SharedCacheMode getSpecifiedSharedCacheMode() {
+		return this.specifiedSharedCacheMode;
+	}
+
+	public void setSpecifiedSharedCacheMode(SharedCacheMode specifiedSharedCacheMode) {
+		SharedCacheMode old = this.specifiedSharedCacheMode;
+		this.specifiedSharedCacheMode = specifiedSharedCacheMode;
+		this.xmlPersistenceUnit.setSharedCacheMode(SharedCacheMode.toXmlResourceModel(specifiedSharedCacheMode));
+		this.firePropertyChanged(SPECIFIED_SHARED_CACHE_MODE_PROPERTY, old, specifiedSharedCacheMode);
+	}
+
+	public SharedCacheMode getDefaultSharedCacheMode() {
+		return this.defaultSharedCacheMode;
+	}
+
+	protected void setDefaultSharedCacheMode(SharedCacheMode defaultSharedCacheMode) {
+		SharedCacheMode old = this.defaultSharedCacheMode;
+		this.defaultSharedCacheMode = defaultSharedCacheMode;
+		this.firePropertyChanged(DEFAULT_SHARED_CACHE_MODE_PROPERTY, old, defaultSharedCacheMode);
+	}
+	
+	public boolean calculateDefaultCacheable() {
+		switch (getSharedCacheMode()) {
+			case NONE:
+			case ENABLE_SELECTIVE:
+			case UNSPECIFIED:
+				return false;
+			case ALL:
+			case DISABLE_SELECTIVE:
+				return true;
+		}
+		return false;//null
+	}
+	
+	protected SharedCacheMode buildSpecifiedSharedCacheMode() {
+		return SharedCacheMode.fromXmlResourceModel(this.xmlPersistenceUnit.getSharedCacheMode());
+	}
+	
+	protected SharedCacheMode buildDefaultSharedCacheMode() {
+		return SharedCacheMode.UNSPECIFIED;
+	}
+
+	// ********** validation mode **********
+
+	public ValidationMode getValidationMode() {
+		return (this.specifiedValidationMode != null) ? this.specifiedValidationMode : this.defaultValidationMode;
+	}
+
+	public ValidationMode getSpecifiedValidationMode() {
+		return this.specifiedValidationMode;
+	}
+
+	public void setSpecifiedValidationMode(ValidationMode specifiedValidationMode) {
+		ValidationMode old = this.specifiedValidationMode;
+		this.specifiedValidationMode = specifiedValidationMode;
+		this.xmlPersistenceUnit.setValidationMode(ValidationMode.toXmlResourceModel(specifiedValidationMode));
+		this.firePropertyChanged(SPECIFIED_VALIDATION_MODE_PROPERTY, old, specifiedValidationMode);
+	}
+
+	public ValidationMode getDefaultValidationMode() {
+		return this.defaultValidationMode;
+	}
+
+	protected void setDefaultValidationMode(ValidationMode defaultValidationMode) {
+		ValidationMode old = this.defaultValidationMode;
+		this.defaultValidationMode = defaultValidationMode;
+		this.firePropertyChanged(DEFAULT_VALIDATION_MODE_PROPERTY, old, defaultValidationMode);
+	}	
+
+	protected ValidationMode buildSpecifiedValidationMode() {
+		return ValidationMode.fromXmlResourceModel(this.xmlPersistenceUnit.getValidationMode());
+	}
+	
+	protected ValidationMode buildDefaultValidationMode() {
+		return DEFAULT_VALIDATION_MODE; 
+	}
+
+
+	// ********** generators **********
+
+	public ListIterator<Generator> generators() {
+		return new CloneListIterator<Generator>(this.generators);
+	}
+
+	public int generatorsSize() {
+		return this.generators.size();
+	}
+
+	public void addGenerator(Generator generator) {
+		this.generators.add(generator);
+	}
+
+	public String[] uniqueGeneratorNames() {
+		HashSet<String> names = new HashSet<String>(this.generators.size());
+		this.addNonNullGeneratorNamesTo(names);
+		return names.toArray(new String[names.size()]);
+	}
+
+	protected void addNonNullGeneratorNamesTo(Set<String> names) {
+		for (Iterator<Generator> stream = this.generators(); stream.hasNext(); ) {
+			String generatorName = stream.next().getName();
+			if (generatorName != null) {
+				names.add(generatorName);
+			}
+		}
+	}
+
+
+	// ********** queries **********
+
+	public ListIterator<Query> queries() {
+		return new CloneListIterator<Query>(this.queries);
+	}
+
+	public int queriesSize() {
+		return this.queries.size();
+	}
+
+	public void addQuery(Query query) {
+		this.queries.add(query);
+	}
+
+
+	// ********** root entities **********
+
+	public void addRootEntityWithSubEntities(String entityName) {
+		this.rootEntityNames.add(entityName);
+	}
+	
+	public boolean entityIsRootWithSubEntities(String entityName) {
+		return this.rootEntityNames.contains(entityName);
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateMappingFiles(messages, reporter);
+		this.validateClassRefs(messages, reporter);
+		this.validateJarFileRefs(messages, reporter);
+		this.validateProperties(messages, reporter);
+	}
+
+	protected void validateMappingFiles(List<IMessage> messages, IReporter reporter) {
+		this.checkForMultiplePersistenceUnitDefaults(messages);
+		this.checkForDuplicateMappingFiles(messages);
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			mappingFileRef.validate(messages, reporter);
+		}
+	}
+
+	protected void checkForMultiplePersistenceUnitDefaults(List<IMessage> messages) {
+		boolean first = true;
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			if (mappingFileRef.persistenceUnitDefaultsExists()) {
+				if (first) {
+					first = false;
+				} else {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.NORMAL_SEVERITY,
+							JpaValidationMessages.MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_DEFAULTS,
+							new String[] {mappingFileRef.getFileName()},
+							mappingFileRef
+						)
+					);
+				}
+			}
+		}
+	}
+
+	protected void checkForDuplicateMappingFiles(List<IMessage> messages) {
+		HashBag<String> fileNames = new HashBag<String>();
+		CollectionTools.addAll(fileNames, this.mappingFileRefNames());
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			String fileName = mappingFileRef.getFileName();
+			if (fileNames.count(fileName) > 1) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE,
+						new String[] {fileName}, 
+						mappingFileRef, 
+						mappingFileRef.getValidationTextRange()
+					)
+				);
+			}
+		}
+	}
+
+	protected Iterator<String> mappingFileRefNames() {
+		return new TransformationIterator<MappingFileRef, String>(this.mappingFileRefs()) {
+			@Override
+			protected String transform(MappingFileRef mappingFileRef) {
+				return mappingFileRef.getFileName();
+			}
+		};
+	}
+
+	protected void validateClassRefs(List<IMessage> messages, IReporter reporter) {
+		this.checkForDuplicateClasses(messages);
+		for (Iterator<ClassRef> stream = this.classRefs(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter);
+		}
+	}
+
+	protected void checkForDuplicateClasses(List<IMessage> messages) {
+		HashBag<String> classNames = new HashBag<String>();
+		CollectionTools.addAll(classNames, this.classRefNames());
+		for (Iterator<ClassRef> stream = this.classRefs(); stream.hasNext(); ) {
+			ClassRef classRef = stream.next();
+			String className = classRef.getClassName();
+			if ((className != null) && (classNames.count(className) > 1)) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_CLASS,
+						new String[] {className}, 
+						classRef, 
+						classRef.getValidationTextRange()
+					)
+				);
+			}
+		}
+	}
+
+	protected Iterator<String> classRefNames() {
+		return new TransformationIterator<ClassRef, String>(this.classRefs()) {
+			@Override
+			protected String transform(ClassRef classRef) {
+				return classRef.getClassName();
+			}
+		};
+	}
+	
+	protected void validateJarFileRefs(List<IMessage> messages, IReporter reporter) {
+		checkForDuplicateJarFileRefs(messages);
+		for (JarFileRef each : CollectionTools.iterable(jarFileRefs())) {
+			each.validate(messages, reporter);
+		}
+	}
+	
+	protected void checkForDuplicateJarFileRefs(List<IMessage> messages) {
+		HashBag<String> jarFileNames = new HashBag<String>();
+		CollectionTools.addAll(jarFileNames, jarFileNames());
+		for (JarFileRef jarFileRef : CollectionTools.iterable(jarFileRefs())) {
+			String jarFileName = jarFileRef.getFileName();
+			if ((jarFileName != null) && (jarFileNames.count(jarFileName) > 1)) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.PERSISTENCE_UNIT_DUPLICATE_JAR_FILE,
+						new String[] {jarFileName}, 
+						jarFileRef, 
+						jarFileRef.getValidationTextRange()
+					)
+				);
+			}
+		}
+	}
+	
+	protected Iterator<String> jarFileNames() {
+		return new TransformationIterator<JarFileRef, String>(jarFileRefs()) {
+			@Override
+			protected String transform(JarFileRef jarFileRef) {
+				return jarFileRef.getFileName();
+			}
+		};
+	}
+	
+	@SuppressWarnings("unused")
+	protected void validateProperties(List<IMessage> messages, IReporter reporter) {
+		// do nothing by default
+	}
+
+
+	// ********** misc **********
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		for (Iterator<JarFileRef> stream = this.jarFileRefs(); stream.hasNext(); ) {
+			JarFileRef jarFileRef = stream.next();
+			if (jarFileRef.containsOffset(textOffset)) {
+				return jarFileRef;
+			}
+		}
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			if (mappingFileRef.containsOffset(textOffset)) {
+				return mappingFileRef;
+			}
+		}
+		for (Iterator<ClassRef> stream = this.classRefs(); stream.hasNext(); ) {
+			ClassRef classRef = stream.next();
+			if (classRef.containsOffset(textOffset)) {
+				return classRef;
+			}
+		}
+		return this;
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return connectionProfileIsActive();
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.xmlPersistenceUnit.getValidationTextRange();
+	}
+
+	public PersistentType getPersistentType(String typeName) {
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			PersistentType persistentType = mappingFileRef.getPersistentType(typeName);
+			if (persistentType != null) {
+				return persistentType;
+			}
+		}
+		for (Iterator<ClassRef> stream = this.classRefs(); stream.hasNext(); ) {
+			ClassRef classRef = stream.next();
+			if (classRef.isFor(typeName)) {
+				return classRef.getJavaPersistentType();
+			}
+		}
+		for (Iterator<JarFileRef> stream = this.jarFileRefs(); stream.hasNext(); ) {
+			PersistentType persistentType = stream.next().getPersistentType(typeName);
+			if (persistentType != null) {
+				return persistentType;
+			}
+		}
+		return null;
+	}
+
+	public boolean specifiesPersistentType(String className) {
+		for (ClassRef classRef : this.getSpecifiedClassRefs()) {
+			if (classRef.isFor(className)) {
+				return true;
+			}
+		}
+		for (MappingFileRef mappingFileRef : this.getMappingFileRefs()) {
+			if (mappingFileRef.getPersistentType(className) != null) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public Entity getEntity(String typeName) {
+		PersistentType persistentType = this.getPersistentType(typeName);
+		if (persistentType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = persistentType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+	public Embeddable getEmbeddable(String typeName) {
+		PersistentType persistentType = this.getPersistentType(typeName);
+		if (persistentType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = persistentType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	public boolean containsOffset(int textOffset) {
+		return (this.xmlPersistenceUnit != null) && this.xmlPersistenceUnit.containsOffset(textOffset);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append(this.name);
+	}
+
+
+	// ********** metamodel **********
+	// put metamodel stuff here so it can be shared by Generic and EclipseLink implementations
+
+	public void initializeMetamodel() {
+		this.initializeMetamodelFiles();
+	}
+
+	protected void initializeMetamodelFiles() {
+		CollectionTools.addAll(this.metamodelFiles, this.getGeneratedMetamodelFiles());
+	}
+
+	protected Iterable<IFile> getGeneratedMetamodelFiles() {
+		return new TransformationIterable<JavaResourcePersistentType2_0, IFile>(this.getGeneratedMetamodelTopLevelTypes()) {
+			@Override
+			protected IFile transform(JavaResourcePersistentType2_0 jrpt) {
+				return jrpt.getFile();
+			}
+		};
+	}
+
+	protected Iterable<JavaResourcePersistentType2_0> getGeneratedMetamodelTopLevelTypes() {
+		return ((JpaProject2_0) this.getJpaProject()).getGeneratedMetamodelTopLevelTypes();
+	}
+
+	/**
+	 * Not the prettiest code....
+	 */
+	public void synchronizeMetamodel() {
+		// gather up the persistent unit's types, eliminating duplicates;
+		// if we have persistent types with the same name in multiple locations,
+		// the last one we encounter wins (i.e. the classes in the orm.xml take
+		// precedence)
+		HashMap<String, PersistentType2_0> allPersistentTypes = new HashMap<String, PersistentType2_0>();
+		this.addPersistentTypesTo_(this.getJarFileRefs(), allPersistentTypes);
+		this.addPersistentTypesTo(this.getNonNullClassRefPersistentTypes(), allPersistentTypes);
+		this.addPersistentTypesTo_(this.getMappingFileRefs(), allPersistentTypes);
+
+		// build a list of the top-level types and a tree of their associated
+		// member types etc.
+		ArrayList<MetamodelSourceType> topLevelTypes = new ArrayList<MetamodelSourceType>(allPersistentTypes.size());
+		HashMap<String, Collection<MetamodelSourceType>> memberTypeTree = new HashMap<String, Collection<MetamodelSourceType>>();
+		for (PersistentType2_0 type : allPersistentTypes.values()) {
+			String declaringTypeName = type.getDeclaringTypeName();
+			MetamodelSourceType memberType = type;
+			while (true) {
+				if (declaringTypeName == null) {
+					topLevelTypes.add(memberType);
+					break;  // stop at the top-level type
+				}
+
+				// associate the member type with its declaring type
+				Collection<MetamodelSourceType> memberTypes = memberTypeTree.get(declaringTypeName);
+				if (memberTypes == null) {
+					memberTypes = new ArrayList<MetamodelSourceType>();
+					memberTypeTree.put(declaringTypeName, memberTypes);
+				}
+				memberTypes.add(memberType);
+
+				// move out to the member type's declaring type
+				String memberTypeName = declaringTypeName;
+				// check for a context persistent type
+				memberType = allPersistentTypes.get(memberTypeName);
+				if (memberType != null) {
+					break;  // stop - this will be processed in the outer 'for' loop
+				}
+				// check for a Java resource persistent type
+				JavaResourcePersistentType jrpt = this.getJpaProject().getJavaResourcePersistentType(memberTypeName);
+				if (jrpt != null) {
+					declaringTypeName = jrpt.getDeclaringTypeName();
+				} else {
+					// check for a JDT type
+					IType jdtType = this.findJdtType(memberTypeName);
+					if (jdtType != null) {
+						IType jdtDeclaringType = jdtType.getDeclaringType();
+						declaringTypeName = (jdtDeclaringType == null) ? null : jdtDeclaringType.getFullyQualifiedName('.');
+					} else {
+						// assume we have a non-persistent top-level type...?
+						declaringTypeName = null;
+					}
+				}
+				if (declaringTypeName == null) {
+					memberType = this.selectSourceType(topLevelTypes, memberTypeName);
+				} else {
+					memberType = this.selectSourceType(memberTypeTree.get(declaringTypeName), memberTypeName);
+				}
+				if (memberType != null) {
+					break;  // stop - this type has already been processed
+				}
+				memberType = this.buildNonPersistentMetamodelSourceType(memberTypeName);
+			}
+		}
+
+		// remove any top-level type whose name differs from another only by case,
+		// since, on Windows, file names are case-insensitive :-(
+		// sort the original list so we end up with the same top-level type
+		// remaining every time (i.e. the one that sorts out first)
+		Collections.sort(topLevelTypes, MetamodelSourceType.COMPARATOR);
+		HashSet<String> names = new HashSet<String>(topLevelTypes.size());
+		for (Iterator<MetamodelSourceType> stream = topLevelTypes.iterator(); stream.hasNext(); ) {
+			MetamodelSourceType topLevelType = stream.next();
+			// hopefully this is case-insensitive enough...
+			if ( ! names.add(topLevelType.getName().toLowerCase())) {
+				stream.remove();
+			}
+		}
+
+		// copy the list of metamodel files...
+		HashSet<IFile> deadMetamodelFiles = new HashSet<IFile>(this.metamodelFiles);
+		this.metamodelFiles.clear();
+		for (MetamodelSourceType topLevelType : topLevelTypes) {
+			IFile metamodelFile = topLevelType.getMetamodelFile();
+			// ...remove whatever files are still present...
+			deadMetamodelFiles.remove(metamodelFile);
+			// ...rebuild the list of metamodel files...
+			if (this.fileIsGeneratedMetamodel(metamodelFile)) {  // only add files with the Dali tag
+				this.metamodelFiles.add(metamodelFile);
+			}
+		}
+		// ...delete the files that are now gone
+		// [perform the deletes first - this is critical when a file has been
+		// renamed by only altering its name's case; since we will try to write
+		// out a new file that, on Windows, collides with the old file :-( ]
+		for (IFile deadMetamodelFile : deadMetamodelFiles) {
+			this.deleteMetamodelFile(deadMetamodelFile);
+		}
+
+		// now generate the metamodel classes
+		for (MetamodelSourceType topLevelType : topLevelTypes) {
+			topLevelType.synchronizeMetamodel(memberTypeTree);
+		}
+	}
+
+	protected void addPersistentTypesTo_(Iterable<? extends PersistentTypeContainer> ptContainers, HashMap<String, PersistentType2_0> persistentTypeMap) {
+		for (PersistentTypeContainer ptContainer : ptContainers) {
+			this.addPersistentTypesTo(ptContainer.getPersistentTypes(), persistentTypeMap);
+		}
+	}
+
+	protected void addPersistentTypesTo(Iterable<? extends PersistentType> persistentTypes, HashMap<String, PersistentType2_0> persistentTypeMap) {
+		for (PersistentType persistentType : persistentTypes) {
+			if (persistentType.getName() != null) {
+				persistentTypeMap.put(persistentType.getName(), (PersistentType2_0) persistentType);
+			}
+		}
+	}
+
+	protected MetamodelSourceType selectSourceType(Iterable<MetamodelSourceType> types, String typeName) {
+		if (types != null) {
+			for (MetamodelSourceType type : types) {
+				if (type.getName().equals(typeName)) {
+					return type;
+				}
+			}
+		}
+		return null;
+	}
+
+	protected MetamodelSourceType buildNonPersistentMetamodelSourceType(String nonPersistentTypeName) {
+		return new NonPersistentMetamodelSourceType(nonPersistentTypeName, this.getJpaProject());
+	}
+
+	protected IType findJdtType(String typeName) {
+		try {
+			return this.getJpaProject().getJavaProject().findType(typeName);
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return null;
+		}
+	}
+
+	protected void deleteMetamodelFile(IFile file) {
+		try {
+			this.deleteMetamodelFile_(file);
+		} catch (CoreException ex) {
+			JptCorePlugin.log(ex);
+		}
+	}
+
+	protected void deleteMetamodelFile_(IFile file) throws CoreException {
+		if (this.fileIsGeneratedMetamodel(file)) {
+			file.delete(true, null);  // true = force
+		}
+	}
+
+	protected boolean fileIsGeneratedMetamodel(IFile file) {
+		return ((JpaProject2_0) this.getJpaProject()).getGeneratedMetamodelTopLevelType(file) != null;
+	}
+
+	public void disposeMetamodel() {
+		this.metamodelFiles.clear();
+	}
+
+	// ***** Metamodel source for non-persistent types
+	protected static class NonPersistentMetamodelSourceType
+		implements MetamodelSourceType
+	{
+		protected final String name;
+		protected final JpaProject jpaProject;
+		protected final MetamodelSourceType.Synchronizer metamodelSynchronizer;
+
+		protected NonPersistentMetamodelSourceType(String name, JpaProject jpaProject) {
+			super();
+			this.name = name;
+			this.jpaProject = jpaProject;
+			this.metamodelSynchronizer = this.buildMetamodelSynchronizer();
+		}
+
+		protected MetamodelSourceType.Synchronizer buildMetamodelSynchronizer() {
+			return this.getJpaFactory().buildMetamodelSynchronizer(this);
+		}
+
+		protected JpaFactory2_0 getJpaFactory() {
+			return (JpaFactory2_0) this.getJpaProject().getJpaPlatform().getJpaFactory();
+		}
+
+		public String getName() {
+			return this.name;
+		}
+
+		public boolean isManaged() {
+			return false;
+		}
+
+		public PersistentType getSuperPersistentType() {
+			return null;
+		}
+
+		public <T extends PersistentAttribute> ListIterator<T> attributes() {
+			return EmptyListIterator.instance();
+		}
+
+		public IFile getMetamodelFile() {
+			return this.metamodelSynchronizer.getFile();
+		}
+
+		public JpaProject getJpaProject() {
+			return this.jpaProject;
+		}
+
+		public void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+			this.metamodelSynchronizer.synchronize(memberTypeTree);
+		}
+
+		public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+			this.metamodelSynchronizer.printBodySourceOn(pw, memberTypeTree);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceUnitProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceUnitProperties.java
new file mode 100644
index 0000000..b1af233
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceUnitProperties.java
@@ -0,0 +1,412 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitProperties;
+import org.eclipse.jpt.utility.internal.ReflectionTools;
+import org.eclipse.jpt.utility.internal.model.AbstractModel;
+
+/**
+ *  AbstractPersistenceUnitProperties
+ */
+public abstract class AbstractPersistenceUnitProperties extends AbstractModel
+				implements PersistenceUnitProperties
+{
+	private PersistenceUnit persistenceUnit;
+
+	// key = PersistenceUnit property key; value = property id
+	private Map<String, String> propertyNames;
+
+	private static final long serialVersionUID = 1L;
+	
+	// ********** constructors / initialization **********
+	protected AbstractPersistenceUnitProperties(PersistenceUnit parent) {
+		super();
+		this.initialize();
+		this.initialize(parent);
+		this.postInitialize();
+	}
+
+	/**
+	 * Base initialization.
+	 */
+	protected void initialize() {
+		this.propertyNames = new HashMap<String, String>();
+	}
+
+	/**
+	 * Initialization based on the persistence unit.
+	 */
+	protected void initialize(PersistenceUnit parent) {
+		this.persistenceUnit = parent;
+		
+		this.initializePropertyNames();
+		this.initializeProperties();
+	}
+
+	protected void initializePropertyNames() {
+		this.addPropertyNames(this.propertyNames);
+	}
+
+	/**
+	 * Initializes properties with values from the persistence unit.
+	 */
+	protected abstract void initializeProperties();
+
+	/**
+     * Does all post treatment in this method after the properties are initialized
+	 */
+	protected void postInitialize() {
+		// do nothing by default
+	}
+
+	// ********** behavior **********
+	public PersistenceUnit getPersistenceUnit() {
+		return this.persistenceUnit;
+	}
+	
+	public JpaProject getJpaProject() {
+		return this.persistenceUnit.getJpaProject();
+	}
+
+	private Map<String, String> propertyNames() {
+		return this.propertyNames;
+	}
+	/**
+	 * Adds property names key/value pairs, used by the methods: itemIsProperty
+	 * and propertyIdFor.
+	 * 
+	 * key = property key; value = property id
+	 */
+	protected abstract void addPropertyNames(Map<String, String> pNames);
+
+	/**
+	 * Method used for identifying the given property.
+	 */
+	public boolean itemIsProperty(PersistenceUnit.Property item) {
+		if (item == null) {
+			throw new NullPointerException();
+		}
+		return this.propertyNames().keySet().contains(item.getName());
+	}
+
+	/**
+	 * Returns the property name used for change notification of the given
+	 * property.
+	 */
+	public String propertyIdOf(PersistenceUnit.Property property) {
+		String propertyId = this.propertyNames().get(property.getName());
+		if (propertyId == null) {
+			throw new IllegalArgumentException("Illegal property: " + property); //$NON-NLS-1$
+		}
+		return propertyId;
+	}
+	
+	public String propertyIdOf(String eclipseLinkkey) {
+		String propertyId = this.propertyNames().get(eclipseLinkkey);
+		if (propertyId == null) {
+			throw new IllegalArgumentException("Illegal property: " + eclipseLinkkey); //$NON-NLS-1$
+		}
+		return propertyId;
+	}
+
+	/*
+	 * Get the PersistenceUnit property key of the given property 
+	 */
+	protected String persistenceUnitKeyOf(String propertyId) {
+		for (String persistenceUnitKey : this.propertyNames().keySet()) {
+			if (this.propertyNames().get(persistenceUnitKey).equals(propertyId)) {
+				return persistenceUnitKey;
+			}
+		}
+		throw new IllegalArgumentException("Illegal property ID: " + propertyId); //$NON-NLS-1$
+	}
+	
+	// ******** Convenience methods ********
+	/**
+	 * Put into persistenceUnit properties.
+	 * 
+	 * @param key -
+	 *            property name
+	 * @param value -
+	 *            property value
+	 */
+	protected void putProperty(String key, Object value) {
+		this.putProperty(key, value, false);
+	}
+
+	@SuppressWarnings("unchecked")
+	protected void putProperty(String key, Object value, boolean allowDuplicates) {
+		String persistenceUnitKey = this.persistenceUnitKeyOf(key);
+		if ((value != null) && value.getClass().isEnum()) {
+			this.putEnumValue(persistenceUnitKey, (Enum) value, allowDuplicates);
+		} 
+		else {
+			this.putPersistenceUnitProperty(persistenceUnitKey, null, value, allowDuplicates);
+		}
+	}
+
+	private void putPersistenceUnitProperty(String key, String keySuffix, Object value, boolean allowDuplicates) {
+		String persistenceUnitKey = (keySuffix == null) ? key : key + keySuffix;
+		String stringValue = (value == null) ? null : value.toString();
+		this.getPersistenceUnit().setProperty(persistenceUnitKey, stringValue, allowDuplicates);
+	}
+
+	/**
+	 * Removes a persistenceUnit property.
+	 * 
+	 * @param key -
+	 *            property name
+	 * @param value -
+	 *            property value
+	 */
+	protected void removeProperty(String key, String value) {
+		String persistenceUnitKey = this.persistenceUnitKeyOf(key);
+		
+		this.getPersistenceUnit().removeProperty(persistenceUnitKey, value);
+	}
+
+	/**
+	 * Returns true when the given key exits in the PersistenceXml.
+	 */
+	protected boolean persistenceUnitKeyExists(String persistenceUnitKey) {
+		return (this.getStringValue(persistenceUnitKey) != null);
+	}
+	
+	// ****** get/set String convenience methods *******
+	/**
+	 * Returns the String value of the given Property from the PersistenceXml.
+	 */
+	protected String getStringValue(String persistenceUnitKey) {
+		PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
+		return (p == null) ? null : p.getValue();
+	}
+
+	protected String getStringValue(String key, String keySuffix) {
+		return this.getStringValue((keySuffix == null) ? key : key + keySuffix);
+	}
+
+	/**
+	 * Put the given String value into the PersistenceXml.
+	 * @param key -
+	 *            property key
+	 * @param newValue
+	 *            value to be associated with the key
+	 */
+	protected void putStringValue(String key, String newValue) {
+		this.putStringValue(key, null, newValue, false);
+	}
+
+	/**
+	 * Put the given String value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param newValue
+	 *            value to be associated with the key
+	 * @param allowDuplicate
+	 */
+	protected void putStringValue(String key, String newValue, boolean allowDuplicate) {
+		this.putStringValue(key, null, newValue, allowDuplicate);
+	}
+
+	/**
+	 * Put the given String value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param keySuffix
+	 *            e.g. entity name
+	 * @param newValue
+	 *            value to be associated with the key
+	 * @param allowDuplicate
+	 */
+	protected void putStringValue(String key, String keySuffix, String newValue, boolean allowDuplicate) {
+		this.putPersistenceUnitProperty(key, keySuffix, newValue, allowDuplicate);
+	}
+
+	// ****** Integer convenience methods *******
+	/**
+	 * Returns the Integer value of the given Property from the PersistenceXml.
+	 */
+	protected Integer getIntegerValue(String persistenceUnitKey) {
+		PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
+		return (p == null) ? null : getIntegerValueOf(p.getValue());
+	}
+
+	protected Integer getIntegerValue(String key, String keySuffix) {
+		return this.getIntegerValue((keySuffix == null) ? key : key + keySuffix);
+	}
+
+	/**
+	 * Put the given Integer value into the PersistenceXml.
+	 * @param key -
+	 *            property key
+	 * @param newValue
+	 *            value to be associated with the key
+	 */
+	protected void putIntegerValue(String key, Integer newValue) {
+		this.putIntegerValue(key, null, newValue, false);
+	}
+
+	/**
+	 * Put the given Integer value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param newValue
+	 *            value to be associated with the key
+	 * @param allowDuplicate
+	 */
+	protected void putIntegerValue(String key, Integer newValue, boolean allowDuplicate) {
+		this.putIntegerValue(key, null, newValue, allowDuplicate);
+	}
+
+	/**
+	 * Put the given Integer value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param keySuffix
+	 *            e.g. entity name
+	 * @param newValue
+	 *            value to be associated with the key
+	 * @param allowDuplicate
+	 */
+	protected void putIntegerValue(String key, String keySuffix, Integer newValue, boolean allowDuplicate) {
+		this.putPersistenceUnitProperty(key, keySuffix, newValue, allowDuplicate);
+	}
+
+	// ****** Boolean convenience methods ******* 
+	/**
+	 * Returns the Boolean value of the given Property from the PersistenceXml.
+	 */
+	protected Boolean getBooleanValue(String persistenceUnitKey) {
+		PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
+		return (p == null) ? null : getBooleanValueOf(p.getValue());
+	}
+
+	protected Boolean getBooleanValue(String key, String keySuffix) {
+		return this.getBooleanValue((keySuffix == null) ? key : key + keySuffix);
+	}
+
+	/**
+	 * Put the given Boolean value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param newValue
+	 *            value to be associated with the key
+	 */
+	protected void putBooleanValue(String key, Boolean newValue) {
+		this.putBooleanValue(key, null, newValue, false);
+	}
+
+	/**
+	 * Put the given Boolean value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param newValue
+	 *            value to be associated with the key
+	 * @param allowDuplicate
+	 */
+	protected void putBooleanValue(String key, Boolean newValue, boolean allowDuplicate) {
+		this.putBooleanValue(key, null, newValue, allowDuplicate);
+	}
+
+	/**
+	 * Put the given Boolean value into the PersistenceXml.
+	 * @param key
+	 *            property key
+	 * @param keySuffix
+	 *            e.g. entity name
+	 * @param newValue
+	 *            value to be associated with the key
+	 * @param allowDuplicate
+	 */
+	protected void putBooleanValue(String key, String keySuffix, Boolean newValue, boolean allowDuplicate) {
+		this.putPersistenceUnitProperty(key, keySuffix, newValue, allowDuplicate);
+	}
+
+	// ****** Enum convenience methods ******* 
+	/**
+	 * Returns the Enum value of the given Property from the PersistenceXml.
+	 */
+	protected <T extends Enum<T>> T getEnumValue(String persistenceUnitKey, T[] enumValues) {
+		PersistenceUnit.Property p = this.getPersistenceUnit().getProperty(persistenceUnitKey);
+		return (p == null) ? null : getEnumValueOf(p.getValue(), enumValues);
+	}
+
+	protected <T extends Enum<T>> T getEnumValue(String key, String keySuffix, T[] enumValues) {
+		return this.getEnumValue((keySuffix == null) ? key : key + keySuffix, enumValues);
+	}
+
+	/**
+	 * Put the given Enum value into the PersistenceXml.
+	 * 
+	 * @param key -
+	 *            property key
+	 */
+	protected <T extends Enum<T>> void putEnumValue(String key, T newValue) {
+		this.putEnumValue(key, null, newValue, false);
+	}
+
+	protected <T extends Enum<T>> void putEnumValue(String key, T newValue, boolean allowDuplicate) {
+		this.putEnumValue(key, null, newValue, allowDuplicate);
+	}
+
+	protected <T extends Enum<T>> void putEnumValue(String key, String keySuffix, T newValue, boolean allowDuplicate) {
+		this.putPersistenceUnitProperty(key, keySuffix, getPropertyStringValueOf(newValue), allowDuplicate);
+	}
+
+	// ****** Static methods ******* 
+	
+	public static Boolean getBooleanValueOf(String puStringValue) {
+		if (puStringValue == null) {
+			return null;
+		}
+		return Boolean.valueOf(puStringValue);
+	}
+
+	public static Integer getIntegerValueOf(String puStringValue) {
+		if (puStringValue == null) {
+			return null;
+		}
+		return Integer.valueOf(puStringValue);
+	}
+
+	/**
+	 * Returns the enum constant of the specified enum type with the specified
+	 * Property string value.
+	 */
+	public static <T extends Enum<T>> T getEnumValueOf(String puStringValue, T[] enumValues) {
+		for (T enumValue : enumValues) {
+			if (getPropertyStringValueOf(enumValue).equals(puStringValue)) {
+				return enumValue;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the Property string value of the given property value.
+	 */
+	public static String getPropertyStringValueOf(Object value) {
+		if (value == null) {
+			return null;
+		}
+		if (value.getClass().isEnum()) {
+			return (String) ReflectionTools.getStaticFieldValue(value.getClass(), value.toString().toUpperCase(Locale.ENGLISH));
+		}
+		return value.toString();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java
new file mode 100644
index 0000000..71a4449
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlContextNode.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlDefinition;
+import org.eclipse.jpt.core.internal.context.AbstractXmlContextNode;
+
+/**
+ * Use this abstract class for context nodes that are part of an
+ * <code>orm.xml</code> file.
+ * This will not work for a pure {@link org.eclipse.jpt.core.context.MappingFile}
+ * implementation.
+ */
+public abstract class AbstractPersistenceXmlContextNode
+	extends AbstractXmlContextNode
+{
+	// ********** constructor **********
+
+	protected AbstractPersistenceXmlContextNode(JpaContextNode parent) {
+		super(parent);
+	}
+
+
+	// ********** convenience methods **********
+
+	protected PersistenceXmlDefinition getPersistenceXmlDefinition() {
+		return (PersistenceXmlDefinition) this.getJpaPlatform().getResourceDefinition(this.getResourceType());
+	}
+
+	protected EFactory getResourceNodeFactory() {
+		return this.getPersistenceXmlDefinition().getResourceNodeFactory();
+	}
+
+	protected PersistenceXmlContextNodeFactory getContextNodeFactory() {
+		return this.getPersistenceXmlDefinition().getContextNodeFactory();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java
new file mode 100644
index 0000000..271ee5d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlContextNodeFactory.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.java.JarFile;
+import org.eclipse.jpt.core.context.persistence.ClassRef;
+import org.eclipse.jpt.core.context.persistence.JarFileRef;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJarFile;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericClassRef;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericJarFileRef;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericMappingFileRef;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericPersistence;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericPersistenceUnit;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericPersistenceUnitProperty;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.ImpliedMappingFileRef;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
+import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.core.resource.persistence.XmlProperty;
+
+public abstract class AbstractPersistenceXmlContextNodeFactory implements PersistenceXmlContextNodeFactory
+{
+	
+	public Persistence buildPersistence(PersistenceXml parent, XmlPersistence xmlPersistence) {
+		return new GenericPersistence(parent, xmlPersistence);
+	}
+	
+	public PersistenceUnit buildPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) {
+		return new GenericPersistenceUnit(parent, xmlPersistenceUnit);
+	}
+	
+	public MappingFileRef buildMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef) {
+		return new GenericMappingFileRef(parent, xmlMappingFileRef);
+	}
+	
+	public MappingFileRef buildImpliedMappingFileRef(PersistenceUnit parent) {
+		return new ImpliedMappingFileRef(parent, JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH );
+	}
+	
+	public ClassRef buildClassRef(PersistenceUnit parent, XmlJavaClassRef classRef) {
+		return new GenericClassRef(parent, classRef);
+	}
+	
+	public ClassRef buildClassRef(PersistenceUnit parent, String className) {
+		return new GenericClassRef(parent, className);
+	}
+	
+	public JarFileRef buildJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef) {
+		return new GenericJarFileRef(parent, xmlJarFileRef);
+	}
+
+	public JarFile buildJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot) {
+		return new GenericJarFile(parent, jarResourcePackageFragmentRoot);
+	}
+	
+	public PersistenceUnit.Property buildProperty(PersistenceUnit parent, XmlProperty xmlProperty) {
+		return new GenericPersistenceUnitProperty(parent, xmlProperty);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java
new file mode 100644
index 0000000..86c07e8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/AbstractPersistenceXmlDefinition.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlDefinition;
+
+/**
+ * All the state in the definition should be "static" (i.e. unchanging once it is initialized).
+ */
+public abstract class AbstractPersistenceXmlDefinition
+	implements PersistenceXmlDefinition
+{
+	
+	private final PersistenceXmlContextNodeFactory factory;
+	
+	
+	/**
+	 * zero-argument constructor
+	 */
+	protected AbstractPersistenceXmlDefinition() {
+		super();
+		this.factory = buildContextNodeFactory();
+	}
+	
+	
+	protected abstract PersistenceXmlContextNodeFactory buildContextNodeFactory();
+	
+	public PersistenceXmlContextNodeFactory getContextNodeFactory() {
+		return this.factory;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java
new file mode 100644
index 0000000..64b67b6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/persistence/GenericPersistenceXmlContextNodeFactory.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitProperties;
+import org.eclipse.jpt.core.internal.jpa2.context.persistence.connection.NullConnection2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.persistence.options.NullOptions2_0;
+
+
+public class GenericPersistenceXmlContextNodeFactory extends AbstractPersistenceXmlContextNodeFactory
+{
+
+	public PersistenceUnitProperties buildConnection(PersistenceUnit parent) {
+		return new NullConnection2_0(parent);
+	}
+	
+	public PersistenceUnitProperties buildOptions(PersistenceUnit parent) {
+		return new NullOptions2_0(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java
new file mode 100644
index 0000000..77e242d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+/**
+ * Performs things common to install, version change
+ */
+public abstract class JpaFacetActionDelegate
+	implements IDelegate, JpaFacetDataModelProperties
+{
+	public final void execute(
+			IProject project, IProjectFacetVersion fv, 
+			Object config, IProgressMonitor monitor) throws CoreException {
+		
+		monitor = this.nonNullMonitor(monitor);
+		try {
+			this.execute_(project, fv, config, monitor);
+		} finally {
+			monitor.done();
+		}
+	}
+	
+	protected void execute_(
+			IProject project, @SuppressWarnings("unused") IProjectFacetVersion fv, 
+			Object config, IProgressMonitor monitor) throws CoreException {
+		
+		monitor.beginTask("", 1); //$NON-NLS-1$
+		
+		// NB: WTP Natures (including the JavaEMFNature)
+		// should already be added, as this facet should 
+		// always coexist with a module facet.
+		
+		IDataModel dataModel = (IDataModel) config;
+		
+		// project settings
+		JptCorePlugin.setJpaPlatformId(project, dataModel.getStringProperty(PLATFORM_ID));
+		
+		// do NOT use IDataModel.getStringProperty(String) - or the connection profile name can
+		// be set to an empty string - we want it to be null
+		JptCorePlugin.setConnectionProfileName(project, (String) dataModel.getProperty(CONNECTION));
+		
+		if (dataModel.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
+			JptCorePlugin.setUserOverrideDefaultCatalog(project, dataModel.getStringProperty(USER_OVERRIDE_DEFAULT_CATALOG));
+		}
+		if (dataModel.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
+			JptCorePlugin.setUserOverrideDefaultSchema(project, dataModel.getStringProperty(USER_OVERRIDE_DEFAULT_SCHEMA));
+		}
+		
+		JptCorePlugin.setDiscoverAnnotatedClasses(project, dataModel.getBooleanProperty(DISCOVER_ANNOTATED_CLASSES));
+		
+		// defaults settings
+		JptCorePlugin.setDefaultJpaPlatformId(fv.getVersionString(), dataModel.getStringProperty(PLATFORM_ID));
+		
+		//Delegate to LibraryInstallDelegate to configure the project classpath
+		((LibraryInstallDelegate) dataModel.getProperty(JpaFacetInstallDataModelProperties.LIBRARY_PROVIDER_DELEGATE)).execute(new NullProgressMonitor());
+		
+		monitor.worked(1);
+	}
+	
+	private IProgressMonitor nonNullMonitor(IProgressMonitor monitor) {
+		return (monitor != null) ? monitor : new NullProgressMonitor();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java
new file mode 100644
index 0000000..4b3eb38
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
+
+public interface JpaFacetDataModelProperties
+	extends IDataModelProperties
+{
+	String PREFIX = "JpaFacetDataModelProperties";
+	String PREFIX_ = PREFIX + '.';
+	
+	/**
+	 * Internal, type IRuntime, identifies runtime associated with project
+	 * Used only in conjunction with validation of other properties, because this information
+	 * is otherwise inaccessible to this data model
+	 */
+	String RUNTIME = PREFIX_ + "RUNTIME";
+	
+	/**
+	 * Required, type String, identifies Jpa Platform
+	 */
+	String PLATFORM_ID = PREFIX_ + "PLATFORM_ID";
+	
+	/**
+	 * Required, type LibraryInstallDelegate, the library install delegate used to configure JPA provider library
+	 */
+    String LIBRARY_PROVIDER_DELEGATE = PREFIX_ + "LIBRARY_PROVIDER_DELEGATE";
+	
+    /**
+	 * Not required, type String, identifies database connection
+	 */
+	String CONNECTION = PREFIX_ + "CONNECTION";
+	
+	/**
+	 * Required, type Boolean, identifies whether database connection is active
+	 */
+	String CONNECTION_ACTIVE = PREFIX_ + "CONNECTION_ACTIVE";
+	
+	/**
+	 * Required, type Boolean, identifies if the user wishes to override default Catalog name
+	 */
+	String USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG = PREFIX_ + "USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG";
+	
+	/**
+	 * Not required, type String, identifies the user overridden default Catalog name
+	 */
+	String USER_OVERRIDE_DEFAULT_CATALOG = PREFIX_ + "USER_OVERRIDE_DEFAULT_CATALOG";
+
+	/**
+	 * Required, type Boolean, identifies if the user wishes to override default schema name
+	 */
+	String USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA = PREFIX_ + "USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA";
+	
+	/**
+	 * Not required, type String, identifies the user overridden default schema name
+	 */
+	String USER_OVERRIDE_DEFAULT_SCHEMA = PREFIX_ + "USER_OVERRIDE_DEFAULT_SCHEMA";
+	
+	/**
+	 * Required, type boolean, opposite of LIST_ANNOTATED_CLASSES, identifies 
+	 * whether all annotated classes are to be automatically included as part of 
+	 * all persistence units
+	 */
+	String DISCOVER_ANNOTATED_CLASSES = PREFIX_ + "DISCOVER_ANNOTATED_CLASSES";
+	
+	/**
+	 * Required, type boolean, opposite of DISCOVER_ANNOTATED_CLASSES, identifies
+	 * if annotated classes should be listed in the persistence.xml in order to
+	 * be considered part of a persistence unit
+	 * (This additional setting is necessary in order to use synchHelper within
+	 * the wizard - there must be a unique property for each radio button. Stupid
+	 * but true)
+	 */
+	String LIST_ANNOTATED_CLASSES = PREFIX_ + "LIST_ANNOTATED_CLASSES";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProvider.java
new file mode 100644
index 0000000..638e926
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProvider.java
@@ -0,0 +1,689 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.JpaPlatformRegistry;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.ConnectionProfileFactory;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.DatabaseIdentifierAdapter;
+import org.eclipse.jpt.db.JptDbPlugin;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
+
+public abstract class JpaFacetDataModelProvider
+	extends FacetInstallDataModelProvider
+	implements JpaFacetDataModelProperties
+{
+	protected static final String EJB_FACET_ID = IModuleConstants.JST_EJB_MODULE;
+	
+	protected static final IStatus PLATFORM_NOT_SPECIFIED_STATUS = 
+			buildErrorStatus(JptCoreMessages.VALIDATE_PLATFORM_NOT_SPECIFIED);
+	
+	protected static final IStatus CONNECTION_NOT_CONNECTED_STATUS = 
+			buildInfoStatus(JptCoreMessages.VALIDATE_CONNECTION_NOT_CONNECTED);
+	
+	protected static final IStatus USER_OVERRIDE_DEFAULT_CATALOG_NOT_SPECIFIED_STATUS = 
+			buildErrorStatus(JptCoreMessages.VALIDATE_DEFAULT_CATALOG_NOT_SPECIFIED);
+	
+	protected static final IStatus USER_OVERRIDE_DEFAULT_SCHEMA_NOT_SPECIFIED_STATUS = 
+			buildErrorStatus(JptCoreMessages.VALIDATE_DEFAULT_SCHEMA_NOT_SPECIFIED);
+	
+	
+	private LibraryInstallDelegate defaultLibraryProvider;
+	
+	/** cache the connection profile - change it whenever the user selects a different name */
+	private ConnectionProfile connectionProfile;
+	
+	
+	/**
+	 * required default constructor
+	 */
+	protected JpaFacetDataModelProvider() {
+		super();
+	}
+	
+	
+	@Override
+	public Set<String> getPropertyNames() {
+		@SuppressWarnings("unchecked") Set<String> propertyNames = super.getPropertyNames();
+		propertyNames.add(RUNTIME);
+		propertyNames.add(PLATFORM_ID);
+		propertyNames.add(LIBRARY_PROVIDER_DELEGATE);
+		propertyNames.add(CONNECTION);
+		propertyNames.add(CONNECTION_ACTIVE);
+		propertyNames.add(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG);
+		propertyNames.add(USER_OVERRIDE_DEFAULT_CATALOG);
+		propertyNames.add(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA);
+		propertyNames.add(USER_OVERRIDE_DEFAULT_SCHEMA);
+		propertyNames.add(DISCOVER_ANNOTATED_CLASSES);
+		propertyNames.add(LIST_ANNOTATED_CLASSES);
+		return propertyNames;
+	}
+	
+	
+	// ********** properties **********
+	
+	protected IFacetedProjectWorkingCopy getFacetedProjectWorkingCopy() {
+		return (IFacetedProjectWorkingCopy) this.getProperty(FACETED_PROJECT_WORKING_COPY);
+	}
+	
+	protected IProjectFacetVersion getProjectFacetVersion() {
+		return (IProjectFacetVersion) this.getProperty(FACET_VERSION);
+	}
+	
+	protected IRuntime getRuntime() {
+		return (IRuntime) this.getProperty(RUNTIME);
+	}
+	
+	protected String getPlatformId() {
+		return (String) this.getProperty(PLATFORM_ID);
+	}
+	
+	protected LibraryInstallDelegate getLibraryInstallDelegate() {
+		return (LibraryInstallDelegate) this.getProperty(LIBRARY_PROVIDER_DELEGATE);
+	}
+	
+	protected String getConnectionName() {
+		return (String) this.getProperty(CONNECTION);
+	}
+	
+	protected boolean userWantsToOverrideDefaultCatalog() {
+		return this.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG);
+	}
+	
+	protected String getUserOverrideDefaultCatalog() {
+		return (String) this.getProperty(USER_OVERRIDE_DEFAULT_CATALOG);
+	}
+	
+	protected boolean userWantsToOverrideDefaultSchema() {
+		return this.getBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA);
+	}
+	
+	protected String getUserOverrideDefaultSchema() {
+		return (String) this.getProperty(USER_OVERRIDE_DEFAULT_SCHEMA);
+	}
+	
+	protected boolean discoverAnnotatedClasses() {
+		return this.getBooleanProperty(DISCOVER_ANNOTATED_CLASSES);
+	}
+	
+	
+	// ********** enabled **********
+	
+	@Override
+	public boolean isPropertyEnabled(String propertyName) {
+		if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
+			return this.connectionIsActive() && this.databaseSupportsCatalogs();
+		}
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
+			return this.userWantsToOverrideDefaultCatalog();
+		}
+		if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
+			return this.connectionIsActive();
+		}
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
+			return this.userWantsToOverrideDefaultSchema();
+		}
+		
+		return super.isPropertyEnabled(propertyName);
+	}
+	
+	
+	// ********** defaults **********
+	
+	@Override
+	public Object getDefaultProperty(String propertyName) {
+		if (propertyName.equals(FACET_ID)) {
+			return JptCorePlugin.FACET_ID;
+		}
+		if (propertyName.equals(RUNTIME)) {
+			return null;
+		}
+		if (propertyName.equals(PLATFORM_ID)) {
+			return getDefaultPlatformId();
+		}
+		if (propertyName.equals(LIBRARY_PROVIDER_DELEGATE)) {
+			return getDefaultLibraryProvider();
+		}
+		if (propertyName.equals(CONNECTION)) {
+			return getDefaultConnection();
+		}
+		if (propertyName.equals(CONNECTION_ACTIVE)) {
+			return Boolean.valueOf(this.connectionIsActive());
+		}
+		if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
+			return getDefaultUserWantsToOverrideDefaultCatalog();
+		}
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
+			return getDefaultCatalogIdentifier();
+		}
+		if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
+			return getDefaultUserWantsToOverrideDefaultSchema();
+		}
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
+			return getDefaultSchemaIdentifier();
+		}
+		if (propertyName.equals(DISCOVER_ANNOTATED_CLASSES)) {
+			return getDefaultDiscoverAnnotatedClasses();
+		}
+		if (propertyName.equals(LIST_ANNOTATED_CLASSES)) {
+			return getDefaultListAnnotatedClasses();
+		}
+		
+		return super.getDefaultProperty(propertyName);
+	}
+	
+	protected abstract String getDefaultPlatformId();
+	
+	protected LibraryInstallDelegate getDefaultLibraryProvider() {
+		// delegate itself changes, not the instance of delegate
+		if (this.defaultLibraryProvider == null) {
+			this.defaultLibraryProvider = this.buildDefaultLibraryProvider();
+		}
+		return defaultLibraryProvider;
+	}
+	
+	protected  LibraryInstallDelegate buildDefaultLibraryProvider() {
+		IFacetedProjectWorkingCopy fpjwc = this.getFacetedProjectWorkingCopy();
+		if (fpjwc == null) {
+			return null;
+		}
+		IProjectFacetVersion pfv = this.getProjectFacetVersion();
+		if (pfv == null) {
+			return null;
+		}
+		LibraryInstallDelegate lp = new LibraryInstallDelegate(fpjwc, pfv, this.buildEnablementVariables());
+		lp.addListener(this.buildLibraryProviderListener());
+		return lp;
+	}
+	
+	protected Map<String, Object> buildEnablementVariables() {
+		Map<String, Object> enablementVariables = new HashMap<String, Object>();
+		enablementVariables.put(JpaLibraryProviderConstants.EXPR_VAR_JPA_PLATFORM, this.getPlatformId());
+		return enablementVariables;
+	}
+	
+	protected IPropertyChangeListener buildLibraryProviderListener() {
+		return new IPropertyChangeListener() {
+				public void propertyChanged(String property, Object oldValue, Object newValue ) {
+					JpaFacetDataModelProvider.this.getDataModel().notifyPropertyChange(
+							LIBRARY_PROVIDER_DELEGATE, IDataModel.VALUE_CHG);
+				}
+			};
+	}
+	
+	protected abstract String getDefaultConnection();
+	
+	protected abstract Boolean getDefaultUserWantsToOverrideDefaultCatalog();
+	
+	protected abstract String getDefaultCatalogIdentifier();
+	
+	protected abstract Boolean getDefaultUserWantsToOverrideDefaultSchema();
+	
+	protected abstract String getDefaultSchemaIdentifier();
+	
+	protected abstract Boolean getDefaultDiscoverAnnotatedClasses();
+	
+	protected Boolean getDefaultListAnnotatedClasses() {
+		return Boolean.valueOf( ! this.discoverAnnotatedClasses());
+	}
+	
+	protected boolean runtimeSupportsEjb30() {
+		IRuntime runtime = this.getRuntime();
+		return (runtime != null) && runtime.supports(this.getEJB30());
+	}
+	
+	protected IProjectFacetVersion getEJB30() {
+		return ProjectFacetsManager.getProjectFacet(EJB_FACET_ID).getVersion("3.0"); //$NON-NLS-1$
+	}
+	
+	
+	// ********** synchronize data model **********
+	
+	/**
+	 * The specified property's value has changed to the specified value.
+	 * Return whether to fire a VALUE_CHG DataModelEvent.
+	 */
+	@Override
+	public boolean propertySet(String propertyName, Object propertyValue) {
+		boolean ok = super.propertySet(propertyName, propertyValue);
+		
+		if (propertyName.equals(FACETED_PROJECT_WORKING_COPY)) {
+			//no-op
+		}
+		else if (propertyName.equals(FACET_VERSION)) {
+			this.model.notifyPropertyChange(PLATFORM_ID, IDataModel.DEFAULT_CHG);
+			resetLibraryProviderEnablementContext();
+			this.model.notifyPropertyChange(LIBRARY_PROVIDER_DELEGATE, IDataModel.DEFAULT_CHG);
+		}
+		else if (propertyName.equals(RUNTIME)) {
+			LibraryInstallDelegate lid = this.getLibraryInstallDelegate();
+			if (lid != null) {
+				// may be null while model is being built up
+				// ... or in tests
+				lid.refresh();
+			}
+			this.model.notifyPropertyChange(DISCOVER_ANNOTATED_CLASSES, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(LIST_ANNOTATED_CLASSES, IDataModel.DEFAULT_CHG);
+		}
+		else if (propertyName.equals(PLATFORM_ID)) {
+			resetLibraryProviderEnablementContext();
+		}
+		else if (propertyName.equals(CONNECTION)) {
+			this.setBooleanProperty(CONNECTION_ACTIVE, this.connectionIsActive());
+			
+			// JpaFacetWizardPage sets the connection when the user adds a new connection
+			// implying that there is a new set of valid connections to choose from
+			this.model.notifyPropertyChange(CONNECTION, IDataModel.VALID_VALUES_CHG);
+			
+			// catalog
+			if ((propertyValue != null) && this.databaseSupportsCatalogs()) {  // connection set to something that supports catalogs
+				this.setProperty(USER_OVERRIDE_DEFAULT_CATALOG, this.getDefaultCatalogIdentifier());
+			} else {  // connection either '<None>' or non-catalog database
+				this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, false);
+			}
+			this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, IDataModel.ENABLE_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.VALID_VALUES_CHG);
+			
+			// schema
+			if (propertyValue == null) {  // connection set to '<None>'
+				this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, false);
+			} else {
+				this.setProperty(USER_OVERRIDE_DEFAULT_SCHEMA, this.getDefaultSchemaIdentifier());
+			}
+			this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, IDataModel.ENABLE_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.VALID_VALUES_CHG);
+		}
+		else if (propertyName.equals(CONNECTION_ACTIVE)) {
+			// catalog
+			if (this.propertyValueIsFalse(propertyValue)) {  // connection is inactive
+				this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, false);
+			}
+			this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG, IDataModel.ENABLE_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.VALID_VALUES_CHG);
+			
+			// schema
+			if (this.propertyValueIsFalse(propertyValue)) {  // connection is inactive
+				this.setBooleanProperty(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, false);
+			}
+			this.model.notifyPropertyChange(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA, IDataModel.ENABLE_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.VALID_VALUES_CHG);
+		}
+		else if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)) {
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_CATALOG, IDataModel.ENABLE_CHG);
+			if (this.propertyValueIsFalse(propertyValue)) {
+				this.setProperty(USER_OVERRIDE_DEFAULT_CATALOG, null);
+			}
+		}
+		else if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
+			this.setProperty(USER_OVERRIDE_DEFAULT_SCHEMA, this.getDefaultSchemaIdentifier());
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.VALID_VALUES_CHG);
+		}
+		else if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)) {
+			this.model.notifyPropertyChange(USER_OVERRIDE_DEFAULT_SCHEMA, IDataModel.ENABLE_CHG);
+			if (this.propertyValueIsFalse(propertyValue)) {
+				this.setProperty(USER_OVERRIDE_DEFAULT_SCHEMA, null);
+			}
+		}
+		else if (propertyName.equals(DISCOVER_ANNOTATED_CLASSES)) {
+			this.setBooleanProperty(LIST_ANNOTATED_CLASSES, this.propertyValueIsFalse(propertyValue));
+		}
+		else if (propertyName.equals(LIST_ANNOTATED_CLASSES)) {
+			this.setBooleanProperty(DISCOVER_ANNOTATED_CLASSES, this.propertyValueIsFalse(propertyValue));
+		}
+		return ok;
+	}
+	
+	protected boolean propertyValueIsFalse(Object propertyValue) {
+		return ! this.propertyValueIsTrue(propertyValue);
+	}
+	
+	protected boolean propertyValueIsTrue(Object propertyValue) {
+		return ((Boolean) propertyValue).booleanValue();
+	}
+	
+	protected void resetLibraryProviderEnablementContext() {
+		LibraryInstallDelegate lid = this.getLibraryInstallDelegate();
+			if (lid != null) {
+				// may be null while model is being built up
+				// ... or in tests
+				lid.setEnablementContextVariable(JpaLibraryProviderConstants.EXPR_VAR_JPA_PLATFORM, getPlatformId());
+			}
+	}
+	
+	
+	// ********** property descriptors **********
+	
+	@Override
+	public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
+		if (propertyName.equals(PLATFORM_ID)) {
+			return this.buildValidPlatformDescriptors();
+		}
+		if (propertyName.equals(CONNECTION)) {
+			return this.buildValidConnectionDescriptors();
+		}
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
+			return this.buildValidCatalogDescriptors();
+		}
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
+			return this.buildValidSchemaDescriptors();
+		}
+		
+		return super.getValidPropertyDescriptors(propertyName);
+	}
+	
+	protected DataModelPropertyDescriptor[] buildValidPlatformDescriptors() {
+		Iterable<String> validPlatformIds = buildValidPlatformIds();
+		Iterable<DataModelPropertyDescriptor> validPlatformDescriptors =
+				new TransformationIterable<String, DataModelPropertyDescriptor>(validPlatformIds) {
+					@Override
+					protected DataModelPropertyDescriptor transform(String platformId) {
+						return JpaFacetDataModelProvider.this.buildPlatformIdDescriptor(platformId);
+					}
+				};
+		return ArrayTools.sort(ArrayTools.array(validPlatformDescriptors, EMPTY_DMPD_ARRAY), DESCRIPTOR_COMPARATOR);
+	}
+	
+	protected Iterable<String> buildValidPlatformIds() {
+		String jpaFacetVersion = this.getProjectFacetVersion().getVersionString();
+		return JpaPlatformRegistry.instance().getJpaPlatformIdsForJpaFacetVersion(jpaFacetVersion);
+	}
+	
+	protected static final Comparator<DataModelPropertyDescriptor> DESCRIPTOR_COMPARATOR =
+			new Comparator<DataModelPropertyDescriptor>() {
+				public int compare(DataModelPropertyDescriptor dmpd1, DataModelPropertyDescriptor dmpd2) {
+					return dmpd1.getPropertyDescription().compareTo(dmpd2.getPropertyDescription());
+				}
+			};
+	
+	protected DataModelPropertyDescriptor[] buildValidConnectionDescriptors() {
+		List<String> connectionNames = this.buildValidConnectionNames();
+		DataModelPropertyDescriptor[] descriptors = new DataModelPropertyDescriptor[connectionNames.size()];
+		for (int i = 0; i < descriptors.length; i++) {
+			descriptors[i] = this.buildConnectionDescriptor(connectionNames.get(i));
+		}
+		return descriptors;
+	}
+	
+	/**
+	 * put a null entry at the top of the list (for <none>)
+	 */
+	protected List<String> buildValidConnectionNames() {
+		List<String> connectionNames = CollectionTools.sort(CollectionTools.list(this.getConnectionProfileNames()));
+		connectionNames.add(0, null);
+		return connectionNames;
+	}
+	
+	protected DataModelPropertyDescriptor[] buildValidCatalogDescriptors() {
+		Database db = this.getDatabase();
+		return (db == null) ? EMPTY_DMPD_ARRAY : this.buildDescriptors(this.buildValidCatalogIdentifiers(db));
+	}
+	
+	/**
+	 * pre-condition: 'db' is not null
+	 */
+	protected List<String> buildValidCatalogIdentifiers(Database db) {
+		// use catalog *identifiers* since the string ends up being the "default" for various text entries
+		return this.buildValidStrings(db.getSortedCatalogIdentifiers(), this.getDefaultCatalogIdentifier());
+	}
+	
+	protected DataModelPropertyDescriptor[] buildValidSchemaDescriptors() {
+		Database db = this.getDatabase();
+		return (db == null) ? EMPTY_DMPD_ARRAY : this.buildDescriptors(this.buildValidSchemaIdentifiers());
+	}
+	
+	protected List<String> buildValidSchemaIdentifiers() {
+		return this.buildValidStrings(this.getSchemaIdentifiers(), this.getDefaultSchemaIdentifier());
+	}
+	
+	protected Iterable<String> getSchemaIdentifiers() {
+		SchemaContainer sc = this.getSchemaContainer();
+		// use schema *identifiers* since the string ends up being the "default" for various text entries
+		return (sc != null) ? sc.getSortedSchemaIdentifiers() : EmptyIterable.<String>instance();
+	}
+	
+	/**
+	 * put an entry for the default at the top of the list
+	 */
+	protected List<String> buildValidStrings(Iterable<String> strings, String defaultString) {
+		List<String> validStrings = CollectionTools.list(strings);
+		if ((defaultString != null) && ! validStrings.contains(defaultString)) {
+			validStrings.add(0, defaultString);
+		}
+		return validStrings;
+	}
+	
+	protected DataModelPropertyDescriptor[] buildDescriptors(List<String> strings) {
+		DataModelPropertyDescriptor[] descriptors = new DataModelPropertyDescriptor[strings.size()];
+		for (int i = 0; i < descriptors.length; i++) {
+			descriptors[i] = new DataModelPropertyDescriptor(strings.get(i));
+		}
+		return descriptors;
+	}
+	
+	protected static final DataModelPropertyDescriptor[] EMPTY_DMPD_ARRAY = new DataModelPropertyDescriptor[0];
+	
+	/**
+	 * platform and connection have 'description's (in addition to 'value's)
+	 */
+	@Override
+	public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
+		if (propertyName.equals(PLATFORM_ID)) {
+			return buildPlatformIdDescriptor(this.getPlatformId());
+		}
+		if (propertyName.equals(CONNECTION)) {
+			return buildConnectionDescriptor(this.getConnectionName());
+		}
+		return super.getPropertyDescriptor(propertyName);
+	}
+	
+	protected DataModelPropertyDescriptor buildPlatformIdDescriptor(String platformId) {
+		return new DataModelPropertyDescriptor(platformId, this.getPlatformLabel(platformId));
+	}
+	
+	protected String getPlatformLabel(String platformId) {
+		return JpaPlatformRegistry.instance().getJpaPlatformLabel(platformId);
+	}
+	
+	protected DataModelPropertyDescriptor buildConnectionDescriptor(String connectionName) {
+		String description = (connectionName == null) ? JptCoreMessages.NONE : null;
+		return new DataModelPropertyDescriptor(connectionName, description);
+	}
+	
+	
+	// ********** database **********
+	
+	protected SchemaContainer getSchemaContainer() {
+		return this.databaseSupportsCatalogs() ? this.getCatalog() : this.getDatabase();
+	}
+	
+	protected Catalog getCatalog() {
+		String name = this.getUserOverrideDefaultCatalog();
+		return (name == null) ? null : this.getCatalog(name);
+	}
+	
+	/**
+	 * pre-condition: 'name' is not null
+	 */
+	protected Catalog getCatalog(String name) {
+		Database db = this.getDatabase();
+		return (db == null) ? null : db.getCatalogForIdentifier(name);
+	}
+	
+	protected boolean databaseSupportsCatalogs() {
+		Database db = this.getDatabase();
+		return (db != null) && db.supportsCatalogs();
+	}
+	
+	protected Database getDatabase() {
+		ConnectionProfile cp = this.getConnectionProfile();
+		return (cp == null) ? null : cp.getDatabase();
+	}
+	
+	protected boolean connectionIsActive() {
+		ConnectionProfile cp = this.getConnectionProfile();
+		return (cp != null) && cp.isActive();
+	}
+	
+	protected ConnectionProfile getConnectionProfile() {
+		String name = this.getConnectionName();
+		return (name == null) ? null : this.getConnectionProfile(name);
+	}
+	
+	/**
+	 * pre-condition: 'name' is not null
+	 */
+	protected ConnectionProfile getConnectionProfile(String name) {
+		if (this.cachedConnectionProfileIsStale(name)) {
+			this.connectionProfile = this.buildConnectionProfile(name);
+		}
+		return this.connectionProfile;
+	}
+	
+	protected boolean cachedConnectionProfileIsStale(String name) {
+		return (this.connectionProfile == null) || ! this.connectionProfile.getName().equals(name);
+	}
+	
+	protected ConnectionProfile buildConnectionProfile(String name) {
+		return this.getConnectionProfileFactory().buildConnectionProfile(name, DatabaseIdentifierAdapter.Default.instance());
+	}
+	
+	protected Iterable<String> getConnectionProfileNames() {
+		return this.getConnectionProfileFactory().getConnectionProfileNames();
+	}
+	
+	protected ConnectionProfileFactory getConnectionProfileFactory() {
+		// we don't have a JPA project yet, so go to the db plug-in directly to get the factory
+		return JptDbPlugin.instance().getConnectionProfileFactory();
+	}
+	
+	
+	// ********** validation **********
+	
+	@Override
+	public IStatus validate(String propertyName) {
+		if (propertyName.equals(PLATFORM_ID)) {
+			return this.validatePlatformId();
+		}
+		if (propertyName.equals(LIBRARY_PROVIDER_DELEGATE)) {
+		    return this.getLibraryInstallDelegate().validate();
+		}
+		if (propertyName.equals(CONNECTION)) {
+			return this.validateConnection();
+		}
+		if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG)
+				|| propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
+			return this.validateUserOverrideDefaultCatalog();
+		}
+		if (propertyName.equals(USER_WANTS_TO_OVERRIDE_DEFAULT_SCHEMA)
+				|| propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
+			return this.validateUserOverrideDefaultSchema();
+		}
+		if (propertyName.equals(DISCOVER_ANNOTATED_CLASSES)) {
+			return this.validatePersistentClassManagement();
+		}
+		
+		return super.validate(propertyName);
+	}
+	
+	protected IStatus validatePlatformId() {
+		return (this.getPlatformId() == null) ? PLATFORM_NOT_SPECIFIED_STATUS : OK_STATUS;
+	}
+	
+	protected IStatus validateConnection() {
+		String connectionName = this.getConnectionName();
+		return (connectionName == null) ? OK_STATUS : this.validateNonNullConnection(connectionName);
+	}
+	
+	protected IStatus validateNonNullConnection(String connectionName) {
+		ConnectionProfile cp = this.getConnectionProfile(connectionName);
+		if (cp == null) {
+			return buildErrorStatus(NLS.bind(JptCoreMessages.VALIDATE_CONNECTION_INVALID, connectionName));
+		}
+		if ( ! cp.isActive()) {
+			return CONNECTION_NOT_CONNECTED_STATUS;
+		}
+		return OK_STATUS;
+	}
+	
+	protected IStatus validateUserOverrideDefaultCatalog() {
+		if (this.userWantsToOverrideDefaultCatalog()) {
+			if (this.getUserOverrideDefaultCatalog() == null) {
+				return USER_OVERRIDE_DEFAULT_CATALOG_NOT_SPECIFIED_STATUS;
+			}
+		}
+		return OK_STATUS;
+	}
+	
+	protected IStatus validateUserOverrideDefaultSchema() {
+		if (this.userWantsToOverrideDefaultSchema()) {
+			if (this.getUserOverrideDefaultSchema() == null) {
+				return USER_OVERRIDE_DEFAULT_SCHEMA_NOT_SPECIFIED_STATUS;
+			}
+		}
+		return OK_STATUS;
+	}
+	
+	protected IStatus validatePersistentClassManagement() {
+		// TODO warning if "discovery" is used, but no runtime specified ??
+		// boolean discoverAnnotatedClasses = this.discoverAnnotatedClasses();
+		return OK_STATUS;
+	}
+	
+	
+	// ********** static methods **********
+	
+	protected static IStatus buildInfoStatus(String message) {
+		return buildStatus(IStatus.INFO, message);
+	}
+	
+//	private static IStatus buildWarningStatus(String message) {
+//		return buildStatus(IStatus.WARNING, message);
+//	}
+	
+	protected static IStatus buildErrorStatus(String message) {
+		return buildStatus(IStatus.ERROR, message);
+	}
+	
+	protected static IStatus buildStatus(int severity, String message) {
+		return new Status(severity, JptCorePlugin.PLUGIN_ID, message);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProperties.java
new file mode 100644
index 0000000..4a0bfb1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProperties.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+@SuppressWarnings("nls")
+public interface JpaFacetInstallDataModelProperties
+	extends JpaFacetDataModelProperties
+{
+	String PREFIX = "JpaFacetInstallDataModelProperties";
+	String PREFIX_ = PREFIX + '.';
+	
+	/**
+	 * Required, type Boolean, identifies if the user wishes to add the database driver jars to the classpath
+	 */
+	String USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH = PREFIX_ + "USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH";
+
+	/**
+	 * Not required, type String, identifies the database driver library added to the classpath
+	 */
+	String DB_DRIVER_NAME = PREFIX_ + "DB_DRIVER_NAME";
+
+	/**
+	 * Required, type boolean, details whether orm.xml should be created
+	 */
+	String CREATE_ORM_XML = PREFIX_ + "CREATE_ORM_XML";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java
new file mode 100644
index 0000000..2832f2f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import java.util.Set;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+public class JpaFacetInstallDataModelProvider
+	extends JpaFacetDataModelProvider
+	implements JpaFacetInstallDataModelProperties
+{
+	/**
+	 * required default constructor
+	 */
+	public JpaFacetInstallDataModelProvider() {
+		super();
+	}
+	
+	@Override
+	public Set<String> getPropertyNames() {
+		Set<String> propertyNames = super.getPropertyNames();
+		propertyNames.add(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH);
+		propertyNames.add(DB_DRIVER_NAME);
+		propertyNames.add(CREATE_ORM_XML);
+		return propertyNames;
+	}
+	
+	
+	// ********** properties **********
+	
+	protected boolean userWantsToAddDbDriverJarsToClasspath() {
+		return this.getBooleanProperty(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH);
+	}
+	
+	protected String getDriverName() {
+		return (String) this.getProperty(DB_DRIVER_NAME);
+	}
+	
+	
+	// ********** enabled **********
+	
+	@Override
+	public boolean isPropertyEnabled(String propertyName) {
+		if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
+			return (this.getConnectionProfile() != null);
+		}
+		if (propertyName.equals(DB_DRIVER_NAME)) {
+			return this.userWantsToAddDbDriverJarsToClasspath();
+		}
+		
+		return super.isPropertyEnabled(propertyName);
+	}
+	
+	
+	// ********** defaults **********
+	
+	@Override
+	public Object getDefaultProperty(String propertyName) {
+		if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
+			return Boolean.FALSE;
+		}
+		if (propertyName.equals(DB_DRIVER_NAME)) {
+			return this.getDefaultDriverName();
+		}
+		if (propertyName.equals(CREATE_ORM_XML)) {
+			return Boolean.FALSE;
+		}
+		
+		return super.getDefaultProperty(propertyName);
+	}
+	
+	@Override
+	protected String getDefaultPlatformId() {
+		return JptCorePlugin.getDefaultJpaPlatformId(getProjectFacetVersion().getVersionString());
+	}
+	
+	@Override
+	protected String getDefaultConnection() {
+		return null;
+	}
+	
+	@Override
+	protected Boolean getDefaultUserWantsToOverrideDefaultCatalog() {
+		return Boolean.FALSE;
+	}
+	
+	@Override
+	protected String getDefaultCatalogIdentifier() {
+		Database db = this.getDatabase();
+		return (db == null) ? null : db.getDefaultCatalogIdentifier();
+	}
+	
+	@Override
+	protected Boolean getDefaultUserWantsToOverrideDefaultSchema() {
+		return Boolean.FALSE;
+	}
+	
+	@Override
+	protected String getDefaultSchemaIdentifier()  {
+		SchemaContainer sc = this.getSchemaContainer();
+		return (sc == null) ? null : sc.getDefaultSchemaIdentifier();
+	}
+	
+	protected String getDefaultDriverName() {
+		ConnectionProfile cp = this.getConnectionProfile();
+		return (cp == null) ? null : cp.getDriverName();
+	}
+	
+	@Override
+	protected Boolean getDefaultDiscoverAnnotatedClasses() {
+		return Boolean.valueOf(this.runtimeSupportsEjb30());
+	}
+	
+	
+	// ********** synchronize data model **********
+	
+	/**
+	 * The specified property's value has changed to the specified value.
+	 * Return whether to fire a VALUE_CHG DataModelEvent.
+	 */
+	@Override
+	public boolean propertySet(String propertyName, Object propertyValue) {
+		boolean ok = super.propertySet(propertyName, propertyValue);
+		
+		if (propertyName.equals(CONNECTION)) {
+			// db driver
+			if (propertyValue == null) {  // connection set to '<None>'
+				this.setBooleanProperty(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH, false);
+			}
+			this.model.notifyPropertyChange(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH, IDataModel.ENABLE_CHG);
+			this.model.notifyPropertyChange(DB_DRIVER_NAME, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(DB_DRIVER_NAME, IDataModel.VALID_VALUES_CHG);
+		}
+		else if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
+			this.model.notifyPropertyChange(DB_DRIVER_NAME, IDataModel.ENABLE_CHG);
+			if (this.propertyValueIsFalse(propertyValue)) {
+				this.setProperty(DB_DRIVER_NAME, null);
+			}
+		}
+		
+		return ok;
+	}
+	
+	
+	// ********** property descriptors **********
+
+	@Override
+	public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
+		if (propertyName.equals(PLATFORM_ID)) {
+			return this.buildValidPlatformDescriptors();
+		}
+
+		if (propertyName.equals(CONNECTION)) {
+			return this.buildValidConnectionDescriptors();
+		}
+
+		if (propertyName.equals(DB_DRIVER_NAME)) {
+			return this.buildValidDriverDescriptors();
+		}
+
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_CATALOG)) {
+			return this.buildValidCatalogDescriptors();
+		}
+
+		if (propertyName.equals(USER_OVERRIDE_DEFAULT_SCHEMA)) {
+			return this.buildValidSchemaDescriptors();
+		}
+
+		return super.getValidPropertyDescriptors(propertyName);
+	}
+	
+	protected DataModelPropertyDescriptor[] buildValidDriverDescriptors() {
+		return new DataModelPropertyDescriptor[] { new DataModelPropertyDescriptor(this.getDriverName()) };
+	}
+	
+	
+	// ********** validation **********
+	
+	@Override
+	public IStatus validate(String propertyName) {
+		if (propertyName.equals(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)
+				|| propertyName.equals(DB_DRIVER_NAME)) {
+			return this.validateDbDriverName();
+		}
+		
+		return super.validate(propertyName);
+	}
+	
+	protected IStatus validateDbDriverName() {
+		return OK_STATUS;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDelegate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDelegate.java
new file mode 100644
index 0000000..9cc7179
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDelegate.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.operations.JpaFileCreationDataModelProperties;
+import org.eclipse.jpt.core.internal.operations.OrmFileCreationDataModelProvider;
+import org.eclipse.jpt.core.internal.operations.PersistenceFileCreationDataModelProvider;
+import org.eclipse.jpt.db.JptDbPlugin;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+/**
+ * We don't really "install" the JPA facet here. We simply store all the various
+ * data model properties in the appropriate preferences. These settings will
+ * used in the POST_INSTALL event listener to build the JPA project.
+ */
+public class JpaFacetInstallDelegate 
+	extends JpaFacetActionDelegate
+	implements JpaFacetInstallDataModelProperties
+{
+	@Override
+	protected void execute_(
+			IProject project, @SuppressWarnings("unused") IProjectFacetVersion fv, 
+			Object config, IProgressMonitor monitor) throws CoreException {
+		
+		// NB: WTP Natures (including the JavaEMFNature)
+		// should already be added, as this facet should 
+		// always coexist with a module facet.
+		
+		super.execute_(project, fv, config, monitor);
+		
+		IJavaProject javaProject = JavaCore.create(project);
+		IDataModel dataModel = (IDataModel) config;
+		
+		try {
+			monitor.beginTask("", 3); //$NON-NLS-1$
+
+			// project settings
+			this.addDbDriverLibraryToClasspath(javaProject, dataModel, monitor);
+
+			monitor.worked(1);
+
+			// create project XML files
+			this.createProjectXml(project, dataModel.getBooleanProperty(CREATE_ORM_XML));
+
+			monitor.worked(2);
+		} 
+		finally {
+			monitor.done();
+		}
+	}
+	
+	protected void addDbDriverLibraryToClasspath(
+			IJavaProject javaProject, IDataModel dataModel, 
+			IProgressMonitor monitor) throws CoreException {
+		
+		if( ! dataModel.getBooleanProperty(USER_WANTS_TO_ADD_DB_DRIVER_JARS_TO_CLASSPATH)) {
+			return;
+		}
+		String driverName = dataModel.getStringProperty(DB_DRIVER_NAME);
+		
+		IClasspathContainer container = JptDbPlugin.instance().buildDriverClasspathContainerFor(driverName);
+		IClasspathEntry entry = JavaCore.newContainerEntry(container.getPath());
+		this.addClasspathEntryToProject(entry, javaProject, monitor);
+	}
+	
+	private void addClasspathEntryToProject(
+			IClasspathEntry classpathEntry, IJavaProject javaProject, IProgressMonitor monitor) 
+			throws CoreException {
+		
+		// if the classpathEntry is already there, do nothing
+		IClasspathEntry[] classpath = javaProject.getRawClasspath();
+		if (ArrayTools.contains(classpath, classpathEntry)) {
+			return;
+		}
+		
+		// add the given classpathEntry to the project classpath
+		int len = classpath.length;
+		IClasspathEntry[] newClasspath = new IClasspathEntry[len + 1];
+		System.arraycopy(classpath, 0, newClasspath, 0, len);
+		newClasspath[len] = classpathEntry;
+		javaProject.setRawClasspath(newClasspath, monitor);
+	}
+	
+	private void createProjectXml(IProject project, boolean buildOrmXml) {
+		this.createPersistenceXml(project);
+
+		if (buildOrmXml) {
+			this.createOrmXml(project);
+		}
+	}
+
+	private void createPersistenceXml(IProject project) {
+		IDataModel config = DataModelFactory.createDataModel(new PersistenceFileCreationDataModelProvider());
+		config.setProperty(JpaFileCreationDataModelProperties.PROJECT_NAME, project.getName());
+		// default values for all other properties should suffice
+		try {
+			config.getDefaultOperation().execute(null, null);
+		} catch (ExecutionException ex) {
+			JptCorePlugin.log(ex);
+		}
+	}
+
+	private void createOrmXml(IProject project) {
+		IDataModel config = DataModelFactory.createDataModel(new OrmFileCreationDataModelProvider());
+		config.setProperty(JpaFileCreationDataModelProperties.PROJECT_NAME, project.getName());
+		// default values for all other properties should suffice
+		try {
+			config.getDefaultOperation().execute(null, null);
+		} catch (ExecutionException ex) {
+			JptCorePlugin.log(ex);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java
new file mode 100644
index 0000000..acdfa2d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.wst.common.project.facet.core.IDelegate;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+public class JpaFacetUninstallDelegate 
+	implements IDelegate 
+{
+	public void execute(IProject project, IProjectFacetVersion fv,
+			Object config, IProgressMonitor monitor) throws CoreException {
+		
+		// There is nothing to do here.  Everything is taken care of by the 
+		// JpaModelManager *whenever* the facet is removed (even via meta-file
+		// editing and CVS updating), but this delegate needs to be here because
+		// it is required by the facet extension point action element, and that 
+		// is required by the facet UI to allow uninstallation of this facet.
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
new file mode 100644
index 0000000..17a394b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.JpaPlatformRegistry;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+
+public class JpaFacetVersionChangeDataModelProvider
+	extends JpaFacetDataModelProvider
+	implements JpaFacetDataModelProperties
+{
+	protected static final IStatus PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION_STATUS = 
+			buildErrorStatus(JptCoreMessages.VALIDATE_PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION);
+	
+	
+	/**
+	 * required default constructor
+	 */
+	public JpaFacetVersionChangeDataModelProvider() {
+		super();
+	}
+	
+	
+	protected String getProjectName() {
+		return getStringProperty(FACET_PROJECT_NAME);
+	}
+	
+	protected JpaProject getJpaProject() {
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(getProjectName());
+		return JptCorePlugin.getJpaProject(project);
+	}
+	
+	
+	// **************** defaults **********************************************
+	
+	@Override
+	protected String getDefaultPlatformId() {
+		return getJpaProject().getJpaPlatform().getId();
+	}
+	
+	@Override
+	protected String getDefaultConnection() {
+		return getJpaProject().getDataSource().getConnectionProfileName();
+	}
+	
+	@Override
+	protected Boolean getDefaultUserWantsToOverrideDefaultCatalog() {
+		return getJpaProject().getUserOverrideDefaultCatalog() != null;
+	}
+	
+	@Override
+	protected String getDefaultCatalogIdentifier() {
+		return getJpaProject().getUserOverrideDefaultCatalog();
+	}
+	
+	@Override
+	protected Boolean getDefaultUserWantsToOverrideDefaultSchema() {
+		return getJpaProject().getUserOverrideDefaultSchema() != null;
+	}
+	
+	@Override
+	protected String getDefaultSchemaIdentifier() {
+		return getJpaProject().getDefaultSchema();
+	}
+	
+	@Override
+	protected Boolean getDefaultDiscoverAnnotatedClasses() {
+		return getJpaProject().discoversAnnotatedClasses();
+	}
+	
+	
+	// **************** valid property descriptors ****************************
+	
+	@Override
+	protected Iterable<String> buildValidPlatformIds() {
+		// add existing platform id to list of choices
+		Iterable<String> validPlatformIds = super.buildValidPlatformIds();
+		if (! CollectionTools.contains(validPlatformIds, getDefaultPlatformId())) {
+			validPlatformIds = new CompositeIterable(getDefaultPlatformId(), validPlatformIds);
+		}
+		return validPlatformIds;
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	@Override
+	protected IStatus validatePlatformId() {
+		IStatus status = super.validatePlatformId();
+		
+		if (status.isOK()) {
+			if (! JpaPlatformRegistry.instance().platformSupportsJpaFacetVersion(
+					getPlatformId(), getProjectFacetVersion().getVersionString())) {
+				status = PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION_STATUS;
+			}
+		}
+		
+		return status;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDelegate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDelegate.java
new file mode 100644
index 0000000..157bf08
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDelegate.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+public class JpaFacetVersionChangeDelegate
+	extends JpaFacetActionDelegate
+{
+	@Override
+	protected void execute_(
+			IProject project, IProjectFacetVersion fv, 
+			Object config, IProgressMonitor monitor) throws CoreException {
+		
+		super.execute_(project, fv, config, monitor);
+		
+		// need to do a rebuild here
+		
+		monitor.beginTask("", 1); //$NON-NLS-1$
+		
+		JptCorePlugin.rebuildJpaProject(project);
+		
+		monitor.worked(1);
+		
+		// nothing further to do here *just* yet
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaLibraryProviderConstants.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaLibraryProviderConstants.java
new file mode 100644
index 0000000..626ae91
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaLibraryProviderConstants.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+public interface JpaLibraryProviderConstants
+{
+	public static final String EXPR_VAR_JPA_PLATFORM
+		= "jpaPlatform"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/LegacyJpaLibraryProviderDetector.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/LegacyJpaLibraryProviderDetector.java
new file mode 100644
index 0000000..3c3bef9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/LegacyJpaLibraryProviderDetector.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
+import org.eclipse.jst.common.project.facet.core.libprov.LegacyLibraryProviderDetector;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+
+public class LegacyJpaLibraryProviderDetector
+	extends LegacyLibraryProviderDetector
+{
+	public static final String LEGACY_JPA_LIBRARY_PROVIDER_ID
+		= "jpa-legacy-library-provider"; //$NON-NLS-1$
+	
+	
+	@Override
+	public ILibraryProvider detect(
+			final IProject project, final IProjectFacet facet) {
+		if (facet.getId().equals(JptCorePlugin.FACET_ID)) {
+			return LibraryProviderFramework.getProvider(LEGACY_JPA_LIBRARY_PROVIDER_ID);
+		}
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/LegacyJpaLibraryProviderInstallOperation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/LegacyJpaLibraryProviderInstallOperation.java
new file mode 100644
index 0000000..2b286e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/LegacyJpaLibraryProviderInstallOperation.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.facet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperation;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
+
+public class LegacyJpaLibraryProviderInstallOperation
+	extends LibraryProviderOperation
+{
+	@Override
+	public void execute(
+			LibraryProviderOperationConfig config, IProgressMonitor monitor) 
+			throws CoreException {
+		// no op - nothing to uninstall
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/RuntimeChangedListener.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/RuntimeChangedListener.java
new file mode 100644
index 0000000..4aed10f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/RuntimeChangedListener.java
@@ -0,0 +1,45 @@
+package org.eclipse.jpt.core.internal.facet;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
+
+public class RuntimeChangedListener
+		implements IFacetedProjectListener {
+	
+	public void handleEvent(IFacetedProjectEvent facetedProjectEvent) {
+		
+		IFacetedProjectBase fpb = facetedProjectEvent.getWorkingCopy();
+		if (fpb == null) {
+			fpb = facetedProjectEvent.getProject();
+		}
+		IProjectFacetVersion pfv = 
+			fpb.getProjectFacetVersion(ProjectFacetsManager.getProjectFacet(JptCorePlugin.FACET_ID));
+		if (pfv != null) {
+			Map<String, Object> enablementVariables = new HashMap<String, Object>();
+			enablementVariables.put(JpaLibraryProviderConstants.EXPR_VAR_JPA_PLATFORM, getJpaPlatformId(fpb.getProject()));
+			LibraryInstallDelegate lp = new LibraryInstallDelegate(fpb, pfv, enablementVariables);
+			try {
+				lp.execute(new NullProgressMonitor());
+			}
+			catch (CoreException ce) {
+				JptCorePlugin.log(ce);
+			}
+		}
+	}
+	
+	protected String getJpaPlatformId(IProject project) {
+		JpaProject jpaProject = JptCorePlugin.getJpaProject(project);
+		return (jpaProject == null) ? null : jpaProject.getJpaPlatform().getId();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaDataSource.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaDataSource.java
new file mode 100644
index 0000000..e71d6b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaDataSource.java
@@ -0,0 +1,232 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1;
+
+import org.eclipse.jpt.core.JpaDataSource;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.AbstractJpaNode;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.db.ConnectionAdapter;
+import org.eclipse.jpt.db.ConnectionListener;
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.ConnectionProfileFactory;
+import org.eclipse.jpt.db.ConnectionProfileListener;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.DatabaseIdentifierAdapter;
+import org.eclipse.jpt.db.DatabaseObject;
+
+/**
+ * GenericJpaDataSource
+ */
+public class GenericJpaDataSource
+	extends AbstractJpaNode
+	implements JpaDataSource
+{
+	/**
+	 * cache the connection profile name so we can detect when
+	 * it changes and notify listeners
+	 */
+	protected String connectionProfileName;
+
+	protected transient ConnectionProfile connectionProfile;
+
+	/**
+	 * listen for the connection to be added or removed or its name changed
+	 */
+	protected final ConnectionProfileListener connectionProfileListener;
+
+	/**
+	 * listen for the connection to be opened or closed
+	 */
+	protected final ConnectionListener connectionListener;
+
+	private static final long serialVersionUID = 1L;
+
+
+	// ********** constructor/initialization **********
+
+	public GenericJpaDataSource(JpaProject jpaProject, String connectionProfileName) {
+		super(jpaProject);
+		//moving the building of the connection profile before the connectionProfileListener
+		//is added.  Need to make sure the loading of db profiles is completed before
+		//listening, otherwise we get notifications before our model is finished being built.
+		//this means our updater is called before it is set which results in an IllegalStateException.
+		//Hopefully this change is temporary and DTP will fix bug 246270 where I suggest they
+		//not fire events when building profiles.
+		this.connectionProfileName = connectionProfileName;
+		this.connectionProfile = this.buildConnectionProfile(connectionProfileName);
+
+		this.connectionProfileListener = this.buildConnectionProfileListener();
+		this.getConnectionProfileFactory().addConnectionProfileListener(this.connectionProfileListener);
+
+		this.connectionListener = this.buildConnectionListener();
+		if (this.connectionProfile != null) {
+			this.connectionProfile.addConnectionListener(this.connectionListener);
+		}
+	}
+
+	protected ConnectionProfileFactory getConnectionProfileFactory() {
+		return this.getJpaPlatform().getConnectionProfileFactory();
+	}
+
+	protected ConnectionProfileListener buildConnectionProfileListener() {
+		return new LocalConnectionProfileListener();
+	}
+
+	protected ConnectionListener buildConnectionListener() {
+		return new LocalConnectionListener();
+	}
+
+
+	// ********** JpaDataSource implementation **********
+
+	public String getConnectionProfileName() {
+		return this.connectionProfileName;
+	}
+
+	public void setConnectionProfileName(String connectionProfileName) {
+		String old = this.connectionProfileName;
+		this.connectionProfileName = connectionProfileName;
+		if (this.attributeValueHasChanged(old, connectionProfileName)) {
+			this.firePropertyChanged(CONNECTION_PROFILE_NAME_PROPERTY, old, connectionProfileName);
+			 // synch the connection profile when the name changes
+			this.setConnectionProfile(this.buildConnectionProfile(connectionProfileName));
+			JptCorePlugin.setConnectionProfileName(this.getJpaProject().getProject(), connectionProfileName);
+		}
+	}
+
+	public ConnectionProfile getConnectionProfile() {
+		return this.connectionProfile;
+	}
+
+	@Override
+	public boolean connectionProfileIsActive() {
+		ConnectionProfile cp = this.connectionProfile;
+		return (cp != null) && cp.isActive();
+	}
+
+	@Override
+	public Database getDatabase() {
+		ConnectionProfile cp = this.connectionProfile;
+		return (cp == null) ? null : cp.getDatabase();
+	}
+
+	public <T extends DatabaseObject> T selectDatabaseObjectForIdentifier(Iterable<T> databaseObjects, String identifier) {
+		Database db = this.getDatabase();
+		return (db == null) ? null : db.selectDatabaseObjectForIdentifier(databaseObjects, identifier);
+	}
+
+	public void dispose() {
+		if (this.connectionProfile != null) {
+			this.connectionProfile.removeConnectionListener(this.connectionListener);
+		}
+		this.getConnectionProfileFactory().removeConnectionProfileListener(this.connectionProfileListener);
+	}
+
+
+	// ********** internal methods **********
+
+	protected ConnectionProfile buildConnectionProfile(String name) {
+		return this.getConnectionProfileFactory().buildConnectionProfile(name, this.buildDatabaseIdentifierAdapter());
+	}
+
+	protected DatabaseIdentifierAdapter buildDatabaseIdentifierAdapter() {
+		return this.isJpa2_0Compatible() ?
+			((JpaFactory2_0) this.getJpaFactory()).buildDatabaseIdentifierAdapter(this) :
+			DatabaseIdentifierAdapter.Default.instance();
+	}
+
+	protected void setConnectionProfile(ConnectionProfile connectionProfile) {
+		ConnectionProfile old = this.connectionProfile;
+		if (old != null) {
+			old.removeConnectionListener(this.connectionListener);
+		}
+		this.connectionProfile = connectionProfile;
+		if (connectionProfile != null) {
+			connectionProfile.addConnectionListener(this.connectionListener);
+		}
+		this.firePropertyChanged(CONNECTION_PROFILE_PROPERTY, old, connectionProfile);
+	}
+
+
+	// ********** overrides **********
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.connectionProfileName);
+	}
+
+
+	// ********** member classes **********
+
+	/**
+	 * Listen for a connection profile with our name being removed.
+	 * Also listen for our connection's name being changed.
+	 */
+	protected class LocalConnectionProfileListener implements ConnectionProfileListener {
+
+		protected LocalConnectionProfileListener() {
+			super();
+		}
+
+		public void connectionProfileAdded(String name) {
+			// check to see if a connection profile with our name was added
+			// (assume our connection profile is null)
+			if (GenericJpaDataSource.this.connectionProfile == null) {
+				if (name.equals(GenericJpaDataSource.this.getConnectionProfileName())) {
+					GenericJpaDataSource.this.setConnectionProfileName(name);  // this will trigger creation of CP
+				}
+			}
+		}
+
+		public void connectionProfileRemoved(String name) {
+			if (GenericJpaDataSource.this.connectionProfile == null) {
+				return;
+			}
+			if (name.equals(GenericJpaDataSource.this.connectionProfile.getName())) {
+				GenericJpaDataSource.this.setConnectionProfile(null);
+			}
+		}
+
+		public void connectionProfileRenamed(String oldName, String newName) {
+			if (GenericJpaDataSource.this.connectionProfile == null) {
+				if (newName.equals(GenericJpaDataSource.this.connectionProfileName)) {
+					GenericJpaDataSource.this.setConnectionProfileName(newName);
+				}
+				return;
+			}
+			// the connection profile will already have the new name,
+			// we just need to synch the name held by the data source
+			if (newName.equals(GenericJpaDataSource.this.connectionProfile.getName())) {
+				GenericJpaDataSource.this.setConnectionProfileName(newName);
+			}
+		}
+	}
+
+
+	/**
+	 * Whenever the connection is opened or closed trigger a project update.
+	 */
+	protected class LocalConnectionListener extends ConnectionAdapter {
+
+		@Override
+		public void opened(ConnectionProfile profile) {
+			GenericJpaDataSource.this.getJpaProject().update();
+		}
+
+		@Override
+		public void closed(ConnectionProfile profile) {
+			GenericJpaDataSource.this.getJpaProject().update();
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaFactory.java
new file mode 100644
index 0000000..65c0f52
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaFactory.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1;
+
+import org.eclipse.jpt.core.internal.AbstractJpaFactory;
+
+/**
+ * Generic JPA
+ */
+public class GenericJpaFactory
+	extends AbstractJpaFactory
+{
+	public GenericJpaFactory() {
+		super();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaFile.java
new file mode 100644
index 0000000..7fb2a0f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaFile.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.internal.AbstractJpaNode;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * The transition between a JPA project and the resource model associated
+ * with a file.
+ * Hold the associated root structure nodes, which are hooks to the
+ * context model.
+ */
+public class GenericJpaFile
+	extends AbstractJpaNode
+	implements JpaFile
+{
+	/**
+	 * typically a .java or .xml file.
+	 */
+	protected final IFile file;
+
+	/**
+	 * cache the content type - if the content type changes, the JPA project
+	 * will throw out the JPA file and build a new one
+	 */
+	protected final IContentType contentType;
+
+	/**
+	 * the resource model corresponding to the file
+	 */
+	protected final JpaResourceModel resourceModel;
+
+	/**
+	 * the root structure (context model) nodes corresponding to the resource
+	 * model
+	 */
+	protected final Hashtable<Object, JpaStructureNode> rootStructureNodes;
+
+
+	// ********** construction **********
+
+	public GenericJpaFile(JpaProject jpaProject, IFile file, IContentType contentType, JpaResourceModel resourceModel) {
+		super(jpaProject);
+		this.file = file;
+		this.contentType = contentType;
+		this.resourceModel = resourceModel;
+		this.rootStructureNodes = new Hashtable<Object, JpaStructureNode>();
+	}
+
+	/**
+	 * Changes to ROOT_STRUCTURE_NODES_COLLECTION do not need to trigger a
+	 * project update. Only the UI cares about the root structure nodes.
+	 * If a project update is allowed to happen, an infinite loop will result
+	 * if any java class is specified in more than one location in the
+	 * persistence unit.
+	 */
+	@Override
+	protected void addNonUpdateAspectNamesTo(Set<String> nonUpdateAspectNames) {
+		super.addNonUpdateAspectNamesTo(nonUpdateAspectNames);
+		nonUpdateAspectNames.add(ROOT_STRUCTURE_NODES_COLLECTION);
+	}
+
+
+	// ********** file **********
+
+	public IFile getFile() {
+		return this.file;
+	}
+
+	public IContentType getContentType() {
+		return this.contentType;
+	}
+
+	public JpaResourceModel getResourceModel() {
+		return this.resourceModel;
+	}
+
+	public JpaResourceModel getResourceModel(IContentType ct) {
+		return this.contentType.isKindOf(ct) ? this.resourceModel : null;
+	}
+
+
+	// ********** root structure nodes **********
+
+	public Iterator<JpaStructureNode> rootStructureNodes() {
+		return this.getRootStructureNodes().iterator();
+	}
+
+	protected Iterable<JpaStructureNode> getRootStructureNodes() {
+		return new LiveCloneIterable<JpaStructureNode>(this.rootStructureNodes.values());
+	}
+
+	public int rootStructureNodesSize() {
+		return this.rootStructureNodes.size();
+	}
+
+	public void addRootStructureNode(Object key, JpaStructureNode rootStructureNode) {
+		JpaStructureNode old = this.rootStructureNodes.put(key, rootStructureNode);
+		if (rootStructureNode != old) {
+			if (old != null) {
+				this.fireItemRemoved(ROOT_STRUCTURE_NODES_COLLECTION, old);
+			}
+			this.fireItemAdded(ROOT_STRUCTURE_NODES_COLLECTION, rootStructureNode);
+		}
+	}
+
+	public void removeRootStructureNode(Object key) {
+		this.fireItemRemoved(ROOT_STRUCTURE_NODES_COLLECTION, this.rootStructureNodes.remove(key));
+	}
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		for (JpaStructureNode rootNode : this.getRootStructureNodes()) {
+			JpaStructureNode node = rootNode.getStructureNode(textOffset);
+			if (node != null) {
+				return node;
+			}
+		}
+		return null;
+	}
+
+
+	// ********** misc **********
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.file);
+		sb.append('[');
+		sb.append(this.contentType.getName());
+		sb.append(']');
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaProject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaProject.java
new file mode 100644
index 0000000..7d0c986
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/GenericJpaProject.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.internal.AbstractJpaProject;
+
+/**
+ * Not much different from the abstract JPA project.
+ */
+public class GenericJpaProject
+	extends AbstractJpaProject
+{
+
+	// ********** constructor/initialization **********
+
+	public GenericJpaProject(JpaProject.Config config) {
+		super(config);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
new file mode 100644
index 0000000..48e1a0f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ *  Copyright (c) 2011  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import java.util.List;
+
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.IdClassReference;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractEntityPrimaryKeyValidator extends
+		AbstractPrimaryKeyValidator {
+
+	public AbstractEntityPrimaryKeyValidator(Entity entity,
+			PrimaryKeyTextRangeResolver textRangeResolver) {
+		super(entity, textRangeResolver);
+	}
+
+	protected Entity entity() {
+		return (Entity) this.typeMapping();
+	}
+	
+	@Override
+	protected IdClassReference idClassReference() {
+		return entity().getIdClassReference();
+	}
+	
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		// if an entity is non-root, it is not allowed to define primary keys
+		if (! entity().isRoot()) {
+			validatePrimaryKeyForNonRoot(messages, reporter);
+		}
+		else {
+			validatePrimaryKeyForRoot(messages, reporter);
+		}
+	}
+	
+	protected void validatePrimaryKeyForNonRoot(List<IMessage> messages, IReporter reporter) {
+		validateNonRootEntityDoesNotSpecifyIdClass(messages, reporter);
+		validateNonRootEntityDoesNotSpecifyPrimaryKeyAttributes(messages, reporter);
+	}
+	
+	protected void validatePrimaryKeyForRoot(List<IMessage> messages, IReporter reporter) {
+		validatePrimaryKeyIsNotRedefined(messages, reporter);
+		validateIdClassIsUsedIfNecessary(messages, reporter);
+		
+		// if the primary key is not defined on an ancestor, it must be defined here
+		if (! definesPrimaryKey(typeMapping())) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_NO_PK,
+						new String[0],
+						entity(),
+						textRangeResolver().getTypeMappingTextRange()));
+		}
+		
+		// if primary key is composite, it may either use an id class or embedded id, not both
+		validateOneOfIdClassOrEmbeddedIdIsUsed(messages, reporter);
+		// ... and only one embedded id
+		validateOneEmbeddedId(messages, reporter);
+		
+		validateMapsIdMappings(messages, reporter);
+		
+		if (specifiesIdClass()) {
+			validateIdClass(idClassReference().getIdClass(), messages, reporter);
+		}
+	}
+	
+	protected void validateNonRootEntityDoesNotSpecifyIdClass(List<IMessage> messages, IReporter reporter) {
+		if (idClassReference().isSpecified()) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_NON_ROOT_ID_CLASS_SPECIFIED,
+						new String[0],
+						entity(),
+						textRangeResolver().getIdClassTextRange()));
+		}
+	}
+	
+	protected void validateNonRootEntityDoesNotSpecifyPrimaryKeyAttributes(List<IMessage> messages, IReporter reporter) {
+		for (AttributeMapping each : getPrimaryKeyMappingsDefinedLocally(typeMapping())) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED,
+						new String[0],
+						each,
+						textRangeResolver().getAttributeMappingTextRange(each.getName())));
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
new file mode 100644
index 0000000..364cedf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2011  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.IdClassReference;
+import org.eclipse.jpt.core.context.MappedSuperclass;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractMappedSuperclassPrimaryKeyValidator
+	extends AbstractPrimaryKeyValidator
+{
+	public AbstractMappedSuperclassPrimaryKeyValidator(
+			MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
+		
+		super(mappedSuperclass, textRangeResolver);
+	}
+	
+	
+	protected MappedSuperclass mappedSuperclass() {
+		return (MappedSuperclass) this.typeMapping();
+	}
+	
+	@Override
+	protected IdClassReference idClassReference() {
+		return mappedSuperclass().getIdClassReference();
+	}
+	
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		validatePrimaryKeyIsNotRedefined(messages, reporter);
+		validateIdClassIsUsedIfNecessary(messages, reporter);
+		
+		// if primary key is composite, it may either use an id class or embedded id, not both
+		validateOneOfIdClassOrEmbeddedIdIsUsed(messages, reporter);
+		// ... and only one embedded id
+		validateOneEmbeddedId(messages, reporter);
+		
+		if (specifiesIdClass()) {
+			validateIdClass(idClassReference().getIdClass(), messages, reporter);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
new file mode 100644
index 0000000..b39e362
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
@@ -0,0 +1,589 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.EmbeddedIdMapping;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.IdClassReference;
+import org.eclipse.jpt.core.context.IdMapping;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyValidator;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.HashBag;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class AbstractPrimaryKeyValidator
+	implements PrimaryKeyValidator
+{
+	private TypeMapping typeMapping;
+	
+	private PrimaryKeyTextRangeResolver textRangeResolver;
+	
+	
+	protected AbstractPrimaryKeyValidator(
+			TypeMapping typeMapping, PrimaryKeyTextRangeResolver textRangeResolver) {
+		
+		this.typeMapping = typeMapping;
+		this.textRangeResolver = textRangeResolver;
+	}
+	
+	
+	protected TypeMapping typeMapping() {
+		return this.typeMapping;
+	}
+	
+	protected abstract IdClassReference idClassReference();
+	
+	protected PrimaryKeyTextRangeResolver textRangeResolver() {
+		return this.textRangeResolver;
+	}
+	
+	// for JPA portability, a hierarchy must define its primary key on one class 
+	// (entity *or* mapped superclass)
+	protected void validatePrimaryKeyIsNotRedefined(List<IMessage> messages, IReporter reporter) {
+		if (definesPrimaryKeyOnAncestor(typeMapping())) {
+			if (idClassReference().isSpecified()) {
+				messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_CLASS,
+							new String[0],
+							typeMapping(),
+							textRangeResolver().getIdClassTextRange()));
+			}
+			for (AttributeMapping each : getPrimaryKeyMappingsDefinedLocally(typeMapping())) {
+				messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE,
+							new String[0],
+							each,
+							textRangeResolver().getAttributeMappingTextRange(each.getName())));
+			}
+			return;
+		}
+	}
+	
+	// if a primary key defining class has multiple primary keys, it must use an id class
+	protected void validateIdClassIsUsedIfNecessary(List<IMessage> messages, IReporter reporter) {
+		if (! specifiesIdClass() && idClassIsRequired()) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REQUIRED,
+						new String[0],
+						typeMapping(),
+						textRangeResolver().getTypeMappingTextRange()));
+		}
+	}
+	
+	// only one composite primary key strategy may be used
+	protected void validateOneOfIdClassOrEmbeddedIdIsUsed(List<IMessage> messages, IReporter reporter) {
+		if (idClassReference().isSpecified()
+				&& CollectionTools.size(typeMapping().getAllAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY)) > 0) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED,
+						new String[0],
+						typeMapping(),
+						textRangeResolver().getTypeMappingTextRange()));
+		}
+	}
+	
+	// only one embedded id may be used
+	protected void validateOneEmbeddedId(List<IMessage> messages, IReporter reporter) {
+		if (CollectionTools.size(getEmbeddedIdMappings(typeMapping())) > 1) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TYPE_MAPPING_MULTIPLE_EMBEDDED_ID,
+						new String[0],
+						typeMapping(),
+						textRangeResolver().getTypeMappingTextRange()));
+		}
+	}
+	
+	protected void validateMapsIdMappings(List<IMessage> messages, IReporter reporter) {
+		for (SingleRelationshipMapping2_0 mapsIdRelationshipMapping : getMapsIdMappingsDefinedLocally(typeMapping())) {
+			// can't use maps id mappings with an id class
+			if (definesIdClass(typeMapping())) {
+				messages.add(DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID,
+						new String[] {mapsIdRelationshipMapping.getName()},
+						mapsIdRelationshipMapping,
+						textRangeResolver().getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
+			}
+			
+			AttributeMapping resolvedAttributeMapping = 
+					mapsIdRelationshipMapping.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getResolvedAttributeMappingValue();
+			if (resolvedAttributeMapping != null 
+					&& ! ClassName.areAutoboxEquivalents(
+						resolvedAttributeMapping.getPersistentAttribute().getTypeName(), 
+						getTargetEntityPrimaryKeyTypeName(mapsIdRelationshipMapping))) {
+				messages.add(DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
+						new String[] {mapsIdRelationshipMapping.getName()},
+						mapsIdRelationshipMapping,
+						textRangeResolver().getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
+			}
+		}
+	}
+	
+	protected void validateIdClass(JavaPersistentType idClass, List<IMessage> messages, IReporter reporter) {
+		// there should already be a validation error if the id class does not resolve to a class
+		if (idClass == null) {
+			return;
+		}
+		
+		if (hasDerivedIdMappingMatchingIdClass(idClass)) {
+			validateIdClass_derivedIdMappingMatchingIdClass(idClass, messages, reporter);
+			return;
+		}
+		for (JavaPersistentAttribute idClassAttribute : 
+				new SubIterableWrapper<PersistentAttribute, JavaPersistentAttribute>(
+					CollectionTools.iterable(idClass.allAttributes()))) {
+			boolean foundMatch = false;
+			for (AttributeMapping attributeMapping : getAttributeMappings(typeMapping())) {
+				if (idClassAttribute.getName().equals(attributeMapping.getName())) {
+					foundMatch = true;
+					
+					// the matching attribute should be a primary key
+					if (! definesPrimaryKey(attributeMapping)) {
+						messages.add(DefaultJpaValidationMessages.buildMessage(
+								IMessage.HIGH_SEVERITY,
+								JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY,
+								new String[] {idClassAttribute.getName()},
+								typeMapping(),
+								textRangeResolver().getIdClassTextRange()));
+					}
+					
+					// the matching attribute's type should agree
+					String idClassAttributeTypeName = idClassAttribute.getTypeName();
+					String attributeMappingTypeName = getTypeNameForIdClass(attributeMapping);
+					if (attributeMappingTypeName != null 	// if it's null, there should be 
+																// another failing validation elsewhere
+							&& ! ClassName.areAutoboxEquivalents(idClassAttributeTypeName, attributeMappingTypeName)) {
+						messages.add(DefaultJpaValidationMessages.buildMessage(
+								IMessage.HIGH_SEVERITY,
+								JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
+								new String[] {idClassAttribute.getName(), idClassAttributeTypeName},
+								typeMapping(),
+								textRangeResolver().getIdClassTextRange()));
+					}
+				}
+			}
+			
+			if (! foundMatch) {
+				messages.add(DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH,
+						new String[] {idClassAttribute.getName()},
+						typeMapping(),
+						textRangeResolver().getIdClassTextRange()));
+			}
+		}
+	}
+	
+	protected void validateIdClass_derivedIdMappingMatchingIdClass(
+			JavaPersistentType idClass, List<IMessage> messages, IReporter reporter) {
+		
+		Collection<AttributeMapping> errorMappings = new HashBag<AttributeMapping>();
+		for (AttributeMapping each 
+				: new CompositeIterable<AttributeMapping>(getIdMappings(typeMapping()), getEmbeddedIdMappings(typeMapping()))) {
+			errorMappings.add(each);
+		}
+		Collection<AttributeMapping> errorDerivedIdMappings = new HashBag<AttributeMapping>();
+		for (SingleRelationshipMapping2_0 each : getDerivedIdMappings(typeMapping())) {
+			if (idClass.getName().equals(getTargetEntityPrimaryKeyTypeName(each))) {
+				errorDerivedIdMappings.add(each);
+			}
+			else {
+				errorMappings.add(each);
+			}
+		}
+		for (AttributeMapping each : errorMappings) {
+			addNoIdClassAttributeMatchError(each, messages);
+		}
+		if (CollectionTools.size(errorDerivedIdMappings) > 1) {
+			for (AttributeMapping each : errorDerivedIdMappings) {
+				addDuplicateIdClassAttributeMatchError(each, messages);
+			}
+		}
+	}
+	
+	protected void addNoIdClassAttributeMatchError(AttributeMapping attributeMapping, List<IMessage> messages) {
+		messages.add(DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH,
+				new String[] {attributeMapping.getName()},
+				typeMapping(),
+				textRangeResolver().getIdClassTextRange()));
+	}
+	
+	protected void addDuplicateIdClassAttributeMatchError(AttributeMapping attributeMapping, List<IMessage> messages) {
+		messages.add(DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH,
+				new String[] {attributeMapping.getName()},
+				typeMapping(),
+				textRangeResolver().getIdClassTextRange()));
+	}
+	
+	
+	// **************** convenience methods ********************************************************
+	
+	// **************** primary key overall ********************************************************
+	
+	/**
+	 * Return whether an ancestor class has defined any aspect of the primary key
+	 */
+	protected boolean definesPrimaryKeyOnAncestor(TypeMapping typeMapping) {
+		for (TypeMapping each : CollectionTools.iterable(typeMapping.inheritanceHierarchy())) {
+			if (each != typeMapping && definesPrimaryKey(each)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Return whether the type mapping has defined any aspect of the primary key
+	 */
+	protected boolean definesPrimaryKey(TypeMapping typeMapping) {
+		return getIdClass(typeMapping) != null
+				|| ! CollectionTools.isEmpty(getPrimaryKeyMappings(typeMapping));
+	}
+	
+	/**
+	 * Return true if the type mapping has defined any aspect of a complex primary key
+	 */
+	protected boolean definesComplexPrimaryKey(TypeMapping typeMapping) {
+		return definesIdClass(typeMapping)
+				|| getEmbeddedIdMapping(typeMapping) != null;
+	}
+	
+	/**
+	 * Return the overriding type name of the primary key for the type mapping.
+	 * This may be
+	 * - type of the single simple primary key (id) attribute
+	 * - type of the single complex primary key (embedded id) attribute
+	 * - type of the id class
+	 * - null if none of the above are coherent (i.e. there are multiple possibilities, or the 
+	 * 		primary key is invalid)
+	 */
+	protected String getPrimaryKeyTypeName(TypeMapping typeMapping) {
+		JavaPersistentType idClass = getIdClass(typeMapping);
+		if (idClass != null) {
+			return idClass.getName();
+		}
+		EmbeddedIdMapping embeddedId = getEmbeddedIdMapping(typeMapping);
+		if (embeddedId != null) {
+			return embeddedId.getPersistentAttribute().getTypeName();
+		}
+		IdMapping id = getIdMapping(typeMapping);
+		if (id != null) {
+			return id.getPersistentAttribute().getTypeName();
+		}
+		return null;
+	}
+	
+	/**
+	 * Return whether the attribute mapping has defined any aspect of the primary key
+	 */
+	protected boolean definesPrimaryKey(AttributeMapping attributeMapping) {
+		String mappingKey = attributeMapping.getKey();
+		if (StringTools.stringsAreEqual(mappingKey, MappingKeys.ID_ATTRIBUTE_MAPPING_KEY)
+				|| StringTools.stringsAreEqual(mappingKey, MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY)) {
+			return true;
+		}
+		if (StringTools.stringsAreEqual(mappingKey, MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)
+				|| StringTools.stringsAreEqual(mappingKey, MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY)) {
+			SingleRelationshipMapping2_0 relationshipMapping = (SingleRelationshipMapping2_0) attributeMapping;
+			return (relationshipMapping.getDerivedIdentity().usesIdDerivedIdentityStrategy()
+					|| relationshipMapping.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy());
+		}
+		return false;
+	}
+	
+	
+	// **************** id class **********************************************
+	
+	protected boolean specifiesIdClass() {
+		return idClassReference().isSpecified();
+	}
+	
+	/**
+	 * Return whether an id class is defined on the class
+	 * NOTE: this is different from whether an id class is *specified*.  If a specified id class
+	 * 		is not resolved, it is not defined.  There will be a validation error to that effect.
+	 */
+	protected boolean definesIdClass(TypeMapping typeMapping) {
+		return getIdClass(typeMapping) != null;
+	}
+	
+	/**
+	 * Return whether an ancestor class has defined an id class
+	 */
+	protected boolean definesIdClassOnAncestor(TypeMapping typeMapping) {
+		for (TypeMapping each : CollectionTools.iterable(typeMapping.inheritanceHierarchy())) {
+			if (each != typeMapping && definesIdClass(each)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Return the id class to be used for the type mapping, whether that be locally
+	 * or on an ancestor
+	 */
+	protected JavaPersistentType getIdClass(TypeMapping typeMapping) {
+		for (Iterator<TypeMapping> stream = typeMapping.inheritanceHierarchy(); stream.hasNext(); ) {
+			TypeMapping next = stream.next();
+			if (next.getIdClass() != null) {
+				return next.getIdClass();
+			}
+		}
+		return null;
+	}
+	
+	
+	// **************** attribute mappings in general *************************
+	
+	protected Iterable<AttributeMapping> getAttributeMappings(TypeMapping typeMapping) {
+		return CollectionTools.collection(typeMapping.allAttributeMappings());
+	}
+	
+	/**
+	 * Return all primary key mappings, defined on and above the type mapping
+	 */
+	protected Iterable<AttributeMapping> getPrimaryKeyMappings(TypeMapping typeMapping) {
+		return new CompositeIterable<AttributeMapping>(
+				getIdMappings(typeMapping),
+				getEmbeddedIdMappings(typeMapping),
+				getDerivedIdMappings(typeMapping),
+				getMapsIdMappings(typeMapping));
+	}
+	
+	/**
+	 * Return primary key mappings declared directly on the type mapping
+	 */
+	protected Iterable<AttributeMapping> getPrimaryKeyMappingsDefinedLocally(TypeMapping typeMapping) {
+		return new CompositeIterable<AttributeMapping>(
+				getIdMappingsDefinedLocally(typeMapping),
+				getEmbeddedIdMappingsDefinedLocally(typeMapping),
+				getDerivedIdMappingsDefinedLocally(typeMapping),
+				getMapsIdMappingsDefinedLocally(typeMapping));
+	}
+	
+	protected boolean hasAnyPrimaryKeyMappings(TypeMapping typeMapping) {
+		return ! CollectionTools.isEmpty(getPrimaryKeyMappings(typeMapping));
+	}
+	
+	// **************** id mappings *******************************************
+	
+	protected IdMapping getIdMapping(TypeMapping typeMapping) {
+		Iterable<IdMapping> idMappings = getIdMappings(typeMapping);
+		if (CollectionTools.size(idMappings) == 1) {
+			return idMappings.iterator().next();
+		}
+		return null;
+	}
+	
+	protected Iterable<IdMapping> getIdMappings(TypeMapping typeMapping) {
+		return new SubIterableWrapper<AttributeMapping, IdMapping>(
+				typeMapping.getAllAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY));
+	}
+	
+	protected Iterable<IdMapping> getIdMappingsDefinedLocally(TypeMapping typeMapping) {
+		return new SubIterableWrapper<AttributeMapping, IdMapping>(
+				typeMapping.getAttributeMappings(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY));
+	}
+	
+	
+	// **************** embedded id mappings **********************************
+	
+	/**
+	 * Return whether an embedded id is defined for this class, whether that be locally
+	 * or on an ancestor
+	 */
+	protected boolean definesEmbeddedIdMapping(TypeMapping typeMapping) {
+		return ! CollectionTools.isEmpty(getEmbeddedIdMappings(typeMapping));
+	}
+	
+	protected EmbeddedIdMapping getEmbeddedIdMapping(TypeMapping typeMapping) {
+		Iterable<EmbeddedIdMapping> embeddedIdMappings = getEmbeddedIdMappings(typeMapping);
+		if (CollectionTools.size(embeddedIdMappings) == 1) {
+			return embeddedIdMappings.iterator().next();
+		}
+		return null;
+	}
+	
+	protected Iterable<EmbeddedIdMapping> getEmbeddedIdMappings(TypeMapping typeMapping) {
+		return new SubIterableWrapper<AttributeMapping, EmbeddedIdMapping>(
+				typeMapping.getAllAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY));
+	}
+	
+	protected Iterable<EmbeddedIdMapping> getEmbeddedIdMappingsDefinedLocally(TypeMapping typeMapping) {
+		return new SubIterableWrapper<AttributeMapping, EmbeddedIdMapping>(
+				typeMapping.getAttributeMappings(MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY));
+	}
+	
+	
+	// **************** derived id mappings ***********************************
+	
+	protected Iterable<SingleRelationshipMapping2_0> getDerivedIdMappings(TypeMapping typeMapping) {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						typeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						typeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getDerivedIdMappingsDefinedLocally(TypeMapping typeMapping) {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						typeMapping.getAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						typeMapping.getAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	// **************** maps id mappings **************************************
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdMappings(TypeMapping typeMapping) {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						typeMapping.getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						typeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdMappingsDefinedLocally(TypeMapping typeMapping) {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						typeMapping.getAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						typeMapping.getAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	// **************** misc **************************************************
+	
+	/**
+	 * Return whether an id class is required for this class
+	 */
+	protected boolean idClassIsRequired() {
+		// An id class is required if
+		// - there are multiple "simple" primary key mappings
+		// - or there is at least one "complex" primary key mapping
+		// A simple primary key mapping can be
+		// - an id mapping
+		// - a derived id relationship mapping to an entity with a simple primary key
+		// A complex primary key mapping can be 
+		// - a derived id relationship mapping to an entity with a complex primary key
+		int simplePrimaryKeyMappingCount = 
+				CollectionTools.size(getIdMappings(typeMapping()));
+		if (simplePrimaryKeyMappingCount > 1) {
+			return true;
+		}
+		for (SingleRelationshipMapping2_0 relationshipMapping : getDerivedIdMappings(typeMapping())) {
+			Entity entity = relationshipMapping.getResolvedTargetEntity();
+			if (entity != null) {
+				if (definesComplexPrimaryKey(entity)) {
+					return true;
+				}
+				else {
+					simplePrimaryKeyMappingCount++;
+				}
+				if (simplePrimaryKeyMappingCount > 1) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
+	protected boolean hasDerivedIdMappingMatchingIdClass(JavaPersistentType idClass) {
+		for (SingleRelationshipMapping2_0 each : getDerivedIdMappings(typeMapping())) {
+			String primaryKeyTypeName = getTargetEntityPrimaryKeyTypeName(each);
+			if (idClass.getName().equals(primaryKeyTypeName)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	protected String getTargetEntityPrimaryKeyTypeName(SingleRelationshipMapping2_0 relationshipMapping) {
+		Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
+		if (targetEntity != null) {
+			return getPrimaryKeyTypeName(targetEntity);
+		}
+		return null;
+	}
+	
+	protected String getTypeNameForIdClass(AttributeMapping attributeMapping) {
+		if (StringTools.stringsAreEqual(attributeMapping.getKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY)
+				|| StringTools.stringsAreEqual(attributeMapping.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY)) {
+			return attributeMapping.getPersistentAttribute().getTypeName();
+		}
+		if (StringTools.stringsAreEqual(attributeMapping.getKey(), MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)
+				|| StringTools.stringsAreEqual(attributeMapping.getKey(), MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY)) {
+			SingleRelationshipMapping2_0 relationshipMapping = (SingleRelationshipMapping2_0) attributeMapping;
+			Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
+			if (targetEntity != null) {
+				return getPrimaryKeyTypeName(targetEntity);
+			}
+		}
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
new file mode 100644
index 0000000..2ef9b73
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+
+public class GenericEntityPrimaryKeyValidator
+	extends AbstractEntityPrimaryKeyValidator
+{
+	public GenericEntityPrimaryKeyValidator(Entity entity, PrimaryKeyTextRangeResolver textRangeResolver) {
+		super(entity, textRangeResolver);
+	}
+	
+	@Override
+	protected boolean idClassIsRequired() {
+		//Short circuit check for idClassIsRequired if any part of the primary key is defined
+		//in a superclass for Generic types.  Other validation will exist and needs to be
+		//addressed first
+		if(definesPrimaryKeyOnAncestor(typeMapping())){
+			return false;
+		}
+		return super.idClassIsRequired();
+	}
+	
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
new file mode 100644
index 0000000..b9b47ad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import org.eclipse.jpt.core.context.MappedSuperclass;
+import org.eclipse.jpt.core.internal.context.PrimaryKeyTextRangeResolver;
+
+public class GenericMappedSuperclassPrimaryKeyValidator extends
+		AbstractMappedSuperclassPrimaryKeyValidator {
+
+	public GenericMappedSuperclassPrimaryKeyValidator(MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
+			super(mappedSuperclass, textRangeResolver);
+		}
+		
+	@Override
+	protected boolean idClassIsRequired() {
+		//Short circuit check for idClassIsRequired if any part of the primary key is defined
+		//in a superclass for Generic types.  Other validation will exist and needs to be
+		//addressed first
+		if(definesPrimaryKeyOnAncestor(typeMapping())){
+			return false;
+		}
+		return super.idClassIsRequired();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericRootContextNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericRootContextNode.java
new file mode 100644
index 0000000..1625ac7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/GenericRootContextNode.java
@@ -0,0 +1,282 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context;
+
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.MappingFileRoot;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.internal.context.AbstractJpaContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.JpaRootContextNode2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceXml2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.HashBag;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * the context model root
+ */
+public class GenericRootContextNode
+	extends AbstractJpaContextNode
+	implements JpaRootContextNode2_0
+{
+	/* This object has no parent, so it must point to the JPA project explicitly. */
+	protected final JpaProject jpaProject;
+
+	/* Main context object. */
+	protected PersistenceXml persistenceXml;
+
+
+	public GenericRootContextNode(JpaProject jpaProject) {
+		super(null);  // the JPA project is not really a "parent"...
+		if (jpaProject == null) {
+			throw new NullPointerException();
+		}
+		this.jpaProject = jpaProject;
+		this.initialize();
+	}
+
+
+	@Override
+	protected boolean requiresParent() {
+		return false;
+	}
+
+	protected void initialize() {
+		JpaXmlResource resource = this.resolvePersistenceXmlResource();
+		if (resource != null) {
+			this.persistenceXml = this.buildPersistenceXml(resource);
+		}
+	}
+
+	public void update(IProgressMonitor monitor) {
+		JpaXmlResource xmlResource = this.resolvePersistenceXmlResource();
+		if (xmlResource == null) {
+			if (this.persistenceXml != null) {
+				this.persistenceXml.dispose();
+				this.setPersistenceXml(null);
+			}
+		} else {
+			if (this.persistenceXml == null) {
+				this.setPersistenceXml(this.buildPersistenceXml(xmlResource));
+			} else {
+				this.persistenceXml.update();
+			}
+		}
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.persistenceXml != null) {
+			this.persistenceXml.postUpdate();
+		}
+	}
+
+
+	// ********** AbstractJpaNode overrides **********
+
+	@Override
+	public JpaProject getJpaProject() {
+		return this.jpaProject;
+	}
+
+	@Override
+	public IResource getResource() {
+		return this.getProject();
+	}
+
+	protected IProject getProject() {
+		return this.jpaProject.getProject();
+	}
+
+
+	// ********** AbstractJpaContextNode overrides **********
+
+	@Override
+	public PersistenceUnit getPersistenceUnit() {
+		return null;
+	}
+
+	@Override
+	public MappingFileRoot getMappingFileRoot() {
+		return null;
+	}
+
+
+	// ********** persistence.xml **********
+
+	public PersistenceXml getPersistenceXml() {
+		return this.persistenceXml;
+	}
+
+	protected void setPersistenceXml(PersistenceXml persistenceXml) {
+		PersistenceXml old = this.persistenceXml;
+		this.persistenceXml = persistenceXml;
+		this.firePropertyChanged(PERSISTENCE_XML_PROPERTY, old, persistenceXml);
+	}
+
+	protected JpaXmlResource resolvePersistenceXmlResource() {
+		JpaXmlResource xmlResource = this.jpaProject.getPersistenceXmlResource();
+		if (xmlResource == null) {
+			return null;
+		}
+		if (xmlResource.isReverting()) {
+			// 308254 - this can happen when persistence.xml is closed without saving;
+			// the model is completely whacked in another thread - so wipe our model(?)
+			return null;
+		}
+		JpaResourceType resourceType = xmlResource.getResourceType();
+		if (resourceType == null) {
+			return null;
+		}
+		if ( ! this.getJpaPlatform().supportsResourceType(resourceType)) {
+			return null;
+		}
+		return xmlResource;
+	}
+
+	protected PersistenceXml buildPersistenceXml(JpaXmlResource resource) {
+		return this.getJpaFactory().buildPersistenceXml(this, resource);
+	}
+
+
+	// ********** metamodel **********
+
+	public void initializeMetamodel() {
+		if (this.persistenceXml != null) {
+			((PersistenceXml2_0) this.persistenceXml).initializeMetamodel();
+		}
+	}
+
+	public void synchronizeMetamodel() {
+		if (this.persistenceXml != null) {
+			((PersistenceXml2_0) this.persistenceXml).synchronizeMetamodel();
+		}
+	}
+
+	public void disposeMetamodel() {
+		if (this.persistenceXml != null) {
+			((PersistenceXml2_0) this.persistenceXml).disposeMetamodel();
+		}
+	}
+
+
+	// ********** validation **********
+
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		if (reporter.isCancelled()) {
+			throw new ValidationCancelledException();
+		}
+
+		if (this.persistenceXml == null) {
+			messages.add(buildPersistenceXmlValidationMessage());
+			return;
+		}
+		if ( ! this.jpaProject.discoversAnnotatedClasses()) {
+			this.validateOrphanClasses(messages);
+		}
+		this.persistenceXml.validate(messages, reporter);
+	}
+
+	protected IMessage buildPersistenceXmlValidationMessage() {
+		int severity = IMessage.HIGH_SEVERITY;
+		IFile file = getPlatformFile();
+		if (file.exists()) {
+			JpaXmlResource xmlResource = this.jpaProject.getPersistenceXmlResource();
+			if (xmlResource != null 
+					&& ! getJpaPlatform().supportsResourceType(xmlResource.getResourceType())) {
+				return DefaultJpaValidationMessages.buildMessage(
+					severity,
+					JpaValidationMessages.PERSISTENCE_XML_UNSUPPORTED_CONTENT,
+					file);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				severity,
+				JpaValidationMessages.PERSISTENCE_XML_INVALID_CONTENT,
+				file);
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+			severity,
+			JpaValidationMessages.PROJECT_NO_PERSISTENCE_XML,
+			this);
+	}
+
+	protected IFile getPlatformFile() {
+		return this.jpaProject.convertToPlatformFile(JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATH);
+	}
+
+	protected void validateOrphanClasses(List<IMessage> messages) {
+		Persistence persistence = this.persistenceXml.getPersistence();
+		if (persistence == null) {
+			return;  // handled with other validation
+		}
+		if (persistence.persistenceUnitsSize() != 1) {
+			return;  // the context model currently only supports 1 persistence unit
+		}
+
+		PersistenceUnit persistenceUnit = persistence.persistenceUnits().next();
+		HashBag<String> annotatedClassNames = CollectionTools.bag(this.jpaProject.annotatedJavaSourceClassNames());
+		HashBag<String> orphans = annotatedClassNames.clone();
+		for (String annotatedClassName : annotatedClassNames) {
+			if (persistenceUnit.specifiesPersistentType(annotatedClassName)) {
+				orphans.remove(annotatedClassName);
+			}
+		}
+
+		// TODO remove 'jrcu'
+		// replace jrcu.getFile() with jrpt.getFile()
+		// replace jrpt.getMappingAnnotation().getTextRange(jrcu.buildASTRoot())
+		//    with jrpt.getMappingAnnotation().getTextRange()
+		//    (new method #getTextRange() ?)
+		for (String orphan : orphans) {
+			JavaResourcePersistentType jrpt = this.jpaProject.getJavaResourcePersistentType(orphan);
+			JavaResourceCompilationUnit jrcu = jrpt.getJavaResourceCompilationUnit();
+			if (jrpt.isMapped()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT,
+						new String[] {jrpt.getName()},
+						jrpt.getFile(),
+						jrpt.getNameTextRange(jrcu.buildASTRoot())
+					)
+				);
+			}
+			else {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.NORMAL_SEVERITY,
+						JpaValidationMessages.PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT,
+						new String[] {jrpt.getName()},
+						jrpt.getFile(),
+						jrpt.getNameTextRange(jrcu.buildASTRoot())
+					)
+				);
+			}
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJarFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJarFile.java
new file mode 100644
index 0000000..f256062
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJarFile.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JarFile;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.persistence.JarFileRef;
+import org.eclipse.jpt.core.internal.context.AbstractJpaContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.HashBag;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Context JAR file
+ */
+public class GenericJarFile
+	extends AbstractJpaContextNode
+	implements JarFile, PersistentType.Owner
+{
+	protected JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot;
+	protected final Vector<JavaPersistentType> javaPersistentTypes = new Vector<JavaPersistentType>();
+
+
+	// ********** constructor/initialization **********
+
+	public GenericJarFile(JarFileRef parent, JavaResourcePackageFragmentRoot jarResourcePackageFragmentRoot) {
+		super(parent);
+		this.jarResourcePackageFragmentRoot = jarResourcePackageFragmentRoot;
+		CollectionTools.addAll(this.javaPersistentTypes, this.buildJavaPersistentTypes());
+	}
+
+	protected Iterator<JavaPersistentType> buildJavaPersistentTypes() {
+		return new TransformationIterator<JavaResourcePersistentType, JavaPersistentType>(this.javaResourcePersistentTypes()) {
+			@Override
+			protected JavaPersistentType transform(JavaResourcePersistentType jrpt) {
+				return GenericJarFile.this.buildJavaPersistentType(jrpt);
+			}
+		};
+	}
+
+	/**
+	 * the resource JAR holds only annotated types, so we can use them all for
+	 * building the context types
+	 */
+	protected Iterator<JavaResourcePersistentType> javaResourcePersistentTypes() {
+		return this.jarResourcePackageFragmentRoot.persistentTypes();
+	}
+
+	protected JavaPersistentType buildJavaPersistentType(JavaResourcePersistentType jrpt) {
+		return this.getJpaFactory().buildJavaPersistentType(this, jrpt);
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return null;
+	}
+	
+	@Override
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.JAR_RESOURCE_TYPE;
+	}
+	
+	public TextRange getSelectionTextRange() {
+		return null;
+	}
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		return null;
+	}
+
+	public void dispose() {
+		// nothing yet
+	}
+
+
+	// ********** JarFile implementation **********
+
+	public JavaPersistentType getPersistentType(String typeName) {
+		for (JavaPersistentType pt : this.getJavaPersistentTypes()) {
+			if (pt.getName().equals(typeName)) {
+				return pt;
+			}
+		}
+		return null;
+	}
+
+	public Iterator<JavaPersistentType> javaPersistentTypes() {
+		return this.getJavaPersistentTypes().iterator();
+	}
+
+	protected Iterable<JavaPersistentType> getJavaPersistentTypes() {
+		return new LiveCloneIterable<JavaPersistentType>(this.javaPersistentTypes);
+	}
+
+	public int javaPersistentTypesSize() {
+		return this.javaPersistentTypes.size();
+	}
+
+	protected JavaPersistentType addJavaPersistentType(JavaResourcePersistentType jrpt) {
+		JavaPersistentType javaPersistentType = this.buildJavaPersistentType(jrpt);
+		this.addItemToCollection(javaPersistentType, this.javaPersistentTypes, JAVA_PERSISTENT_TYPES_COLLECTION);
+		return javaPersistentType;
+	}
+
+	protected void removeJavaPersistentType(JavaPersistentType javaPersistentType ) {
+		this.removeItemFromCollection(javaPersistentType, this.javaPersistentTypes, JAVA_PERSISTENT_TYPES_COLLECTION);
+	}
+
+
+	// ********** PersistentTypeContainer implementation **********
+
+	public Iterable<? extends PersistentType> getPersistentTypes() {
+		return this.getJavaPersistentTypes();
+	}
+
+
+	// ********** PersistentType.Owner implementation **********
+
+	public AccessType getDefaultPersistentTypeAccess() {
+		return this.getPersistenceUnit().getDefaultAccess();
+	}
+
+	public AccessType getOverridePersistentTypeAccess() {
+		// no access type at this level overrides any local access type specification
+		return null;
+	}
+	
+	
+	// ********** JpaNode implementation **********
+	
+	@Override
+	public IResource getResource() {
+		return this.jarResourcePackageFragmentRoot.getFile();
+	}
+
+
+	// ********** updating **********
+
+	public void update(JavaResourcePackageFragmentRoot jrpfr) {
+		this.jarResourcePackageFragmentRoot = jrpfr;
+		this.updateJavaPersistentTypes();
+	}
+
+	protected void updateJavaPersistentTypes() {
+		HashBag<JavaPersistentType> contextTypesToRemove = CollectionTools.bag(this.javaPersistentTypes(), this.javaPersistentTypes.size());
+		ArrayList<JavaPersistentType> contextTypesToUpdate = new ArrayList<JavaPersistentType>(this.javaPersistentTypes.size());
+
+		for (Iterator<JavaResourcePersistentType> resourceTypes = this.javaResourcePersistentTypes(); resourceTypes.hasNext(); ) {
+			JavaResourcePersistentType resourceType = resourceTypes.next();
+			boolean match = false;
+			for (Iterator<JavaPersistentType> contextTypes = contextTypesToRemove.iterator(); contextTypes.hasNext(); ) {
+				JavaPersistentType contextType = contextTypes.next();
+				if (contextType.getResourcePersistentType() == resourceType) {
+					contextTypes.remove();
+					contextTypesToUpdate.add(contextType);
+					match = true;
+					break;
+				}
+			}
+			if ( ! match) {
+				this.addJavaPersistentType(resourceType);
+			}
+		}
+		for (JavaPersistentType contextType : contextTypesToRemove) {
+			this.removeJavaPersistentType(contextType);
+		}
+		// handle adding and removing java persistent types first, update the
+		// remaining java persistent types last; this reduces the churn during "update"
+		for (JavaPersistentType contextType : contextTypesToUpdate) {
+			contextType.update();
+		}
+	}
+
+
+	// ********** validation **********
+
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		if (reporter.isCancelled()) {
+			throw new ValidationCancelledException();
+		}
+		// TODO validate 'javaPersistentTypes'
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
new file mode 100644
index 0000000..a52f96e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOverride;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaAssociationOverride extends AbstractJavaOverride
+	implements JavaAssociationOverride
+{
+
+	protected final JavaAssociationOverrideRelationshipReference relationshipReference;
+
+	public GenericJavaAssociationOverride(JavaAssociationOverrideContainer parent, JavaAssociationOverride.Owner owner) {
+		super(parent, owner);
+		this.relationshipReference = buildRelationshipReference();
+	}
+	
+	public void initializeFrom(AssociationOverride oldAssociationOverride) {
+		this.setName(oldAssociationOverride.getName());
+		this.relationshipReference.initializeFrom(oldAssociationOverride.getRelationshipReference());
+	}
+	
+	protected JavaAssociationOverrideRelationshipReference buildRelationshipReference() {
+		return getJpaFactory().buildJavaAssociationOverrideRelationshipReference(this);
+	}
+	
+	public JavaAssociationOverrideRelationshipReference getRelationshipReference() {
+		return this.relationshipReference;
+	}
+	
+	@Override
+	public JavaAssociationOverride setVirtual(boolean virtual) {
+		return (JavaAssociationOverride) super.setVirtual(virtual);
+	}
+
+	@Override
+	public AssociationOverrideAnnotation getOverrideAnnotation() {
+		return (AssociationOverrideAnnotation) super.getOverrideAnnotation();
+	}
+	
+	@Override
+	public JavaAssociationOverride.Owner getOwner() {
+		return (JavaAssociationOverride.Owner) super.getOwner();
+	}
+
+	@Override
+	protected Iterator<String> candidateNames() {
+		return this.getOwner().allOverridableAttributeNames();
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.relationshipReference.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+	public void initialize(AssociationOverrideAnnotation associationOverride) {
+		super.initialize(associationOverride);
+		this.relationshipReference.initialize(associationOverride);
+	}		
+
+	public void update(AssociationOverrideAnnotation associationOverride) {
+		super.update(associationOverride);
+		this.relationshipReference.update(associationOverride);
+	}
+	
+	
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.relationshipReference.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
new file mode 100644
index 0000000..552a6aa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
@@ -0,0 +1,445 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaAssociationOverrideContainer extends AbstractJavaJpaContextNode
+	implements JavaAssociationOverrideContainer
+{
+	protected JavaResourcePersistentMember javaResourcePersistentMember;
+
+	protected final JavaAssociationOverrideContainer.Owner owner;
+	
+	protected final List<JavaAssociationOverride> specifiedAssociationOverrides;
+
+	protected final List<JavaAssociationOverride> virtualAssociationOverrides;
+	
+	public GenericJavaAssociationOverrideContainer(JavaJpaContextNode parent, JavaAssociationOverrideContainer.Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.specifiedAssociationOverrides = new ArrayList<JavaAssociationOverride>();
+		this.virtualAssociationOverrides = new ArrayList<JavaAssociationOverride>();
+	}
+
+	protected Owner getOwner() {
+		return this.owner;
+	}
+
+	public JavaAssociationOverride getAssociationOverrideNamed(String name) {
+		return (JavaAssociationOverride) getOverrideNamed(name, associationOverrides());
+	}
+
+	public boolean containsAssociationOverride(String name) {
+		return containsOverride(name, associationOverrides());
+	}
+
+	public boolean containsSpecifiedAssociationOverride(String name) {
+		return containsOverride(name, specifiedAssociationOverrides());
+	}
+
+	public boolean containsDefaultAssociationOverride(String name) {
+		return containsOverride(name, virtualAssociationOverrides());
+	}
+
+	protected BaseOverride getOverrideNamed(String name, ListIterator<? extends BaseOverride> overrides) {
+		for (BaseOverride override : CollectionTools.iterable(overrides)) {
+			String overrideName = override.getName();
+			if (overrideName == null && name == null) {
+				return override;
+			}
+			if (overrideName != null && overrideName.equals(name)) {
+				return override;
+			}
+		}
+		return null;
+	}
+
+	protected boolean containsOverride(String name, ListIterator<? extends BaseOverride> overrides) {
+		return getOverrideNamed(name, overrides) != null;
+	}
+
+	protected Iterator<String> allOverridableAssociationNames() {
+		return getOwner().allOverridableNames();
+	}
+	
+	@SuppressWarnings("unchecked")
+	public ListIterator<JavaAssociationOverride> associationOverrides() {
+		return new CompositeListIterator<JavaAssociationOverride>(specifiedAssociationOverrides(), virtualAssociationOverrides());
+	}
+	
+	public int associationOverridesSize() {
+		return this.specifiedAssociationOverridesSize() + this.virtualAssociationOverridesSize();
+	}
+
+	public  ListIterator<JavaAssociationOverride> virtualAssociationOverrides() {
+		return new CloneListIterator<JavaAssociationOverride>(this.virtualAssociationOverrides);
+	}
+	
+	public int virtualAssociationOverridesSize() {
+		return this.virtualAssociationOverrides.size();
+	}
+	
+	public ListIterator<JavaAssociationOverride> specifiedAssociationOverrides() {
+		return new CloneListIterator<JavaAssociationOverride>(this.specifiedAssociationOverrides);
+	}
+	
+	public int specifiedAssociationOverridesSize() {
+		return this.specifiedAssociationOverrides.size();
+	}
+
+	public JavaAssociationOverride addSpecifiedAssociationOverride(int index) {
+		JavaAssociationOverride associationOverride = getJpaFactory().buildJavaAssociationOverride(this, createAssociationOverrideOwner());
+		this.specifiedAssociationOverrides.add(index, associationOverride);
+		AssociationOverrideAnnotation associationOverrideResource = 
+				(AssociationOverrideAnnotation) this.javaResourcePersistentMember.addAnnotation(
+					index, AssociationOverrideAnnotation.ANNOTATION_NAME, 
+					AssociationOverridesAnnotation.ANNOTATION_NAME);
+		associationOverride.initialize(associationOverrideResource);
+		this.fireItemAdded(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, index, associationOverride);
+		return associationOverride;
+	}
+	
+	protected JavaAssociationOverride.Owner createAssociationOverrideOwner() {
+		return new AssociationOverrideOwner();
+	}
+	
+	protected void addSpecifiedAssociationOverride(int index, JavaAssociationOverride associationOverride) {
+		addItemToList(index, associationOverride, this.specifiedAssociationOverrides, SPECIFIED_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	protected void addSpecifiedAssociationOverride(JavaAssociationOverride associationOverride) {
+		this.addSpecifiedAssociationOverride(this.specifiedAssociationOverrides.size(), associationOverride);
+	}
+	
+	protected void removeSpecifiedAssociationOverride_(JavaAssociationOverride associationOverride) {
+		removeItemFromList(associationOverride, this.specifiedAssociationOverrides, SPECIFIED_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	public void moveSpecifiedAssociationOverride(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedAssociationOverrides, targetIndex, sourceIndex);
+		this.javaResourcePersistentMember.moveAnnotation(
+				targetIndex, sourceIndex, AssociationOverridesAnnotation.ANNOTATION_NAME);
+		fireItemMoved(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, targetIndex, sourceIndex);		
+	}
+
+	protected JavaAssociationOverride setAssociationOverrideVirtual(boolean virtual, JavaAssociationOverride associationOverride) {
+		// Add a new attribute override
+		if (virtual) {
+			return setAssociationOverrideVirtual(associationOverride);
+		}
+		return setAssociationOverrideSpecified(associationOverride);
+	}
+	
+	protected JavaAssociationOverride setAssociationOverrideVirtual(JavaAssociationOverride associationOverride) {
+		int index = this.specifiedAssociationOverrides.indexOf(associationOverride);
+		this.specifiedAssociationOverrides.remove(index);
+		String associationOverrideName = associationOverride.getName();
+		//add the virtual attribute override so that I can control the order that change notification is sent.
+		//otherwise when we remove the annotation from java we will get an update and add the attribute override
+		//during the update.  This causes the UI to be flaky, since change notification might not occur in the correct order
+		JavaAssociationOverride virtualAssociationOverride = null;
+		if (associationOverrideName != null) {
+			for (String name : CollectionTools.iterable(allOverridableAssociationNames())) {
+				if (name.equals(associationOverrideName)) {
+					//store the virtualAttributeOverride so we can fire change notification later
+					virtualAssociationOverride = buildVirtualAssociationOverride(name);
+					this.virtualAssociationOverrides.add(virtualAssociationOverride);
+					break;
+				}
+			}
+		}
+
+		this.javaResourcePersistentMember.removeAnnotation(
+				index, AssociationOverrideAnnotation.ANNOTATION_NAME, 
+				AssociationOverridesAnnotation.ANNOTATION_NAME);
+		fireItemRemoved(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, index, associationOverride);
+		
+		if (virtualAssociationOverride != null) {
+			fireItemAdded(VIRTUAL_ASSOCIATION_OVERRIDES_LIST, virtualAssociationOverridesSize() - 1, virtualAssociationOverride);
+		}
+		return virtualAssociationOverride;
+	}
+	
+	protected JavaAssociationOverride setAssociationOverrideSpecified(JavaAssociationOverride oldAssociationOverride) {
+		int index = specifiedAssociationOverridesSize();
+		JavaAssociationOverride newAssociationOverride = getJpaFactory().buildJavaAssociationOverride(this, createAssociationOverrideOwner());
+		this.specifiedAssociationOverrides.add(index, newAssociationOverride);
+		
+		AssociationOverrideAnnotation attributeOverrideResource = 
+				(AssociationOverrideAnnotation) this.javaResourcePersistentMember.addAnnotation(
+					index, AssociationOverrideAnnotation.ANNOTATION_NAME, 
+					AssociationOverridesAnnotation.ANNOTATION_NAME);
+		newAssociationOverride.initialize(attributeOverrideResource);
+		
+		int virtualIndex = this.virtualAssociationOverrides.indexOf(oldAssociationOverride);
+		this.virtualAssociationOverrides.remove(virtualIndex);
+
+		newAssociationOverride.initializeFrom(oldAssociationOverride);
+		
+		this.fireItemRemoved(VIRTUAL_ASSOCIATION_OVERRIDES_LIST, virtualIndex, oldAssociationOverride);
+		this.fireItemAdded(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, index, newAssociationOverride);		
+
+		return newAssociationOverride;
+	}
+	
+	protected void addVirtualAssociationOverride(JavaAssociationOverride associationOverride) {
+		addItemToList(associationOverride, this.virtualAssociationOverrides, VIRTUAL_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	protected void removeVirtualAssociationOverride(JavaAssociationOverride associationOverride) {
+		removeItemFromList(associationOverride, this.virtualAssociationOverrides, VIRTUAL_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+
+	
+	public void initialize(JavaResourcePersistentMember resourcePersistentMember) {
+		this.javaResourcePersistentMember = resourcePersistentMember;
+		this.initializeSpecifiedAssociationOverrides();
+		this.initializeVirtualAssociationOverrides();
+	}	
+	
+	protected void initializeSpecifiedAssociationOverrides() {
+		for (Iterator<NestableAnnotation> stream = this.relavantResourceAssociationOverrides(); stream.hasNext(); ) {
+			this.specifiedAssociationOverrides.add(
+				buildAssociationOverride((AssociationOverrideAnnotation) stream.next()));
+		}
+	}
+	
+	protected void initializeVirtualAssociationOverrides() {
+		for (String name : CollectionTools.iterable(allOverridableAssociationNames())) {
+			JavaAssociationOverride associationOverride = getAssociationOverrideNamed(name);
+			if (associationOverride == null) {
+				this.virtualAssociationOverrides.add(buildVirtualAssociationOverride(name));
+			}
+		}
+	}
+	
+	public void update(JavaResourcePersistentMember resourcePersistentMember) {
+		this.javaResourcePersistentMember = resourcePersistentMember;
+		this.updateSpecifiedAssociationOverrides();
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		
+		//In postUpdate because the joiningStrategy is not initialized on relationship mappings.
+		//if we fix the issue that we do not initialize java mappings, but they instead get initialized
+		//during the first update, then we can probably move this.
+		updateVirtualAssociationOverrides(); 
+	}
+	
+
+	protected void updateSpecifiedAssociationOverrides() {
+		ListIterator<JavaAssociationOverride> associationOverrides = specifiedAssociationOverrides();
+		Iterator<NestableAnnotation> resourceAssociationOverrides = this.relavantResourceAssociationOverrides();
+		
+		while (associationOverrides.hasNext()) {
+			JavaAssociationOverride associationOverride = associationOverrides.next();
+			if (resourceAssociationOverrides.hasNext()) {
+				associationOverride.update((AssociationOverrideAnnotation) resourceAssociationOverrides.next());
+			}
+			else {
+				removeSpecifiedAssociationOverride_(associationOverride);
+			}
+		}
+		
+		while (resourceAssociationOverrides.hasNext()) {
+			addSpecifiedAssociationOverride(buildAssociationOverride((AssociationOverrideAnnotation) resourceAssociationOverrides.next()));
+		}	
+	}
+	protected Iterator<NestableAnnotation> relavantResourceAssociationOverrides() {
+		Iterator<NestableAnnotation> resourceAssociationOverrides = 
+			this.javaResourcePersistentMember.annotations(
+				AssociationOverrideAnnotation.ANNOTATION_NAME, 
+				AssociationOverridesAnnotation.ANNOTATION_NAME);
+
+		return new FilteringIterator<NestableAnnotation>(resourceAssociationOverrides) {
+			@Override
+			protected boolean accept(NestableAnnotation o) {
+				String overrideName = ((AssociationOverrideAnnotation) o).getName();
+				return overrideName != null && getOwner().isRelevant(overrideName);
+			}
+		};
+	}
+
+	
+	protected JavaAssociationOverride buildAssociationOverride(AssociationOverrideAnnotation associationOverrideResource) {
+		JavaAssociationOverride associationOverride = getJpaFactory().buildJavaAssociationOverride(this, createAssociationOverrideOwner());
+		associationOverride.initialize(associationOverrideResource);
+		return associationOverride;
+	}
+	
+	protected JavaAssociationOverride buildVirtualAssociationOverride(String name) {
+		return buildAssociationOverride(buildVirtualAssociationOverrideAnnotation(name));
+	}
+	
+	protected AssociationOverrideAnnotation buildVirtualAssociationOverrideAnnotation(String name) {
+		RelationshipReference relationshipReference = this.resolveAssociationOverrideRelationshipReference(name);
+		return getJpaFactory().buildJavaVirtualAssociationOverrideAnnotation(this.javaResourcePersistentMember, name, relationshipReference.getPredominantJoiningStrategy());
+	}
+	
+	private RelationshipReference resolveAssociationOverrideRelationshipReference(String associationOverrideName) {
+		return getOwner().resolveRelationshipReference(associationOverrideName);
+	}
+
+	protected void updateVirtualAssociationOverrides() {
+		for (String name : CollectionTools.iterable(allOverridableAssociationNames())) {
+			JavaAssociationOverride associationOverride = getAssociationOverrideNamed(name);
+			if (associationOverride == null) {
+				addVirtualAssociationOverride(buildVirtualAssociationOverride(name));
+			}
+			else if (associationOverride.isVirtual()) {
+				associationOverride.update(buildVirtualAssociationOverrideAnnotation(name));
+			}
+		}
+		
+		Collection<String> associationNames = CollectionTools.collection(allOverridableAssociationNames());
+	
+		//remove any default mappings that are not included in the associationNames collection
+		for (JavaAssociationOverride associationOverride : CollectionTools.iterable(virtualAssociationOverrides())) {
+			if (!associationNames.contains(associationOverride.getName())
+				|| containsSpecifiedAssociationOverride(associationOverride.getName())) {
+				removeVirtualAssociationOverride(associationOverride);
+			}
+		}
+	}
+	
+	
+	//******************** Code Completion *************************
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaAssociationOverride override : CollectionTools.iterable(this.associationOverrides())) {
+			result = override.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+	
+	//********** Validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		
+		for (Iterator<JavaAssociationOverride> stream = this.associationOverrides(); stream.hasNext();) {
+			stream.next().validate(messages, reporter, astRoot);
+		}
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return getOwner().getValidationTextRange(astRoot);
+	}
+
+	
+	// ********** association override owner **********
+
+	protected class AssociationOverrideOwner implements JavaAssociationOverride.Owner {
+
+		public RelationshipMapping getRelationshipMapping(String attributeName) {
+			return MappingTools.getRelationshipMapping(attributeName, getOwner().getOverridableTypeMapping());
+		}
+
+		public boolean isVirtual(BaseOverride override) {
+			return GenericJavaAssociationOverrideContainer.this.virtualAssociationOverrides.contains(override);
+		}
+		
+		public BaseOverride setVirtual(boolean virtual, BaseOverride attributeOverride) {
+			return GenericJavaAssociationOverrideContainer.this.setAssociationOverrideVirtual(virtual, (JavaAssociationOverride) attributeOverride);
+		}
+
+		public TypeMapping getTypeMapping() {
+			return getOwner().getTypeMapping();
+		}
+
+		public Iterator<String> allOverridableAttributeNames() {
+			return GenericJavaAssociationOverrideContainer.this.allOverridableAssociationNames();
+		}
+
+		public String getPossiblePrefix() {
+			return getOwner().getPossiblePrefix();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return getOwner().tableNameIsInvalid(tableName);
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return getOwner().candidateTableNames();
+		}
+
+		public String getDefaultTableName() {
+			return getOwner().getDefaultTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getOwner().getDbTable(tableName);
+		}
+
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			return getOwner().buildColumnTableNotValidMessage(override, column, textRange);
+		}
+
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			return getOwner().buildColumnUnresolvedNameMessage(override, column, textRange);
+		}
+
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			return getOwner().buildColumnUnresolvedReferencedColumnNameMessage(override, column, textRange);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			return getOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(override, column, textRange);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			return getOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override, column, textRange);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..9c18c1e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAssociationOverrideRelationshipReference.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaAssociationOverrideRelationshipReference;
+
+public class GenericJavaAssociationOverrideRelationshipReference extends AbstractJavaAssociationOverrideRelationshipReference
+{
+
+	public GenericJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent) {
+		super(parent);
+	}
+	
+	public void initializeFrom(AssociationOverrideRelationshipReference oldAssociationOverride) {
+		if (oldAssociationOverride.getJoinColumnJoiningStrategy().hasSpecifiedJoinColumns()) {
+			getJoinColumnJoiningStrategy().initializeFrom(oldAssociationOverride.getJoinColumnJoiningStrategy());
+		}
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
new file mode 100644
index 0000000..9ccff4b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
@@ -0,0 +1,254 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOverride;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.AttributeOverride2_0;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaAttributeOverride
+	extends AbstractJavaOverride
+	implements AttributeOverride2_0, JavaAttributeOverride
+{
+	protected final JavaColumn column;
+	
+	/* 2.0 feature - a relationship may map this attribute override */
+	protected boolean mappedByRelationship;
+	
+	
+	public GenericJavaAttributeOverride(
+			JavaAttributeOverrideContainer parent,
+			JavaAttributeOverride.Owner owner) {
+		
+		super(parent, owner);
+		this.column = getJpaFactory().buildJavaColumn(this, this);
+	}
+	
+	
+	@Override
+	public JavaAttributeOverride setVirtual(boolean virtual) {
+		return (JavaAttributeOverride) super.setVirtual(virtual);
+	}
+	
+	@Override
+	public AttributeOverrideAnnotation getOverrideAnnotation() {
+		return (AttributeOverrideAnnotation) super.getOverrideAnnotation();
+	}
+	
+	@Override
+	public JavaAttributeOverride.Owner getOwner() {
+		return (JavaAttributeOverride.Owner) super.getOwner();
+	}
+	
+	public ColumnAnnotation getResourceColumn() {
+		return this.getOverrideAnnotation().getNonNullColumn();
+	}
+	
+	public ColumnAnnotation getResourceColumnOrNull() {
+		return this.getOverrideAnnotation().getColumn();
+	}
+	
+	protected boolean isColumnSpecified() {
+		return getResourceColumn() != null;
+	}
+	
+	
+	//************* NamedColumn.Owner implementation **************
+	
+	public TypeMapping getTypeMapping() {
+		return this.getOwner().getTypeMapping();
+	}
+	
+	public Table getDbTable(String tableName) {
+		return this.getOwner().getDbTable(tableName);
+	}
+	
+	public String getDefaultColumnName() {
+		Column column = resolveOverriddenColumn();
+		if (column == null) {
+			return getName();
+		}
+		return column.getName();
+	}
+	
+	
+	//************* BaseColumn.Owner implementation **************
+	
+	public String getDefaultTableName() {
+		Column column = resolveOverriddenColumn();
+		if (column != null) {
+			String tableName = column.getSpecifiedTable();
+			if (tableName != null) {
+				return tableName;
+			}
+		}
+		return getOwner().getDefaultTableName();
+	}
+	
+	protected Column resolveOverriddenColumn() {
+		return isVirtual() ? getOwner().resolveOverriddenColumn(getName()) : null;
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getOwner().tableNameIsInvalid(tableName);
+	}
+	
+	public Iterator<String> candidateTableNames() {
+		return getOwner().candidateTableNames();
+	}
+	
+	
+	//************* AttributeOverride implementation **************
+	
+	public JavaColumn getColumn() {
+		return this.column;
+	}
+	
+	
+	//************* JavaOverride implementation **************
+	
+	@Override
+	protected Iterator<String> candidateNames() {
+		return this.getOwner().allOverridableAttributeNames();
+	}
+	
+	
+	// **************** AttributeOverride2_0 impl *****************************
+	
+	public boolean isMappedByRelationship() {
+		return this.mappedByRelationship;
+	}
+	
+	protected void setMappedByRelationship(boolean newValue) {
+		boolean oldValue = this.mappedByRelationship;
+		this.mappedByRelationship = newValue;
+		firePropertyChanged(MAPPED_BY_RELATIONSHIP_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean calculateMappedByRelationship() {
+		for (SingleRelationshipMapping2_0 each : getMapsIdRelationships()) {
+			if (getName() == null) {
+				return false;
+			}
+			
+			// overrideable names are (usually?) qualified with a container mapping, 
+			// which may also be the one mapped by a relationship
+			String qualifier = 
+					(getName().indexOf('.') > 0) ?
+						getName().substring(0, getName().indexOf('.'))
+						: getName();
+			return qualifier.equals(each.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue());
+		}
+		return false;
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	//************* java resource model -> java context model **************	
+	
+	public void initialize(AttributeOverrideAnnotation attributeOverrideResource) {
+		super.initialize(attributeOverrideResource);
+		this.column.initialize(this.getResourceColumn());
+		this.mappedByRelationship = calculateMappedByRelationship();
+	}
+	
+	public void update(AttributeOverrideAnnotation attributeOverrideResource) {
+		super.update(attributeOverrideResource);
+		this.column.update(this.getResourceColumn());
+		setMappedByRelationship(calculateMappedByRelationship());
+	}
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+	
+	
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		
+		// [JPA 2.0] if the column is specified, or if the override is not mapped by a relationship,
+		// then the column is validated.
+		// (In JPA 1.0, the column will always be validated, since the override is never mapped by a
+		//  relationship)
+		if (isColumnSpecified() || ! isMappedByRelationship()) {
+			getColumn().validate(messages, reporter, astRoot);
+		}
+		
+		// [JPA 2.0] if the override is mapped by a relationship, then that actually is in itself
+		// a validation error
+		// (We prevent implied overrides that are mapped by a relationship ... hopefully)
+		// (In JPA 1.0, this will never occur)
+		if (isMappedByRelationship()) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ATTRIBUTE_OVERRIDE_MAPPED_BY_RELATIONSHIP_AND_SPECIFIED,
+						new String[] {},
+						this,
+						getValidationTextRange(astRoot)));
+		}
+	}
+	
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return getOwner().buildColumnUnresolvedNameMessage(this, column, textRange);
+	}
+	
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return getOwner().buildColumnTableNotValidMessage(this, column, textRange);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java
new file mode 100644
index 0000000..027151e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaAttributeOverrideContainer.java
@@ -0,0 +1,451 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.VirtualAttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.AttributeOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaAttributeOverrideContainer extends AbstractJavaJpaContextNode
+	implements JavaAttributeOverrideContainer
+{
+	protected JavaResourcePersistentMember javaResourcePersistentMember;
+
+	protected final List<JavaAttributeOverride> specifiedAttributeOverrides;
+
+	protected final List<JavaAttributeOverride> virtualAttributeOverrides;
+	
+	protected final Owner owner;
+	
+	public GenericJavaAttributeOverrideContainer(JavaJpaContextNode parent, Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.specifiedAttributeOverrides = new ArrayList<JavaAttributeOverride>();
+		this.virtualAttributeOverrides = new ArrayList<JavaAttributeOverride>();
+	}
+
+	protected Owner getOwner() {
+		return this.owner;
+	}
+	
+	@SuppressWarnings("unchecked")
+	public ListIterator<JavaAttributeOverride> attributeOverrides() {
+		return new CompositeListIterator<JavaAttributeOverride>(specifiedAttributeOverrides(), virtualAttributeOverrides());
+	}
+	
+	public int attributeOverridesSize() {
+		return this.specifiedAttributeOverridesSize() + this.virtualAttributeOverridesSize();
+	}
+	
+	public ListIterator<JavaAttributeOverride> virtualAttributeOverrides() {
+		return new CloneListIterator<JavaAttributeOverride>(this.virtualAttributeOverrides);
+	}
+	
+	public int virtualAttributeOverridesSize() {
+		return this.virtualAttributeOverrides.size();
+	}
+	
+	public ListIterator<JavaAttributeOverride> specifiedAttributeOverrides() {
+		return new CloneListIterator<JavaAttributeOverride>(this.specifiedAttributeOverrides);
+	}
+	
+	public int specifiedAttributeOverridesSize() {
+		return this.specifiedAttributeOverrides.size();
+	}
+
+	protected JavaAttributeOverride addSpecifiedAttributeOverride(int index) {
+		JavaAttributeOverride attributeOverride = getJpaFactory().buildJavaAttributeOverride(this, createAttributeOverrideOwner());
+		this.specifiedAttributeOverrides.add(index, attributeOverride);
+		AttributeOverrideAnnotation attributeOverrideResource = 
+				(AttributeOverrideAnnotation) this.javaResourcePersistentMember.addAnnotation(
+					index, AttributeOverrideAnnotation.ANNOTATION_NAME, 
+					AttributeOverridesAnnotation.ANNOTATION_NAME);
+		attributeOverride.initialize(attributeOverrideResource);
+		this.fireItemAdded(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, index, attributeOverride);
+		return attributeOverride;
+	}
+	
+	protected JavaAttributeOverride setAttributeOverrideVirtual(boolean virtual, JavaAttributeOverride attributeOverride) {
+		// Add a new attribute override
+		if (virtual) {
+			return setAttributeOverrideVirtual(attributeOverride);
+		}
+		return setAttributeOverrideSpecified(attributeOverride);
+	}
+	
+	protected JavaAttributeOverride setAttributeOverrideVirtual(JavaAttributeOverride specifiedAttributeOverride) {
+		int index = this.specifiedAttributeOverrides.indexOf(specifiedAttributeOverride);
+		this.specifiedAttributeOverrides.remove(index);
+		String attributeOverrideName = specifiedAttributeOverride.getName();
+		//add the virtual attribute override so that I can control the order that change notification is sent.
+		//otherwise when we remove the annotation from java we will get an update and add the attribute override
+		//during the update.  This causes the UI to be flaky, since change notification might not occur in the correct order
+		JavaAttributeOverride virtualAttributeOverride = null;
+		if (attributeOverrideName != null) {
+			for (String name : CollectionTools.iterable(allOverridableAttributeNames())) {
+				if (name.equals(attributeOverrideName)) {
+					//store the virtualAttributeOverride so we can fire change notification later
+					virtualAttributeOverride = buildVirtualAttributeOverride(name);
+					this.virtualAttributeOverrides.add(virtualAttributeOverride);
+					break;
+				}
+			}
+		}
+
+		this.javaResourcePersistentMember.removeAnnotation(
+				this.resourceIndexOf(specifiedAttributeOverride),
+				AttributeOverrideAnnotation.ANNOTATION_NAME, 
+				AttributeOverridesAnnotation.ANNOTATION_NAME);
+		fireItemRemoved(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, index, specifiedAttributeOverride);
+		
+		if (virtualAttributeOverride != null) {
+			fireItemAdded(VIRTUAL_ATTRIBUTE_OVERRIDES_LIST, virtualAttributeOverridesSize() - 1, virtualAttributeOverride);
+		}
+		return virtualAttributeOverride;
+	}
+	
+	protected JavaAttributeOverride setAttributeOverrideSpecified(JavaAttributeOverride virtualAttributeOverride) {
+		int index = specifiedAttributeOverridesSize();
+		int resourceIndex = 0;
+		if (specifiedAttributeOverridesSize() > 0) {
+			resourceIndex = this.resourceIndexOf(this.specifiedAttributeOverrides.get(index - 1)) + 1;
+		}
+		JavaAttributeOverride specifiedAttributeOverride = getJpaFactory().buildJavaAttributeOverride(this, createAttributeOverrideOwner());
+		
+		AttributeOverrideAnnotation attributeOverrideResource = 
+				(AttributeOverrideAnnotation) this.javaResourcePersistentMember.addAnnotation(
+					resourceIndex,
+					AttributeOverrideAnnotation.ANNOTATION_NAME, 
+					AttributeOverridesAnnotation.ANNOTATION_NAME);
+		specifiedAttributeOverride.initialize(attributeOverrideResource);
+		
+		int defaultIndex = this.virtualAttributeOverrides.indexOf(virtualAttributeOverride);
+		this.virtualAttributeOverrides.remove(defaultIndex);
+
+		String name = virtualAttributeOverride.getName();
+		String prefix = getOwner().getWritePrefix();
+		if (prefix != null) {
+			name = prefix + name;
+		}
+		this.specifiedAttributeOverrides.add(index, specifiedAttributeOverride);
+		specifiedAttributeOverride.setName(name);
+		specifiedAttributeOverride.getColumn().setSpecifiedName(virtualAttributeOverride.getColumn().getName());
+		
+		this.fireItemRemoved(VIRTUAL_ATTRIBUTE_OVERRIDES_LIST, defaultIndex, virtualAttributeOverride);
+		this.fireItemAdded(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, index, specifiedAttributeOverride);		
+
+		return specifiedAttributeOverride;
+	}
+	
+	protected JavaAttributeOverride.Owner createAttributeOverrideOwner() {
+		return new AttributeOverrideOwner();
+	}
+	
+	protected void addSpecifiedAttributeOverride(int index, JavaAttributeOverride attributeOverride) {
+		addItemToList(index, attributeOverride, this.specifiedAttributeOverrides, SPECIFIED_ATTRIBUTE_OVERRIDES_LIST);
+	}
+	
+	protected void addSpecifiedAttributeOverride(JavaAttributeOverride attributeOverride) {
+		this.addSpecifiedAttributeOverride(this.specifiedAttributeOverrides.size(), attributeOverride);
+	}
+	
+	protected void removeSpecifiedAttributeOverride_(JavaAttributeOverride attributeOverride) {
+		removeItemFromList(attributeOverride, this.specifiedAttributeOverrides, SPECIFIED_ATTRIBUTE_OVERRIDES_LIST);
+	}
+
+	public void moveSpecifiedAttributeOverride(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedAttributeOverrides, targetIndex, sourceIndex);
+		this.javaResourcePersistentMember.moveAnnotation(
+				targetIndex, sourceIndex, AttributeOverridesAnnotation.ANNOTATION_NAME);
+		fireItemMoved(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, targetIndex, sourceIndex);		
+	}
+	
+	protected void addVirtualAttributeOverride(JavaAttributeOverride attributeOverride) {
+		addItemToList(attributeOverride, this.virtualAttributeOverrides, VIRTUAL_ATTRIBUTE_OVERRIDES_LIST);
+	}
+	
+	protected void removeVirtualAttributeOverride(JavaAttributeOverride attributeOverride) {
+		removeItemFromList(attributeOverride, this.virtualAttributeOverrides, VIRTUAL_ATTRIBUTE_OVERRIDES_LIST);
+	}
+
+	public JavaAttributeOverride getAttributeOverrideNamed(String name) {
+		return (JavaAttributeOverride) getOverrideNamed(name, attributeOverrides());
+	}
+
+	public boolean containsAttributeOverride(String name) {
+		return containsOverride(name, attributeOverrides());
+	}
+
+	public boolean containsDefaultAttributeOverride(String name) {
+		return containsOverride(name, virtualAttributeOverrides());
+	}
+
+	public boolean containsSpecifiedAttributeOverride(String name) {
+		return containsOverride(name, specifiedAttributeOverrides());
+	}
+
+	protected BaseOverride getOverrideNamed(String name, ListIterator<? extends BaseOverride> overrides) {
+		for (BaseOverride override : CollectionTools.iterable(overrides)) {
+			String overrideName = override.getName();
+			if (overrideName == null && name == null) {
+				return override;
+			}
+			if (overrideName != null && overrideName.equals(name)) {
+				return override;
+			}
+		}
+		return null;
+	}
+
+	protected boolean containsOverride(String name, ListIterator<? extends BaseOverride> overrides) {
+		return getOverrideNamed(name, overrides) != null;
+	}
+
+	protected Iterator<String> allOverridableAttributeNames() {
+		return getOwner().allOverridableNames();
+	}
+	
+	public void initialize(JavaResourcePersistentMember resourcePersistentMember) {
+		this.javaResourcePersistentMember = resourcePersistentMember;
+		this.initializeSpecifiedAttributeOverrides();
+		this.initializeVirtualAttributeOverrides();
+	}
+	
+	protected void initializeSpecifiedAttributeOverrides() {
+		for (Iterator<NestableAnnotation> stream = this.relavantResourceAttributeOverrides(); stream.hasNext(); ) {
+			this.specifiedAttributeOverrides.add(
+				buildAttributeOverride((AttributeOverrideAnnotation) stream.next()));
+		}
+	}
+	
+	protected void initializeVirtualAttributeOverrides() {
+		for (String name : CollectionTools.iterable(allOverridableAttributeNames())) {
+			JavaAttributeOverride attributeOverride = getAttributeOverrideNamed(name);
+			if (attributeOverride == null) {
+				this.virtualAttributeOverrides.add(buildVirtualAttributeOverride(name));
+			}
+		}
+	}
+	
+	public void update(JavaResourcePersistentMember resourcePersistentMember) {
+		this.javaResourcePersistentMember = resourcePersistentMember;
+		this.updateSpecifiedAttributeOverrides();
+		this.updateVirtualAttributeOverrides();
+	}
+	
+	protected void updateSpecifiedAttributeOverrides() {
+		ListIterator<JavaAttributeOverride> attributeOverrides = specifiedAttributeOverrides();
+		Iterator<NestableAnnotation> resourceAttributeOverrides = this.relavantResourceAttributeOverrides();
+		
+		while (attributeOverrides.hasNext()) {
+			JavaAttributeOverride attributeOverride = attributeOverrides.next();
+			if (resourceAttributeOverrides.hasNext()) {
+				attributeOverride.update((AttributeOverrideAnnotation) resourceAttributeOverrides.next());
+			}
+			else {
+				removeSpecifiedAttributeOverride_(attributeOverride);
+			}
+		}
+		
+		while (resourceAttributeOverrides.hasNext()) {
+			addSpecifiedAttributeOverride(buildAttributeOverride((AttributeOverrideAnnotation) resourceAttributeOverrides.next()));
+		}
+	}
+
+	protected Iterator<NestableAnnotation> relavantResourceAttributeOverrides() {
+		Iterator<NestableAnnotation> resourceAttributeOverrides = 
+			this.javaResourcePersistentMember.annotations(
+				AttributeOverrideAnnotation.ANNOTATION_NAME, 
+				AttributeOverridesAnnotation.ANNOTATION_NAME);
+
+		return new FilteringIterator<NestableAnnotation>(resourceAttributeOverrides) {
+			@Override
+			protected boolean accept(NestableAnnotation o) {
+				String overrideName = ((AttributeOverrideAnnotation) o).getName();
+				return overrideName != null && getOwner().isRelevant(overrideName);
+			}
+		};
+	}
+	
+	protected int resourceIndexOf(JavaAttributeOverride specifiedAttributeOverride) {
+		Iterator<NestableAnnotation> overrideAnnotations = this.javaResourcePersistentMember.annotations(
+			AttributeOverrideAnnotation.ANNOTATION_NAME, 
+			AttributeOverridesAnnotation.ANNOTATION_NAME);
+		
+		return CollectionTools.indexOf(
+				overrideAnnotations,
+				specifiedAttributeOverride.getOverrideAnnotation());
+	}
+
+	protected JavaAttributeOverride buildAttributeOverride(AttributeOverrideAnnotation attributeOverrideResource) {
+		JavaAttributeOverride attributeOverride = getJpaFactory().buildJavaAttributeOverride(this, createAttributeOverrideOwner());
+		attributeOverride.initialize(attributeOverrideResource);
+		return attributeOverride;
+	}
+	
+	protected JavaAttributeOverride buildVirtualAttributeOverride(String attributeOverrideName) {
+		return buildAttributeOverride(buildVirtualAttributeOverrideAnnotation(attributeOverrideName));
+	}
+	
+	protected VirtualAttributeOverrideAnnotation buildVirtualAttributeOverrideAnnotation(String attributeOverrideName) {
+		Column column = resolveOverriddenColumn(attributeOverrideName);
+		return new VirtualAttributeOverrideAnnotation(this.javaResourcePersistentMember, attributeOverrideName, column);
+	}
+
+	private Column resolveOverriddenColumn(String attributeOverrideName) {
+		return getOwner().resolveOverriddenColumn(attributeOverrideName);
+	}
+	
+	protected void updateVirtualAttributeOverrides() {
+		for (String name : CollectionTools.iterable(allOverridableAttributeNames())) {
+			JavaAttributeOverride attributeOverride = getAttributeOverrideNamed(name);
+			if (attributeOverride == null) {
+				addVirtualAttributeOverride(buildVirtualAttributeOverride(name));
+			}
+			else if (attributeOverride.isVirtual()) {
+				attributeOverride.update(buildVirtualAttributeOverrideAnnotation(name));
+			}
+		}
+		
+		Collection<String> attributeNames = CollectionTools.collection(allOverridableAttributeNames());
+	
+		//remove any default mappings that are not included in the attributeNames collection
+		for (JavaAttributeOverride attributeOverride : CollectionTools.iterable(virtualAttributeOverrides())) {
+			if (!attributeNames.contains(attributeOverride.getName())
+				|| containsSpecifiedAttributeOverride(attributeOverride.getName())) {
+				removeVirtualAttributeOverride(attributeOverride);
+			}
+		}
+	}
+	
+	
+	//******************** Code Completion *************************
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaAttributeOverride override : CollectionTools.iterable(this.attributeOverrides())) {
+			result = override.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+	
+	//********** Validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		for (Iterator<JavaAttributeOverride> stream = this.attributeOverrides(); stream.hasNext();) {
+			stream.next().validate(messages, reporter, astRoot);
+		}
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		Annotation annotation = 
+				this.javaResourcePersistentMember.getAnnotation(AttributeOverridesAnnotation.ANNOTATION_NAME);
+		if (annotation == null) {
+			annotation = this.javaResourcePersistentMember.getAnnotation(AttributeOverrideAnnotation.ANNOTATION_NAME);
+		}
+		
+		return (annotation == null) ?
+				getOwner().getValidationTextRange(astRoot)
+				: annotation.getTextRange(astRoot);
+	}
+	
+	
+	// ********** attribute override owner **********
+
+	protected class AttributeOverrideOwner implements JavaAttributeOverride.Owner {
+
+		public Column resolveOverriddenColumn(String attributeName) {
+			if (attributeName == null) {
+				return null;
+			}
+			return GenericJavaAttributeOverrideContainer.this.resolveOverriddenColumn(attributeName);			
+		}
+
+		public boolean isVirtual(BaseOverride override) {
+			return GenericJavaAttributeOverrideContainer.this.virtualAttributeOverrides.contains(override);
+		}
+
+		public BaseOverride setVirtual(boolean virtual, BaseOverride attributeOverride) {
+			return GenericJavaAttributeOverrideContainer.this.setAttributeOverrideVirtual(virtual, (JavaAttributeOverride) attributeOverride);
+		}
+
+		public TypeMapping getTypeMapping() {
+			return getOwner().getTypeMapping();
+		}
+
+		public Iterator<String> allOverridableAttributeNames() {
+			return GenericJavaAttributeOverrideContainer.this.allOverridableAttributeNames();
+		}
+
+		public String getPossiblePrefix() {
+			return getOwner().getPossiblePrefix();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return getOwner().tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return getOwner().candidateTableNames();
+		}
+
+		public String getDefaultTableName() {
+			return getOwner().getDefaultTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getOwner().getDbTable(tableName);
+		}
+
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			return getOwner().buildColumnTableNotValidMessage(override, column, textRange);
+		}
+
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			return getOwner().buildColumnUnresolvedNameMessage(override, column, textRange);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaBasicMapping.java
new file mode 100644
index 0000000..9d6fa7b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaBasicMapping.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaBasicMapping;
+
+
+public class GenericJavaBasicMapping extends AbstractJavaBasicMapping
+{
+	public GenericJavaBasicMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaCascade.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaCascade.java
new file mode 100644
index 0000000..a9407bb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaCascade.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Cascade;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.Cascade2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCascade2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaCascade
+	extends AbstractJavaJpaContextNode
+	implements JavaCascade2_0
+{
+	protected boolean all;
+	
+	protected boolean persist;
+	
+	protected boolean merge;
+	
+	protected boolean remove;
+	
+	protected boolean refresh;
+	
+	/* JPA 2.0 */
+	protected boolean detach;
+	
+	
+	public GenericJavaCascade(JavaRelationshipMapping2_0 parent) {
+		super(parent);
+	}
+	
+	
+	protected JavaRelationshipMapping2_0 getMapping() {
+		return (JavaRelationshipMapping2_0) getParent();
+	}
+	
+	protected RelationshipMapping2_0Annotation getAnnotation() {
+		return getMapping().getMappingAnnotation();
+	}
+	
+	public boolean isAll() {
+		return this.all;
+	}
+
+	public void setAll(boolean newAll) {
+		boolean oldAll = this.all;
+		this.all = newAll;
+		getAnnotation().setCascadeAll(newAll);
+		firePropertyChanged(Cascade.ALL_PROPERTY, oldAll, newAll);
+	}
+	
+	protected void setAll_(boolean newAll) {
+		boolean oldAll = this.all;
+		this.all = newAll;
+		firePropertyChanged(Cascade.ALL_PROPERTY, oldAll, newAll);
+	}
+	
+	public boolean isPersist() {
+		return this.persist;
+	}
+	
+	public void setPersist(boolean newPersist) {
+		boolean oldPersist = this.persist;
+		this.persist = newPersist;
+		getAnnotation().setCascadePersist(newPersist);
+		firePropertyChanged(Cascade.PERSIST_PROPERTY, oldPersist, newPersist);
+	}
+	
+	protected void setPersist_(boolean newPersist) {
+		boolean oldPersist = this.persist;
+		this.persist = newPersist;
+		firePropertyChanged(Cascade.PERSIST_PROPERTY, oldPersist, newPersist);
+	}
+	
+	public boolean isMerge() {
+		return this.merge;
+	}
+	
+	public void setMerge(boolean newMerge) {
+		boolean oldMerge = this.merge;
+		this.merge = newMerge;
+		getAnnotation().setCascadeMerge(newMerge);
+		firePropertyChanged(Cascade.MERGE_PROPERTY, oldMerge, newMerge);
+	}
+	
+	protected void setMerge_(boolean newMerge) {
+		boolean oldMerge = this.merge;
+		this.merge = newMerge;
+		firePropertyChanged(Cascade.MERGE_PROPERTY, oldMerge, newMerge);
+	}
+	
+	public boolean isRemove() {
+		return this.remove;
+	}
+	
+	public void setRemove(boolean newRemove) {
+		boolean oldRemove = this.remove;
+		this.remove = newRemove;
+		getAnnotation().setCascadeRemove(newRemove);
+		firePropertyChanged(Cascade.REMOVE_PROPERTY, oldRemove, newRemove);
+	}
+	
+	protected void setRemove_(boolean newRemove) {
+		boolean oldRemove = this.remove;
+		this.remove = newRemove;
+		firePropertyChanged(Cascade.REMOVE_PROPERTY, oldRemove, newRemove);
+	}
+	
+	public boolean isRefresh() {
+		return this.refresh;
+	}
+	
+	public void setRefresh(boolean newRefresh) {
+		boolean oldRefresh = this.refresh;
+		this.refresh = newRefresh;
+		getAnnotation().setCascadeRefresh(newRefresh);
+		firePropertyChanged(Cascade.REFRESH_PROPERTY, oldRefresh, newRefresh);
+	}
+	
+	protected void setRefresh_(boolean newRefresh) {
+		boolean oldRefresh = this.refresh;
+		this.refresh = newRefresh;
+		firePropertyChanged(Cascade.REFRESH_PROPERTY, oldRefresh, newRefresh);
+	}
+	
+	public boolean isDetach() {
+		return this.detach;
+	}
+	
+	public void setDetach(boolean newDetach) {
+		boolean oldDetach = this.detach;
+		this.detach = newDetach;
+		getAnnotation().setCascadeDetach(newDetach);
+		firePropertyChanged(Cascade2_0.DETACH_PROPERTY, oldDetach, newDetach);
+	}
+	
+	protected void setDetach_(boolean newDetach) {
+		boolean oldDetach = this.detach;
+		this.detach = newDetach;
+		firePropertyChanged(Cascade2_0.DETACH_PROPERTY, oldDetach, newDetach);
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return getAnnotation().getCascadeTextRange(astRoot);
+	}
+	
+	public void initialize() {
+		this.all = getAnnotation().isCascadeAll();
+		this.persist = getAnnotation().isCascadePersist();
+		this.merge = getAnnotation().isCascadeMerge();
+		this.remove = getAnnotation().isCascadeRemove();
+		this.refresh = getAnnotation().isCascadeRefresh();
+		this.detach = getAnnotation().isCascadeDetach();
+	}
+	
+	public void update() {
+		this.setAll_(getAnnotation().isCascadeAll());
+		this.setPersist_(getAnnotation().isCascadePersist());
+		this.setMerge_(getAnnotation().isCascadeMerge());
+		this.setRemove_(getAnnotation().isCascadeRemove());
+		this.setRefresh_(getAnnotation().isCascadeRefresh());
+		this.setDetach_(getAnnotation().isCascadeDetach());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaColumn.java
new file mode 100644
index 0000000..170a03c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaColumn.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaBaseColumn;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+
+public class GenericJavaColumn extends AbstractJavaBaseColumn<ColumnAnnotation> implements JavaColumn
+{
+
+	protected Integer specifiedLength;
+
+	protected Integer specifiedPrecision;
+
+	protected Integer specifiedScale;
+	
+	public GenericJavaColumn(JavaJpaContextNode parent, JavaBaseColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	@Override
+	public void initialize(ColumnAnnotation column) {
+		super.initialize(column);
+		this.specifiedLength = this.getResourceLength();
+		this.specifiedPrecision = this.getResourcePrecision();
+		this.specifiedScale = this.getResourceScale();
+	}
+	
+	@Override
+	public void update(ColumnAnnotation column) {
+		super.update(column);
+		this.setSpecifiedLength_(this.getResourceLength());
+		this.setSpecifiedPrecision_(this.getResourcePrecision());
+		this.setSpecifiedScale_(this.getResourceScale());
+	}
+	
+	public int getLength() {
+		return (this.getSpecifiedLength() == null) ? getDefaultLength() : this.getSpecifiedLength().intValue();
+	}
+
+	public int getDefaultLength() {
+		return Column.DEFAULT_LENGTH;
+	}
+	
+	public Integer getSpecifiedLength() {
+		return this.specifiedLength;
+	}
+
+	public void setSpecifiedLength(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		getResourceColumn().setLength(newSpecifiedLength);
+		firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+	
+	protected void setSpecifiedLength_(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+	
+	protected Integer getResourceLength() {
+		return getResourceColumn().getLength();
+	}
+
+	public int getPrecision() {
+		return (this.getSpecifiedPrecision() == null) ? getDefaultPrecision() : this.getSpecifiedPrecision().intValue();
+	}
+
+	public int getDefaultPrecision() {
+		return Column.DEFAULT_PRECISION;
+	}
+	
+	public Integer getSpecifiedPrecision() {
+		return this.specifiedPrecision;
+	}
+
+	public void setSpecifiedPrecision(Integer newSpecifiedPrecision) {
+		Integer oldSpecifiedPrecision = this.specifiedPrecision;
+		this.specifiedPrecision = newSpecifiedPrecision;
+		getResourceColumn().setPrecision(newSpecifiedPrecision);
+		firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, oldSpecifiedPrecision, newSpecifiedPrecision);
+	}
+	
+	protected void setSpecifiedPrecision_(Integer newSpecifiedPrecision) {
+		Integer oldSpecifiedPrecision = this.specifiedPrecision;
+		this.specifiedPrecision = newSpecifiedPrecision;
+		firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, oldSpecifiedPrecision, newSpecifiedPrecision);
+	}
+	
+	protected Integer getResourcePrecision() {
+		return getResourceColumn().getPrecision();
+	}
+
+	public int getScale() {
+		return (this.getSpecifiedScale() == null) ? getDefaultScale() : this.getSpecifiedScale().intValue();
+	}
+
+	public int getDefaultScale() {
+		return Column.DEFAULT_SCALE;
+	}
+	
+	public Integer getSpecifiedScale() {
+		return this.specifiedScale;
+	}
+
+	public void setSpecifiedScale(Integer newSpecifiedScale) {
+		Integer oldSpecifiedScale = this.specifiedScale;
+		this.specifiedScale = newSpecifiedScale;
+		getResourceColumn().setScale(newSpecifiedScale);
+		firePropertyChanged(SPECIFIED_SCALE_PROPERTY, oldSpecifiedScale, newSpecifiedScale);
+	}
+	
+	protected void setSpecifiedScale_(Integer newSpecifiedScale) {
+		Integer oldSpecifiedScale = this.specifiedScale;
+		this.specifiedScale = newSpecifiedScale;
+		firePropertyChanged(SPECIFIED_SCALE_PROPERTY, oldSpecifiedScale, newSpecifiedScale);
+	}
+	
+	protected Integer getResourceScale() {
+		return getResourceColumn().getScale();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
new file mode 100644
index 0000000..479a3fd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.core.context.DiscriminatorType;
+import org.eclipse.jpt.core.context.java.JavaDiscriminatorColumn;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaNamedColumn;
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+
+public class GenericJavaDiscriminatorColumn extends AbstractJavaNamedColumn<DiscriminatorColumnAnnotation>
+	implements JavaDiscriminatorColumn
+{
+
+	protected DiscriminatorType specifiedDiscriminatorType;
+
+	protected DiscriminatorType defaultDiscriminatorType;
+	
+	protected Integer specifiedLength;
+	
+	protected int defaultLength;
+	
+	public GenericJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	@Override
+	public void initialize(DiscriminatorColumnAnnotation column) {
+		super.initialize(column);
+		this.defaultDiscriminatorType = this.buildDefaultDiscriminatorType();
+		this.defaultLength = this.buildDefaultLength();
+		this.specifiedDiscriminatorType = this.getResourceDiscriminatorType();
+		this.specifiedLength = this.getResourceLength();
+	}
+	
+	@Override
+	public JavaDiscriminatorColumn.Owner getOwner() {
+		return (JavaDiscriminatorColumn.Owner) super.getOwner();
+	}
+	
+	public boolean isResourceSpecified() {
+		return getResourceColumn().isSpecified();
+	}
+	
+	public DiscriminatorType getDiscriminatorType() {
+		return (this.getSpecifiedDiscriminatorType() == null) ? this.getDefaultDiscriminatorType() : this.getSpecifiedDiscriminatorType();
+	}
+
+	public DiscriminatorType getDefaultDiscriminatorType() {
+		return this.defaultDiscriminatorType;
+	}
+	
+	protected void setDefaultDiscriminatorType(DiscriminatorType discriminatorType) {
+		DiscriminatorType old = this.defaultDiscriminatorType;
+		this.defaultDiscriminatorType = discriminatorType;
+		firePropertyChanged(DEFAULT_DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
+	}
+		
+	public DiscriminatorType getSpecifiedDiscriminatorType() {
+		return this.specifiedDiscriminatorType;
+	}
+	
+	public void setSpecifiedDiscriminatorType(DiscriminatorType newSpecifiedDiscriminatorType) {
+		DiscriminatorType oldDiscriminatorType = this.specifiedDiscriminatorType;
+		this.specifiedDiscriminatorType = newSpecifiedDiscriminatorType;
+		getResourceColumn().setDiscriminatorType(DiscriminatorType.toJavaResourceModel(newSpecifiedDiscriminatorType));
+		firePropertyChanged(DiscriminatorColumn.SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, oldDiscriminatorType, newSpecifiedDiscriminatorType);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedDiscriminatorType_(DiscriminatorType newSpecifiedDiscriminatorType) {
+		DiscriminatorType oldDiscriminatorType = this.specifiedDiscriminatorType;
+		this.specifiedDiscriminatorType = newSpecifiedDiscriminatorType;
+		firePropertyChanged(DiscriminatorColumn.SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, oldDiscriminatorType, newSpecifiedDiscriminatorType);
+	}
+		
+	public int getLength() {
+		return (this.getSpecifiedLength() == null) ? this.getDefaultLength() : this.getSpecifiedLength().intValue();
+	}
+
+	public int getDefaultLength() {
+		return this.defaultLength;
+	}
+	
+	protected void setDefaultLength(int defaultLength) {
+		int old = this.defaultLength;
+		this.defaultLength = defaultLength;
+		firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, defaultLength);
+	}
+	
+	public Integer getSpecifiedLength() {
+		return this.specifiedLength;
+	}
+
+	public void setSpecifiedLength(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		getResourceColumn().setLength(newSpecifiedLength);
+		firePropertyChanged(DiscriminatorColumn.SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedLength_(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		firePropertyChanged(DiscriminatorColumn.SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+
+	
+	// ********** java annotations -> persistence model **********
+	
+	@Override
+	public void update(DiscriminatorColumnAnnotation discriminatorColumn) {
+		//don't call super because postUpdate() handles updating the default column name
+		this.resourceColumn = discriminatorColumn;
+		this.setSpecifiedName_(discriminatorColumn.getName());
+		this.setColumnDefinition_(discriminatorColumn.getColumnDefinition());
+		this.setSpecifiedDiscriminatorType_(this.getResourceDiscriminatorType());
+		this.setSpecifiedLength_(this.getResourceLength());
+	}
+	
+	@Override
+	/**
+	 * Using postUpdate since these defaults are dependent on the entity hierarchy
+	 */
+	public void postUpdate() {
+		super.postUpdate();
+		this.setDefaultName(this.buildDefaultName());
+		this.setDefaultDiscriminatorType(this.buildDefaultDiscriminatorType());
+		this.setDefaultLength(this.buildDefaultLength());
+	}
+	
+	protected DiscriminatorType getResourceDiscriminatorType() {
+		return DiscriminatorType.fromJavaResourceModel(getResourceColumn().getDiscriminatorType());
+	}
+	
+	protected Integer getResourceLength() {
+		return getResourceColumn().getLength();
+	}
+	
+	@Override
+	public JavaEntity getParent() {
+		return (JavaEntity) super.getParent();
+	}
+	
+	protected int buildDefaultLength() {
+		return this.getOwner().getDefaultLength();
+	}
+	
+	protected DiscriminatorType buildDefaultDiscriminatorType() {
+		return this.getOwner().getDefaultDiscriminatorType();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddable.java
new file mode 100644
index 0000000..38a2c98
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddable.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaEmbeddable;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+
+public class GenericJavaEmbeddable
+	extends AbstractJavaEmbeddable
+{
+	public GenericJavaEmbeddable(JavaPersistentType parent) {
+		super(parent);
+	}
+	
+	@Override
+	public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
+		//generic only allows basic and transient within an Embeddable
+		return ArrayTools.contains(ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
+	}
+
+	public static final String[] ALLOWED_ATTRIBUTE_MAPPING_KEYS =
+		new String[] {
+			MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY
+		};
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java
new file mode 100644
index 0000000..6b4045d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddedIdMapping.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaBaseEmbeddedMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.EmbeddedIdMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.EmbeddedIdAnnotation;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaEmbeddedIdMapping
+	extends AbstractJavaBaseEmbeddedMapping<EmbeddedIdAnnotation>
+	implements EmbeddedIdMapping2_0, JavaEmbeddedIdMapping
+{
+	/* 2.0 feature - a relationship may map this embedded id */
+	protected boolean mappedByRelationship;
+	
+	
+	public GenericJavaEmbeddedIdMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+	
+	//****************** JavaAttributeMapping implementation *******************
+
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return EmbeddedIdAnnotation.ANNOTATION_NAME;
+	}
+	
+	
+	// **************** EmbeddedId2_0 impl ************************************
+	
+	public boolean isMappedByRelationship() {
+		return this.mappedByRelationship;
+	}
+	
+	protected void setMappedByRelationship(boolean newValue) {
+		boolean oldValue = this.mappedByRelationship;
+		this.mappedByRelationship = newValue;
+		firePropertyChanged(MAPPED_BY_RELATIONSHIP_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean calculateMappedByRelationship() {
+		for (SingleRelationshipMapping2_0 each : getMapsIdRelationships()) {
+			if (getName().equals(each.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue())) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	// **************** overrides *********************************************
+	
+	@Override
+	protected Iterator<String> embeddableOverrideableAttributeMappingNames() {
+		return (isMappedByRelationship()) ?
+			EmptyIterator.<String>instance()
+			: super.embeddableOverrideableAttributeMappingNames();
+	}
+	
+	@Override
+	protected JavaAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
+		return new AttributeOverrideContainerOwner();
+	}
+	
+	
+	protected class AttributeOverrideContainerOwner
+		extends AbstractJavaBaseEmbeddedMapping.AttributeOverrideContainerOwner
+	{
+		@Override
+		public Iterator<String> allOverridableNames() {
+			return (GenericJavaEmbeddedIdMapping.this.isMappedByRelationship()) ?
+					EmptyIterator.<String>instance()
+					: super.allOverridableNames();
+		}
+		
+		@Override
+		protected Iterator<String> allOverridableAttributeNames_(TypeMapping typeMapping) {
+			final Collection<String> mappedByRelationshipAttributes = CollectionTools.collection(
+					new TransformationIterator<SingleRelationshipMapping2_0, String>(getMapsIdRelationships()) {
+						@Override
+						protected String transform(SingleRelationshipMapping2_0 next) {
+							return next.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue();
+						}
+					});
+			return new FilteringIterator<String>(super.allOverridableAttributeNames_(typeMapping)) {
+				@Override
+				protected boolean accept(String o) {
+					if (mappedByRelationshipAttributes.isEmpty()) {
+						return true;
+					}
+					// overrideable names are (usually?) qualified with a container mapping, 
+					// which may also be the one mapped by a relationship
+					String qualifier = 
+							(o.indexOf('.') > 0) ?
+								o.substring(0, o.indexOf('.'))
+								: o;
+					return ! mappedByRelationshipAttributes.contains(qualifier);
+				}
+			};
+		}
+	}
+	
+	
+	// **************** resource -> context ***********************************
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.mappedByRelationship = calculateMappedByRelationship();
+	}
+	
+	
+	@Override
+	protected void update() {
+		super.update();
+		setMappedByRelationship(calculateMappedByRelationship());
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		
+		// [JPA 2.0] if the embedded id is mapped by a relationship, then any specified 
+		// attribute overrides are in error
+		// (in JPA 1.0, this will obviously never be reached)
+		if (isMappedByRelationship()
+				&& getAttributeOverrideContainer().specifiedAttributeOverridesSize() > 0) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
+						new String[] {},
+						getAttributeOverrideContainer(),
+						getAttributeOverrideContainer().getValidationTextRange(astRoot)));
+		}
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java
new file mode 100644
index 0000000..3f4ca58
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEmbeddedMapping.java
@@ -0,0 +1,375 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaBaseEmbeddedMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class GenericJavaEmbeddedMapping
+	extends AbstractJavaBaseEmbeddedMapping<EmbeddedAnnotation>
+	implements JavaEmbeddedMapping2_0
+{
+	protected final JavaAssociationOverrideContainer associationOverrideContainer;
+
+	public GenericJavaEmbeddedMapping(JavaPersistentAttribute parent) {
+		super(parent);
+		this.associationOverrideContainer = this.buildAssociationOverrideContainer();
+	}
+	
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.associationOverrideContainer.initialize(this.getResourcePersistentAttribute());
+	}
+	
+	@Override
+	protected void update() {
+		super.update();
+		this.associationOverrideContainer.update(this.getResourcePersistentAttribute());
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		this.associationOverrideContainer.postUpdate();
+	}
+	
+	//****************** JavaAttributeMapping implementation *******************
+
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return EmbeddedAnnotation.ANNOTATION_NAME;
+	}
+	
+	//only putting this in EmbeddedMapping since relationship mappings
+	//defined within an embedded id class are not supported by the 2.0 spec.
+	//i.e. the mappedBy choices will not include attributes nested in an embedded mapping
+	@Override
+	public Iterator<String> allMappingNames() {
+		return this.isJpa2_0Compatible() ?
+				new CompositeIterator<String>(this.getName(), this.allEmbeddableAttributeMappingNames()) :
+				super.allMappingNames();
+	}
+	
+	protected Iterator<String> allEmbeddableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+			}
+		);
+	}
+
+	@Override
+	public AttributeMapping resolveAttributeMapping(String name) {
+		AttributeMapping resolvedMapping = super.resolveAttributeMapping(name);
+		if (resolvedMapping != null) {
+			return resolvedMapping;
+		}
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = name.indexOf('.');
+			if (dotIndex != -1) {
+				if (getName().equals(name.substring(0, dotIndex))) {
+					for (AttributeMapping attributeMapping : CollectionTools.iterable(embeddableAttributeMappings())) {
+						resolvedMapping = attributeMapping.resolveAttributeMapping(name.substring(dotIndex + 1));
+						if (resolvedMapping != null) {
+							return resolvedMapping;
+						}
+					}
+				}
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = attributeName.indexOf('.');
+			if (dotIndex != -1) {
+				if (getName().equals(attributeName.substring(0, dotIndex))) {
+					attributeName = attributeName.substring(dotIndex + 1);
+					AssociationOverride override = getAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+					if (override != null && !override.isVirtual()) {
+						return override.getRelationshipReference();
+					}
+					if (this.getTargetEmbeddable() == null) {
+						return null;
+					}
+					return this.getTargetEmbeddable().resolveRelationshipReference(attributeName);
+				}
+			}
+		}
+		return null;
+	}
+	
+	//****************** AbstractJavaAttributeMapping implementation *******************
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		if (this.isJpa2_0Compatible()) {
+			names.add(JPA.ASSOCIATION_OVERRIDE);
+			names.add(JPA.ASSOCIATION_OVERRIDES);
+		}
+	}
+	
+	
+	//****************** association overrides - 2.0 supports this *******************
+	
+	protected JavaAssociationOverrideContainer buildAssociationOverrideContainer() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) this.getJpaFactory()).buildJavaAssociationOverrideContainer(this, new AssociationOverrideContainerOwner()) : 
+			new NullJavaAssociationOverrideContainer(this);
+	}
+
+	public JavaAssociationOverrideContainer getAssociationOverrideContainer() {
+		return this.associationOverrideContainer;
+	}
+
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		
+		result = getAssociationOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validateOverrides(messages, reporter, astRoot);
+		this.getAssociationOverrideContainer().validate(messages, reporter, astRoot);
+	}
+
+
+	// ********** association override container owner **********
+
+	protected class AssociationOverrideContainerOwner
+		implements JavaAssociationOverrideContainer.Owner
+	{	
+		public TypeMapping getTypeMapping() {
+			return GenericJavaEmbeddedMapping.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return GenericJavaEmbeddedMapping.this.getOverridableTypeMapping();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAssociationNames();
+		}
+		
+		public RelationshipReference resolveRelationshipReference(String associationOverrideName) {
+			return MappingTools.resolveRelationshipReference(getOverridableTypeMapping(), associationOverrideName);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return getTypeMapping().tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return getTypeMapping().associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return getTypeMapping().getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return getTypeMapping().getPrimaryTableName();
+		}
+		
+		public String getPossiblePrefix() {
+			return null;
+		}
+		
+		public String getWritePrefix() {
+			return null;
+		}
+		
+		//no prefix, so always true
+		public boolean isRelevant(String overrideName) {
+			return true;
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaEmbeddedMapping.this.getValidationTextRange(astRoot);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {overrideName, column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEntity.java
new file mode 100644
index 0000000..fed7a6e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEntity.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaEntity;
+import org.eclipse.jpt.core.internal.jpa2.context.java.NullJavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.CacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+public class GenericJavaEntity
+	extends AbstractJavaEntity
+{
+	
+	protected final JavaCacheable2_0 cacheable;
+
+	public GenericJavaEntity(JavaPersistentType parent) {
+		super(parent);
+		this.cacheable = this.buildCacheable();
+	}
+	
+	@Override
+	public void initialize(JavaResourcePersistentType resourcePersistentType) {
+		super.initialize(resourcePersistentType);
+		this.cacheable.initialize(resourcePersistentType);
+	}
+	
+	@Override
+	public void update(JavaResourcePersistentType resourcePersistentType) {
+		super.update(resourcePersistentType);
+		this.cacheable.update(resourcePersistentType);
+	}
+	
+	//****************** Entity2_0 implementation *******************
+
+	protected JavaCacheable2_0 buildCacheable() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) this.getJpaFactory()).buildJavaCacheable(this) : 
+			new NullJavaCacheable2_0(this);
+	}
+
+	public JavaCacheable2_0 getCacheable() {
+		return this.cacheable;
+	}
+	
+	public boolean calculateDefaultCacheable() {		
+		CacheableHolder2_0 parentEntity = (CacheableHolder2_0) getParentEntity();
+		if (parentEntity != null) {
+			return parentEntity.getCacheable().isCacheable();
+		}
+		return ((PersistenceUnit2_0) getPersistenceUnit()).calculateDefaultCacheable();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEnumeratedConverter.java
new file mode 100644
index 0000000..ee186c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaEnumeratedConverter.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.EnumType;
+import org.eclipse.jpt.core.context.EnumeratedConverter;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaEnumeratedConverter;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaEnumeratedConverter extends AbstractJavaJpaContextNode
+	implements JavaEnumeratedConverter
+{
+	protected EnumType specifiedEnumType;
+	
+	protected JavaResourcePersistentAttribute resourcePersistenceAttribute;
+	
+	public GenericJavaEnumeratedConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa) {
+		super(parent);
+		this.initialize(jrpa);
+	}
+
+	@Override
+	public JavaAttributeMapping getParent() {
+		return (JavaAttributeMapping) super.getParent();
+	}
+
+	public String getType() {
+		return Converter.ENUMERATED_CONVERTER;
+	}
+	
+	protected String getAnnotationName() {
+		return EnumeratedAnnotation.ANNOTATION_NAME;
+	}
+	
+	public void addToResourceModel() {
+		this.resourcePersistenceAttribute.addAnnotation(getAnnotationName());
+	}
+	
+	public void removeFromResourceModel() {
+		this.resourcePersistenceAttribute.removeAnnotation(getAnnotationName());
+	}
+	
+	public EnumType getEnumType() {
+		return getSpecifiedEnumType() == null ? getDefaultEnumType() : getSpecifiedEnumType();
+	}
+	
+	public EnumType getDefaultEnumType() {
+		return EnumeratedConverter.DEFAULT_ENUM_TYPE;
+	}
+	
+	public EnumType getSpecifiedEnumType() {
+		return this.specifiedEnumType;
+	}
+	
+	public void setSpecifiedEnumType(EnumType newSpecifiedEnumType) {
+		EnumType oldSpecifiedEnumType = this.specifiedEnumType;
+		this.specifiedEnumType = newSpecifiedEnumType;
+		this.getResourceEnumerated().setValue(EnumType.toJavaResourceModel(newSpecifiedEnumType));
+		firePropertyChanged(EnumeratedConverter.SPECIFIED_ENUM_TYPE_PROPERTY, oldSpecifiedEnumType, newSpecifiedEnumType);
+	}
+
+	protected void setSpecifiedEnumType_(EnumType newSpecifiedEnumType) {
+		EnumType oldSpecifiedEnumType = this.specifiedEnumType;
+		this.specifiedEnumType = newSpecifiedEnumType;
+		firePropertyChanged(EnumeratedConverter.SPECIFIED_ENUM_TYPE_PROPERTY, oldSpecifiedEnumType, newSpecifiedEnumType);
+	}
+
+	protected EnumeratedAnnotation getResourceEnumerated() {
+		return (EnumeratedAnnotation) this.resourcePersistenceAttribute.
+				getAnnotation(getAnnotationName());
+	}
+	
+	protected void initialize(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistenceAttribute = jrpa;
+		this.specifiedEnumType = this.specifiedEnumType(getResourceEnumerated());
+	}	
+	
+	public void update(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistenceAttribute = jrpa;
+		this.setSpecifiedEnumType_(this.specifiedEnumType(getResourceEnumerated()));
+	}	
+	
+	protected EnumType specifiedEnumType(EnumeratedAnnotation resourceEnumerated) {
+		return resourceEnumerated == null ? null : EnumType.fromJavaResourceModel(resourceEnumerated.getValue());
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getResourceEnumerated().getTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
new file mode 100644
index 0000000..d599391
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.GeneratedValue;
+import org.eclipse.jpt.core.context.GenerationType;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.java.JavaGeneratedValue;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * 
+ */
+public class GenericJavaGeneratedValue
+	extends AbstractJavaJpaContextNode
+	implements JavaGeneratedValue
+{
+	protected GeneratedValueAnnotation resourceGeneratedValue;
+
+	protected GenerationType specifiedStrategy;
+
+	protected String specifiedGenerator;
+
+	// always null?
+	protected String defaultGenerator = null;
+	
+
+	public GenericJavaGeneratedValue(JavaIdMapping parent) {
+		super(parent);
+	}
+
+	public void initialize(GeneratedValueAnnotation generatedValueAnnotation) {
+		this.resourceGeneratedValue = generatedValueAnnotation;
+		this.specifiedStrategy = this.buildSpecifiedStrategy();
+		this.specifiedGenerator = generatedValueAnnotation.getGenerator();
+	}
+
+
+	// ********** strategy **********
+
+	public GenerationType getStrategy() {
+		return (this.specifiedStrategy != null) ? this.specifiedStrategy : this.getDefaultStrategy();
+	}
+
+	public GenerationType getDefaultStrategy() {
+		return GeneratedValue.DEFAULT_STRATEGY;
+	}
+	
+	public GenerationType getSpecifiedStrategy() {
+		return this.specifiedStrategy;
+	}
+
+	public void setSpecifiedStrategy(GenerationType strategy) {
+		GenerationType old = this.specifiedStrategy;
+		this.specifiedStrategy = strategy;
+		this.resourceGeneratedValue.setStrategy(GenerationType.toJavaResourceModel(strategy));
+		this.firePropertyChanged(SPECIFIED_STRATEGY_PROPERTY, old, strategy);
+	}
+
+	protected void setSpecifiedStrategy_(GenerationType strategy) {
+		GenerationType old = this.specifiedStrategy;
+		this.specifiedStrategy = strategy;
+		this.firePropertyChanged(SPECIFIED_STRATEGY_PROPERTY, old, strategy);
+	}
+
+
+	// ********** generator **********
+
+	public String getGenerator() {
+		return (this.specifiedGenerator != null) ? this.specifiedGenerator : this.defaultGenerator;
+	}
+
+	public String getDefaultGenerator() {
+		return this.defaultGenerator;
+	}
+	
+	public String getSpecifiedGenerator() {
+		return this.specifiedGenerator;
+	}
+
+	public void setSpecifiedGenerator(String generator) {
+		String old = this.specifiedGenerator;
+		this.specifiedGenerator = generator;
+		this.resourceGeneratedValue.setGenerator(generator);
+		this.firePropertyChanged(SPECIFIED_GENERATOR_PROPERTY, old, generator);
+	}
+
+	protected void setSpecifiedGenerator_(String generator) {
+		String old = this.specifiedGenerator;
+		this.specifiedGenerator = generator;
+		this.firePropertyChanged(SPECIFIED_GENERATOR_PROPERTY, old, generator);
+	}
+	
+
+	// ********** text ranges **********
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.resourceGeneratedValue.getTextRange(astRoot);
+	}
+
+	public TextRange getGeneratorTextRange(CompilationUnit astRoot) {
+		return this.resourceGeneratedValue.getGeneratorTextRange(astRoot);
+	}
+
+
+	// ********** completion proposals **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.generatorTouches(pos, astRoot)) {
+			return this.javaCandidateGeneratorNames(filter);
+		}
+		return null;
+	}
+
+	protected boolean generatorTouches(int pos, CompilationUnit astRoot) {
+		return this.resourceGeneratedValue.generatorTouches(pos, astRoot);
+	}
+
+	protected Iterator<String> javaCandidateGeneratorNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateGeneratorNames(filter));
+	}
+
+	protected Iterator<String> candidateGeneratorNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateGeneratorNames(), filter);
+	}
+
+	protected Iterator<String> candidateGeneratorNames() {
+		return new TransformationIterator<Generator, String>(this.candidateGenerators()) {
+			@Override
+			protected String transform(Generator generator) {
+				return generator.getName();
+			}
+		};
+	}
+
+	protected Iterator<Generator> candidateGenerators() {
+		return this.getPersistenceUnit().generators();
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+
+		String generator = this.getGenerator();
+		if (generator == null) {
+			return;
+		}
+
+		for (Iterator<Generator> stream = this.getPersistenceUnit().generators(); stream.hasNext(); ) {
+			if (generator.equals(stream.next().getName())) {
+				return;
+			}
+		}
+
+		messages.add(
+			DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.ID_MAPPING_UNRESOLVED_GENERATOR_NAME,
+				new String[] {generator},
+				this.getParent(),
+				this.getGeneratorTextRange(astRoot)
+			)
+		);
+	}
+
+
+	// ********** update from resource model **********
+
+	public void update(GeneratedValueAnnotation generatedValueAnnotation) {
+		this.resourceGeneratedValue = generatedValueAnnotation;
+		this.setSpecifiedStrategy_(this.buildSpecifiedStrategy());
+		this.setSpecifiedGenerator_(generatedValueAnnotation.getGenerator());
+	}
+
+	protected GenerationType buildSpecifiedStrategy() {
+		return GenerationType.fromJavaResourceModel(this.resourceGeneratedValue.getStrategy());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
new file mode 100644
index 0000000..1f4586a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.java.JavaGenerator;
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.context.java.JavaTableGenerator;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
+	implements JavaGeneratorContainer
+{
+	protected JavaResourcePersistentMember javaResourcePersistentMember;
+
+	protected JavaSequenceGenerator sequenceGenerator;
+
+	protected JavaTableGenerator tableGenerator;
+	
+	public GenericJavaGeneratorContainer(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	@Override
+	public JavaJpaContextNode getParent() {
+		return (JavaJpaContextNode) super.getParent();
+	}
+	
+	public JavaTableGenerator addTableGenerator() {
+		if (getTableGenerator() != null) {
+			throw new IllegalStateException("tableGenerator already exists"); //$NON-NLS-1$
+		}
+		this.tableGenerator = getJpaFactory().buildJavaTableGenerator(this);
+		TableGeneratorAnnotation tableGeneratorResource = 
+				(TableGeneratorAnnotation) this.javaResourcePersistentMember.
+					addAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
+		this.tableGenerator.initialize(tableGeneratorResource);
+		firePropertyChanged(TABLE_GENERATOR_PROPERTY, null, this.tableGenerator);
+		return this.tableGenerator;
+	}
+	
+	public void removeTableGenerator() {
+		if (getTableGenerator() == null) {
+			throw new IllegalStateException("tableGenerator does not exist, cannot be removed"); //$NON-NLS-1$
+		}
+		JavaTableGenerator oldTableGenerator = this.tableGenerator;
+		this.tableGenerator = null;
+		this.javaResourcePersistentMember.removeAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
+		firePropertyChanged(TABLE_GENERATOR_PROPERTY, oldTableGenerator, null);
+	}
+	
+	public JavaTableGenerator getTableGenerator() {
+		return this.tableGenerator;
+	}
+	
+	protected void setTableGenerator(JavaTableGenerator newTableGenerator) {
+		JavaTableGenerator oldTableGenerator = this.tableGenerator;
+		this.tableGenerator = newTableGenerator;
+		firePropertyChanged(TABLE_GENERATOR_PROPERTY, oldTableGenerator, newTableGenerator);
+	}
+
+	public JavaSequenceGenerator addSequenceGenerator() {
+		if (getSequenceGenerator() != null) {
+			throw new IllegalStateException("sequenceGenerator already exists"); //$NON-NLS-1$
+		}
+		this.sequenceGenerator = getJpaFactory().buildJavaSequenceGenerator(this);
+		SequenceGeneratorAnnotation sequenceGeneratorResource = 
+				(SequenceGeneratorAnnotation) this.javaResourcePersistentMember.
+					addAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
+		this.sequenceGenerator.initialize(sequenceGeneratorResource);
+		firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, null, this.sequenceGenerator);
+		return this.sequenceGenerator;
+	}
+	
+	public void removeSequenceGenerator() {
+		if (getSequenceGenerator() == null) {
+			throw new IllegalStateException("sequenceGenerator does not exist, cannot be removed"); //$NON-NLS-1$
+		}
+		JavaSequenceGenerator oldSequenceGenerator = this.sequenceGenerator;
+		this.sequenceGenerator = null;
+		this.javaResourcePersistentMember.removeAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
+		firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, oldSequenceGenerator,null);
+	}
+	
+	public JavaSequenceGenerator getSequenceGenerator() {
+		return this.sequenceGenerator;
+	}
+
+	protected void setSequenceGenerator(JavaSequenceGenerator newSequenceGenerator) {
+		JavaSequenceGenerator oldSequenceGenerator = this.sequenceGenerator;
+		this.sequenceGenerator = newSequenceGenerator;
+		firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, oldSequenceGenerator, newSequenceGenerator);
+	}
+	
+	
+	public void initialize(JavaResourcePersistentMember jrpm) {
+		this.javaResourcePersistentMember = jrpm;
+		this.initializeTableGenerator();
+		this.initializeSequenceGenerator();
+	}
+	
+	protected void initializeTableGenerator() {
+		TableGeneratorAnnotation tableGeneratorResource = getResourceTableGenerator();
+		if (tableGeneratorResource != null) {
+			this.tableGenerator = buildTableGenerator(tableGeneratorResource);
+		}
+	}
+	
+	protected void initializeSequenceGenerator() {
+		SequenceGeneratorAnnotation sequenceGeneratorResource = getResourceSequenceGenerator();
+		if (sequenceGeneratorResource != null) {
+			this.sequenceGenerator = buildSequenceGenerator(sequenceGeneratorResource);
+		}
+	}
+
+	public void update(JavaResourcePersistentMember jrpm) {
+		this.javaResourcePersistentMember = jrpm;
+		this.updateTableGenerator();
+		this.updateSequenceGenerator();
+	}
+	
+	protected void updateTableGenerator() {
+		TableGeneratorAnnotation tableGeneratorResource = getResourceTableGenerator();
+		if (tableGeneratorResource == null) {
+			if (getTableGenerator() != null) {
+				setTableGenerator(null);
+			}
+		}
+		else {
+			if (getTableGenerator() == null) {
+				setTableGenerator(buildTableGenerator(tableGeneratorResource));
+			}
+			else {
+				getTableGenerator().update(tableGeneratorResource);
+			}
+		}
+	}
+	
+	protected JavaTableGenerator buildTableGenerator(TableGeneratorAnnotation tableGeneratorResource) {
+		JavaTableGenerator generator = getJpaFactory().buildJavaTableGenerator(this);
+		generator.initialize(tableGeneratorResource);
+		return generator;
+	}
+	
+	protected TableGeneratorAnnotation getResourceTableGenerator() {
+		return (TableGeneratorAnnotation) this.javaResourcePersistentMember.
+				getAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
+	}
+
+	protected void updateSequenceGenerator() {
+		SequenceGeneratorAnnotation sequenceGeneratorResource = getResourceSequenceGenerator();
+		if (sequenceGeneratorResource == null) {
+			if (getSequenceGenerator() != null) {
+				setSequenceGenerator(null);
+			}
+		}
+		else {
+			if (getSequenceGenerator() == null) {
+				setSequenceGenerator(buildSequenceGenerator(sequenceGeneratorResource));
+			}
+			else {
+				getSequenceGenerator().update(sequenceGeneratorResource);
+			}
+		}
+	}
+	
+	protected JavaSequenceGenerator buildSequenceGenerator(SequenceGeneratorAnnotation sequenceGeneratorResource) {
+		JavaSequenceGenerator generator = getJpaFactory().buildJavaSequenceGenerator(this);
+		generator.initialize(sequenceGeneratorResource);
+		return generator;
+	}
+	
+	protected SequenceGeneratorAnnotation getResourceSequenceGenerator() {
+		return (SequenceGeneratorAnnotation) this.javaResourcePersistentMember.
+				getAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
+	}
+	
+	
+	//******************** Code Completion *************************
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.getTableGenerator() != null) {
+			result = this.getTableGenerator().javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		if (this.getSequenceGenerator() != null) {
+			result = this.getSequenceGenerator().javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+	
+	//********** Validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateGenerators(messages, astRoot);
+	}
+	
+	protected void validateGenerators(List<IMessage> messages, CompilationUnit astRoot) {
+		for (Iterator<JavaGenerator> localGenerators = this.generators(); localGenerators.hasNext(); ) {
+			JavaGenerator localGenerator = localGenerators.next();
+			for (Iterator<Generator> globalGenerators = this.getPersistenceUnit().generators(); globalGenerators.hasNext(); ) {
+				if (localGenerator.duplicates(globalGenerators.next())) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.GENERATOR_DUPLICATE_NAME,
+							new String[] {localGenerator.getName()},
+							localGenerator,
+							localGenerator.getNameTextRange(astRoot)
+						)
+					);
+				}
+			}
+		}
+	}
+
+	protected final Iterator<JavaGenerator> generators() {
+		ArrayList<JavaGenerator> generators = new ArrayList<JavaGenerator>();
+		this.addGeneratorsTo(generators);
+		return generators.iterator();
+	}
+
+	protected void addGeneratorsTo(ArrayList<JavaGenerator> generators) {
+		if (this.sequenceGenerator != null) {
+			generators.add(this.sequenceGenerator);
+		}
+		if (this.tableGenerator != null) {
+			generators.add(this.tableGenerator);
+		}
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.javaResourcePersistentMember.getTextRange(astRoot);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaIdMapping.java
new file mode 100644
index 0000000..97620c7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaIdMapping.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaIdMapping;
+
+
+public class GenericJavaIdMapping
+	extends AbstractJavaIdMapping
+{	
+	
+	public GenericJavaIdMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
new file mode 100644
index 0000000..a357dd5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
@@ -0,0 +1,197 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaBaseColumn;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+
+public class GenericJavaJoinColumn extends AbstractJavaBaseColumn<JoinColumnAnnotation> implements JavaJoinColumn
+{
+
+	protected String specifiedReferencedColumnName;
+
+	protected String defaultReferencedColumnName;
+	
+	public GenericJavaJoinColumn(JavaJpaContextNode parent, JavaJoinColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	@Override
+	public void initialize(JoinColumnAnnotation annotation) {
+		super.initialize(annotation);
+		this.specifiedReferencedColumnName = annotation.getReferencedColumnName();
+		this.defaultReferencedColumnName = this.buildDefaultReferencedColumnName();
+	}
+	
+	@Override
+	public void update(JoinColumnAnnotation annotation) {
+		super.update(annotation);
+		this.setSpecifiedReferencedColumnName_(annotation.getReferencedColumnName());
+		this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
+	}
+
+	
+	public String getReferencedColumnName() {
+		return (this.specifiedReferencedColumnName == null) ? this.defaultReferencedColumnName : this.specifiedReferencedColumnName;
+	}
+
+	public String getSpecifiedReferencedColumnName() {
+		return this.specifiedReferencedColumnName;
+	}
+
+	public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		this.getResourceColumn().setReferencedColumnName(newSpecifiedReferencedColumnName);
+		firePropertyChanged(BaseJoinColumn.SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+
+	protected void setSpecifiedReferencedColumnName_(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		firePropertyChanged(BaseJoinColumn.SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+
+	public String getDefaultReferencedColumnName() {
+		return this.defaultReferencedColumnName;
+	}
+
+	protected void setDefaultReferencedColumnName(String newDefaultReferencedColumnName) {
+		String oldDefaultReferencedColumnName = this.defaultReferencedColumnName;
+		this.defaultReferencedColumnName = newDefaultReferencedColumnName;
+		firePropertyChanged(BaseJoinColumn.DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, oldDefaultReferencedColumnName, newDefaultReferencedColumnName);
+	}
+
+
+	@Override
+	public JavaJoinColumn.Owner getOwner() {
+		return (JavaJoinColumn.Owner) super.getOwner();
+	}
+
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+
+	public Table getReferencedColumnDbTable() {
+		return getOwner().getReferencedColumnDbTable();
+	}
+
+	public Column getReferencedDbColumn() {
+		Table table = this.getReferencedColumnDbTable();
+		return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
+	}
+
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return getResourceColumn().referencedColumnNameTouches(pos, astRoot);
+	}
+
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.referencedColumnNameTouches(pos, astRoot)) {
+			return this.getJavaCandidateReferencedColumnNames(filter).iterator();
+		}
+		return null;
+	}
+
+	private Iterable<String> getJavaCandidateReferencedColumnNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateReferencedColumnNames(filter));
+	}
+
+	private Iterable<String> getCandidateReferencedColumnNames(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateReferencedColumnNames(), filter);
+	}
+
+	private Iterable<String> getCandidateReferencedColumnNames() {
+		Table table = this.getOwner().getReferencedColumnDbTable();
+		return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	public boolean isReferencedColumnResolved() {
+		return getReferencedDbColumn() != null;
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		TextRange textRange = getResourceColumn().getReferencedColumnNameTextRange(astRoot);
+		return (textRange != null) ? textRange : getOwner().getValidationTextRange(astRoot);
+	}
+	
+	@Override
+	protected String buildDefaultName() {
+		return MappingTools.buildJoinColumnDefaultName(this, this.getOwner());
+	}
+	
+	protected String buildDefaultReferencedColumnName() {
+		return MappingTools.buildJoinColumnDefaultReferencedColumnName(this.getOwner());
+	}
+
+	@Override
+	//this method will only be called if the table validates correctly
+	protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
+		this.validateJoinColumnName(messages, astRoot);
+		this.validateReferencedColumnName(messages, astRoot);
+	}
+	
+	protected void validateJoinColumnName(List<IMessage> messages, CompilationUnit astRoot) {
+		if (getSpecifiedName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedNameMultipleJoinColumnsMessage(astRoot));
+		}
+		else if (this.getName() != null){
+			super.validateName(messages, astRoot);
+		}
+		//If the name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+	
+	protected void validateReferencedColumnName(List<IMessage> messages, CompilationUnit astRoot) {
+		if (getSpecifiedReferencedColumnName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(astRoot));
+		}
+		else if (this.getSpecifiedReferencedColumnName() != null) {
+			if (this.getReferencedColumnDbTable() != null && ! this.isReferencedColumnResolved()) {
+				messages.add(getOwner().buildUnresolvedReferencedColumnNameMessage(this, this.getReferencedColumnNameTextRange(astRoot)));
+			}
+		}
+		//If the referenced column name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+	
+	protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(CompilationUnit astRoot) {
+		return getOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(this, getNameTextRange(astRoot));
+	}
+
+	protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(CompilationUnit astRoot) {
+		return getOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(this, getReferencedColumnNameTextRange(astRoot));
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaJoinTable.java
new file mode 100644
index 0000000..d9c2c68
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaJoinTable.java
@@ -0,0 +1,594 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinTable;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java join table
+ */
+public class GenericJavaJoinTable
+	extends GenericJavaReferenceTable
+	implements JavaJoinTable
+{
+
+	protected JavaJoinColumn defaultInverseJoinColumn;
+
+	protected final Vector<JavaJoinColumn> specifiedInverseJoinColumns = new Vector<JavaJoinColumn>();
+	protected final JavaJoinColumn.Owner inverseJoinColumnOwner;
+
+
+	public GenericJavaJoinTable(JavaJoinTableJoiningStrategy parent) {
+		super(parent);
+		this.inverseJoinColumnOwner = this.buildInverseJoinColumnOwner();
+	}
+
+	@Override
+	protected JavaJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	protected JavaJoinColumn.Owner buildInverseJoinColumnOwner() {
+		return new InverseJoinColumnOwner();
+	}
+
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getParent().getRelationshipReference().getRelationshipMapping();
+	}
+
+	public PersistentAttribute getPersistentAttribute() {
+		return getRelationshipMapping().getPersistentAttribute();
+	}
+	
+	public void initialize(JoinTableAnnotation joinTable) {
+		super.initialize(joinTable);
+		this.initializeSpecifiedInverseJoinColumns(joinTable);
+		this.initializeDefaultInverseJoinColumn(joinTable);
+	}
+
+	public void update(JoinTableAnnotation joinTable) {
+		super.update(joinTable);
+		this.updateSpecifiedInverseJoinColumns(joinTable);
+		this.updateDefaultInverseJoinColumn(joinTable);
+	}
+
+
+	// ********** AbstractJavaTable implementation **********
+
+	@Override
+	public JavaJoinTableJoiningStrategy getParent() {
+		return (JavaJoinTableJoiningStrategy) super.getParent();
+	}
+
+	@Override
+	protected String getAnnotationName() {
+		return JoinTableAnnotation.ANNOTATION_NAME;
+	}
+
+	@Override
+	protected String buildDefaultName() {
+		return this.getParent().getJoinTableDefaultName();
+	}
+
+	@Override
+	protected JoinTableAnnotation getAnnotation() {
+		return this.getParent().getAnnotation();
+	}
+
+
+	// ********** inverse join columns **********
+
+	public ListIterator<JavaJoinColumn> inverseJoinColumns() {
+		return this.hasSpecifiedInverseJoinColumns() ? this.specifiedInverseJoinColumns() : this.defaultInverseJoinColumns();
+	}
+
+	public int inverseJoinColumnsSize() {
+		return this.hasSpecifiedInverseJoinColumns() ? this.specifiedInverseJoinColumnsSize() : this.defaultInverseJoinColumnsSize();
+	}
+
+	public void convertDefaultToSpecifiedInverseJoinColumn() {
+		MappingTools.convertJoinTableDefaultToSpecifiedInverseJoinColumn(this);
+	}
+
+	protected JavaJoinColumn buildInverseJoinColumn(JoinColumnAnnotation joinColumnAnnotation) {
+		return this.buildJoinColumn(joinColumnAnnotation, this.inverseJoinColumnOwner);
+	}
+
+
+	// ********** default inverse join column **********
+
+	public JavaJoinColumn getDefaultInverseJoinColumn() {
+		return this.defaultInverseJoinColumn;
+	}
+
+	protected void setDefaultInverseJoinColumn(JavaJoinColumn defaultInverseJoinColumn) {
+		JavaJoinColumn old = this.defaultInverseJoinColumn;
+		this.defaultInverseJoinColumn = defaultInverseJoinColumn;
+		this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, old, defaultInverseJoinColumn);
+	}
+
+	protected ListIterator<JavaJoinColumn> defaultInverseJoinColumns() {
+		if (this.defaultInverseJoinColumn != null) {
+			return new SingleElementListIterator<JavaJoinColumn>(this.defaultInverseJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+
+	protected int defaultInverseJoinColumnsSize() {
+		return (this.defaultInverseJoinColumn == null) ? 0 : 1;
+	}
+
+	protected void initializeDefaultInverseJoinColumn(JoinTableAnnotation joinTableAnnotation) {
+		if (this.shouldBuildDefaultInverseJoinColumn()) {
+			this.defaultInverseJoinColumn = this.buildInverseJoinColumn(new NullJoinColumnAnnotation(joinTableAnnotation));
+		}
+	}
+
+	protected boolean shouldBuildDefaultInverseJoinColumn() {
+		return ! this.hasSpecifiedInverseJoinColumns();
+	}
+
+	protected void updateDefaultInverseJoinColumn(JoinTableAnnotation joinTableAnnotation) {
+		if (this.shouldBuildDefaultInverseJoinColumn()) {
+			if (this.defaultInverseJoinColumn == null) {
+				this.setDefaultInverseJoinColumn(this.buildInverseJoinColumn(new NullJoinColumnAnnotation(joinTableAnnotation)));
+			} else {
+				this.defaultInverseJoinColumn.update(new NullJoinColumnAnnotation(joinTableAnnotation));
+			}
+		} else {
+			this.setDefaultInverseJoinColumn(null);
+		}
+	}
+
+
+	// ********** specified inverse join columns **********
+
+	public ListIterator<JavaJoinColumn> specifiedInverseJoinColumns() {
+		return new CloneListIterator<JavaJoinColumn>(this.specifiedInverseJoinColumns);
+	}
+
+	public int specifiedInverseJoinColumnsSize() {
+		return this.specifiedInverseJoinColumns.size();
+	}
+
+	public boolean hasSpecifiedInverseJoinColumns() {
+		return this.specifiedInverseJoinColumns.size() != 0;
+	}
+
+	public JavaJoinColumn addSpecifiedInverseJoinColumn(int index) {
+		// Clear out the default now so it doesn't get removed during an update and
+		// cause change notifications to be sent to the UI in the wrong order.
+		// If the default is already null, nothing will happen.
+		JoinColumn oldDefault = this.defaultInverseJoinColumn;
+		this.defaultInverseJoinColumn = null;
+
+		JavaJoinColumn inverseJoinColumn = this.getJpaFactory().buildJavaJoinColumn(this, this.inverseJoinColumnOwner);
+		this.specifiedInverseJoinColumns.add(index, inverseJoinColumn);
+		JoinTableAnnotation joinTableAnnotation = this.getAnnotation();
+		JoinColumnAnnotation joinColumnAnnotation = joinTableAnnotation.addInverseJoinColumn(index);
+		inverseJoinColumn.initialize(joinColumnAnnotation);
+		this.fireItemAdded(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST, index, inverseJoinColumn);
+
+		this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, oldDefault, null);
+		return inverseJoinColumn;
+	}
+
+	protected void addSpecifiedInverseJoinColumn(int index, JavaJoinColumn inverseJoinColumn) {
+		this.addItemToList(index, inverseJoinColumn, this.specifiedInverseJoinColumns, SPECIFIED_INVERSE_JOIN_COLUMNS_LIST);
+	}
+
+	protected void addSpecifiedInverseJoinColumn(JavaJoinColumn inverseJoinColumn) {
+		this.addSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumns.size(), inverseJoinColumn);
+	}
+
+	public void removeSpecifiedInverseJoinColumn(JoinColumn inverseJoinColumn) {
+		this.removeSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumns.indexOf(inverseJoinColumn));
+	}
+
+	public void removeSpecifiedInverseJoinColumn(int index) {
+		JavaJoinColumn removedJoinColumn = this.specifiedInverseJoinColumns.remove(index);
+		if ( ! this.hasSpecifiedInverseJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultInverseJoinColumn = this.buildInverseJoinColumn(new NullJoinColumnAnnotation(this.getAnnotation()));
+		}
+		this.getAnnotation().removeInverseJoinColumn(index);
+		this.fireItemRemoved(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST, index, removedJoinColumn);
+		if (this.defaultInverseJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, null, this.defaultInverseJoinColumn);
+		}
+	}
+
+	protected void removeSpecifiedInverseJoinColumn_(JavaJoinColumn joinColumn) {
+		this.removeItemFromList(joinColumn, this.specifiedInverseJoinColumns, SPECIFIED_INVERSE_JOIN_COLUMNS_LIST);
+	}
+
+	public void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedInverseJoinColumns, targetIndex, sourceIndex);
+		this.getAnnotation().moveInverseJoinColumn(targetIndex, sourceIndex);
+		this.fireItemMoved(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);
+	}
+
+	public void clearSpecifiedInverseJoinColumns() {
+		// for now, we have to remove annotations one at a time...
+		for (int i = this.specifiedInverseJoinColumns.size(); i-- > 0; ) {
+			this.removeSpecifiedInverseJoinColumn(i);
+		}
+	}
+
+	protected void initializeSpecifiedInverseJoinColumns(JoinTableAnnotation joinTableAnnotation) {
+		for (ListIterator<JoinColumnAnnotation> stream = joinTableAnnotation.inverseJoinColumns(); stream.hasNext(); ) {
+			this.specifiedInverseJoinColumns.add(this.buildInverseJoinColumn(stream.next()));
+		}
+	}
+
+	protected void updateSpecifiedInverseJoinColumns(JoinTableAnnotation joinTableAnnotation) {
+		ListIterator<JavaJoinColumn> joinColumns = this.specifiedInverseJoinColumns();
+		ListIterator<JoinColumnAnnotation> joinColumnAnnotations = joinTableAnnotation.inverseJoinColumns();
+
+		while (joinColumns.hasNext()) {
+			JavaJoinColumn joinColumn = joinColumns.next();
+			if (joinColumnAnnotations.hasNext()) {
+				joinColumn.update(joinColumnAnnotations.next());
+			} else {
+				this.removeSpecifiedInverseJoinColumn_(joinColumn);
+			}
+		}
+
+		while (joinColumnAnnotations.hasNext()) {
+			this.addSpecifiedInverseJoinColumn(this.buildInverseJoinColumn(joinColumnAnnotations.next()));
+		}
+	}
+
+
+	// ********** Java completion proposals **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaJoinColumn column : CollectionTools.iterable(this.inverseJoinColumns())) {
+			result = column.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+
+
+
+	// ********** validation **********
+
+	@Override
+	protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validateJoinColumns(messages, reporter, astRoot);
+		this.validateJoinColumns(this.inverseJoinColumns(), messages, reporter, astRoot);
+	}
+
+	@Override
+	protected boolean shouldValidateAgainstDatabase() {
+		return getParent().shouldValidateAgainstDatabase();
+	}
+
+	@Override
+	protected String getUnresolvedCatalogMessageId() {
+		return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_CATALOG;
+	}
+	
+	@Override
+	protected String getUnresolvedSchemaMessageId() {
+		return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_SCHEMA;
+	}
+	
+	@Override
+	protected String getUnresolvedNameMessageId() {
+		return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_NAME;
+	}
+
+
+	// ********** join column owner adapters **********
+
+	/**
+	 * just a little common behavior
+	 */
+	protected abstract class AbstractJoinColumnOwner
+		implements JavaJoinColumn.Owner
+	{
+		protected AbstractJoinColumnOwner() {
+			super();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return GenericJavaJoinTable.this.getParent().getRelationshipReference().getTypeMapping();
+		}
+
+		public PersistentAttribute getPersistentAttribute() {
+			return GenericJavaJoinTable.this.getPersistentAttribute();
+		}
+
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the join table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+
+		/**
+		 * the join column can only be on the join table itself
+		 */
+		public Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			if (GenericJavaJoinTable.this.getName() == null) {
+				return null;
+			}
+			return (GenericJavaJoinTable.this.getName().equals(tableName)) ? GenericJavaJoinTable.this.getDbTable() : null;
+		}
+
+		/**
+		 * by default, the join column is, obviously, in the join table;
+		 * not sure whether it can be anywhere else...
+		 */
+		public String getDefaultTableName() {
+			return GenericJavaJoinTable.this.getName();
+		}
+
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaJoinTable.this.getValidationTextRange(astRoot);
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getTableNotValidMessage(),
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE}, 
+				column,
+				textRange
+			);
+		}
+
+		protected abstract String getTableNotValidMessage();
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getUnresolvedNameMessage(),
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getUnresolvedNameMessage();
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getUnresolvedReferencedColumnNameMessage(),
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getUnresolvedReferencedColumnNameMessage();
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getUnspecifiedNameMultipleJoinColumnsMessage(),
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected abstract String getUnspecifiedNameMultipleJoinColumnsMessage();
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		protected abstract String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
+	}
+
+
+	/**
+	 * owner for "back-pointer" JoinColumns;
+	 * these point at the source/owning entity
+	 */
+	protected class JoinColumnOwner
+		extends AbstractJoinColumnOwner
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+
+		public Entity getRelationshipTarget() {
+			return GenericJavaJoinTable.this.getParent().getRelationshipReference().getEntity();
+		}
+
+		public String getAttributeName() {
+			RelationshipMapping relationshipMapping = GenericJavaJoinTable.this.getRelationshipMapping();
+			if (relationshipMapping == null) {
+				return null;
+			}
+			Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
+			if (targetEntity == null) {
+				return null;
+			}
+			for (PersistentAttribute each : 
+					CollectionTools.iterable(
+						targetEntity.getPersistentType().allAttributes())) {
+				if (each.getMapping().isOwnedBy(relationshipMapping)) {
+					return each.getName();
+				}
+			}
+			return null;
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			return getTypeMapping().getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericJavaJoinTable.this.defaultJoinColumn == joinColumn;
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public int joinColumnsSize() {
+			return GenericJavaJoinTable.this.joinColumnsSize();
+		}
+
+		@Override
+		protected String getUnresolvedNameMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME;
+		}
+
+		@Override
+		protected String getTableNotValidMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		protected String getUnresolvedReferencedColumnNameMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+		}
+
+		@Override
+		protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+	}
+
+
+	/**
+	 * owner for "forward-pointer" JoinColumns;
+	 * these point at the target/inverse entity
+	 */
+	protected class InverseJoinColumnOwner
+		extends AbstractJoinColumnOwner
+	{
+		protected InverseJoinColumnOwner() {
+			super();
+		}
+
+		public Entity getRelationshipTarget() {
+			RelationshipMapping relationshipMapping = GenericJavaJoinTable.this.getRelationshipMapping();
+			return relationshipMapping == null ? null : relationshipMapping.getResolvedTargetEntity();
+		}
+
+		public String getAttributeName() {
+			RelationshipMapping relationshipMapping = GenericJavaJoinTable.this.getRelationshipMapping();
+			return relationshipMapping == null ? null : relationshipMapping.getName();
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			Entity relationshipTarget = getRelationshipTarget();
+			return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericJavaJoinTable.this.defaultInverseJoinColumn == joinColumn;
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public int joinColumnsSize() {
+			return GenericJavaJoinTable.this.inverseJoinColumnsSize();
+		}
+
+		@Override
+		protected String getUnresolvedNameMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_UNRESOLVED_NAME;
+		}
+
+		@Override
+		protected String getTableNotValidMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		protected String getUnresolvedReferencedColumnNameMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+		}
+
+		@Override
+		protected String getUnspecifiedNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		protected String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaLobConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaLobConverter.java
new file mode 100644
index 0000000..3755a7c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaLobConverter.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaLobConverter;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.LobAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaLobConverter extends AbstractJavaJpaContextNode
+	implements JavaLobConverter
+{
+	protected JavaResourcePersistentAttribute resourcePersistentAttribute;
+	
+	
+	public GenericJavaLobConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa) {
+		super(parent);
+		this.initialize(jrpa);
+	}
+
+	@Override
+	public JavaAttributeMapping getParent() {
+		return (JavaAttributeMapping) super.getParent();
+	}
+	
+	public String getType() {
+		return Converter.LOB_CONVERTER;
+	}
+
+	protected String getAnnotationName() {
+		return LobAnnotation.ANNOTATION_NAME;
+	}
+	
+	public void addToResourceModel() {
+		this.resourcePersistentAttribute.addAnnotation(getAnnotationName());
+	}
+	
+	public void removeFromResourceModel() {
+		this.resourcePersistentAttribute.removeAnnotation(getAnnotationName());
+	}
+	
+	protected TemporalAnnotation getResourceLob() {
+		return (TemporalAnnotation) this.resourcePersistentAttribute.
+				getAnnotation(getAnnotationName());
+	}
+
+	protected void initialize(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistentAttribute = jrpa;
+	}
+	
+	public void update(JavaResourcePersistentAttribute jrpa) {		
+		this.resourcePersistentAttribute = jrpa;
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return getResourceLob().getTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java
new file mode 100644
index 0000000..4d0780c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaManyToManyMapping.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaManyToManyMapping;
+
+
+public class GenericJavaManyToManyMapping
+	extends AbstractJavaManyToManyMapping
+{
+	public GenericJavaManyToManyMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java
new file mode 100644
index 0000000..d4730b8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaManyToOneMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaManyToOneMapping;
+import org.eclipse.jpt.core.internal.context.java.GenericJavaManyToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneRelationshipReference2_0;
+
+
+public class GenericJavaManyToOneMapping
+	extends AbstractJavaManyToOneMapping
+{
+	public GenericJavaManyToOneMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaManyToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericJavaManyToOneRelationshipReference(this);
+	}	
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java
new file mode 100644
index 0000000..3b19e3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaMappedSuperclass.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaMappedSuperclass;
+
+public class GenericJavaMappedSuperclass extends AbstractJavaMappedSuperclass
+{
+
+	public GenericJavaMappedSuperclass(JavaPersistentType parent) {
+		super(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java
new file mode 100644
index 0000000..ab5d1a5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNamedNativeQuery.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.NamedNativeQuery;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaNamedNativeQuery;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaQuery;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
+
+
+public class GenericJavaNamedNativeQuery extends AbstractJavaQuery
+	implements JavaNamedNativeQuery
+{
+
+	protected String resultClass;
+
+	protected String resultSetMapping;
+
+	public GenericJavaNamedNativeQuery(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	@Override
+	protected NamedNativeQueryAnnotation getResourceQuery() {
+		return (NamedNativeQueryAnnotation) super.getResourceQuery();
+	}
+	
+	public char getResultClassEnclosingTypeSeparator() {
+		return '.';
+	}
+	
+	public String getResultClass() {
+		return this.resultClass;
+	}
+
+	public void setResultClass(String newResultClass) {
+		String oldResultClass = this.resultClass;
+		this.resultClass = newResultClass;
+		getResourceQuery().setResultClass(newResultClass);
+		firePropertyChanged(NamedNativeQuery.RESULT_CLASS_PROPERTY, oldResultClass, newResultClass);
+	}
+	
+	protected void setResultClass_(String newResultClass) {
+		String oldResultClass = this.resultClass;
+		this.resultClass = newResultClass;
+		firePropertyChanged(NamedNativeQuery.RESULT_CLASS_PROPERTY, oldResultClass, newResultClass);
+	}
+
+	public String getResultSetMapping() {
+		return this.resultSetMapping;
+	}
+
+	public void setResultSetMapping(String newResultSetMapping) {
+		String oldResultSetMapping = this.resultSetMapping;
+		this.resultSetMapping = newResultSetMapping;
+		getResourceQuery().setResultSetMapping(newResultSetMapping);
+		firePropertyChanged(NamedNativeQuery.RESULT_SET_MAPPING_PROPERTY, oldResultSetMapping, newResultSetMapping);
+	}
+
+	protected void setResultSetMapping_(String newResultSetMapping) {
+		String oldResultSetMapping = this.resultSetMapping;
+		this.resultSetMapping = newResultSetMapping;
+		firePropertyChanged(NamedNativeQuery.RESULT_SET_MAPPING_PROPERTY, oldResultSetMapping, newResultSetMapping);
+	}
+
+	public void initialize(NamedNativeQueryAnnotation resourceQuery) {
+		super.initialize(resourceQuery);
+		this.resultClass = resourceQuery.getResultClass();
+		this.resultSetMapping = resourceQuery.getResultSetMapping();
+	}
+	
+	public void update(NamedNativeQueryAnnotation resourceQuery) {
+		super.update(resourceQuery);
+		this.setResultClass_(resourceQuery.getResultClass());
+		this.setResultSetMapping_(resourceQuery.getResultSetMapping());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNamedQuery.java
new file mode 100644
index 0000000..d5d7a96
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNamedQuery.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaNamedQuery;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaQuery;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+
+
+
+public class GenericJavaNamedQuery extends AbstractJavaQuery implements JavaNamedQuery
+{
+	
+	public GenericJavaNamedQuery(JavaJpaContextNode parent) {
+		super(parent);
+	}
+	
+	@Override
+	protected NamedQueryAnnotation getResourceQuery() {
+		return (NamedQueryAnnotation) super.getResourceQuery();
+	}
+
+	public void initialize(NamedQueryAnnotation resourceQuery) {
+		super.initialize(resourceQuery);
+	}
+	
+	public void update(NamedQueryAnnotation resourceQuery) {
+		super.update(resourceQuery);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java
new file mode 100644
index 0000000..790b932
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNullAttributeMapping.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaAttributeMapping;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class GenericJavaNullAttributeMapping
+	extends AbstractJavaAttributeMapping<Annotation>
+{
+	public GenericJavaNullAttributeMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+	
+	public String getKey() {
+		return MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return null;
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+	}
+
+
+	// ********** metamodel **********  
+
+	@Override
+	public MetamodelField getMetamodelField() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNullConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNullConverter.java
new file mode 100644
index 0000000..7215197
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaNullConverter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaNullConverter extends AbstractJavaJpaContextNode
+	implements JavaConverter
+{
+	
+	public GenericJavaNullConverter(JavaAttributeMapping parent) {
+		super(parent);
+	}
+
+	@Override
+	public JavaAttributeMapping getParent() {
+		return (JavaAttributeMapping) super.getParent();
+	}
+	
+	public String getType() {
+		return Converter.NO_CONVERTER;
+	}
+	
+	public void addToResourceModel() {
+		//do nothing
+	}
+	
+	public void removeFromResourceModel() {
+		//do nothin		
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	public void update(JavaResourcePersistentAttribute jrpa) {
+		//do nothing		
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java
new file mode 100644
index 0000000..68e49c9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToManyMapping.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaRelationshipReference;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToManyMapping;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+
+
+public class GenericJavaOneToManyMapping
+	extends AbstractJavaOneToManyMapping<OneToMany2_0Annotation>
+{
+	
+	public GenericJavaOneToManyMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}	
+	
+	@Override
+	protected JavaRelationshipReference buildRelationshipReference() {
+		return new GenericJavaOneToManyRelationshipReference(this);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToManyRelationshipReference.java
new file mode 100644
index 0000000..d54772a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToManyRelationshipReference.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToManyRelationshipReference;
+
+public class GenericJavaOneToManyRelationshipReference
+	extends AbstractJavaOneToManyRelationshipReference
+{	
+
+	public GenericJavaOneToManyRelationshipReference(JavaOneToManyMapping parent) {
+		super(parent);
+	}	
+
+	@Override
+	protected JavaJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new NullJavaJoinColumnJoiningStrategy(this);
+	}
+
+	// **************** join columns *******************************************
+
+	@Override
+	public boolean usesJoinColumnJoiningStrategy() {
+		return false;
+	}
+
+	@Override
+	public void setJoinColumnJoiningStrategy() {
+		throw new UnsupportedOperationException("join column joining strategy not supported on a 1.0 1-m mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public void unsetJoinColumnJoiningStrategy() {
+		throw new UnsupportedOperationException("join column joining strategy not supported on a 1.0 1-m mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java
new file mode 100644
index 0000000..3c9b2f7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOneToOneMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToOneMapping;
+import org.eclipse.jpt.core.internal.context.java.GenericJavaOneToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneRelationshipReference2_0;
+
+
+public class GenericJavaOneToOneMapping
+	extends AbstractJavaOneToOneMapping
+{
+	public GenericJavaOneToOneMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaOneToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericJavaOneToOneRelationshipReference(this);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOrderable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOrderable.java
new file mode 100644
index 0000000..6ebe7b8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaOrderable.java
@@ -0,0 +1,401 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.internal.jpa2.context.java.NullJavaOrderColumn2_0;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderable2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.OrderByAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class GenericJavaOrderable
+	extends AbstractJavaJpaContextNode
+	implements JavaOrderable2_0
+{
+
+	protected String specifiedOrderBy = null;
+	protected boolean noOrdering = false;
+	protected boolean pkOrdering = false;
+	protected boolean customOrdering = false;
+
+	//JPA 2.0
+	protected final Orderable.Owner owner; //the owner is only used for 2.0 projects
+	protected boolean orderColumnOrdering = false;
+	protected final JavaOrderColumn2_0 orderColumn;
+
+	public GenericJavaOrderable(JavaAttributeMapping parent, Orderable.Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.orderColumn = buildOrderColumn();
+	}
+
+	public void initialize() {
+		this.initializeOrdering();
+	}
+
+	public void update() {
+		this.updateOrdering();
+	}
+
+	@Override
+	public JavaAttributeMapping getParent() {
+		return (JavaAttributeMapping) super.getParent();
+	}
+	
+	protected JavaPersistentAttribute getPersistentAttribute() {
+		return getParent().getPersistentAttribute();
+	}
+	
+	protected JavaResourcePersistentAttribute getResourcePersistentAttribute() {
+		return this.getPersistentAttribute().getResourcePersistentAttribute();
+	}
+
+	
+	// ********** Orderable2_0 implementation **********  
+
+	public String getDefaultTableName() {
+		return getOwner().getTableName();
+	}
+
+	/**
+	 * Only call this for 2.0 projects
+	 */
+	protected Orderable2_0.Owner getOwner() {
+		return (Orderable2_0.Owner) this.owner;
+	}
+	
+	// ********** order by **********  
+
+	public String getSpecifiedOrderBy() {
+		return this.specifiedOrderBy;
+	}
+
+	public void setSpecifiedOrderBy(String orderBy) {
+		String old = this.specifiedOrderBy;
+		this.specifiedOrderBy = orderBy;
+		OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
+		if (orderBy == null) {
+			if (orderByAnnotation != null) { 
+				this.removeOrderByAnnotation();
+			}
+		} else {
+			if (orderByAnnotation == null) {
+				orderByAnnotation = this.addOrderByAnnotation();
+			}
+			orderByAnnotation.setValue(orderBy);
+		}
+		this.firePropertyChanged(SPECIFIED_ORDER_BY_PROPERTY, old, orderBy);
+	}
+
+	protected void setSpecifiedOrderBy_(String orderBy) {
+		String old = this.specifiedOrderBy;
+		this.specifiedOrderBy = orderBy;
+		this.firePropertyChanged(SPECIFIED_ORDER_BY_PROPERTY, old, orderBy);
+	}
+
+	protected void initializeOrdering() {
+		OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
+		OrderColumn2_0Annotation orderColumnAnnotation = this.getOrderColumnAnnotation();
+		if (orderByAnnotation == null && orderColumnAnnotation == null) {
+			this.noOrdering = true;
+		} else if (orderByAnnotation != null){
+			this.specifiedOrderBy = orderByAnnotation.getValue();
+			if (this.specifiedOrderBy == null) {
+				this.pkOrdering = true;
+			} else {
+				this.customOrdering = true;
+			}
+		} else {
+			this.orderColumnOrdering = true;
+		}
+		this.orderColumn.initialize(getResourcePersistentAttribute());
+	}
+
+	protected void updateOrdering() {
+		OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
+		OrderColumn2_0Annotation orderColumnAnnotation = this.getOrderColumnAnnotation();
+		if (orderByAnnotation == null && orderColumnAnnotation == null) {
+			this.setSpecifiedOrderBy_(null);
+			this.setNoOrdering_(true);
+			this.setPkOrdering_(false);
+			this.setCustomOrdering_(false);
+			this.setOrderColumnOrdering_(false);
+		} else if (orderByAnnotation != null) {
+			String ob = orderByAnnotation.getValue();
+			this.setSpecifiedOrderBy_(ob);
+			this.setNoOrdering_(false);
+			this.setPkOrdering_(ob == null);
+			this.setCustomOrdering_(ob != null);
+			this.setOrderColumnOrdering_(false);
+		} else {
+			this.setSpecifiedOrderBy_(null);
+			this.setNoOrdering_(false);
+			this.setPkOrdering_(false);
+			this.setCustomOrdering_(false);
+			this.setOrderColumnOrdering_(true);
+		}
+		this.orderColumn.update(getResourcePersistentAttribute());
+	}
+
+	protected OrderByAnnotation getOrderByAnnotation() {
+		return (OrderByAnnotation) this.getResourcePersistentAttribute().getAnnotation(OrderByAnnotation.ANNOTATION_NAME);
+	}
+
+	protected OrderByAnnotation addOrderByAnnotation() {
+		return (OrderByAnnotation) this.getResourcePersistentAttribute().addAnnotation(OrderByAnnotation.ANNOTATION_NAME);
+	}
+
+	protected void removeOrderByAnnotation() {
+		this.getResourcePersistentAttribute().removeAnnotation(OrderByAnnotation.ANNOTATION_NAME);
+	}
+
+
+	// ********** no ordering **********  
+
+	public boolean isNoOrdering() {
+		return this.noOrdering;
+	}
+
+	public void setNoOrdering(boolean noOrdering) {
+		boolean old = this.noOrdering;
+		this.noOrdering = noOrdering;
+		if (noOrdering) {
+			if (this.getOrderByAnnotation() != null) {
+				this.removeOrderByAnnotation();
+			}
+			if (this.getOrderColumnAnnotation() != null) {
+				this.removeOrderColumnAnnotation();
+			}
+		} else {
+			// the 'noOrdering' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setNoOrdering_(boolean)
+		}
+		this.firePropertyChanged(NO_ORDERING_PROPERTY, old, noOrdering);
+	}
+
+	protected void setNoOrdering_(boolean noOrdering) {
+		boolean old = this.noOrdering;
+		this.noOrdering = noOrdering;
+		this.firePropertyChanged(NO_ORDERING_PROPERTY, old, noOrdering);	
+	}
+
+
+	// ********** pk ordering **********  
+
+	public boolean isPkOrdering() {
+		return this.pkOrdering;
+	}
+
+	public void setPkOrdering(boolean pkOrdering) {
+		boolean old = this.pkOrdering;
+		this.pkOrdering = pkOrdering;
+		OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
+		if (pkOrdering) {
+			if (orderByAnnotation == null) {
+				this.addOrderByAnnotation();
+			} else {
+				orderByAnnotation.setValue(null);
+			}
+		} else {
+			// the 'pkOrdering' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setPkOrdering_(boolean)
+		}
+		this.firePropertyChanged(PK_ORDERING_PROPERTY, old, pkOrdering);
+	}
+
+	protected void setPkOrdering_(boolean pkOrdering) {
+		boolean old = this.pkOrdering;
+		this.pkOrdering = pkOrdering;
+		this.firePropertyChanged(PK_ORDERING_PROPERTY, old, pkOrdering);
+	}
+
+
+	// ********** custom ordering **********  
+
+	public boolean isCustomOrdering() {
+		return this.customOrdering;
+	}
+
+	public void setCustomOrdering(boolean customOrdering) {
+		boolean old = this.customOrdering;
+		this.customOrdering = customOrdering;
+		if (customOrdering) {
+			this.setSpecifiedOrderBy(""); //$NON-NLS-1$
+		} else {
+			// the 'customOrdering' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setCustomOrdering_(boolean)
+		}
+		this.firePropertyChanged(CUSTOM_ORDERING_PROPERTY, old, customOrdering);
+	}
+
+	protected void setCustomOrdering_(boolean customOrdering) {
+		boolean old = this.customOrdering;
+		this.customOrdering = customOrdering;
+		this.firePropertyChanged(CUSTOM_ORDERING_PROPERTY, old, customOrdering);
+	}
+
+	// ********** order column 2.0 **********  
+
+	protected JavaOrderColumn2_0 buildOrderColumn() {
+		return this.isJpa2_0Compatible() ? 
+			((JpaFactory2_0) getJpaFactory()).buildJavaOrderColumn(this, new OrderColumnOwner()) : 
+			new NullJavaOrderColumn2_0(this, new OrderColumnOwner());
+	}
+
+	public boolean isOrderColumnOrdering() {
+		return this.orderColumnOrdering;
+	}
+	
+	public void setOrderColumnOrdering(boolean orderColumnOrdering) {
+		boolean old = this.orderColumnOrdering;
+		this.orderColumnOrdering = orderColumnOrdering;
+		OrderColumn2_0Annotation orderColumnAnnotation = this.getOrderColumnAnnotation();
+		if (orderColumnOrdering) {
+			if (orderColumnAnnotation == null) {
+				this.addOrderColumnAnnotation();
+			}
+			this.removeOrderByAnnotation();
+		} else {
+			removeOrderColumnAnnotation();
+		}
+		this.firePropertyChanged(ORDER_COLUMN_ORDERING_PROPERTY, old, orderColumnOrdering);
+	}
+	
+	protected void setOrderColumnOrdering_(boolean orderColumnOrdering) {
+		boolean old = this.orderColumnOrdering;
+		this.orderColumnOrdering = orderColumnOrdering;
+		this.firePropertyChanged(ORDER_COLUMN_ORDERING_PROPERTY, old, orderColumnOrdering);
+	}
+	
+	public JavaOrderColumn2_0 getOrderColumn() {
+		return this.orderColumn;
+	}
+	
+	protected OrderColumn2_0Annotation getOrderColumnAnnotation() {
+		return (OrderColumn2_0Annotation) this.getResourcePersistentAttribute().getAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected OrderColumn2_0Annotation addOrderColumnAnnotation() {
+		return (OrderColumn2_0Annotation) this.getResourcePersistentAttribute().addAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected void removeOrderColumnAnnotation() {
+		this.getResourcePersistentAttribute().removeAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
+	}
+	
+	
+	// ********** Java completion proposals **********  
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getOrderColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.getOrderByAnnotationTextRange(astRoot);
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+	}
+
+	protected TextRange getOrderByAnnotationTextRange(CompilationUnit astRoot) {
+		OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
+		return (orderByAnnotation == null) ? null : orderByAnnotation.getTextRange(astRoot);
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		if (getOrderColumnAnnotation() != null && getOrderByAnnotation() != null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED,
+					new String[] {getPersistentAttribute().getName()},
+					this.getParent(),
+					this.getOrderByAnnotationTextRange(astRoot)
+				)
+			);
+		}
+		if (isOrderColumnOrdering()) {
+			//TODO validation message if type is not List
+			this.getOrderColumn().validate(messages, reporter, astRoot);
+		}
+	}
+
+	// ********** JavaNamedColumn.Owner implementation- JPA 2.0 **********  
+
+	protected class OrderColumnOwner implements JavaNamedColumn.Owner {
+			
+		public String getDefaultTableName() {
+			return GenericJavaOrderable.this.getDefaultTableName();
+		}
+		
+		public Table getDbTable(String tableName) {
+			return getOwner().getDbTable(tableName);
+		}
+	
+		public String getDefaultColumnName() {
+			return getPersistentAttribute().getName() + "_ORDER"; //$NON-NLS-1$
+		}
+	
+		public TypeMapping getTypeMapping() {
+			return getPersistentAttribute().getOwningTypeMapping();
+		}
+	
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaOrderable.this.getValidationTextRange(astRoot);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.ORDER_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
new file mode 100644
index 0000000..7d052c2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaPersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * Generic Java persistent attribute
+ */
+public class GenericJavaPersistentAttribute
+	extends AbstractJavaPersistentAttribute
+{
+
+	public GenericJavaPersistentAttribute(PersistentType parent, JavaResourcePersistentAttribute jrpa) {
+		super(parent, jrpa);
+	}
+
+	
+	// ********** AccessHolder implementation **********
+	
+	/**
+	 * GenericJavaPersistentAttribute does not support specified access (no access element in 1.0), so we return null
+	 */
+	public AccessType getSpecifiedAccess() {
+		return null;
+	}
+	
+	public void setSpecifiedAccess(AccessType specifiedAccess) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPersistentType.java
new file mode 100644
index 0000000..a18bb0f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPersistentType.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaPersistentType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * JPA 1.0 Java persistent type.
+ * The specified access is always null.
+ */
+public class GenericJavaPersistentType
+	extends AbstractJavaPersistentType
+{
+
+	public GenericJavaPersistentType(PersistentType.Owner parent, JavaResourcePersistentType jrpt) {
+		super(parent, jrpt);
+	}
+	
+	
+	// ********** access **********
+	
+	/**
+	 * GenericJavaPersistentType does not support specified access (no Access
+	 * annotation in 1.0), so we return null
+	 */
+	@Override
+	protected AccessType buildSpecifiedAccess() {
+		return null;
+	}
+	
+	/**
+	 * GenericJavaPersistentType does not support specified access
+	 * (no Access annotation in 1.0)
+	 */
+	public void setSpecifiedAccess(AccessType specifiedAccess) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..6a66e6d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaBaseJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaNamedColumn;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+
+public class GenericJavaPrimaryKeyJoinColumn extends AbstractJavaNamedColumn<PrimaryKeyJoinColumnAnnotation>
+	implements JavaPrimaryKeyJoinColumn
+{
+	protected String specifiedReferencedColumnName;
+
+	protected String defaultReferencedColumnName;
+	
+	public GenericJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaBaseJoinColumn.Owner owner) {
+		super(parent, owner);
+	}
+
+	@Override
+	public void initialize(PrimaryKeyJoinColumnAnnotation column) {
+		super.initialize(column);
+		this.specifiedReferencedColumnName = this.getResourceReferencedColumnName();
+		this.defaultReferencedColumnName = this.buildDefaultReferencedColumnName();
+	}
+
+	@Override
+	public void update(PrimaryKeyJoinColumnAnnotation resourceColumn) {
+		super.update(resourceColumn);
+		this.setSpecifiedReferencedColumnName_(this.getResourceReferencedColumnName());
+		this.setDefaultReferencedColumnName(this.buildDefaultReferencedColumnName());
+	}
+
+	//************** JavaNamedColumn implementation ***************
+	@Override
+	public JavaBaseJoinColumn.Owner getOwner() {
+		return (JavaBaseJoinColumn.Owner) super.getOwner();
+	}
+	
+	//************** BaseJoinColumn implementation ***************
+	
+	public String getReferencedColumnName() {
+		return (this.specifiedReferencedColumnName == null) ? this.defaultReferencedColumnName : this.specifiedReferencedColumnName;
+	}
+
+	public String getSpecifiedReferencedColumnName() {
+		return this.specifiedReferencedColumnName;
+	}
+
+	public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		getResourceColumn().setReferencedColumnName(newSpecifiedReferencedColumnName);
+		firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+
+	protected void setSpecifiedReferencedColumnName_(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+
+	public String getDefaultReferencedColumnName() {
+		return this.defaultReferencedColumnName;
+	}
+
+	protected void setDefaultReferencedColumnName(String newDefaultReferencedColumnName) {
+		String oldDefaultReferencedColumnName = this.defaultReferencedColumnName;
+		this.defaultReferencedColumnName = newDefaultReferencedColumnName;
+		firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, oldDefaultReferencedColumnName, newDefaultReferencedColumnName);
+	}
+	
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+
+	@Override
+	public String getTable() {
+		return getOwner().getDefaultTableName();
+	}
+
+	public Column getReferencedDbColumn() {
+		Table table = this.getReferencedColumnDbTable();
+		return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
+	}
+
+	public Table getReferencedColumnDbTable() {
+		return getOwner().getReferencedColumnDbTable();
+	}
+
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceColumn().referencedColumnNameTouches(pos, astRoot);
+	}
+
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.referencedColumnNameTouches(pos, astRoot)) {
+			return this.getJavaCandidateReferencedColumnNames(filter).iterator();
+		}
+		return null;
+	}
+
+	private Iterable<String> getJavaCandidateReferencedColumnNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateReferencedColumnNames(filter));
+	}
+
+	private Iterable<String> getCandidateReferencedColumnNames(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateReferencedColumnNames(), filter);
+	}
+
+	private Iterable<String> getCandidateReferencedColumnNames() {
+		Table table = this.getOwner().getReferencedColumnDbTable();
+		return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	public boolean isReferencedColumnResolved() {
+		return getReferencedDbColumn() != null;
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		TextRange textRange = this.getResourceColumn().getReferencedColumnNameTextRange(astRoot);
+		return textRange != null ? textRange : getValidationTextRange(astRoot);
+	}
+	
+	protected String getResourceReferencedColumnName() {
+		return getResourceColumn().getReferencedColumnName();
+	}
+	
+	//TODO not correct when we start supporting primaryKeyJoinColumns in 1-1 mappings
+	protected String buildDefaultReferencedColumnName() {
+		return buildDefaultName();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		super.toString(sb);
+		sb.append("=>"); //$NON-NLS-1$
+		sb.append(this.getReferencedColumnName());
+	}
+	
+	@Override
+	//this method will only be called if the table validates correctly
+	protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
+		this.validateJoinColumnName(messages, astRoot);
+		this.validateReferencedColumnName(messages, astRoot);
+	}
+	
+	protected void validateJoinColumnName(List<IMessage> messages, CompilationUnit astRoot) {
+		if (getSpecifiedName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedNameMultipleJoinColumnsMessage(astRoot));
+		}
+		else if (this.getName() != null){
+			super.validateName(messages, astRoot);
+		}
+		//If the name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+	
+	protected void validateReferencedColumnName(List<IMessage> messages, CompilationUnit astRoot) {
+		if (getSpecifiedReferencedColumnName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(astRoot));
+		}
+		else if (this.getReferencedColumnName() != null) {
+			if (this.getReferencedColumnDbTable() != null && ! this.isReferencedColumnResolved()) {
+				messages.add(getOwner().buildUnresolvedReferencedColumnNameMessage(this, this.getReferencedColumnNameTextRange(astRoot)));
+			}
+		}
+		//If the referenced column name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+	
+	protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(CompilationUnit astRoot) {
+		return getOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(this, getNameTextRange(astRoot));
+	}
+
+	protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(CompilationUnit astRoot) {
+		return getOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(this, getReferencedColumnNameTextRange(astRoot));
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
new file mode 100644
index 0000000..3baaedc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.NamedNativeQuery;
+import org.eclipse.jpt.core.context.NamedQuery;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaNamedNativeQuery;
+import org.eclipse.jpt.core.context.java.JavaNamedQuery;
+import org.eclipse.jpt.core.context.java.JavaQuery;
+import org.eclipse.jpt.core.context.java.JavaQueryContainer;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
+	implements JavaQueryContainer
+{
+	protected JavaResourcePersistentMember javaResourcePersistentMember;
+
+	protected final List<JavaNamedQuery> namedQueries;
+
+	protected final List<JavaNamedNativeQuery> namedNativeQueries;
+	
+	public GenericJavaQueryContainer(JavaJpaContextNode parent) {
+		super(parent);
+		this.namedQueries = new ArrayList<JavaNamedQuery>();
+		this.namedNativeQueries = new ArrayList<JavaNamedNativeQuery>();
+	}
+
+	@Override
+	public JavaJpaContextNode getParent() {
+		return (JavaJpaContextNode) super.getParent();
+	}
+	
+	
+	public ListIterator<JavaNamedQuery> namedQueries() {
+		return new CloneListIterator<JavaNamedQuery>(this.namedQueries);
+	}
+	
+	public int namedQueriesSize() {
+		return this.namedQueries.size();
+	}
+	
+	public JavaNamedQuery addNamedQuery(int index) {
+		JavaNamedQuery namedQuery = getJpaFactory().buildJavaNamedQuery(this);
+		this.namedQueries.add(index, namedQuery);
+		NamedQueryAnnotation namedQueryAnnotation = 
+				(NamedQueryAnnotation) this.javaResourcePersistentMember.
+					addAnnotation(
+						index, NamedQueryAnnotation.ANNOTATION_NAME, 
+						NamedQueriesAnnotation.ANNOTATION_NAME);
+		namedQuery.initialize(namedQueryAnnotation);
+		fireItemAdded(NAMED_QUERIES_LIST, index, namedQuery);
+		return namedQuery;
+	}
+	
+	protected void addNamedQuery(int index, JavaNamedQuery namedQuery) {
+		addItemToList(index, namedQuery, this.namedQueries, NAMED_QUERIES_LIST);
+	}
+	
+	protected void addNamedQuery(JavaNamedQuery namedQuery) {
+		this.addNamedQuery(this.namedQueries.size(), namedQuery);
+	}
+	
+	public void removeNamedQuery(NamedQuery namedQuery) {
+		removeNamedQuery(this.namedQueries.indexOf(namedQuery));
+	}
+	
+	public void removeNamedQuery(int index) {
+		JavaNamedQuery removedNamedQuery = this.namedQueries.remove(index);
+		this.javaResourcePersistentMember.removeAnnotation(
+				index, NamedQueryAnnotation.ANNOTATION_NAME, NamedQueriesAnnotation.ANNOTATION_NAME);
+		fireItemRemoved(NAMED_QUERIES_LIST, index, removedNamedQuery);
+	}	
+	
+	protected void removeNamedQuery_(JavaNamedQuery namedQuery) {
+		removeItemFromList(namedQuery, this.namedQueries, NAMED_QUERIES_LIST);
+	}
+	
+	public void moveNamedQuery(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.namedQueries, targetIndex, sourceIndex);
+		this.javaResourcePersistentMember.moveAnnotation(
+				targetIndex, sourceIndex, NamedQueriesAnnotation.ANNOTATION_NAME);
+		fireItemMoved(NAMED_QUERIES_LIST, targetIndex, sourceIndex);		
+	}
+	
+	public ListIterator<JavaNamedNativeQuery> namedNativeQueries() {
+		return new CloneListIterator<JavaNamedNativeQuery>(this.namedNativeQueries);
+	}
+	
+	public int namedNativeQueriesSize() {
+		return this.namedNativeQueries.size();
+	}
+	
+	public JavaNamedNativeQuery addNamedNativeQuery(int index) {
+		JavaNamedNativeQuery namedNativeQuery = getJpaFactory().buildJavaNamedNativeQuery(this);
+		this.namedNativeQueries.add(index, namedNativeQuery);
+		NamedNativeQueryAnnotation namedNativeQueryAnnotation = 
+				(NamedNativeQueryAnnotation) this.javaResourcePersistentMember.
+					addAnnotation(
+						index, NamedNativeQueryAnnotation.ANNOTATION_NAME, 
+						NamedNativeQueriesAnnotation.ANNOTATION_NAME);
+		namedNativeQuery.initialize(namedNativeQueryAnnotation);		
+		fireItemAdded(NAMED_NATIVE_QUERIES_LIST, index, namedNativeQuery);
+		return namedNativeQuery;
+	}
+	
+	protected void addNamedNativeQuery(int index, JavaNamedNativeQuery namedNativeQuery) {
+		addItemToList(index, namedNativeQuery, this.namedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+	}
+	
+	protected void addNamedNativeQuery(JavaNamedNativeQuery namedNativeQuery) {
+		this.addNamedNativeQuery(this.namedNativeQueries.size(), namedNativeQuery);
+	}
+	
+	public void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery) {
+		this.removeNamedNativeQuery(this.namedNativeQueries.indexOf(namedNativeQuery));
+	}
+	
+	public void removeNamedNativeQuery(int index) {
+		JavaNamedNativeQuery removedNamedNativeQuery = this.namedNativeQueries.remove(index);
+		this.javaResourcePersistentMember.removeAnnotation(
+				index, NamedNativeQueryAnnotation.ANNOTATION_NAME, 
+				NamedNativeQueriesAnnotation.ANNOTATION_NAME);
+		fireItemRemoved(NAMED_NATIVE_QUERIES_LIST, index, removedNamedNativeQuery);
+	}	
+	
+	protected void removeNamedNativeQuery_(JavaNamedNativeQuery namedNativeQuery) {
+		removeItemFromList(namedNativeQuery, this.namedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+	}
+	
+	public void moveNamedNativeQuery(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.namedNativeQueries, targetIndex, sourceIndex);
+		this.javaResourcePersistentMember.moveAnnotation(
+				targetIndex, sourceIndex, NamedNativeQueriesAnnotation.ANNOTATION_NAME);
+		fireItemMoved(NAMED_NATIVE_QUERIES_LIST, targetIndex, sourceIndex);		
+	}
+
+	
+	
+	public void initialize(JavaResourcePersistentMember jrpm) {
+		this.javaResourcePersistentMember = jrpm;
+		this.initializeNamedQueries();
+		this.initializeNamedNativeQueries();
+	}
+
+	protected void initializeNamedQueries() {
+		for (Iterator<NestableAnnotation> stream = this.javaResourcePersistentMember.
+					annotations(
+						NamedQueryAnnotation.ANNOTATION_NAME, 
+						NamedQueriesAnnotation.ANNOTATION_NAME); 
+					stream.hasNext(); ) {
+			this.namedQueries.add(buildNamedQuery((NamedQueryAnnotation) stream.next()));
+		}
+	}
+	
+	protected void initializeNamedNativeQueries() {
+		for (Iterator<NestableAnnotation> stream = this.javaResourcePersistentMember.
+					annotations(
+						NamedNativeQueryAnnotation.ANNOTATION_NAME, 
+						NamedNativeQueriesAnnotation.ANNOTATION_NAME); 
+					stream.hasNext(); ) {
+			this.namedNativeQueries.add(buildNamedNativeQuery((NamedNativeQueryAnnotation) stream.next()));
+		}
+	}
+	
+	protected JavaNamedQuery buildNamedQuery(NamedQueryAnnotation namedQueryResource) {
+		JavaNamedQuery namedQuery = getJpaFactory().buildJavaNamedQuery(this);
+		namedQuery.initialize(namedQueryResource);
+		return namedQuery;
+	}
+	
+	protected JavaNamedNativeQuery buildNamedNativeQuery(NamedNativeQueryAnnotation namedNativeQueryResource) {
+		JavaNamedNativeQuery namedNativeQuery = getJpaFactory().buildJavaNamedNativeQuery(this);
+		namedNativeQuery.initialize(namedNativeQueryResource);
+		return namedNativeQuery;
+	}
+
+	public void update(JavaResourcePersistentMember jrpm) {
+		this.javaResourcePersistentMember = jrpm;
+		this.updateNamedQueries();
+		this.updateNamedNativeQueries();
+	}
+	
+	protected void updateNamedQueries() {
+		ListIterator<JavaNamedQuery> queries = namedQueries();
+		Iterator<NestableAnnotation> resourceNamedQueries = 
+				this.javaResourcePersistentMember.annotations(
+					NamedQueryAnnotation.ANNOTATION_NAME, 
+					NamedQueriesAnnotation.ANNOTATION_NAME);
+		
+		while (queries.hasNext()) {
+			JavaNamedQuery namedQuery = queries.next();
+			if (resourceNamedQueries.hasNext()) {
+				namedQuery.update((NamedQueryAnnotation) resourceNamedQueries.next());
+			}
+			else {
+				removeNamedQuery_(namedQuery);
+			}
+		}
+		
+		while (resourceNamedQueries.hasNext()) {
+			addNamedQuery(buildNamedQuery((NamedQueryAnnotation) resourceNamedQueries.next()));
+		}
+	}
+	
+	protected void updateNamedNativeQueries() {
+		ListIterator<JavaNamedNativeQuery> queries = namedNativeQueries();
+		Iterator<NestableAnnotation> resourceNamedNativeQueries = 
+				this.javaResourcePersistentMember.annotations(
+					NamedNativeQueryAnnotation.ANNOTATION_NAME, 
+					NamedNativeQueriesAnnotation.ANNOTATION_NAME);
+		
+		while (queries.hasNext()) {
+			JavaNamedNativeQuery namedQuery = queries.next();
+			if (resourceNamedNativeQueries.hasNext()) {
+				namedQuery.update((NamedNativeQueryAnnotation) resourceNamedNativeQueries.next());
+			}
+			else {
+				removeNamedNativeQuery_(namedQuery);
+			}
+		}
+		
+		while (resourceNamedNativeQueries.hasNext()) {
+			addNamedNativeQuery(buildNamedNativeQuery((NamedNativeQueryAnnotation) resourceNamedNativeQueries.next()));
+		}	
+	}
+	
+	
+	//********** Validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateQueries(messages, astRoot);
+	}
+	
+	protected void validateQueries(List<IMessage> messages, CompilationUnit astRoot) {
+		for (Iterator<JavaQuery> localQueries = this.queries(); localQueries.hasNext(); ) {
+			JavaQuery localQuery = localQueries.next();
+			for (Iterator<Query> globalQueries = this.getPersistenceUnit().queries(); globalQueries.hasNext(); ) {
+				if (localQuery.duplicates(globalQueries.next())) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.QUERY_DUPLICATE_NAME,
+							new String[] {localQuery.getName()},
+							localQuery,
+							localQuery.getNameTextRange(astRoot)
+						)
+					);
+				}
+			}
+		}
+	}
+	
+	
+	@SuppressWarnings("unchecked")
+	public Iterator<JavaQuery> queries() {
+		return new CompositeIterator<JavaQuery>(this.namedNativeQueries(), this.namedQueries());
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.javaResourcePersistentMember.getTextRange(astRoot);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryHint.java
new file mode 100644
index 0000000..e785903
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryHint.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.QueryHint;
+import org.eclipse.jpt.core.context.java.JavaQuery;
+import org.eclipse.jpt.core.context.java.JavaQueryHint;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaQueryHint extends AbstractJavaJpaContextNode implements JavaQueryHint
+{
+	protected String name;
+
+	protected String value;
+
+	protected QueryHintAnnotation resourceQueryHint;
+	
+	public GenericJavaQueryHint(JavaQuery parent) {
+		super(parent);
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		this.resourceQueryHint.setName(newName);
+		firePropertyChanged(QueryHint.NAME_PROPERTY, oldName, newName);
+	}
+
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String newValue) {
+		String oldValue = this.value;
+		this.value = newValue;
+		this.resourceQueryHint.setValue(newValue);
+		firePropertyChanged(QueryHint.VALUE_PROPERTY, oldValue, newValue);
+	}
+
+
+	public void initialize(QueryHintAnnotation resourceQueryHint) {
+		this.resourceQueryHint = resourceQueryHint;
+		this.name = resourceQueryHint.getName();
+		this.value = resourceQueryHint.getValue();
+	}
+	
+	public void update(QueryHintAnnotation resourceQueryHint) {
+		this.resourceQueryHint = resourceQueryHint;
+		this.setName(resourceQueryHint.getName());
+		this.setValue(resourceQueryHint.getValue());
+	}
+
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.resourceQueryHint.getTextRange(astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
new file mode 100644
index 0000000..51691fe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
@@ -0,0 +1,365 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaReferenceTable;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaTable;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.ReferenceTableAnnotation;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Java join table
+ */
+public abstract class GenericJavaReferenceTable
+	extends AbstractJavaTable
+	implements JavaReferenceTable
+{
+
+	protected JavaJoinColumn defaultJoinColumn;
+
+	protected final Vector<JavaJoinColumn> specifiedJoinColumns = new Vector<JavaJoinColumn>();
+	protected final JavaJoinColumn.Owner joinColumnOwner;
+
+
+	protected GenericJavaReferenceTable(JavaJpaContextNode parent) {
+		super(parent);
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+	}
+
+	protected abstract JavaJoinColumn.Owner buildJoinColumnOwner();
+
+	public void initialize(ReferenceTableAnnotation referenceTableAnnotation) {
+		super.initialize(referenceTableAnnotation);
+		this.initializeSpecifiedJoinColumns(referenceTableAnnotation);
+		this.initializeDefaultJoinColumn(referenceTableAnnotation);
+	}
+
+	public void update(ReferenceTableAnnotation referenceTableAnnotation) {
+		super.update(referenceTableAnnotation);
+		this.updateSpecifiedJoinColumns(referenceTableAnnotation);
+		this.updateDefaultJoinColumn(referenceTableAnnotation);
+	}
+
+
+	// ********** AbstractJavaTable implementation **********
+
+	@Override
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	@Override
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+	@Override
+	protected abstract ReferenceTableAnnotation getAnnotation();
+
+
+	// ********** Table implementation **********
+
+	public boolean isResourceSpecified() {
+		return this.getAnnotation().isSpecified();
+	}
+
+
+	// ********** join columns **********
+
+	public ListIterator<JavaJoinColumn> joinColumns() {
+		return this.hasSpecifiedJoinColumns() ? this.specifiedJoinColumns() : this.defaultJoinColumns();
+	}
+
+	public int joinColumnsSize() {
+		return this.hasSpecifiedJoinColumns() ? this.specifiedJoinColumnsSize() : this.defaultJoinColumnsSize();
+	}
+
+	public void convertDefaultToSpecifiedJoinColumn() {
+		MappingTools.convertReferenceTableDefaultToSpecifiedJoinColumn(this);
+	}
+
+	protected JavaJoinColumn buildJoinColumn(JoinColumnAnnotation joinColumnAnnotation) {
+		return this.buildJoinColumn(joinColumnAnnotation, this.joinColumnOwner);
+	}
+
+
+	// ********** default join column **********
+
+	public JavaJoinColumn getDefaultJoinColumn() {
+		return this.defaultJoinColumn;
+	}
+
+	protected void setDefaultJoinColumn(JavaJoinColumn defaultJoinColumn) {
+		JavaJoinColumn old = this.defaultJoinColumn;
+		this.defaultJoinColumn = defaultJoinColumn;
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN, old, defaultJoinColumn);
+	}
+
+	protected ListIterator<JavaJoinColumn> defaultJoinColumns() {
+		if (this.defaultJoinColumn != null) {
+			return new SingleElementListIterator<JavaJoinColumn>(this.defaultJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+
+	protected int defaultJoinColumnsSize() {
+		return (this.defaultJoinColumn == null) ? 0 : 1;
+	}
+
+	protected void initializeDefaultJoinColumn(ReferenceTableAnnotation referenceTableAnnotation) {
+		if (this.shouldBuildDefaultJoinColumn()) {
+			this.defaultJoinColumn = this.buildJoinColumn(new NullJoinColumnAnnotation(referenceTableAnnotation));
+		}
+	}
+
+	protected void updateDefaultJoinColumn(ReferenceTableAnnotation referenceTableAnnotation) {
+		if (this.shouldBuildDefaultJoinColumn()) {
+			if (this.defaultJoinColumn == null) {
+				this.setDefaultJoinColumn(this.buildJoinColumn(new NullJoinColumnAnnotation(referenceTableAnnotation)));
+			} else {
+				this.defaultJoinColumn.update(new NullJoinColumnAnnotation(referenceTableAnnotation));
+			}
+		} else {
+			this.setDefaultJoinColumn(null);
+		}
+	}
+
+	protected boolean shouldBuildDefaultJoinColumn() {
+		return ! this.hasSpecifiedJoinColumns();
+	}
+
+
+	// ********** specified join columns **********
+
+	public ListIterator<JavaJoinColumn> specifiedJoinColumns() {
+		return new CloneListIterator<JavaJoinColumn>(this.specifiedJoinColumns);
+	}
+
+	public int specifiedJoinColumnsSize() {
+		return this.specifiedJoinColumns.size();
+	}
+
+	public boolean hasSpecifiedJoinColumns() {
+		return this.specifiedJoinColumns.size() != 0;
+	}
+
+	public JavaJoinColumn addSpecifiedJoinColumn(int index) {
+		// Clear out the default now so it doesn't get removed during an update and
+		// cause change notifications to be sent to the UI in the wrong order.
+		// If the default is already null, nothing will happen.
+		JoinColumn oldDefault = this.defaultJoinColumn;
+		this.defaultJoinColumn = null;
+
+		JavaJoinColumn joinColumn = this.getJpaFactory().buildJavaJoinColumn(this, this.joinColumnOwner);
+		this.specifiedJoinColumns.add(index, joinColumn);
+		ReferenceTableAnnotation referenceTableAnnotation = this.getAnnotation();
+		JoinColumnAnnotation joinColumnAnnotation = referenceTableAnnotation.addJoinColumn(index);
+		joinColumn.initialize(joinColumnAnnotation);
+		this.fireItemAdded(SPECIFIED_JOIN_COLUMNS_LIST, index, joinColumn);
+
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN, oldDefault, null);
+		return joinColumn;
+	}
+
+	protected void addSpecifiedJoinColumn(int index, JavaJoinColumn joinColumn) {
+		this.addItemToList(index, joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+
+	protected void addSpecifiedJoinColumn(JavaJoinColumn joinColumn) {
+		this.addSpecifiedJoinColumn(this.specifiedJoinColumns.size(), joinColumn);
+	}
+
+	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
+		this.removeSpecifiedJoinColumn(this.specifiedJoinColumns.indexOf(joinColumn));
+	}
+
+	public void removeSpecifiedJoinColumn(int index) {
+		JavaJoinColumn removedJoinColumn = this.specifiedJoinColumns.remove(index);
+		if ( ! this.hasSpecifiedJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultJoinColumn = this.buildJoinColumn(new NullJoinColumnAnnotation(this.getAnnotation()));
+		}
+		this.getAnnotation().removeJoinColumn(index);
+		this.fireItemRemoved(SPECIFIED_JOIN_COLUMNS_LIST, index, removedJoinColumn);
+		if (this.defaultJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(DEFAULT_JOIN_COLUMN, null, this.defaultJoinColumn);
+		}
+	}
+
+	protected void removeSpecifiedJoinColumn_(JavaJoinColumn joinColumn) {
+		this.removeItemFromList(joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+
+	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedJoinColumns, targetIndex, sourceIndex);
+		this.getAnnotation().moveJoinColumn(targetIndex, sourceIndex);
+		this.fireItemMoved(SPECIFIED_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);
+	}
+
+	public void clearSpecifiedJoinColumns() {
+		// for now, we have to remove annotations one at a time...
+		for (int i = this.specifiedJoinColumns.size(); i-- > 0; ) {
+			this.removeSpecifiedJoinColumn(i);
+		}
+	}
+
+	protected void initializeSpecifiedJoinColumns(ReferenceTableAnnotation referenceTableAnnotation) {
+		for (ListIterator<JoinColumnAnnotation> stream = referenceTableAnnotation.joinColumns(); stream.hasNext(); ) {
+			this.specifiedJoinColumns.add(this.buildJoinColumn(stream.next()));
+		}
+	}
+
+	protected void updateSpecifiedJoinColumns(ReferenceTableAnnotation referenceTableAnnotation) {
+		ListIterator<JavaJoinColumn> joinColumns = this.specifiedJoinColumns();
+		ListIterator<JoinColumnAnnotation> joinColumnAnnotations = referenceTableAnnotation.joinColumns();
+
+		while (joinColumns.hasNext()) {
+			JavaJoinColumn joinColumn = joinColumns.next();
+			if (joinColumnAnnotations.hasNext()) {
+				joinColumn.update(joinColumnAnnotations.next());
+			} else {
+				this.removeSpecifiedJoinColumn_(joinColumn);
+			}
+		}
+
+		while (joinColumnAnnotations.hasNext()) {
+			this.addSpecifiedJoinColumn(this.buildJoinColumn(joinColumnAnnotations.next()));
+		}
+	}
+
+
+	// ********** Java completion proposals **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaJoinColumn column : CollectionTools.iterable(this.joinColumns())) {
+			result = column.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+
+
+	// ********** misc **********
+
+	protected JavaJoinColumn buildJoinColumn(JoinColumnAnnotation joinColumnAnnotation, JavaJoinColumn.Owner owner) {
+		JavaJoinColumn joinColumn = this.getJpaFactory().buildJavaJoinColumn(this, owner);
+		joinColumn.initialize(joinColumnAnnotation);
+		return joinColumn;
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		boolean continueValidating = true;
+		if (this.shouldValidateAgainstDatabase()) {
+			continueValidating = this.validateAgainstDatabase(messages, reporter, astRoot);
+		}
+		//join column validation will handle the check for whether to validate against the database
+		//some validation messages are not database specific. If the database validation for the
+		//table fails we will stop there and not validate the join columns at all
+		if (continueValidating) {
+			this.validateJoinColumns(messages, reporter, astRoot);
+		}
+	}
+	
+	protected abstract boolean shouldValidateAgainstDatabase();
+
+	protected boolean validateAgainstDatabase(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if ( ! this.hasResolvedCatalog()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					this.getUnresolvedCatalogMessageId(),
+					new String[] {this.getCatalog(), this.getName()}, 
+					this, 
+					this.getCatalogTextRange(astRoot)
+				)
+			);
+			return false;
+		}
+
+		if ( ! this.hasResolvedSchema()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					this.getUnresolvedSchemaMessageId(),
+					new String[] {this.getSchema(), this.getName()}, 
+					this, 
+					this.getSchemaTextRange(astRoot)
+				)
+			);
+			return false;
+		}
+
+		if ( ! this.isResolved()) {
+			if (getName() != null) { //if name is null, the validation will be handled elsewhere, such as the target entity is not defined
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							this.getUnresolvedNameMessageId(),
+							new String[] {this.getName()}, 
+							this, 
+							this.getNameTextRange(astRoot))
+					);
+			}
+			return false;
+		}
+		return true;
+	}
+
+	protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		this.validateJoinColumns(this.joinColumns(), messages, reporter, astRoot);		
+	}
+
+	protected void validateJoinColumns(Iterator<JavaJoinColumn> joinColumns, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		while (joinColumns.hasNext()) {
+			joinColumns.next().validate(messages, reporter, astRoot);
+		}
+	}
+
+	protected abstract String getUnresolvedCatalogMessageId();
+	
+	protected abstract String getUnresolvedSchemaMessageId();
+	
+	protected abstract String getUnresolvedNameMessageId();
+}
+
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
new file mode 100644
index 0000000..e3a8df4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
@@ -0,0 +1,466 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaBaseJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaSecondaryTable;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaTable;
+import org.eclipse.jpt.core.internal.resource.java.NullPrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * 
+ */
+public class GenericJavaSecondaryTable
+	extends AbstractJavaTable
+	implements JavaSecondaryTable
+{
+	protected final List<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns;
+	protected final JavaBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
+
+	protected JavaPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
+
+	protected SecondaryTableAnnotation resourceSecondaryTable;
+	
+	public GenericJavaSecondaryTable(JavaEntity parent) {
+		super(parent);
+		this.specifiedPrimaryKeyJoinColumns = new ArrayList<JavaPrimaryKeyJoinColumn>();
+		this.primaryKeyJoinColumnOwner = this.buildPrimaryKeyJoinColumnOwner();
+	}
+	
+	protected JavaBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+		return new PrimaryKeyJoinColumnOwner();
+	}
+	
+	@Override
+	public JavaEntity getParent() {
+		return (JavaEntity) super.getParent();
+	}
+
+
+	//***************** AbstractJavaTable implementation ********************
+	
+	@Override
+	protected String getAnnotationName() {
+		return SecondaryTableAnnotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected SecondaryTableAnnotation getAnnotation() {
+		return this.resourceSecondaryTable;
+	}
+	
+	public boolean isResourceSpecified() {
+		return true;
+	}
+	
+	// a secondary table doesn't have a default name
+	@Override
+	protected String buildDefaultName() {
+		return null;
+	}
+
+	@Override
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+	
+	@Override
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+	
+
+	//***************** ISecondaryTable implementation ********************
+
+	public ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns() {
+		return this.containsSpecifiedPrimaryKeyJoinColumns() ? this.specifiedPrimaryKeyJoinColumns() : this.defaultPrimaryKeyJoinColumns();
+	}
+	
+	public int primaryKeyJoinColumnsSize() {
+		return this.containsSpecifiedPrimaryKeyJoinColumns() ? this.specifiedPrimaryKeyJoinColumnsSize() : this.defaultPrimaryKeyJoinColumnsSize();
+	}
+	
+	public ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns() {
+		return new CloneListIterator<JavaPrimaryKeyJoinColumn>(this.specifiedPrimaryKeyJoinColumns);
+	}
+	
+	public int specifiedPrimaryKeyJoinColumnsSize() {
+		return this.specifiedPrimaryKeyJoinColumns.size();
+	}
+	
+	public boolean containsSpecifiedPrimaryKeyJoinColumns() {
+		return !this.specifiedPrimaryKeyJoinColumns.isEmpty();
+	}	
+	
+	public JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
+		return this.defaultPrimaryKeyJoinColumn;
+	}
+	
+	protected void setDefaultPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn newPkJoinColumn) {
+		JavaPrimaryKeyJoinColumn oldPkJoinColumn = this.defaultPrimaryKeyJoinColumn;
+		this.defaultPrimaryKeyJoinColumn = newPkJoinColumn;
+		firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, oldPkJoinColumn, newPkJoinColumn);
+	}
+
+	protected ListIterator<JavaPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns() {
+		if (this.defaultPrimaryKeyJoinColumn != null) {
+			return new SingleElementListIterator<JavaPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+	
+	protected int defaultPrimaryKeyJoinColumnsSize() {
+		return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
+	}
+
+	public JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
+		// Clear out the default now so it doesn't get removed during an update and
+		// cause change notifications to be sent to the UI in the wrong order.
+		JavaPrimaryKeyJoinColumn oldDefault = this.defaultPrimaryKeyJoinColumn;
+		this.defaultPrimaryKeyJoinColumn = null;
+
+		JavaPrimaryKeyJoinColumn pkJoinColumn = this.getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner);
+		this.specifiedPrimaryKeyJoinColumns.add(index, pkJoinColumn);
+		PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation = this.resourceSecondaryTable.addPkJoinColumn(index);
+		pkJoinColumn.initialize(pkJoinColumnAnnotation);
+		this.fireItemAdded(SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, pkJoinColumn);
+
+		this.firePropertyChanged(DEFAULT_PRIMARY_KEY_JOIN_COLUMN, oldDefault, null);
+		return pkJoinColumn;
+	}
+
+	protected void addSpecifiedPrimaryKeyJoinColumn(int index, JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		addItemToList(index, primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	protected void addSpecifiedPrimaryKeyJoinColumn(JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		this.addSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.size(), primaryKeyJoinColumn);
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn joinColumn) {
+		this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.indexOf(joinColumn));
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
+		JavaPrimaryKeyJoinColumn removedPrimaryKeyJoinColumn = this.specifiedPrimaryKeyJoinColumns.remove(index);
+		if (!containsSpecifiedPrimaryKeyJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultPrimaryKeyJoinColumn = buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(this.resourceSecondaryTable));
+		}
+		this.resourceSecondaryTable.removePkJoinColumn(index);
+		fireItemRemoved(SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, removedPrimaryKeyJoinColumn);
+		if (this.defaultPrimaryKeyJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(Entity.DEFAULT_PRIMARY_KEY_JOIN_COLUMN, null, this.defaultPrimaryKeyJoinColumn);
+		}
+	}	
+
+	protected void removeSpecifiedPrimaryKeyJoinColumn_(JavaPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		removeItemFromList(primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedPrimaryKeyJoinColumns, targetIndex, sourceIndex);
+		this.resourceSecondaryTable.movePkJoinColumn(targetIndex, sourceIndex);
+		fireItemMoved(SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	public JavaEntity getJavaEntity() {
+		return getParent();
+	}
+	
+	
+	//********************* updating ************************
+	
+	public void initialize(SecondaryTableAnnotation secondaryTable) {
+		super.initialize(secondaryTable);
+		this.resourceSecondaryTable = secondaryTable;
+		this.initializeSpecifiedPrimaryKeyJoinColumns(secondaryTable);
+		this.initializeDefaultPrimaryKeyJoinColumn(secondaryTable);
+	}
+	
+	protected void initializeSpecifiedPrimaryKeyJoinColumns(SecondaryTableAnnotation secondaryTable) {
+		ListIterator<PrimaryKeyJoinColumnAnnotation> annotations = secondaryTable.pkJoinColumns();
+		
+		while(annotations.hasNext()) {
+			this.specifiedPrimaryKeyJoinColumns.add(buildPrimaryKeyJoinColumn(annotations.next()));
+		}
+	}
+	
+	protected boolean shouldBuildDefaultPrimaryKeyJoinColumn() {
+		return !containsSpecifiedPrimaryKeyJoinColumns();
+	}
+	
+	protected void initializeDefaultPrimaryKeyJoinColumn(SecondaryTableAnnotation secondaryTable) {
+		if (!shouldBuildDefaultPrimaryKeyJoinColumn()) {
+			return;
+		}
+		this.defaultPrimaryKeyJoinColumn = buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(secondaryTable));
+	}	
+
+	
+	public void update(SecondaryTableAnnotation sta) {
+		this.resourceSecondaryTable = sta;
+		super.update(sta);
+		this.updateSpecifiedPrimaryKeyJoinColumns(sta);
+		this.updateDefaultPrimaryKeyJoinColumn(sta);
+	}
+	
+	protected void updateSpecifiedPrimaryKeyJoinColumns(SecondaryTableAnnotation sta) {
+		ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns = specifiedPrimaryKeyJoinColumns();
+		ListIterator<PrimaryKeyJoinColumnAnnotation> resourcePrimaryKeyJoinColumns = sta.pkJoinColumns();
+		
+		while (primaryKeyJoinColumns.hasNext()) {
+			JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = primaryKeyJoinColumns.next();
+			if (resourcePrimaryKeyJoinColumns.hasNext()) {
+				primaryKeyJoinColumn.update(resourcePrimaryKeyJoinColumns.next());
+			}
+			else {
+				removeSpecifiedPrimaryKeyJoinColumn_(primaryKeyJoinColumn);
+			}
+		}
+		
+		while (resourcePrimaryKeyJoinColumns.hasNext()) {
+			addSpecifiedPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(resourcePrimaryKeyJoinColumns.next()));
+		}
+	}
+	
+	protected void updateDefaultPrimaryKeyJoinColumn(SecondaryTableAnnotation sta) {
+		if (!shouldBuildDefaultPrimaryKeyJoinColumn()) {
+			setDefaultPrimaryKeyJoinColumn(null);
+			return;
+		}
+		if (getDefaultPrimaryKeyJoinColumn() == null) {
+			this.setDefaultPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(new NullPrimaryKeyJoinColumnAnnotation(sta)));
+		}
+		else {
+			this.defaultPrimaryKeyJoinColumn.update(new NullPrimaryKeyJoinColumnAnnotation(sta));
+		}
+	}	
+	
+	protected JavaPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(PrimaryKeyJoinColumnAnnotation resourcePrimaryKeyJoinColumn) {
+		JavaPrimaryKeyJoinColumn primaryKeyJoinColumn = getJpaFactory().buildJavaPrimaryKeyJoinColumn(this, this.primaryKeyJoinColumnOwner);
+		primaryKeyJoinColumn.initialize(resourcePrimaryKeyJoinColumn);
+		return primaryKeyJoinColumn;
+	}
+	
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		boolean continueValidating = true;
+		if (this.connectionProfileIsActive()) {
+			continueValidating = this.validateAgainstDatabase(messages, astRoot);
+		}
+		//join column validation will handle the check for whether to validate against the database
+		//some validation messages are not database specific. If the database validation for the
+		//table fails we will stop there and not validate the join columns at all
+		if (continueValidating) {
+			for (Iterator<JavaPrimaryKeyJoinColumn> stream = this.primaryKeyJoinColumns(); stream.hasNext(); ) {
+				stream.next().validate(messages, reporter, astRoot);
+			}
+		}
+	}
+
+	protected boolean validateAgainstDatabase(List<IMessage> messages, CompilationUnit astRoot) {
+		if ( ! this.hasResolvedCatalog()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_CATALOG,
+					new String[] {this.getCatalog(), this.getName()}, 
+					this, 
+					this.getCatalogTextRange(astRoot)
+				)
+			);
+			return false;
+		}
+		
+		if ( ! this.hasResolvedSchema()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_SCHEMA,
+					new String[] {this.getSchema(), this.getName()}, 
+					this, 
+					this.getSchemaTextRange(astRoot)
+				)
+			);
+			return false;
+		}
+		
+		if ( ! this.isResolved()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_NAME,
+					new String[] {this.getName()}, 
+					this, 
+					this.getNameTextRange(astRoot)
+				)
+			);
+			return false;
+		}
+		return true;
+	}
+
+
+	// ********** code completion **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaPrimaryKeyJoinColumn column : CollectionTools.iterable(this.primaryKeyJoinColumns())) {
+			result = column.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+
+	public boolean isVirtual() {
+		return false;
+	}
+
+	
+	// ********** PK join column owner adapter **********
+
+	protected class PrimaryKeyJoinColumnOwner
+		implements JavaBaseJoinColumn.Owner
+	{
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaSecondaryTable.this.getValidationTextRange(astRoot);
+		}
+
+		public TypeMapping getTypeMapping() {
+			return GenericJavaSecondaryTable.this.getJavaEntity();
+		}
+
+		public String getDefaultTableName() {
+			return GenericJavaSecondaryTable.this.getName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return GenericJavaSecondaryTable.this.getDbTable();
+		}
+
+		public Table getReferencedColumnDbTable() {
+			return getTypeMapping().getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericJavaSecondaryTable.this.defaultPrimaryKeyJoinColumn == joinColumn;
+		}
+		
+		public String getDefaultColumnName() {
+			if (joinColumnsSize() != 1) {
+				return null;
+			}
+			return getJavaEntity().getPrimaryKeyColumnName();
+
+		}
+
+		public int joinColumnsSize() {
+			return GenericJavaSecondaryTable.this.primaryKeyJoinColumnsSize();
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (((BaseJoinColumn) column).isVirtual()) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME,
+					new String[] {column.getName(), column.getDbTable().getName()}, 
+					column, 
+					textRange
+				);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			if (column.isVirtual()) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+					new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+					column, 
+					textRange
+				);				
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java
new file mode 100644
index 0000000..66ff864
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaSequenceGenerator.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaSequenceGenerator;
+
+/**
+ * 
+ */
+public class GenericJavaSequenceGenerator extends AbstractJavaSequenceGenerator
+{
+
+	public GenericJavaSequenceGenerator(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	// ********** database stuff **********
+
+	/**
+	 * The JPA spec does not allow a sequence to have a schema.
+	 */
+	@Override
+	protected String getSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	/**
+	 * The JPA spec does not allow a sequence to have a catalog.
+	 */
+	@Override
+	protected String getCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTable.java
new file mode 100644
index 0000000..ec81d5f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTable.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaEntity;
+import org.eclipse.jpt.core.context.java.JavaTable;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaTable;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.TableAnnotation;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaTable
+	extends AbstractJavaTable
+	implements JavaTable
+{
+	protected JavaResourcePersistentMember resourcePersistentMember;
+
+	public GenericJavaTable(JavaEntity parent) {
+		super(parent);
+	}
+	
+	public void initialize(JavaResourcePersistentMember pr) {
+		this.resourcePersistentMember = pr;
+		initialize(getAnnotation());
+	}
+
+	//query for the table resource every time on setters.
+	//call one setter and the tableResource could change. 
+	//You could call more than one setter before this object has received any notification
+	//from the java resource model
+	@Override
+	protected TableAnnotation getAnnotation() {
+		//TODO get the NullTable from the resource model or build it here in the context model??
+		return (TableAnnotation) this.resourcePersistentMember.
+				getNonNullAnnotation(getAnnotationName());
+	}
+
+	public boolean isResourceSpecified() {
+		return getAnnotation().isSpecified();
+	}
+	
+	@Override
+	protected String getAnnotationName() {
+		return TableAnnotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	public JavaEntity getParent() {
+		return (JavaEntity) super.getParent();
+	}
+	
+	protected JavaEntity getJavaEntity() {
+		return getParent();
+	}
+	
+	@Override
+	protected String buildDefaultName() {
+		return this.getJavaEntity().getDefaultTableName();
+	}
+
+	/**
+	 * Just to remember:
+	 *   Entity.getDefaultSchema()
+	 *     check inheritance - get default schema from root
+	 *   EntityMappings.getSchema()
+	 *     check for specified schema
+	 *   PersistenceUnit.getDefaultSchema()
+	 *     OrmPersistenceUnitDefaults.getSchema()
+	 *   JpaProject.getDefaultSchema()
+	 *     check for user override project setting
+	 *   Catalog.getDefaultSchema()
+	 *     or
+	 *   Database.getDefaultSchema()
+	 */
+	@Override
+	protected String buildDefaultSchema() {
+		return this.getJavaEntity().getDefaultSchema();
+	}
+	
+	@Override
+	protected String buildDefaultCatalog() {
+		return this.getJavaEntity().getDefaultCatalog();
+	}
+
+	public void update(JavaResourcePersistentMember jrpm) {
+		this.resourcePersistentMember = jrpm;
+		this.update(getAnnotation());
+	}
+
+
+	//******************* validation **********************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		if (this.connectionProfileIsActive()) {
+			this.validateAgainstDatabase(messages, astRoot);
+		}
+	}
+
+	protected void validateAgainstDatabase(List<IMessage> messages, CompilationUnit astRoot) {
+		if ( ! this.hasResolvedCatalog()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TABLE_UNRESOLVED_CATALOG,
+					new String[] {this.getCatalog(), this.getName()}, 
+					this, 
+					this.getCatalogTextRange(astRoot)
+				)
+			);
+			return;
+		}
+		
+		if ( ! this.hasResolvedSchema()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TABLE_UNRESOLVED_SCHEMA,
+					new String[] {this.getSchema(), this.getName()}, 
+					this, 
+					this.getSchemaTextRange(astRoot)
+				)
+			);
+			return;
+		}
+		
+		if ( ! this.isResolved()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TABLE_UNRESOLVED_NAME,
+					new String[] {this.getName()}, 
+					this, 
+					this.getNameTextRange(astRoot)
+				)
+			);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTableGenerator.java
new file mode 100644
index 0000000..14d6d12
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTableGenerator.java
@@ -0,0 +1,533 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaTableGenerator;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaGenerator;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.db.Database;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+/**
+ * 
+ */
+public class GenericJavaTableGenerator
+	extends AbstractJavaGenerator
+	implements JavaTableGenerator, UniqueConstraint.Owner
+{
+	protected String specifiedTable;
+	protected String defaultTable;
+	
+	protected String specifiedSchema;
+	protected String defaultSchema;
+	
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+	
+	protected String specifiedPkColumnName;
+	protected String defaultPkColumnName;
+	
+	protected String specifiedValueColumnName;
+	protected String defaultValueColumnName;
+	
+	protected String specifiedPkColumnValue;
+	protected String defaultPkColumnValue;
+	
+	protected final List<JavaUniqueConstraint> uniqueConstraints;
+
+
+	// ********** constructor **********
+
+	public GenericJavaTableGenerator(JavaJpaContextNode parent) {
+		super(parent);
+		this.uniqueConstraints = new ArrayList<JavaUniqueConstraint>();
+	}
+
+
+	// ********** table **********
+
+	public String getTable() {
+		return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
+	}
+	
+	public String getSpecifiedTable() {
+		return this.specifiedTable;
+	}
+
+	public void setSpecifiedTable(String table) {
+		String old = this.specifiedTable;
+		this.specifiedTable = table;
+		this.getResourceGenerator().setTable(table);
+		this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
+	}
+
+	protected void setSpecifiedTable_(String table) {
+		String old = this.specifiedTable;
+		this.specifiedTable = table;
+		this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
+	}
+
+	/**
+	 * The default table is determined by the JPA implementation.
+	 */
+	public String getDefaultTable() {
+		return this.defaultTable;
+	}
+
+
+	// ********** schema **********
+
+	@Override
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.getResourceGenerator().setSchema(schema);
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	protected void setSpecifiedSchema_(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+
+	// ********** catalog **********
+
+	@Override
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.getResourceGenerator().setCatalog(catalog);
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+	
+	protected void setSpecifiedCatalog_(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+
+	// ********** primary key column name **********
+
+	public String getPkColumnName() {
+		return (this.specifiedPkColumnName != null) ? this.specifiedPkColumnName : this.defaultPkColumnName;
+	}
+
+	public String getSpecifiedPkColumnName() {
+		return this.specifiedPkColumnName;
+	}
+
+	public void setSpecifiedPkColumnName(String name) {
+		String old = this.specifiedPkColumnName;
+		this.specifiedPkColumnName = name;
+		this.getResourceGenerator().setPkColumnName(name);
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	protected void setSpecifiedPkColumnName_(String name) {
+		String old = this.specifiedPkColumnName;
+		this.specifiedPkColumnName = name;
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	/**
+	 * The default primary key column name is determined by the JPA
+	 * implementation.
+	 */
+	public String getDefaultPkColumnName() {
+		return this.defaultPkColumnName;
+	}
+
+
+	// ********** value column name **********
+
+	public String getValueColumnName() {
+		return (this.specifiedValueColumnName != null) ? this.specifiedValueColumnName : this.defaultValueColumnName;
+	}
+
+	public String getSpecifiedValueColumnName() {
+		return this.specifiedValueColumnName;
+	}
+
+	public void setSpecifiedValueColumnName(String name) {
+		String old = this.specifiedValueColumnName;
+		this.specifiedValueColumnName = name;
+		this.getResourceGenerator().setValueColumnName(name);
+		this.firePropertyChanged(SPECIFIED_VALUE_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	protected void setSpecifiedValueColumnName_(String name) {
+		String old = this.specifiedValueColumnName;
+		this.specifiedValueColumnName = name;
+		this.firePropertyChanged(SPECIFIED_VALUE_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	public String getDefaultValueColumnName() {
+		return this.defaultValueColumnName;
+	}
+
+
+	// ********** primary key column value **********
+
+	public String getPkColumnValue() {
+		return (this.specifiedPkColumnValue != null) ? this.specifiedPkColumnValue : this.defaultPkColumnValue;
+	}
+
+	public String getSpecifiedPkColumnValue() {
+		return this.specifiedPkColumnValue;
+	}
+
+	public void setSpecifiedPkColumnValue(String value) {
+		String old = this.specifiedPkColumnValue;
+		this.specifiedPkColumnValue = value;
+		this.getResourceGenerator().setPkColumnValue(value);
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_VALUE_PROPERTY, old, value);
+	}
+
+	protected void setSpecifiedPkColumnValue_(String value) {
+		String old = this.specifiedPkColumnValue;
+		this.specifiedPkColumnValue = value;
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_VALUE_PROPERTY, old, value);
+	}
+
+	public String getDefaultPkColumnValue() {
+		return this.defaultPkColumnValue;
+	}
+
+
+	// ********** unique constraints **********
+	
+	public ListIterator<JavaUniqueConstraint> uniqueConstraints() {
+		return new CloneListIterator<JavaUniqueConstraint>(this.uniqueConstraints);
+	}
+	
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+	
+	public JavaUniqueConstraint addUniqueConstraint(int index) {
+		JavaUniqueConstraint uniqueConstraint = getJpaFactory().buildJavaUniqueConstraint(this, this);
+		this.uniqueConstraints.add(index, uniqueConstraint);
+		UniqueConstraintAnnotation uniqueConstraintAnnotation = this.getResourceGenerator().addUniqueConstraint(index);
+		uniqueConstraint.initialize(uniqueConstraintAnnotation);
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, uniqueConstraint);
+		return uniqueConstraint;
+	}
+		
+	public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
+		this.removeUniqueConstraint(this.uniqueConstraints.indexOf(uniqueConstraint));
+	}
+
+	public void removeUniqueConstraint(int index) {
+		JavaUniqueConstraint uniqueConstraint = this.uniqueConstraints.remove(index);
+		this.getResourceGenerator().removeUniqueConstraint(index);
+		this.fireItemRemoved(UNIQUE_CONSTRAINTS_LIST, index, uniqueConstraint);
+	}
+	
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.uniqueConstraints, targetIndex, sourceIndex);
+		this.getResourceGenerator().moveUniqueConstraint(targetIndex, sourceIndex);
+		this.fireItemMoved(UNIQUE_CONSTRAINTS_LIST, targetIndex, sourceIndex);		
+	}
+	
+	protected void addUniqueConstraint(int index, JavaUniqueConstraint uniqueConstraint) {
+		this.addItemToList(index, uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+	
+	protected void addUniqueConstraint(JavaUniqueConstraint uniqueConstraint) {
+		this.addUniqueConstraint(this.uniqueConstraints.size(), uniqueConstraint);
+	}
+	
+	protected void removeUniqueConstraint_(JavaUniqueConstraint uniqueConstraint) {
+		this.removeItemFromList(uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+
+
+	//******************* UniqueConstraint.Owner implementation ******************
+
+	public Iterator<String> candidateUniqueConstraintColumnNames() {
+		org.eclipse.jpt.db.Table dbTable = this.getDbTable();
+		return (dbTable != null) ? dbTable.getSortedColumnIdentifiers().iterator() : EmptyIterator.<String>instance();
+	}
+
+
+	// ********** resource => context **********
+
+	public void initialize(TableGeneratorAnnotation tableGeneratorAnnotation) {
+		super.initialize(tableGeneratorAnnotation);
+		this.specifiedTable = tableGeneratorAnnotation.getTable();
+		this.defaultSchema = this.buildDefaultSchema();
+		this.specifiedSchema = tableGeneratorAnnotation.getSchema();
+		this.defaultCatalog = this.buildDefaultCatalog();
+		this.specifiedCatalog = tableGeneratorAnnotation.getCatalog();
+		this.specifiedPkColumnName = tableGeneratorAnnotation.getPkColumnName();
+		this.specifiedValueColumnName = tableGeneratorAnnotation.getValueColumnName();
+		this.specifiedPkColumnValue = tableGeneratorAnnotation.getPkColumnValue();
+		this.initializeUniqueConstraints(tableGeneratorAnnotation);
+	}
+
+	protected void initializeUniqueConstraints(TableGeneratorAnnotation tableGeneratorAnnotation) {
+		for (Iterator<UniqueConstraintAnnotation> stream = tableGeneratorAnnotation.uniqueConstraints(); stream.hasNext(); ) {
+			this.uniqueConstraints.add(this.buildUniqueConstraint(stream.next()));
+		}
+	}
+
+	public void update(TableGeneratorAnnotation tableGeneratorAnnotation) {
+		super.update(tableGeneratorAnnotation);
+		this.setSpecifiedTable_(tableGeneratorAnnotation.getTable());
+		this.setDefaultSchema(this.buildDefaultSchema());
+		this.setSpecifiedSchema_(tableGeneratorAnnotation.getSchema());
+		this.setDefaultCatalog(this.buildDefaultCatalog());
+		this.setSpecifiedCatalog_(tableGeneratorAnnotation.getCatalog());
+		this.setSpecifiedPkColumnName_(tableGeneratorAnnotation.getPkColumnName());
+		this.setSpecifiedValueColumnName_(tableGeneratorAnnotation.getValueColumnName());
+		this.setSpecifiedPkColumnValue_(tableGeneratorAnnotation.getPkColumnValue());
+		this.updateUniqueConstraints(tableGeneratorAnnotation);
+	}
+	
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+	protected void updateUniqueConstraints(TableGeneratorAnnotation tableGeneratorAnnotation) {
+		ListIterator<JavaUniqueConstraint> contextConstraints = this.uniqueConstraints();
+		ListIterator<UniqueConstraintAnnotation> resourceConstraints = tableGeneratorAnnotation.uniqueConstraints();
+		
+		while (contextConstraints.hasNext()) {
+			JavaUniqueConstraint uniqueConstraint = contextConstraints.next();
+			if (resourceConstraints.hasNext()) {
+				uniqueConstraint.update(resourceConstraints.next());
+			}
+			else {
+				removeUniqueConstraint_(uniqueConstraint);
+			}
+		}
+		
+		while (resourceConstraints.hasNext()) {
+			addUniqueConstraint(buildUniqueConstraint(resourceConstraints.next()));
+		}
+	}
+
+	protected JavaUniqueConstraint buildUniqueConstraint(UniqueConstraintAnnotation uniqueConstraintAnnotation) {
+		JavaUniqueConstraint uniqueConstraint = getJpaFactory().buildJavaUniqueConstraint(this, this);
+		uniqueConstraint.initialize(uniqueConstraintAnnotation);
+		return uniqueConstraint;
+	}
+
+
+	// ********** database stuff **********
+
+	public Table getDbTable() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getTable());
+	}
+
+
+	// ********** Java completion proposals **********
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		for (JavaUniqueConstraint constraint : CollectionTools.iterable(this.uniqueConstraints())) {
+			result = constraint.javaCompletionProposals(pos, filter, astRoot);
+			if (result != null) {
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * called if the database is connected:
+	 * table, schema, catalog, pkColumnName, valueColumnName
+	 */
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.tableTouches(pos, astRoot)) {
+			return this.getJavaCandidateTables(filter).iterator();
+		}
+		if (this.schemaTouches(pos, astRoot)) {
+			return this.getJavaCandidateSchemata(filter).iterator();
+		}
+		if (this.catalogTouches(pos, astRoot)) {
+			return this.getJavaCandidateCatalogs(filter).iterator();
+		}
+		if (this.pkColumnNameTouches(pos, astRoot)) {
+			return this.getJavaCandidateColumnNames(filter).iterator();
+		}
+		if (this.valueColumnNameTouches(pos, astRoot)) {
+			return this.getJavaCandidateColumnNames(filter).iterator();
+		}
+		return null;
+	}
+
+	// ********** code assist: table
+	
+	protected boolean tableTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceGenerator().tableTouches(pos, astRoot);
+	}
+
+	protected Iterable<String> getJavaCandidateTables(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateTables(filter));
+	}
+
+	protected Iterable<String> getCandidateTables(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateTables(), filter);
+	}
+
+	protected Iterable<String> getCandidateTables() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema != null) ? dbSchema.getSortedTableIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	// ********** code assist: schema
+	
+	protected boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceGenerator().schemaTouches(pos, astRoot);
+	}
+
+	protected Iterable<String> getJavaCandidateSchemata(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateSchemata(filter));
+	}
+
+	protected Iterable<String> getCandidateSchemata(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateSchemata(), filter);
+	}
+
+	protected Iterable<String> getCandidateSchemata() {
+		SchemaContainer schemaContainer = this.getDbSchemaContainer();
+		return (schemaContainer != null) ? schemaContainer.getSortedSchemaIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	// ********** code assist: catalog
+
+	protected boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceGenerator().catalogTouches(pos, astRoot);
+	}
+
+	protected Iterable<String> getJavaCandidateCatalogs(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateCatalogs(filter));
+	}
+
+	protected Iterable<String> getCandidateCatalogs(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateCatalogs(), filter);
+	}
+
+	protected Iterable<String> getCandidateCatalogs() {
+		Database db = this.getDatabase();
+		return (db != null) ? db.getSortedCatalogIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	// ********** code assist: pkColumnName
+
+	protected boolean pkColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceGenerator().pkColumnNameTouches(pos, astRoot);
+	}
+
+	protected Iterable<String> getJavaCandidateColumnNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.getCandidateColumnNames(filter));
+	}
+
+	protected Iterable<String> getCandidateColumnNames(Filter<String> filter) {
+		return new FilteringIterable<String>(this.getCandidateColumnNames(), filter);
+	}
+
+	protected Iterable<String> getCandidateColumnNames() {
+		Table table = this.getDbTable();
+		return (table != null) ? table.getSortedColumnIdentifiers() : EmptyIterable.<String> instance();
+	}
+
+	// ********** code assist: valueColumnName
+
+	protected boolean valueColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.getResourceGenerator().valueColumnNameTouches(pos, astRoot);
+	}
+
+
+	// ********** misc **********
+
+	@Override
+	protected TableGeneratorAnnotation getResourceGenerator() {
+		return (TableGeneratorAnnotation) super.getResourceGenerator();
+	}
+
+	public int getDefaultInitialValue() {
+		return DEFAULT_INITIAL_VALUE;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTemporalConverter.java
new file mode 100644
index 0000000..10e125f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTemporalConverter.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.TemporalType;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaTemporalConverter;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaTemporalConverter extends AbstractJavaJpaContextNode
+	implements JavaTemporalConverter
+{
+	protected TemporalType temporalType;
+	
+	protected JavaResourcePersistentAttribute resourcePersistentAttribute;
+	
+	public GenericJavaTemporalConverter(JavaAttributeMapping parent, JavaResourcePersistentAttribute jrpa) {
+		super(parent);
+		this.initialize(jrpa);
+	}
+
+	@Override
+	public JavaAttributeMapping getParent() {
+		return (JavaAttributeMapping) super.getParent();
+	}
+	
+	public String getType() {
+		return Converter.TEMPORAL_CONVERTER;
+	}
+	
+	protected String getAnnotationName() {
+		return TemporalAnnotation.ANNOTATION_NAME;
+	}
+	
+	public void addToResourceModel() {
+		this.resourcePersistentAttribute.addAnnotation(getAnnotationName());
+	}
+	
+	public void removeFromResourceModel() {
+		this.resourcePersistentAttribute.removeAnnotation(getAnnotationName());
+	}
+	
+	public TemporalType getTemporalType() {
+		return this.temporalType;
+	}
+
+	public void setTemporalType(TemporalType newTemporalType) {
+		TemporalType oldTemporalType = this.temporalType;
+		this.temporalType = newTemporalType;
+		this.getResourceTemporal().setValue(TemporalType.toJavaResourceModel(newTemporalType));
+		firePropertyChanged(TEMPORAL_TYPE_PROPERTY, oldTemporalType, newTemporalType);
+	}
+	
+	protected void setTemporalType_(TemporalType newTemporalType) {
+		TemporalType oldTemporalType = this.temporalType;
+		this.temporalType = newTemporalType;
+		firePropertyChanged(TEMPORAL_TYPE_PROPERTY, oldTemporalType, newTemporalType);
+	}
+
+
+	protected TemporalAnnotation getResourceTemporal() {
+		return (TemporalAnnotation) this.resourcePersistentAttribute.
+				getAnnotation(getAnnotationName());
+	}
+
+	protected void initialize(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistentAttribute = jrpa;
+		this.temporalType = this.temporalType(getResourceTemporal());
+	}	
+	
+	public void update(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistentAttribute = jrpa;
+		this.setTemporalType_(this.temporalType(getResourceTemporal()));
+	}	
+	
+	protected TemporalType temporalType(TemporalAnnotation resourceTemporal) {
+		return resourceTemporal == null ? null : TemporalType.fromJavaResourceModel(resourceTemporal.getValue());
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getResourceTemporal().getTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTransientMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTransientMapping.java
new file mode 100644
index 0000000..53f7a78
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaTransientMapping.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaAttributeMapping;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.resource.java.TransientAnnotation;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class GenericJavaTransientMapping
+	extends AbstractJavaAttributeMapping<TransientAnnotation>
+	implements JavaTransientMapping
+{
+	public GenericJavaTransientMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getKey() {
+		return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return TransientAnnotation.ANNOTATION_NAME;
+	}
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+	}
+
+
+	// ********** metamodel **********  
+
+	@Override
+	public MetamodelField getMetamodelField() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
new file mode 100644
index 0000000..a24d8e8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+
+public class GenericJavaUniqueConstraint extends AbstractJavaJpaContextNode
+	implements JavaUniqueConstraint
+{
+
+	protected final List<String> columnNames;
+
+	protected UniqueConstraintAnnotation resourceUniqueConstraint;
+	
+	protected Owner owner;
+	public GenericJavaUniqueConstraint(JavaJpaContextNode parent, Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.columnNames = new ArrayList<String>();
+	}
+
+	public Owner getOwner() {
+		return this.owner;
+	}
+	
+	public ListIterator<String> columnNames() {
+		return new CloneListIterator<String>(this.columnNames);
+	}
+
+	public int columnNamesSize() {
+		return this.columnNames.size();
+	}
+
+	public void addColumnName(int index, String columnName) {
+		this.columnNames.add(index, columnName);
+		this.resourceUniqueConstraint.addColumnName(index, columnName);
+		fireItemAdded(UniqueConstraint.COLUMN_NAMES_LIST, index, columnName);		
+	}	
+	
+	protected void addColumnName_(int index, String columnName) {
+		this.columnNames.add(index, columnName);
+		fireItemAdded(UniqueConstraint.COLUMN_NAMES_LIST, index, columnName);		
+	}	
+
+	public void removeColumnName(String columnName) {
+		this.removeColumnName(this.columnNames.indexOf(columnName));
+	}
+
+	public void removeColumnName(int index) {
+		String removedColumnName = this.columnNames.remove(index);
+		this.resourceUniqueConstraint.removeColumnName(index);
+		fireItemRemoved(UniqueConstraint.COLUMN_NAMES_LIST, index, removedColumnName);
+	}
+	
+	protected void removeColumnName_(int index) {
+		String removedColumnName = this.columnNames.remove(index);
+		fireItemRemoved(UniqueConstraint.COLUMN_NAMES_LIST, index, removedColumnName);
+	}
+
+	public void moveColumnName(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.columnNames, targetIndex, sourceIndex);
+		this.resourceUniqueConstraint.moveColumnName(targetIndex, sourceIndex);
+		fireItemMoved(UniqueConstraint.COLUMN_NAMES_LIST, targetIndex, sourceIndex);		
+	}
+
+	public void initialize(UniqueConstraintAnnotation uca) {
+		this.resourceUniqueConstraint = uca;
+		this.initializeColumnNames(uca);
+	}
+	
+	protected void initializeColumnNames(UniqueConstraintAnnotation uca) {
+		ListIterator<String> annotationColumnNames = uca.columnNames();
+		
+		for (String resourceColumnName : CollectionTools.iterable(annotationColumnNames)) {
+			this.columnNames.add(resourceColumnName);
+		}
+	}
+
+	public void update(UniqueConstraintAnnotation uca) {
+		this.resourceUniqueConstraint = uca;
+		this.updateColumnNames(uca);
+	}
+
+	protected void updateColumnNames(UniqueConstraintAnnotation uca) {
+		ListIterator<String> annotationColumnNames = uca.columnNames();
+		
+		int index = 0;
+		for (String resourceColumnName : CollectionTools.iterable(annotationColumnNames)) {
+			if (columnNamesSize() > index) {
+				if (this.columnNames.get(index) != resourceColumnName) {
+					addColumnName_(index, resourceColumnName);
+				}
+			}
+			else {
+				addColumnName_(index, resourceColumnName);			
+			}
+			index++;
+		}
+		
+		for ( ; index < columnNamesSize(); ) {
+			removeColumnName_(index);
+		}
+	}
+
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.resourceUniqueConstraint.getTextRange(astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.columnNames);
+	}
+
+
+	// ********** code-assist **********
+
+	@Override
+	public Iterator<String> connectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.connectedJavaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.columnNamesTouches(pos, astRoot)) {
+			return this.javaCandidateColumnNames(filter);
+		}
+		return null;
+	}
+
+	private boolean columnNamesTouches(int pos, CompilationUnit astRoot) {
+		return this.resourceUniqueConstraint.columnNamesTouches(pos, astRoot);
+	}
+
+	private Iterator<String> javaCandidateColumnNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateColumnNames(filter));
+	}
+
+	private Iterator<String> candidateColumnNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateColumnNames(), filter);
+	}
+
+	private Iterator<String> candidateColumnNames() {
+		return this.getOwner().candidateUniqueConstraintColumnNames();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaVersionMapping.java
new file mode 100644
index 0000000..2c989ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaVersionMapping.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaVersionMapping;
+
+
+public class GenericJavaVersionMapping
+	extends AbstractJavaVersionMapping
+{
+
+	public GenericJavaVersionMapping(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaAssociationOverrideContainer.java
new file mode 100644
index 0000000..faf6749
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaAssociationOverrideContainer.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+
+public class NullJavaAssociationOverrideContainer extends AbstractJavaJpaContextNode
+	implements JavaAssociationOverrideContainer
+{
+	public NullJavaAssociationOverrideContainer(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	public void initialize(JavaResourcePersistentMember jrpm) {
+		// no-op
+	}
+	
+	public void update(JavaResourcePersistentMember jrpm) {
+		// no-op
+	}
+
+	public JavaAssociationOverride getAssociationOverrideNamed(String name) {
+		return null;
+	}
+
+	public ListIterator<JavaAssociationOverride> associationOverrides() {
+		return EmptyListIterator.instance();
+	}
+	
+	public int associationOverridesSize() {
+		return 0;
+	}
+
+	public  ListIterator<JavaAssociationOverride> virtualAssociationOverrides() {
+		return EmptyListIterator.instance();
+	}
+	
+	public int virtualAssociationOverridesSize() {
+		return 0;
+	}
+	
+	public ListIterator<JavaAssociationOverride> specifiedAssociationOverrides() {
+		return EmptyListIterator.instance();
+	}
+	
+	public int specifiedAssociationOverridesSize() {
+		return 0;
+	}
+	
+	public void moveSpecifiedAssociationOverride(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	
+	//********** Validation ********************************************
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..44ebd87
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaJoinColumnJoiningStrategy.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+
+public class NullJavaJoinColumnJoiningStrategy 
+	extends AbstractJavaJpaContextNode
+	implements JavaJoinColumnJoiningStrategy
+{	
+	
+	protected NullJavaJoinColumnJoiningStrategy(JoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+	}
+	
+	public void initializeFrom(JoinColumnJoiningStrategy oldStrategy) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public JoinColumnEnabledRelationshipReference getParent() {
+		return (JoinColumnEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public void addStrategy() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeStrategy() {
+		//do nothing, no join column to remove
+	}
+	
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		return null;
+	}
+
+	// **************** join columns *******************************************
+	
+	public ListIterator<JavaJoinColumn> joinColumns() {
+		throw new UnsupportedOperationException();
+
+	}
+	
+	public int joinColumnsSize() {
+		throw new UnsupportedOperationException();
+	}
+	
+	
+	// **************** default join column ************************************
+	
+	public JavaJoinColumn getDefaultJoinColumn() {
+		throw new UnsupportedOperationException();
+	}	
+	
+	// **************** specified join columns *********************************
+	
+	public ListIterator<JavaJoinColumn> specifiedJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public int specifiedJoinColumnsSize() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public boolean hasSpecifiedJoinColumns() {
+		return false;
+	}
+	
+	public JavaJoinColumn addSpecifiedJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeSpecifiedJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// **************** resource => context ************************************
+
+	public void initialize() {
+		//no-op
+	}
+	
+	
+	public void update() {
+		//no-op
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getColumnTableNotValidDescription() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Table getDbTable(String tableName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Table getReferencedColumnDbTable() {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getTableName() {
+		return null;
+	}
+
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TypeMapping getRelationshipSource() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaJoinTableJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaJoinTableJoiningStrategy.java
new file mode 100644
index 0000000..47bb721
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/NullJavaJoinTableJoiningStrategy.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinTable;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+
+public class NullJavaJoinTableJoiningStrategy 
+	extends AbstractJavaJpaContextNode
+	implements JavaJoinTableJoiningStrategy
+{	
+
+	public NullJavaJoinTableJoiningStrategy(JoinTableEnabledRelationshipReference parent) {
+		super(parent);
+	}
+
+	public void initializeFrom(JoinTableJoiningStrategy oldStrategy) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public JoinTableEnabledRelationshipReference getParent() {
+		return (JoinTableEnabledRelationshipReference) super.getParent();
+	}
+
+	public JoinTableEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+
+	public void addStrategy() {
+		//do nothing
+	}
+
+	public void removeStrategy() {
+		//do nothing, no join table to remove
+	}
+
+
+
+	// **************** resource => context ************************************
+
+	public void initialize() {
+		//no-op
+	}
+
+
+	public void update() {
+		//no-op
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getColumnTableNotValidDescription() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Table getDbTable(String tableName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getTableName() {
+		return null;
+	}
+
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TypeMapping getTypeMapping() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	public JoinTableAnnotation getAnnotation() {
+		return null;
+	}
+
+	public JavaJoinTable getJoinTable() {
+		return null;
+	}
+
+	public String getJoinTableDefaultName() {
+		return null;
+	}
+
+	public boolean shouldValidateAgainstDatabase() {
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/VirtualAssociationOverride1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/VirtualAssociationOverride1_0Annotation.java
new file mode 100644
index 0000000..2738d5c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/VirtualAssociationOverride1_0Annotation.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.internal.context.java.VirtualAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public class VirtualAssociationOverride1_0Annotation
+	extends VirtualAssociationOverrideAnnotation
+{
+	
+	public VirtualAssociationOverride1_0Annotation(JavaResourcePersistentMember parent, String name, JoiningStrategy joiningStrategy) {
+		super(parent, name, joiningStrategy);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/AbstractOrmOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/AbstractOrmOverride.java
new file mode 100644
index 0000000..b735003
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/AbstractOrmOverride.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlOverride;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+public class AbstractOrmOverride extends AbstractOrmXmlContextNode
+{
+
+	protected String name;
+
+	protected final BaseOverride.Owner owner;
+
+	protected XmlOverride resourceOverride;
+
+	public AbstractOrmOverride(XmlContextNode parent, BaseOverride.Owner owner, XmlOverride resourceOverride) {
+		super(parent);
+		this.owner = owner;
+		this.resourceOverride = resourceOverride;
+		this.name = getResourceName();
+	}
+	
+	@Override
+	public XmlContextNode getParent() {
+		return (XmlContextNode) super.getParent();
+	}
+
+	public BaseOverride.Owner getOwner() {
+		return this.owner;
+	}
+	
+	protected XmlOverride getResourceOverride() {
+		return this.resourceOverride;
+	}
+
+	protected void update(XmlOverride resourceOverride) {
+		this.resourceOverride = resourceOverride;
+		this.setName_(this.getResourceName());
+	}
+	
+	
+	// ********************* name ****************
+	
+	public String getName() {
+		return this.name;
+	}
+	
+	public void setName(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		this.resourceOverride.setName(newName);
+		firePropertyChanged(BaseOverride.NAME_PROPERTY, oldName, newName);
+	}
+
+	protected void setName_(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		firePropertyChanged(BaseOverride.NAME_PROPERTY, oldName, newName);
+	}
+
+	protected String getResourceName() {
+		return this.resourceOverride.getName();
+	}
+
+	public TextRange getValidationTextRange() {
+		TextRange textRange = this.resourceOverride.getValidationTextRange();
+		return textRange == null ? getParent().getValidationTextRange() : textRange;
+	}
+
+	
+	//****************** miscellaneous ********************
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericEntityMappings.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericEntityMappings.java
new file mode 100644
index 0000000..43ba8c6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericEntityMappings.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.orm.OrmXml;
+import org.eclipse.jpt.core.internal.context.orm.AbstractEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+
+/**
+ * <code>orm.xml</code> file
+ * <br>
+ * <code>entity-mappings</code> element
+ */
+public class GenericEntityMappings
+	extends AbstractEntityMappings
+{
+	public GenericEntityMappings(OrmXml parent, XmlEntityMappings resource) {
+		super(parent, resource);
+	}
+
+	@Override
+	protected String latestDocumentVersion() {
+		return this.getJpaPlatform().getMostRecentSupportedResourceType(JptCorePlugin.ORM_XML_CONTENT_TYPE).getVersion();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
new file mode 100644
index 0000000..df01a97
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmAssociationOverride extends AbstractOrmOverride
+	implements OrmAssociationOverride
+{
+	protected final OrmAssociationOverrideRelationshipReference relationshipReference;
+
+
+	public GenericOrmAssociationOverride(OrmAssociationOverrideContainer parent, AssociationOverride.Owner owner, XmlAssociationOverride xmlAssociationOverride) {
+		super(parent, owner, xmlAssociationOverride);
+		this.relationshipReference = this.buildRelationshipReference();
+	}
+
+	@Override
+	public OrmAssociationOverrideContainer getParent() {
+		return (OrmAssociationOverrideContainer) super.getParent();
+	}
+
+	@Override
+	public Owner getOwner() {
+		return (Owner) super.getOwner();
+	}
+
+	protected OrmAssociationOverrideRelationshipReference buildRelationshipReference() {
+		return getXmlContextNodeFactory().buildOrmAssociationOverrideRelationshipReference(this, getResourceOverride());
+	}
+	
+	public void initializeFrom(AssociationOverride oldAssociationOverride) {
+		this.setName(oldAssociationOverride.getName());
+		this.relationshipReference.initializeFrom(oldAssociationOverride.getRelationshipReference());
+	}
+
+	public void update(XmlAssociationOverride xao) {
+		super.update(xao);
+		this.relationshipReference.update(xao);
+	}	
+
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+	
+	public OrmAssociationOverride setVirtual(boolean virtual) {
+		return (OrmAssociationOverride) getOwner().setVirtual(virtual, this);
+	}
+
+	@Override
+	protected XmlAssociationOverride getResourceOverride() {
+		return (XmlAssociationOverride) super.getResourceOverride();
+	}
+
+	public OrmAssociationOverrideRelationshipReference getRelationshipReference() {
+		return this.relationshipReference;
+	}
+
+
+	// ********** OrmAssociationOverride implementation **********
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.relationshipReference.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
new file mode 100644
index 0000000..c0e87d7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
@@ -0,0 +1,380 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmAssociationOverrideContainer extends AbstractOrmXmlContextNode
+	implements OrmAssociationOverrideContainer
+{
+	
+	protected final List<OrmAssociationOverride> specifiedAssociationOverrides;
+
+	protected final List<OrmAssociationOverride> virtualAssociationOverrides;
+
+	protected final OrmAssociationOverrideContainer.Owner owner;
+	
+	public GenericOrmAssociationOverrideContainer(XmlContextNode parent, OrmAssociationOverrideContainer.Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.specifiedAssociationOverrides = new ArrayList<OrmAssociationOverride>();
+		this.virtualAssociationOverrides = new ArrayList<OrmAssociationOverride>();
+		this.initializeSpecifiedAssociationOverrides();
+		this.initializeVirtualAssociationOverrides();
+	}
+
+	protected Owner getOwner() {
+		return this.owner;
+	}
+
+	protected EList<XmlAssociationOverride> getResourceAssociationOverrides() {
+		return getOwner().getResourceAssociationOverrides();
+	}
+	
+	@SuppressWarnings("unchecked")
+	public ListIterator<OrmAssociationOverride> associationOverrides() {
+		return new CompositeListIterator<OrmAssociationOverride>(specifiedAssociationOverrides(), virtualAssociationOverrides());
+	}
+
+	public int associationOverridesSize() {
+		return this.specifiedAssociationOverridesSize() + this.virtualAssociationOverridesSize();
+	}
+
+	public ListIterator<OrmAssociationOverride> virtualAssociationOverrides() {
+		return new CloneListIterator<OrmAssociationOverride>(this.virtualAssociationOverrides);
+	}
+	
+	public int virtualAssociationOverridesSize() {
+		return this.virtualAssociationOverrides.size();
+	}
+	
+	protected void addVirtualAssociationOverride(OrmAssociationOverride associationOverride) {
+		addItemToList(associationOverride, this.virtualAssociationOverrides, VIRTUAL_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	protected void removeVirtualAssociationOverride(OrmAssociationOverride associationOverride) {
+		removeItemFromList(associationOverride, this.virtualAssociationOverrides, VIRTUAL_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	protected OrmAssociationOverride setAssociationOverrideVirtual(boolean virtual, OrmAssociationOverride associationOverride) {
+		if (virtual) {
+			return setAssociationOverrideVirtual(associationOverride);
+		}
+		return setAssociationOverrideSpecified(associationOverride);
+	}
+	
+	protected OrmAssociationOverride setAssociationOverrideVirtual(OrmAssociationOverride associationOverride) {
+		int index = this.specifiedAssociationOverrides.indexOf(associationOverride);
+		this.specifiedAssociationOverrides.remove(index);
+		String associationOverrideName = associationOverride.getName();
+		//add the virtual attribute override so that I can control the order that change notification is sent.
+		//otherwise when we remove the annotation from java we will get an update and add the attribute override
+		//during the udpate.  This causes the UI to be flaky, since change notification might not occur in the correct order
+		OrmAssociationOverride virtualAssociationOverride = null;
+		if (associationOverrideName != null) {
+			for (String name : CollectionTools.iterable(allOverridableAssociationNames())) {
+				if (name.equals(associationOverrideName)) {
+					//store the virtualAssociationOverride so we can fire change notification later
+					virtualAssociationOverride = buildVirtualAssociationOverride(name);
+					this.virtualAssociationOverrides.add(virtualAssociationOverride);
+				}
+			}
+		}
+
+		this.getResourceAssociationOverrides().remove(index);
+		fireItemRemoved(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, index, associationOverride);
+		
+		if (virtualAssociationOverride != null) {
+			fireItemAdded(VIRTUAL_ASSOCIATION_OVERRIDES_LIST, virtualAssociationOverridesSize() - 1, virtualAssociationOverride);
+		}
+		return virtualAssociationOverride;
+	}
+	
+	protected OrmAssociationOverride setAssociationOverrideSpecified(OrmAssociationOverride oldAssociationOverride) {
+		int index = specifiedAssociationOverridesSize();
+		XmlAssociationOverride xmlAssociationOverride = buildResourceAssociationOverride();
+		OrmAssociationOverride newAssociationOverride = buildAssociationOverride(xmlAssociationOverride);
+		this.specifiedAssociationOverrides.add(index, newAssociationOverride);
+		
+		this.getResourceAssociationOverrides().add(xmlAssociationOverride);
+		
+		int defaultIndex = this.virtualAssociationOverrides.indexOf(oldAssociationOverride);
+		this.virtualAssociationOverrides.remove(defaultIndex);
+
+		newAssociationOverride.initializeFrom(oldAssociationOverride);
+		
+		this.fireItemRemoved(VIRTUAL_ASSOCIATION_OVERRIDES_LIST, defaultIndex, oldAssociationOverride);
+		this.fireItemAdded(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, index, newAssociationOverride);		
+
+		return newAssociationOverride;
+	}
+	
+	public ListIterator<OrmAssociationOverride> specifiedAssociationOverrides() {
+		return new CloneListIterator<OrmAssociationOverride>(this.specifiedAssociationOverrides);
+	}
+
+	public int specifiedAssociationOverridesSize() {
+		return this.specifiedAssociationOverrides.size();
+	}
+
+	protected void addSpecifiedAssociationOverride(int index, OrmAssociationOverride associationOverride) {
+		addItemToList(index, associationOverride, this.specifiedAssociationOverrides, SPECIFIED_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	protected void addSpecifiedAssociationOverride(OrmAssociationOverride associationOverride) {
+		this.addSpecifiedAssociationOverride(this.specifiedAssociationOverrides.size(), associationOverride);
+	}
+	
+	protected void removeSpecifiedAssociationOverride_(OrmAssociationOverride associationOverride) {
+		removeItemFromList(associationOverride, this.specifiedAssociationOverrides, SPECIFIED_ASSOCIATION_OVERRIDES_LIST);
+	}
+	
+	public void moveSpecifiedAssociationOverride(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedAssociationOverrides, targetIndex, sourceIndex);
+		this.getResourceAssociationOverrides().move(targetIndex, sourceIndex);
+		fireItemMoved(SPECIFIED_ASSOCIATION_OVERRIDES_LIST, targetIndex, sourceIndex);		
+	}
+
+	public OrmAssociationOverride getAssociationOverrideNamed(String name) {
+		return (OrmAssociationOverride) getOverrideNamed(name, associationOverrides());
+	}
+
+	public boolean containsAssociationOverride(String name) {
+		return containsOverride(name, associationOverrides());
+	}
+
+	public boolean containsSpecifiedAssociationOverride(String name) {
+		return containsOverride(name, specifiedAssociationOverrides());
+	}
+
+	public boolean containsDefaultAssociationOverride(String name) {
+		return containsOverride(name, virtualAssociationOverrides());
+	}
+
+	private BaseOverride getOverrideNamed(String name, ListIterator<? extends BaseOverride> overrides) {
+		for (BaseOverride override : CollectionTools.iterable(overrides)) {
+			String overrideName = override.getName();
+			if (overrideName == null && name == null) {
+				return override;
+			}
+			if (overrideName != null && overrideName.equals(name)) {
+				return override;
+			}
+		}
+		return null;
+	}
+
+	private boolean containsOverride(String name, ListIterator<? extends BaseOverride> overrides) {
+		return getOverrideNamed(name, overrides) != null;
+	}
+	
+	protected Iterator<String> allOverridableAssociationNames() {
+		return getOwner().allOverridableNames();
+	}
+	
+	protected void initializeVirtualAssociationOverrides() {
+		for (String name : CollectionTools.iterable(allOverridableAssociationNames())) {
+			OrmAssociationOverride ormAssociationOverride = getAssociationOverrideNamed(name);
+			if (ormAssociationOverride == null) {
+				this.virtualAssociationOverrides.add(buildVirtualAssociationOverride(name));
+			}
+		}
+	}
+
+	protected OrmAssociationOverride buildVirtualAssociationOverride(String name) {
+		return buildAssociationOverride(buildVirtualXmlAssociationOverride(name));
+	}
+	
+	protected XmlAssociationOverride buildVirtualXmlAssociationOverride(String name) {
+		RelationshipReference relationshipReference = this.resolveAssociationOverrideRelationshipReference(name);
+		return buildVirtualXmlAssociationOverride(name, relationshipReference.getPredominantJoiningStrategy());
+	}
+	
+	protected XmlAssociationOverride buildVirtualXmlAssociationOverride(String name, JoiningStrategy joiningStrategy) {
+		return getXmlContextNodeFactory().buildVirtualXmlAssociationOverride(name, getOwner().getTypeMapping(), joiningStrategy);
+	}
+	
+	private RelationshipReference resolveAssociationOverrideRelationshipReference(String associationOverrideName) {
+		return getOwner().resolveRelationshipReference(associationOverrideName);
+	}
+
+
+	protected void initializeSpecifiedAssociationOverrides() {
+		for (XmlAssociationOverride associationOverride : this.getResourceAssociationOverrides()) {
+			this.specifiedAssociationOverrides.add(buildAssociationOverride(associationOverride));
+		}
+	}
+	
+	public void update() {
+		this.updateSpecifiedAssociationOverrides();
+		this.updateVirtualAssociationOverrides();
+	}
+
+	protected void updateSpecifiedAssociationOverrides() {
+		// make a copy of the XML overrides (to prevent ConcurrentModificationException)
+		Iterator<XmlAssociationOverride> xmlOverrides = new CloneIterator<XmlAssociationOverride>(this.getResourceAssociationOverrides());
+		
+		for (Iterator<OrmAssociationOverride> contextOverrides = this.specifiedAssociationOverrides(); contextOverrides.hasNext(); ) {
+			OrmAssociationOverride contextOverride = contextOverrides.next();
+			if (xmlOverrides.hasNext()) {
+				contextOverride.update(xmlOverrides.next());
+			}
+			else {
+				removeSpecifiedAssociationOverride_(contextOverride);
+			}
+		}
+		
+		while (xmlOverrides.hasNext()) {
+			addSpecifiedAssociationOverride(buildAssociationOverride(xmlOverrides.next()));
+		}
+	}
+	
+	protected void updateVirtualAssociationOverrides() {
+		Iterator<String> overridableAssociations = allOverridableAssociationNames();
+		ListIterator<OrmAssociationOverride> virtualAssociationOverridesCopy = virtualAssociationOverrides();
+		
+		for (String name : CollectionTools.iterable(overridableAssociations)) {
+			OrmAssociationOverride ormAssociationOverride = getAssociationOverrideNamed(name);
+			if (ormAssociationOverride != null && !ormAssociationOverride.isVirtual()) {
+				continue;
+			}
+			if (ormAssociationOverride != null) {
+				if (virtualAssociationOverridesCopy.hasNext()) {
+					OrmAssociationOverride virtualAssociationOverride = virtualAssociationOverridesCopy.next();
+					virtualAssociationOverride.update(buildVirtualXmlAssociationOverride(name));
+				}
+				else {
+					addVirtualAssociationOverride(buildVirtualAssociationOverride(name));
+				}
+			}
+			else {
+				addVirtualAssociationOverride(buildVirtualAssociationOverride(name));
+			}
+		}
+		for (OrmAssociationOverride virtualAssociationOverride : CollectionTools.iterable(virtualAssociationOverridesCopy)) {
+			removeVirtualAssociationOverride(virtualAssociationOverride);
+		}
+	}
+	
+	protected OrmAssociationOverride buildAssociationOverride(XmlAssociationOverride associationOverride) {
+		return getXmlContextNodeFactory().buildOrmAssociationOverride(this, buildAssociationOverrideOwner(), associationOverride);
+	}
+
+	protected XmlAssociationOverride buildResourceAssociationOverride() {
+		return OrmFactory.eINSTANCE.createXmlAssociationOverride();
+	}
+	
+	protected AssociationOverride.Owner buildAssociationOverrideOwner() {
+		return new AssociationOverrideOwner();
+	}
+	
+	//************ validation ***************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+
+		for (Iterator<OrmAssociationOverride> stream = this.associationOverrides(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter);
+		}
+	}
+
+	public TextRange getValidationTextRange() {
+		return getOwner().getValidationTextRange();
+	}
+	
+	
+	protected class AssociationOverrideOwner implements AssociationOverride.Owner {
+
+		public RelationshipMapping getRelationshipMapping(String attributeName) {
+			return MappingTools.getRelationshipMapping(attributeName, getOwner().getOverridableTypeMapping());
+		}
+
+		public boolean isVirtual(BaseOverride override) {
+			return GenericOrmAssociationOverrideContainer.this.virtualAssociationOverrides.contains(override);
+		}
+
+		public BaseOverride setVirtual(boolean virtual, BaseOverride override) {
+			return GenericOrmAssociationOverrideContainer.this.setAssociationOverrideVirtual(virtual, (OrmAssociationOverride) override);
+		}
+
+		public TypeMapping getTypeMapping() {
+			return getOwner().getTypeMapping();
+		}
+
+		public Iterator<String> allOverridableAttributeNames() {
+			return GenericOrmAssociationOverrideContainer.this.allOverridableAssociationNames();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return getOwner().tableNameIsInvalid(tableName);
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return getOwner().candidateTableNames();
+		}
+
+		public String getDefaultTableName() {
+			return getOwner().getDefaultTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getOwner().getDbTable(tableName);
+		}
+
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			return getOwner().buildColumnTableNotValidMessage(override, column, textRange);
+		}
+
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			return getOwner().buildColumnUnresolvedNameMessage(override, column, textRange);
+		}
+
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			return getOwner().buildColumnUnresolvedReferencedColumnNameMessage(override, column, textRange);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			return getOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(override, column, textRange);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			return getOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override, column, textRange);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideRelationshipReference.java
new file mode 100644
index 0000000..32e7859
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideRelationshipReference.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+public class GenericOrmAssociationOverrideRelationshipReference extends AbstractOrmAssociationOverrideRelationshipReference
+{
+
+	public GenericOrmAssociationOverrideRelationshipReference(OrmAssociationOverride parent, XmlAssociationOverride xao) {
+		super(parent, xao);
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		return this.joinColumnJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
new file mode 100644
index 0000000..2672643
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.AttributeOverride2_0;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmAttributeOverride
+	extends AbstractOrmOverride
+	implements AttributeOverride2_0, OrmAttributeOverride, OrmColumn.Owner
+{
+	protected final OrmColumn column;
+	
+	/* 2.0 feature - a relationship may map this attribute override */
+	protected boolean mappedByRelationship;
+	
+	
+	public GenericOrmAttributeOverride(
+			OrmAttributeOverrideContainer parent, 
+			AttributeOverride.Owner owner, 
+			XmlAttributeOverride resourceAttributeOverride) {
+		
+		super(parent, owner, resourceAttributeOverride);
+		this.column = getXmlContextNodeFactory().buildOrmColumn(this, this);
+		this.column.initialize(resourceAttributeOverride.getColumn());
+	
+		this.mappedByRelationship = //calculateMappedByRelationship();
+				// TODO - move this real calculation to a (currently nonexistent) initialize method
+				false;
+	}
+	
+	
+	public OrmAttributeOverride setVirtual(boolean virtual) {
+		return (OrmAttributeOverride) getOwner().setVirtual(virtual, this);
+	}
+	
+	@Override
+	public Owner getOwner() {
+		return (Owner) super.getOwner();
+	}
+	
+	@Override
+	protected XmlAttributeOverride getResourceOverride() {
+		return (XmlAttributeOverride) super.getResourceOverride();
+	}
+	
+	
+	// ********************* column ****************
+	
+	public OrmColumn getColumn() {
+		return this.column;
+	}
+	
+	//************* NamedColumn.Owner implementation **************
+	
+	public TypeMapping getTypeMapping() {
+		return getOwner().getTypeMapping();
+	}
+	
+	public Table getDbTable(String tableName) {
+		return this.getOwner().getDbTable(tableName);
+	}
+	
+	public String getDefaultColumnName() {
+		Column column = resolveOverriddenColumn();
+		if (column == null) {
+			return getName();
+		}
+		return column.getName();
+	}
+	
+	
+	//************* BaseColumn.Owner implementation **************
+	
+	public String getDefaultTableName() {
+		Column column = resolveOverriddenColumn();
+		if (column != null) {
+			String tableName = column.getSpecifiedTable();
+			if (tableName != null) {
+				return tableName;
+			}
+		}
+		return getOwner().getDefaultTableName();
+	}
+	
+	protected Column resolveOverriddenColumn() {
+		return isVirtual() ? getOwner().resolveOverriddenColumn(getName()) : null;
+	}
+	
+	public boolean tableNameIsInvalid(String tableName) {
+		return getOwner().tableNameIsInvalid(tableName);
+	}
+	
+	public Iterator<String> candidateTableNames() {
+		return getOwner().candidateTableNames();
+	}
+	
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+	
+	
+	//***************** OrmColumn.Owner implementation ****************
+	
+	public XmlColumn getResourceColumn() {
+		return this.getResourceOverride().getColumn();
+	}
+	
+	protected boolean isColumnSpecified() {
+		return getResourceColumn() != null;
+	}
+	
+	public void addResourceColumn() {
+		this.getResourceOverride().setColumn(OrmFactory.eINSTANCE.createXmlColumn());
+	}
+	
+	public void removeResourceColumn() {
+		this.getResourceOverride().setColumn(null);
+	}
+	
+	
+	// **************** AttributeOverride2_0 impl *****************************
+	
+	public boolean isMappedByRelationship() {
+		return this.mappedByRelationship;
+	}
+	
+	protected void setMappedByRelationship(boolean newValue) {
+		boolean oldValue = this.mappedByRelationship;
+		this.mappedByRelationship = newValue;
+		firePropertyChanged(MAPPED_BY_RELATIONSHIP_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean calculateMappedByRelationship() {
+		for (SingleRelationshipMapping2_0 each : getMapsIdRelationships()) {
+			if (getName() == null) {
+				return false;
+			}
+			
+			// overrideable names are (usually?) qualified with a container mapping, 
+			// which may also be the one mapped by a relationship
+			String qualifier = 
+					(getName().indexOf('.') > 0) ?
+						getName().substring(0, getName().indexOf('.'))
+						: getName();
+			return qualifier.equals(each.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue());
+		}
+		return false;
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	// **************** resource -> context ***********************************
+	
+	public void update(XmlAttributeOverride xmlAttributeOverride) {
+		super.update(xmlAttributeOverride);
+		this.column.update(xmlAttributeOverride.getColumn());
+		setMappedByRelationship(calculateMappedByRelationship());
+	}
+	
+	
+	//****************** validation ********************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		// [JPA 2.0] if the column is specified, or if the override is not mapped by a relationship,
+		// then the column is validated.
+		// (In JPA 1.0, the column will always be validated, since the override is never mapped by a
+		//  relationship)
+		if (isColumnSpecified() || ! isMappedByRelationship()) {
+			getColumn().validate(messages, reporter);
+		}
+		
+		// [JPA 2.0] if the override is mapped by a relationship, then that actually is in itself
+		// a validation error
+		// (We prevent implied overrides that are mapped by a relationship ... hopefully)
+		// (In JPA 1.0, this will never occur)
+		if (isMappedByRelationship()) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ATTRIBUTE_OVERRIDE_MAPPED_BY_RELATIONSHIP_AND_SPECIFIED,
+						new String[] {},
+						this,
+						getValidationTextRange()));
+		}
+	}
+	
+	public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+		return getOwner().buildColumnUnresolvedNameMessage(this, column, textRange);
+	}
+	
+	public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+		return getOwner().buildColumnTableNotValidMessage(this, column, textRange);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java
new file mode 100644
index 0000000..59e42b7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java
@@ -0,0 +1,383 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmAttributeOverrideContainer
+	extends AbstractOrmXmlContextNode
+	implements OrmAttributeOverrideContainer
+{
+	protected final List<OrmAttributeOverride> specifiedAttributeOverrides;
+	
+	protected final List<OrmAttributeOverride> virtualAttributeOverrides;
+	
+	protected final Owner owner;
+	
+	
+	public GenericOrmAttributeOverrideContainer(XmlContextNode parent, Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.specifiedAttributeOverrides = new ArrayList<OrmAttributeOverride>();
+		this.virtualAttributeOverrides = new ArrayList<OrmAttributeOverride>();
+		this.initializeSpecifiedAttributeOverrides();
+		this.initializeVirtualAttributeOverrides();
+	}
+	
+	
+	public void initializeFromAttributeOverrideContainer(OrmAttributeOverrideContainer oldContainer) {
+		int index = 0;
+		for (OrmAttributeOverride attributeOverride : CollectionTools.iterable(oldContainer.specifiedAttributeOverrides())) {
+		OrmAttributeOverride newAttributeOverride = addSpecifiedAttributeOverride(index++);
+			newAttributeOverride.setName(attributeOverride.getName());
+			newAttributeOverride.getColumn().initializeFrom(attributeOverride.getColumn());
+		}
+	}
+
+	protected Owner getOwner() {
+		return this.owner;
+	}
+	
+	protected EList<XmlAttributeOverride> getResourceAttributeOverrides() {
+		return getOwner().getResourceAttributeOverrides();
+	}
+
+	@SuppressWarnings("unchecked")
+	public ListIterator<OrmAttributeOverride> attributeOverrides() {
+		return new CompositeListIterator<OrmAttributeOverride>(specifiedAttributeOverrides(), virtualAttributeOverrides());
+	}
+
+	public int attributeOverridesSize() {
+		return this.specifiedAttributeOverridesSize() + this.virtualAttributeOverridesSize();
+	}
+	
+	public ListIterator<OrmAttributeOverride> virtualAttributeOverrides() {
+		return new CloneListIterator<OrmAttributeOverride>(this.virtualAttributeOverrides);
+	}
+	
+	public int virtualAttributeOverridesSize() {
+		return this.virtualAttributeOverrides.size();
+	}
+	
+	protected void addVirtualAttributeOverride(OrmAttributeOverride attributeOverride) {
+		addItemToList(attributeOverride, this.virtualAttributeOverrides, VIRTUAL_ATTRIBUTE_OVERRIDES_LIST);
+	}
+	
+	protected void removeVirtualAttributeOverride(OrmAttributeOverride attributeOverride) {
+		removeItemFromList(attributeOverride, this.virtualAttributeOverrides, VIRTUAL_ATTRIBUTE_OVERRIDES_LIST);
+	}
+	
+	protected OrmAttributeOverride setAttributeOverrideVirtual(boolean virtual, OrmAttributeOverride attributeOverride) {
+		if (virtual) {
+			return setAttributeOverrideVirtual(attributeOverride);
+		}
+		return setAttributeOverrideSpecified(attributeOverride);
+	}
+	
+	protected OrmAttributeOverride setAttributeOverrideVirtual(OrmAttributeOverride attributeOverride) {
+		int index = this.specifiedAttributeOverrides.indexOf(attributeOverride);
+		this.specifiedAttributeOverrides.remove(index);
+		String attributeOverrideName = attributeOverride.getName();
+		//add the virtual attribute override so that I can control the order that change notification is sent.
+		//otherwise when we remove the annotation from java we will get an update and add the attribute override
+		//during the update.  This causes the UI to be flaky, since change notification might not occur in the correct order
+		OrmAttributeOverride virtualAttributeOverride = null;
+		if (attributeOverrideName != null) {
+			for (String name : CollectionTools.iterable(allOverridableAttributeNames())) {
+				if (name.equals(attributeOverrideName)) {
+					//store the virtualAttributeOverride so we can fire change notification later
+					virtualAttributeOverride = buildVirtualAttributeOverride(name);
+					this.virtualAttributeOverrides.add(virtualAttributeOverride);
+				}
+			}
+		}
+
+		this.getResourceAttributeOverrides().remove(index);
+		fireItemRemoved(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, index, attributeOverride);
+		
+		if (virtualAttributeOverride != null) {
+			fireItemAdded(VIRTUAL_ATTRIBUTE_OVERRIDES_LIST, virtualAttributeOverridesSize() - 1, virtualAttributeOverride);
+		}
+		return virtualAttributeOverride;
+	}
+	
+	protected OrmAttributeOverride setAttributeOverrideSpecified(OrmAttributeOverride oldAttributeOverride) {
+		int index = specifiedAttributeOverridesSize();
+		XmlAttributeOverride xmlAttributeOverride = OrmFactory.eINSTANCE.createXmlAttributeOverride();
+		OrmAttributeOverride newAttributeOverride = buildAttributeOverride(xmlAttributeOverride);
+		this.specifiedAttributeOverrides.add(index, newAttributeOverride);
+		
+		this.getResourceAttributeOverrides().add(xmlAttributeOverride);
+		
+		int defaultIndex = this.virtualAttributeOverrides.indexOf(oldAttributeOverride);
+		this.virtualAttributeOverrides.remove(defaultIndex);
+
+		newAttributeOverride.setName(oldAttributeOverride.getName());
+		newAttributeOverride.getColumn().setSpecifiedName(oldAttributeOverride.getColumn().getName());
+		
+		this.fireItemRemoved(VIRTUAL_ATTRIBUTE_OVERRIDES_LIST, defaultIndex, oldAttributeOverride);
+		this.fireItemAdded(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, index, newAttributeOverride);		
+
+		return newAttributeOverride;
+	}
+
+	public ListIterator<OrmAttributeOverride> specifiedAttributeOverrides() {
+		return new CloneListIterator<OrmAttributeOverride>(this.specifiedAttributeOverrides);
+	}
+
+	public int specifiedAttributeOverridesSize() {
+		return this.specifiedAttributeOverrides.size();
+	}
+	
+	protected OrmAttributeOverride addSpecifiedAttributeOverride(int index) {
+		XmlAttributeOverride xmlAttributeOverride = OrmFactory.eINSTANCE.createXmlAttributeOverride();
+		OrmAttributeOverride attributeOverride = buildAttributeOverride(xmlAttributeOverride);
+		this.specifiedAttributeOverrides.add(index, attributeOverride);
+		this.getResourceAttributeOverrides().add(index, xmlAttributeOverride);
+		this.fireItemAdded(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, index, attributeOverride);
+		return attributeOverride;
+	}
+
+	protected void addSpecifiedAttributeOverride(int index, OrmAttributeOverride attributeOverride) {
+		addItemToList(index, attributeOverride, this.specifiedAttributeOverrides, SPECIFIED_ATTRIBUTE_OVERRIDES_LIST);
+	}
+	
+	protected void addSpecifiedAttributeOverride(OrmAttributeOverride attributeOverride) {
+		this.addSpecifiedAttributeOverride(this.specifiedAttributeOverrides.size(), attributeOverride);
+	}
+	
+	protected void removeSpecifiedAttributeOverride_(OrmAttributeOverride attributeOverride) {
+		removeItemFromList(attributeOverride, this.specifiedAttributeOverrides, SPECIFIED_ATTRIBUTE_OVERRIDES_LIST);
+	}
+	
+	public void moveSpecifiedAttributeOverride(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedAttributeOverrides, targetIndex, sourceIndex);
+		this.getResourceAttributeOverrides().move(targetIndex, sourceIndex);
+		fireItemMoved(SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, targetIndex, sourceIndex);		
+	}
+
+	public OrmAttributeOverride getAttributeOverrideNamed(String name) {
+		return (OrmAttributeOverride) getOverrideNamed(name, attributeOverrides());
+	}
+
+	public boolean containsAttributeOverride(String name) {
+		return containsOverride(name, attributeOverrides());
+	}
+
+	public boolean containsDefaultAttributeOverride(String name) {
+		return containsOverride(name, virtualAttributeOverrides());
+	}
+
+	public boolean containsSpecifiedAttributeOverride(String name) {
+		return containsOverride(name, specifiedAttributeOverrides());
+	}
+
+	private BaseOverride getOverrideNamed(String name, ListIterator<? extends BaseOverride> overrides) {
+		for (BaseOverride override : CollectionTools.iterable(overrides)) {
+			String overrideName = override.getName();
+			if (overrideName == null && name == null) {
+				return override;
+			}
+			if (overrideName != null && overrideName.equals(name)) {
+				return override;
+			}
+		}
+		return null;
+	}
+
+	private boolean containsOverride(String name, ListIterator<? extends BaseOverride> overrides) {
+		return getOverrideNamed(name, overrides) != null;
+	}
+
+	protected Iterator<String> allOverridableAttributeNames() {
+		return getOwner().allOverridableNames();
+	}
+
+	protected void initializeVirtualAttributeOverrides() {
+		for (String name : CollectionTools.iterable(allOverridableAttributeNames())) {
+			OrmAttributeOverride ormAttributeOverride = getAttributeOverrideNamed(name);
+			if (ormAttributeOverride == null) {
+				this.virtualAttributeOverrides.add(buildVirtualAttributeOverride(name));
+			}
+		}
+	}
+
+	protected void initializeSpecifiedAttributeOverrides() {
+		for (XmlAttributeOverride attributeOverride : this.getResourceAttributeOverrides()) {
+			this.specifiedAttributeOverrides.add(buildAttributeOverride(attributeOverride));
+		}
+	}
+
+	public void update() {
+		this.updateSpecifiedAttributeOverrides();
+		this.updateVirtualAttributeOverrides();
+	}
+
+	protected OrmAttributeOverride buildVirtualAttributeOverride(String name) {
+		return buildAttributeOverride(buildVirtualXmlAttributeOverride(name));
+	}
+	
+	protected XmlAttributeOverride buildVirtualXmlAttributeOverride(String name) {
+		Column column = resolveOverriddenColumn(name);
+		XmlColumn xmlColumn = getOwner().buildVirtualXmlColumn(column, name, getOwner().getTypeMapping().isMetadataComplete());
+		return new VirtualXmlAttributeOverride(name, xmlColumn);
+	}
+	
+	private Column resolveOverriddenColumn(String attributeOverrideName) {
+		return getOwner().resolveOverriddenColumn(attributeOverrideName);
+	}
+
+	protected void updateSpecifiedAttributeOverrides() {
+		// make a copy of the XML overrides (to prevent ConcurrentModificationException)
+		Iterator<XmlAttributeOverride> xmlOverrides = new CloneIterator<XmlAttributeOverride>(this.getResourceAttributeOverrides());
+		
+		for (Iterator<OrmAttributeOverride> contextOverrides = this.specifiedAttributeOverrides(); contextOverrides.hasNext(); ) {
+			OrmAttributeOverride contextOverride = contextOverrides.next();
+			if (xmlOverrides.hasNext()) {
+				contextOverride.update(xmlOverrides.next());
+			}
+			else {
+				removeSpecifiedAttributeOverride_(contextOverride);
+			}
+		}
+		
+		while (xmlOverrides.hasNext()) {
+			addSpecifiedAttributeOverride(buildAttributeOverride(xmlOverrides.next()));
+		}
+	}
+	
+	protected void updateVirtualAttributeOverrides() {
+		Iterator<String> overridableAttributes = allOverridableAttributeNames();
+		ListIterator<OrmAttributeOverride> virtualAttributeOverridesCopy = virtualAttributeOverrides();
+		
+		for (String name : CollectionTools.iterable(overridableAttributes)) {
+			OrmAttributeOverride ormAttributeOverride = getAttributeOverrideNamed(name);
+			if (ormAttributeOverride != null && !ormAttributeOverride.isVirtual()) {
+				continue;
+			}
+			if (ormAttributeOverride != null) {
+				if (virtualAttributeOverridesCopy.hasNext()) {
+					OrmAttributeOverride virtualAttributeOverride = virtualAttributeOverridesCopy.next();
+					virtualAttributeOverride.update(buildVirtualXmlAttributeOverride(name));
+				}
+				else {
+					addVirtualAttributeOverride(buildVirtualAttributeOverride(name));
+				}
+			}
+			else {
+				addVirtualAttributeOverride(buildVirtualAttributeOverride(name));
+			}
+		}
+		for (OrmAttributeOverride virtualAttributeOverride : CollectionTools.iterable(virtualAttributeOverridesCopy)) {
+			removeVirtualAttributeOverride(virtualAttributeOverride);
+		}
+	}
+	
+	protected OrmAttributeOverride buildAttributeOverride(XmlAttributeOverride attributeOverride) {
+		return getXmlContextNodeFactory().buildOrmAttributeOverride(this, createAttributeOverrideOwner(), attributeOverride);
+	}
+
+	protected AttributeOverride.Owner createAttributeOverrideOwner() {
+		return new AttributeOverrideOwner();
+	}
+	
+	
+	//************ validation ***************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		for (Iterator<OrmAttributeOverride> stream = this.attributeOverrides(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter);
+		}
+	}
+
+	public TextRange getValidationTextRange() {
+		return getOwner().getValidationTextRange();
+	}
+	
+	
+	protected class AttributeOverrideOwner implements AttributeOverride.Owner {
+
+		public Column resolveOverriddenColumn(String attributeName) {
+			if (attributeName == null) {
+				return null;
+			}
+			return GenericOrmAttributeOverrideContainer.this.resolveOverriddenColumn(attributeName);			
+		}
+
+		public boolean isVirtual(BaseOverride override) {
+			return GenericOrmAttributeOverrideContainer.this.virtualAttributeOverrides.contains(override);
+		}
+
+		public BaseOverride setVirtual(boolean virtual, BaseOverride override) {
+			return GenericOrmAttributeOverrideContainer.this.setAttributeOverrideVirtual(virtual, (OrmAttributeOverride) override);
+		}
+
+		public TypeMapping getTypeMapping() {
+			return getOwner().getTypeMapping();
+		}
+
+		public Iterator<String> allOverridableAttributeNames() {
+			return GenericOrmAttributeOverrideContainer.this.allOverridableAttributeNames();
+		}
+
+		public boolean tableNameIsInvalid(String tableName) {
+			return getOwner().tableNameIsInvalid(tableName);
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return getOwner().candidateTableNames();
+		}
+
+		public String getDefaultTableName() {
+			return getOwner().getDefaultTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getOwner().getDbTable(tableName);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			return getOwner().buildColumnTableNotValidMessage(override, column, textRange);
+		}
+
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			return getOwner().buildColumnUnresolvedNameMessage(override, column, textRange);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java
new file mode 100644
index 0000000..406105d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmBasicMapping.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmBasicMapping;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+
+
+public class GenericOrmBasicMapping extends AbstractOrmBasicMapping<XmlBasic>
+{
+	
+	public GenericOrmBasicMapping(OrmPersistentAttribute parent, XmlBasic resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmCascade.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmCascade.java
new file mode 100644
index 0000000..149b003
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmCascade.java
@@ -0,0 +1,281 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmRelationshipMapping;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.Cascade2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCascade2_0;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+public class GenericOrmCascade
+	extends AbstractOrmXmlContextNode
+	implements OrmCascade2_0
+{
+	protected boolean all;
+
+	protected boolean persist;
+
+	protected boolean merge;
+
+	protected boolean remove;
+
+	protected boolean refresh;
+	
+	/* JPA 2.0 */
+	protected boolean detach;
+	
+	protected final AbstractXmlRelationshipMapping relationshipMapping;
+	
+	
+	public GenericOrmCascade(OrmRelationshipMapping parent, AbstractXmlRelationshipMapping relationshipMapping) {
+		super(parent);
+		this.relationshipMapping = relationshipMapping;
+		CascadeType cascade = getResourceCascade();
+		this.all = this.getResourceAll(cascade);
+		this.persist = this.getResourcePersist(cascade);
+		this.merge = this.getResourceMerge(cascade);
+		this.remove = this.getResourceRemove(cascade);
+		this.refresh = this.getResourceRefresh(cascade);
+		this.detach = this.getResourceDetach(cascade);
+	}
+	
+	
+	public void initializeFrom(Cascade2_0 oldCascade) {
+		setAll(oldCascade.isAll());
+		setPersist(oldCascade.isPersist());
+		setMerge(oldCascade.isMerge());
+		setRemove(oldCascade.isRemove());
+		setRefresh(oldCascade.isRefresh());
+		setDetach(oldCascade.isDetach());
+	}
+	
+	public boolean isAll() {
+		return this.all;
+	}
+	
+	public void setAll(boolean newAll) {
+		boolean oldAll = this.all;
+		this.all = newAll;
+		if (oldAll != newAll) {
+			if (this.getResourceCascade() != null) {
+				this.getResourceCascade().setCascadeAll(newAll);						
+				if (this.getResourceCascade().isUnset()) {
+					removeResourceCascade();
+				}
+			}
+			else if (newAll != false) {
+				addResourceCascade();
+				getResourceCascade().setCascadeAll(newAll);
+			}
+		}
+		firePropertyChanged(ALL_PROPERTY, oldAll, newAll);
+	}
+	
+	protected void setAll_(boolean newAll) {
+		boolean oldAll = this.all;
+		this.all = newAll;
+		firePropertyChanged(ALL_PROPERTY, oldAll, newAll);
+	}
+	
+	public boolean isPersist() {
+		return this.persist;
+	}
+	
+	public void setPersist(boolean newPersist) {
+		boolean oldPersist = this.persist;
+		this.persist = newPersist;
+		if (oldPersist != newPersist) {
+			if (this.getResourceCascade() != null) {
+				this.getResourceCascade().setCascadePersist(newPersist);						
+				if (this.getResourceCascade().isUnset()) {
+					removeResourceCascade();
+				}
+			}
+			else if (newPersist != false) {
+				addResourceCascade();
+				getResourceCascade().setCascadePersist(newPersist);
+			}
+		}		
+		firePropertyChanged(PERSIST_PROPERTY, oldPersist, newPersist);
+	}
+	
+	protected void setPersist_(boolean newPersist) {
+		boolean oldPersist = this.persist;
+		this.persist = newPersist;		
+		firePropertyChanged(PERSIST_PROPERTY, oldPersist, newPersist);
+	}
+	
+	public boolean isMerge() {
+		return this.merge;
+	}
+	
+	public void setMerge(boolean newMerge) {
+		boolean oldMerge = this.merge;
+		this.merge = newMerge;
+		if (oldMerge != newMerge) {
+			if (this.getResourceCascade() != null) {
+				this.getResourceCascade().setCascadeMerge(newMerge);						
+				if (this.getResourceCascade().isUnset()) {
+					removeResourceCascade();
+				}
+			}
+			else if (newMerge != false) {
+				addResourceCascade();
+				getResourceCascade().setCascadeMerge(newMerge);
+			}
+		}		
+		firePropertyChanged(MERGE_PROPERTY, oldMerge, newMerge);
+	}
+	
+	protected void setMerge_(boolean newMerge) {
+		boolean oldMerge = this.merge;
+		this.merge = newMerge;
+		firePropertyChanged(MERGE_PROPERTY, oldMerge, newMerge);
+	}
+	
+	public boolean isRemove() {
+		return this.remove;
+	}
+	
+	public void setRemove(boolean newRemove) {
+		boolean oldRemove = this.remove;
+		if (oldRemove != newRemove) {
+			this.remove = newRemove;
+			if (this.getResourceCascade() != null) {
+				this.getResourceCascade().setCascadeRemove(newRemove);						
+				if (this.getResourceCascade().isUnset()) {
+					removeResourceCascade();
+				}
+			}
+			else if (newRemove != false) {
+				addResourceCascade();
+				getResourceCascade().setCascadeRemove(newRemove);
+			}
+		}		
+		firePropertyChanged(REMOVE_PROPERTY, oldRemove, newRemove);
+	}
+	
+	protected void setRemove_(boolean newRemove) {
+		boolean oldRemove = this.remove;
+		this.remove = newRemove;		
+		firePropertyChanged(REMOVE_PROPERTY, oldRemove, newRemove);
+	}
+	
+	public boolean isRefresh() {
+		return this.refresh;
+	}
+	
+	public void setRefresh(boolean newRefresh) {
+		boolean oldRefresh = this.refresh;
+		this.refresh = newRefresh;	
+		if (oldRefresh != newRefresh) {
+			if (this.getResourceCascade() != null) {
+				this.getResourceCascade().setCascadeRefresh(newRefresh);						
+				if (this.getResourceCascade().isUnset()) {
+					removeResourceCascade();
+				}
+			}
+			else if (newRefresh != false) {
+				addResourceCascade();
+				getResourceCascade().setCascadeRefresh(newRefresh);
+			}
+		}
+		firePropertyChanged(REFRESH_PROPERTY, oldRefresh, newRefresh);
+	}
+	
+	protected void setRefresh_(boolean newRefresh) {
+		boolean oldRefresh = this.refresh;
+		this.refresh = newRefresh;
+		firePropertyChanged(REFRESH_PROPERTY, oldRefresh, newRefresh);
+	}
+	
+	public boolean isDetach() {
+		return this.detach;
+	}
+	
+	public void setDetach(boolean newDetach) {
+		boolean oldDetach = this.detach;
+		this.detach = newDetach;	
+		if (oldDetach != newDetach) {
+			if (this.getResourceCascade() != null) {
+				this.getResourceCascade().setCascadeDetach(newDetach);						
+				if (this.getResourceCascade().isUnset()) {
+					removeResourceCascade();
+				}
+			}
+			else if (newDetach != false) {
+				addResourceCascade();
+				getResourceCascade().setCascadeDetach(newDetach);
+			}
+		}
+		firePropertyChanged(DETACH_PROPERTY, oldDetach, newDetach);
+	}
+	
+	protected void setDetach_(boolean newDetach) {
+		boolean oldDetach = this.detach;
+		this.detach = newDetach;
+		firePropertyChanged(DETACH_PROPERTY, oldDetach, newDetach);
+	}
+	
+	protected CascadeType getResourceCascade() {
+		return this.relationshipMapping.getCascade();
+	}
+	
+	protected void removeResourceCascade() {
+		this.relationshipMapping.setCascade(null);		
+	}
+	
+	protected void addResourceCascade() {
+		this.relationshipMapping.setCascade(OrmFactory.eINSTANCE.createCascadeType());			
+	}
+	
+	public void update() {
+		CascadeType cascade = getResourceCascade();
+		this.setAll_(this.getResourceAll(cascade));
+		this.setPersist_(this.getResourcePersist(cascade));
+		this.setMerge_(this.getResourceMerge(cascade));
+		this.setRemove_(this.getResourceRemove(cascade));
+		this.setRefresh_(this.getResourceRefresh(cascade));
+		this.setDetach_(this.getResourceDetach(cascade));
+	}
+	
+	protected boolean getResourceAll(CascadeType cascade) {
+		return cascade == null ? false : cascade.isCascadeAll();
+	}
+	
+	protected boolean getResourcePersist(CascadeType cascade) {
+		return cascade == null ? false : cascade.isCascadePersist();
+	}
+	
+	protected boolean getResourceMerge(CascadeType cascade) {
+		return cascade == null ? false : cascade.isCascadeMerge();
+	}
+	
+	protected boolean getResourceRemove(CascadeType cascade) {
+		return cascade == null ? false : cascade.isCascadeRemove();
+	}
+	
+	protected boolean getResourceRefresh(CascadeType cascade) {
+		return cascade == null ? false : cascade.isCascadeRefresh();
+	}
+	
+	protected boolean getResourceDetach(CascadeType cascade) {
+		return cascade == null ? false : cascade.isCascadeDetach();
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.getResourceCascade().getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmColumn.java
new file mode 100644
index 0000000..ef90cfc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmColumn.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmBaseColumn;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+
+public class GenericOrmColumn extends AbstractOrmBaseColumn<XmlColumn> implements OrmColumn
+{
+	protected Integer specifiedLength;
+
+	protected Integer specifiedPrecision;
+
+	protected Integer specifiedScale;
+
+	public GenericOrmColumn(XmlContextNode parent, OrmColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	@Override
+	public OrmColumn.Owner getOwner() {
+		return (OrmColumn.Owner) super.getOwner();
+	}
+	
+	public void initializeFrom(Column oldColumn) {
+		super.initializeFrom(oldColumn);
+		setSpecifiedLength(oldColumn.getSpecifiedLength());
+		setSpecifiedPrecision(oldColumn.getSpecifiedPrecision());
+		setSpecifiedScale(oldColumn.getSpecifiedScale());
+	}
+
+	public int getLength() {
+		return (this.getSpecifiedLength() == null) ? getDefaultLength() : this.getSpecifiedLength().intValue();
+	}
+
+	public int getDefaultLength() {
+		return Column.DEFAULT_LENGTH;
+	}
+
+	public Integer getSpecifiedLength() {
+		return this.specifiedLength;
+	}
+
+	public void setSpecifiedLength(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		if (this.valuesAreDifferent(oldSpecifiedLength, newSpecifiedLength)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setLength(newSpecifiedLength);
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedLength != null) {
+				addResourceColumn();
+				getResourceColumn().setLength(newSpecifiedLength);
+			}
+		}
+		firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+	
+	protected void setSpecifiedLength_(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+
+	public int getPrecision() {
+		return (this.getSpecifiedPrecision() == null) ? getDefaultPrecision() : this.getSpecifiedPrecision().intValue();
+	}
+
+	public int getDefaultPrecision() {
+		return Column.DEFAULT_PRECISION;
+	}
+	
+	public Integer getSpecifiedPrecision() {
+		return this.specifiedPrecision;
+	}
+
+	public void setSpecifiedPrecision(Integer newSpecifiedPrecision) {
+		Integer oldSpecifiedPrecision = this.specifiedPrecision;
+		this.specifiedPrecision = newSpecifiedPrecision;
+		if (this.valuesAreDifferent(oldSpecifiedPrecision, newSpecifiedPrecision)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setPrecision(newSpecifiedPrecision);
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedPrecision != null) {
+				addResourceColumn();
+				getResourceColumn().setPrecision(newSpecifiedPrecision);
+			}
+		}
+		firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, oldSpecifiedPrecision, newSpecifiedPrecision);
+	}
+	
+	protected void setSpecifiedPrecision_(Integer newSpecifiedPrecision) {
+		Integer oldSpecifiedPrecision = this.specifiedPrecision;
+		this.specifiedPrecision = newSpecifiedPrecision;
+		firePropertyChanged(SPECIFIED_PRECISION_PROPERTY, oldSpecifiedPrecision, newSpecifiedPrecision);
+	}
+
+	public int getScale() {
+		return (this.getSpecifiedScale() == null) ? getDefaultScale() : this.getSpecifiedScale().intValue();
+	}
+
+	public int getDefaultScale() {
+		return Column.DEFAULT_SCALE;
+	}
+	
+	public Integer getSpecifiedScale() {
+		return this.specifiedScale;
+	}
+
+	public void setSpecifiedScale(Integer newSpecifiedScale) {
+		Integer oldSpecifiedScale = this.specifiedScale;
+		this.specifiedScale = newSpecifiedScale;
+		if (this.valuesAreDifferent(oldSpecifiedScale, newSpecifiedScale)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setScale(newSpecifiedScale);
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedScale != null) {
+				addResourceColumn();
+				getResourceColumn().setScale(newSpecifiedScale);
+			}
+		}
+		firePropertyChanged(SPECIFIED_SCALE_PROPERTY, oldSpecifiedScale, newSpecifiedScale);
+	}
+
+	protected void setSpecifiedScale_(Integer newSpecifiedScale) {
+		Integer oldSpecifiedScale = this.specifiedScale;
+		this.specifiedScale = newSpecifiedScale;
+		firePropertyChanged(SPECIFIED_SCALE_PROPERTY, oldSpecifiedScale, newSpecifiedScale);
+	}
+
+	@Override
+	protected XmlColumn getResourceColumn() {
+		return getOwner().getResourceColumn();
+	}
+	
+	@Override
+	protected void addResourceColumn() {
+		getOwner().addResourceColumn();
+	}
+	
+	@Override
+	protected void removeResourceColumn() {
+		getOwner().removeResourceColumn();
+	}
+	
+	@Override
+	public void initialize(XmlColumn column) {
+		super.initialize(column);
+		this.specifiedLength = this.getResourceLength(column);
+		this.specifiedPrecision = this.getResourcePrecision(column);
+		this.specifiedScale = this.getResourceScale(column);
+	}
+	
+	@Override
+	public void update(XmlColumn column) {
+		super.update(column);
+		this.setSpecifiedLength_(this.getResourceLength(column));
+		this.setSpecifiedPrecision_(this.getResourcePrecision(column));
+		this.setSpecifiedScale_(this.getResourceScale(column));
+	}
+
+	protected Integer getResourceLength(XmlColumn column) {
+		return column == null ? null : column.getLength();
+	}
+
+	protected Integer getResourcePrecision(XmlColumn column) {
+		return column == null ? null : column.getPrecision();
+	}
+	
+	protected Integer getResourceScale(XmlColumn column) {
+		return column == null ? null : column.getScale();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java
new file mode 100644
index 0000000..f917ea3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmDiscriminatorColumn.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.core.context.DiscriminatorType;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmDiscriminatorColumn;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmNamedColumn;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+
+public class GenericOrmDiscriminatorColumn extends AbstractOrmNamedColumn<XmlDiscriminatorColumn>
+	implements OrmDiscriminatorColumn
+{
+
+	protected DiscriminatorType specifiedDiscriminatorType;
+	
+	protected DiscriminatorType defaultDiscriminatorType;
+
+	protected Integer specifiedLength;
+	
+	protected int defaultLength;
+
+	protected XmlEntity entity;
+	
+	public GenericOrmDiscriminatorColumn(XmlContextNode parent, OrmDiscriminatorColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	@Override
+	public OrmDiscriminatorColumn.Owner getOwner() {
+		return (OrmDiscriminatorColumn.Owner) super.getOwner();
+	}
+
+	public DiscriminatorType getDiscriminatorType() {
+		return (this.getSpecifiedDiscriminatorType() == null) ? this.getDefaultDiscriminatorType() : this.getSpecifiedDiscriminatorType();
+	}
+
+	public DiscriminatorType getDefaultDiscriminatorType() {
+		return this.defaultDiscriminatorType;
+	}
+	
+	protected void setDefaultDiscriminatorType(DiscriminatorType discriminatorType) {
+		DiscriminatorType old = this.defaultDiscriminatorType;
+		this.defaultDiscriminatorType = discriminatorType;
+		firePropertyChanged(DEFAULT_DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
+	}
+		
+	public DiscriminatorType getSpecifiedDiscriminatorType() {
+		return this.specifiedDiscriminatorType;
+	}
+	
+	public void setSpecifiedDiscriminatorType(DiscriminatorType newSpecifiedDiscriminatorType) {
+		DiscriminatorType oldDiscriminatorType = this.specifiedDiscriminatorType;
+		this.specifiedDiscriminatorType = newSpecifiedDiscriminatorType;
+		if (oldDiscriminatorType != newSpecifiedDiscriminatorType) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setDiscriminatorType(DiscriminatorType.toOrmResourceModel(newSpecifiedDiscriminatorType));
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedDiscriminatorType != null) {
+				addResourceColumn();
+				this.getResourceColumn().setDiscriminatorType(DiscriminatorType.toOrmResourceModel(newSpecifiedDiscriminatorType));
+			}
+		}
+		firePropertyChanged(DiscriminatorColumn.SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, oldDiscriminatorType, newSpecifiedDiscriminatorType);
+	}
+	
+	protected void setSpecifiedDiscriminatorType_(DiscriminatorType newSpecifiedDiscriminatorType) {
+		DiscriminatorType oldDiscriminatorType = this.specifiedDiscriminatorType;
+		this.specifiedDiscriminatorType = newSpecifiedDiscriminatorType;
+		firePropertyChanged(DiscriminatorColumn.SPECIFIED_DISCRIMINATOR_TYPE_PROPERTY, oldDiscriminatorType, newSpecifiedDiscriminatorType);
+	}
+		
+	public int getLength() {
+		return (this.getSpecifiedLength() == null) ? this.getDefaultLength() : this.getSpecifiedLength().intValue();
+	}
+
+	public int getDefaultLength() {
+		return this.defaultLength;
+	}
+	
+	protected void setDefaultLength(int defaultLength) {
+		int old = this.defaultLength;
+		this.defaultLength = defaultLength;
+		firePropertyChanged(DEFAULT_LENGTH_PROPERTY, old, defaultLength);
+	}
+
+	public Integer getSpecifiedLength() {
+		return this.specifiedLength;
+	}
+
+	public void setSpecifiedLength(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		if (this.valuesAreDifferent(oldSpecifiedLength, newSpecifiedLength)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setLength(newSpecifiedLength);
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedLength != null) {
+				addResourceColumn();
+				getResourceColumn().setLength(newSpecifiedLength);
+			}
+		}
+		firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+
+	protected void setSpecifiedLength_(Integer newSpecifiedLength) {
+		Integer oldSpecifiedLength = this.specifiedLength;
+		this.specifiedLength = newSpecifiedLength;
+		firePropertyChanged(SPECIFIED_LENGTH_PROPERTY, oldSpecifiedLength, newSpecifiedLength);
+	}
+	
+	
+	@Override
+	public XmlDiscriminatorColumn getResourceColumn() {
+		return this.entity.getDiscriminatorColumn();
+	}
+	
+	@Override
+	protected void addResourceColumn() {
+		this.entity.setDiscriminatorColumn(OrmFactory.eINSTANCE.createXmlDiscriminatorColumn());		
+	}
+	
+	@Override
+	protected void removeResourceColumn() {
+		this.entity.setDiscriminatorColumn(null);
+	}
+	
+	public boolean isResourceSpecified() {
+		return getResourceColumn() != null;
+	}
+	
+	public void initialize(XmlEntity xmlEntity) {
+		this.entity = xmlEntity;
+		this.initialize(this.getResourceColumn());
+	}
+	
+	public void update(XmlEntity xmlEntity) {
+		this.entity = xmlEntity;
+		this.update(this.getResourceColumn());
+	}
+
+	
+	@Override
+	protected void initialize(XmlDiscriminatorColumn column) {
+		super.initialize(column);
+		this.defaultDiscriminatorType = this.buildDefaultDiscriminatorType();
+		this.defaultLength = this.buildDefaultLength();
+		this.specifiedLength = this.getResourceLength(column);
+		this.specifiedDiscriminatorType = this.getResourceDiscriminatorType(column);
+	}
+	
+	@Override
+	protected void update(XmlDiscriminatorColumn column) {
+		//don't call super because postUpdate() handles updating the default column name
+		this.setSpecifiedName_(this.getResourceColumnName(column));
+		this.setColumnDefinition_(this.getResourceColumnDefinition(column));	
+		this.setSpecifiedLength_(this.getResourceLength(column));
+		this.setSpecifiedDiscriminatorType_(this.getResourceDiscriminatorType(column));
+	}
+	
+	@Override
+	/**
+	 * Using postUpdate since these defaults are dependent on the entity hierarchy
+	 */
+	public void postUpdate() {
+		super.postUpdate();
+		this.setDefaultName(this.buildDefaultName());
+		this.setDefaultDiscriminatorType(this.buildDefaultDiscriminatorType());
+		this.setDefaultLength(this.buildDefaultLength());		
+	}
+	
+	protected Integer getResourceLength(XmlDiscriminatorColumn column) {
+		return column == null ? null : column.getLength();
+	}
+	
+	protected DiscriminatorType getResourceDiscriminatorType(XmlDiscriminatorColumn column) {
+		return column == null ? null : DiscriminatorType.fromOrmResourceModel(column.getDiscriminatorType());
+	}
+	
+	protected int buildDefaultLength() {
+		return this.getOwner().getDefaultLength();
+	}
+	
+	protected DiscriminatorType buildDefaultDiscriminatorType() {
+		return this.getOwner().getDefaultDiscriminatorType();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java
new file mode 100644
index 0000000..f0c0c8d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddable.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Oracle. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmEmbeddable;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaEmbeddable;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddable;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+
+public class GenericOrmEmbeddable
+	extends AbstractOrmEmbeddable
+{
+	public GenericOrmEmbeddable(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	@Override
+	public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
+		return ArrayTools.contains(GenericJavaEmbeddable.ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java
new file mode 100644
index 0000000..21619f2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java
@@ -0,0 +1,201 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmBaseEmbeddedMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.EmbeddedIdMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.Tools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SubIterableWrapper;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class GenericOrmEmbeddedIdMapping
+	extends AbstractOrmBaseEmbeddedMapping<XmlEmbeddedId> 
+	implements EmbeddedIdMapping2_0, OrmEmbeddedIdMapping
+{
+	/* 2.0 feature - a relationship may map this embedded id */
+	protected boolean mappedByRelationship;
+	
+	
+	public GenericOrmEmbeddedIdMapping(OrmPersistentAttribute parent, XmlEmbeddedId resourceMapping) {
+		super(parent, resourceMapping);
+		this.mappedByRelationship = calculateMappedByRelationship();
+	}
+	
+	
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmEmbeddedIdMapping(this);
+	}
+	
+	public int getXmlSequence() {
+		return 10;
+	}
+	
+	
+	//*************** AttributeMapping implementation *********************
+	
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getEmbeddedIds().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getEmbeddedIds().remove(this.resourceAttributeMapping);
+	}
+	
+	
+	// **************** EmbeddedId2_0 impl ************************************
+	
+	public boolean isMappedByRelationship() {
+		return this.mappedByRelationship;
+	}
+	
+	protected void setMappedByRelationship(boolean newValue) {
+		boolean oldValue = this.mappedByRelationship;
+		this.mappedByRelationship = newValue;
+		firePropertyChanged(MAPPED_BY_RELATIONSHIP_PROPERTY, oldValue, newValue);
+	}
+	
+	protected boolean calculateMappedByRelationship() {
+		for (SingleRelationshipMapping2_0 each : getMapsIdRelationships()) {
+			if (Tools.valuesAreEqual(getName(), each.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue())) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	protected Iterable<SingleRelationshipMapping2_0> getMapsIdRelationships() {
+		return new FilteringIterable<SingleRelationshipMapping2_0>(
+				new SubIterableWrapper<AttributeMapping, SingleRelationshipMapping2_0>(
+					new CompositeIterable<AttributeMapping>(
+						getTypeMapping().getAllAttributeMappings(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY),
+						getTypeMapping().getAllAttributeMappings(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY)))) {
+			@Override
+			protected boolean accept(SingleRelationshipMapping2_0 o) {
+				return o.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy();
+			}
+		};
+	}
+	
+	
+	// **************** overrides *********************************************
+	
+	@Override
+	protected Iterator<String> embeddableOverrideableAttributeMappingNames() {
+		return (isMappedByRelationship()) ?
+			EmptyIterator.<String>instance()
+			: super.embeddableOverrideableAttributeMappingNames();
+	}
+	
+	@Override
+	protected OrmAttributeOverrideContainer.Owner buildAttributeOverrideContainerOwner() {
+		return new AttributeOverrideContainerOwner();
+	}
+	
+	
+	protected class AttributeOverrideContainerOwner
+		extends AbstractOrmBaseEmbeddedMapping.AttributeOverrideContainerOwner
+	{
+		@Override
+		public Iterator<String> allOverridableNames() {
+			return (GenericOrmEmbeddedIdMapping.this.isMappedByRelationship()) ?
+					EmptyIterator.<String>instance()
+					: super.allOverridableNames();
+		}
+		
+		@Override
+		protected Iterator<String> allOverridableAttributeNames_(TypeMapping typeMapping) {
+			final Collection<String> mappedByRelationshipAttributes = CollectionTools.collection(
+					new TransformationIterator<SingleRelationshipMapping2_0, String>(getMapsIdRelationships()) {
+						@Override
+						protected String transform(SingleRelationshipMapping2_0 next) {
+							return next.getDerivedIdentity().getMapsIdDerivedIdentityStrategy().getValue();
+						}
+					});
+			return new FilteringIterator<String>(super.allOverridableAttributeNames_(typeMapping)) {
+				@Override
+				protected boolean accept(String o) {
+					if (mappedByRelationshipAttributes.isEmpty()) {
+						return true;
+					}
+					// overrideable names are (usually?) qualified with a container mapping, 
+					// which may also be the one mapped by a relationship
+					String qualifier = 
+							(o.indexOf('.') > 0) ?
+								o.substring(0, o.indexOf('.'))
+								: o;
+					return ! mappedByRelationshipAttributes.contains(qualifier);
+				}
+			};
+		}
+	}
+	
+	
+	// **************** resource -> context ***********************************
+	
+	@Override
+	public void update() {
+		super.update();
+		setMappedByRelationship(calculateMappedByRelationship());
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		// [JPA 2.0] if the embedded id is mapped by a relationship, then any specified 
+		// attribute overrides are in error
+		// (in JPA 1.0, this will obviously never be reached)
+		if (isMappedByRelationship()
+				&& getAttributeOverrideContainer().specifiedAttributeOverridesSize() > 0) {
+			TextRange textRange = getAttributeOverrideContainer().getValidationTextRange();
+			if (!isVirtual()) {
+				textRange = getAttributeOverrideContainer().specifiedAttributeOverrides().next().getValidationTextRange();
+			}
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
+						new String[] {},
+						getAttributeOverrideContainer(),
+						textRange));
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java
new file mode 100644
index 0000000..85bb626
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedMapping.java
@@ -0,0 +1,482 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmBaseEmbeddedMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmEmbeddedMapping2_0;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.SubIteratorWrapper;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public class GenericOrmEmbeddedMapping
+	extends AbstractOrmBaseEmbeddedMapping<XmlEmbedded> 
+	implements OrmEmbeddedMapping2_0
+{
+	protected OrmAssociationOverrideContainer associationOverrideContainer;
+
+	public GenericOrmEmbeddedMapping(OrmPersistentAttribute parent, XmlEmbedded resourceMapping) {
+		super(parent, resourceMapping);
+		this.associationOverrideContainer = 
+			getXmlContextNodeFactory().
+				buildOrmAssociationOverrideContainer(
+					this,
+					new AssociationOverrideContainerOwner());
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		getAssociationOverrideContainer().update();
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		getAssociationOverrideContainer().postUpdate();
+	}
+
+	@Override
+	public JavaEmbeddedMapping2_0 getJavaEmbeddedMapping() {
+		return (JavaEmbeddedMapping2_0) super.getJavaEmbeddedMapping();
+	}
+
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmEmbeddedMapping(this);
+	}
+
+	public int getXmlSequence() {
+		return 80;
+	}
+
+	public String getKey() {
+		return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getEmbeddeds().add(this.resourceAttributeMapping);
+	}
+
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getEmbeddeds().remove(this.resourceAttributeMapping);
+	}
+	
+	//only putting this in EmbeddedMapping since relationship mappings
+	//defined within an embedded id class are not supported  by the 2.0 spec.
+	//i.e. the mappedBy choices will not include attributes nested in an embedded mapping
+	@Override
+	public Iterator<String> allMappingNames() {
+		return this.isJpa2_0Compatible() ?
+				new CompositeIterator<String>(this.getName(),this.allEmbeddableAttributeMappingNames()) :
+				super.allMappingNames();
+	}
+
+	protected Iterator<String> allEmbeddableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+			}
+		);
+	}
+
+	@Override
+	public AttributeMapping resolveAttributeMapping(String attributeName) {
+		if (getName() == null) {
+			return null;
+		}
+		AttributeMapping resolvedMapping = super.resolveAttributeMapping(attributeName);
+		if (resolvedMapping != null) {
+			return resolvedMapping;
+		}
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = attributeName.indexOf('.');
+			if (dotIndex != -1) {
+				if (getName().equals(attributeName.substring(0, dotIndex))) {
+					for (AttributeMapping attributeMapping : CollectionTools.iterable(embeddableAttributeMappings())) {
+						resolvedMapping = attributeMapping.resolveAttributeMapping(attributeName.substring(dotIndex + 1));
+						if (resolvedMapping != null) {
+							return resolvedMapping;
+						}
+					}
+				}
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		if (getName() == null) {
+			return null;
+		}
+		if (this.isJpa2_0Compatible()) {
+			int dotIndex = attributeName.indexOf('.');
+			if (dotIndex != -1) {
+				if (getName().equals(attributeName.substring(0, dotIndex))) {
+					attributeName = attributeName.substring(dotIndex + 1);
+					AssociationOverride override = getAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+					if (override != null && !override.isVirtual()) {
+						return override.getRelationshipReference();
+					}
+					if (this.getTargetEmbeddable() == null) {
+						return null;
+					}
+					return this.getTargetEmbeddable().resolveRelationshipReference(attributeName);
+				}
+			}
+		}
+		return null;
+	}
+	
+	public OrmAssociationOverrideContainer getAssociationOverrideContainer() {
+		return this.associationOverrideContainer;
+	}
+
+	protected JavaAssociationOverride getJavaAssociationOverrideNamed(String attributeName) {
+		if (getJavaEmbeddedMapping() != null) {
+			return getJavaEmbeddedMapping().getAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+		}
+		return null;
+	}
+	
+	
+	//************* AttributeOverrideContainer.Owner implementation ********************
+	
+	public Iterator<String> allOverridableAssociationNames() {
+		return new TransformationIterator<RelationshipMapping, String>(this.allOverridableAssociations()) {
+			@Override
+			protected String transform(RelationshipMapping overridableAssociation) {
+				return overridableAssociation.getName();
+			}
+		};
+	}
+
+	public Iterator<RelationshipMapping> allOverridableAssociations() {
+		return (this.getTargetEmbeddable() == null) ?
+				EmptyIterator.<RelationshipMapping>instance() :
+				new SubIteratorWrapper<AttributeMapping, RelationshipMapping>(this.allOverridableAssociations_());
+	}
+
+	protected Iterator<AttributeMapping> allOverridableAssociations_() {
+		return new FilteringIterator<AttributeMapping>(this.getTargetEmbeddable().attributeMappings()) {
+			@Override
+			protected boolean accept(AttributeMapping o) {
+				return o.isOverridableAssociationMapping();
+			}
+		};
+	}
+
+
+	// ********** validation **********
+	@Override
+	protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
+		super.validateOverrides(messages, reporter);
+		this.getAssociationOverrideContainer().validate(messages, reporter);
+	}
+
+	
+	//********** OrmAssociationOverrideContainer.Owner implementation *********	
+	
+	protected class AssociationOverrideContainerOwner
+		implements OrmAssociationOverrideContainer.Owner
+	{
+		public OrmTypeMapping getTypeMapping() {
+			return GenericOrmEmbeddedMapping.this.getTypeMapping();
+		}
+		
+		public TypeMapping getOverridableTypeMapping() {
+			return GenericOrmEmbeddedMapping.this.getTargetEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAssociationNames();
+		}
+		
+		public EList<XmlAssociationOverride> getResourceAssociationOverrides() {
+			return GenericOrmEmbeddedMapping.this.resourceAttributeMapping.getAssociationOverrides();
+		}
+		
+		public RelationshipReference resolveRelationshipReference(String associationOverrideName) {
+			if (getPersistentAttribute().isVirtual() && !getTypeMapping().isMetadataComplete()) {
+				JavaAssociationOverride javaAssociationOverride = getJavaAssociationOverrideNamed(associationOverrideName);
+				if (javaAssociationOverride != null && !javaAssociationOverride.isVirtual()) {
+					return javaAssociationOverride.getRelationshipReference();
+				}
+			}
+			return MappingTools.resolveRelationshipReference(getOverridableTypeMapping(), associationOverrideName);
+		}
+		
+		public boolean tableNameIsInvalid(String tableName) {
+			return getTypeMapping().tableNameIsInvalid(tableName);
+		}
+		
+		public Iterator<String> candidateTableNames() {
+			return getTypeMapping().associatedTableNamesIncludingInherited();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return getTypeMapping().getDbTable(tableName);
+		}
+		
+		public String getDefaultTableName() {
+			return getTypeMapping().getPrimaryTableName();
+		}
+		
+		public TextRange getValidationTextRange() {
+			return GenericOrmEmbeddedMapping.this.getValidationTextRange();
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					GenericOrmEmbeddedMapping.this.getName(), 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] { 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY},
+				column,
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					GenericOrmEmbeddedMapping.this.getName(), 
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+				);
+		}
+		
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {
+					column.getReferencedColumnName(),
+					column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					GenericOrmEmbeddedMapping.this.getName(),
+					overrideName,
+					column.getReferencedColumnName(),
+					column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {
+					overrideName,
+					column.getReferencedColumnName(),
+					column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {GenericOrmEmbeddedMapping.this.getName(), overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {GenericOrmEmbeddedMapping.this.getName(), overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEntity.java
new file mode 100644
index 0000000..867a738
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEntity.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmEntity;
+import org.eclipse.jpt.core.jpa2.context.CacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+
+public class GenericOrmEntity
+	extends AbstractOrmEntity
+
+{
+
+	protected final OrmCacheable2_0 cacheable;
+	
+	public GenericOrmEntity(OrmPersistentType parent, XmlEntity resourceMapping) {
+		super(parent, resourceMapping);
+		this.cacheable = ((OrmXml2_0ContextNodeFactory) getXmlContextNodeFactory()).buildOrmCacheable(this, resourceMapping);
+	}
+	
+	public OrmCacheable2_0 getCacheable() {
+		return this.cacheable;
+	}
+	
+	public boolean calculateDefaultCacheable() {
+		if (!isMetadataComplete()) {
+			CacheableHolder2_0 javaEntity = (CacheableHolder2_0) getJavaEntity();
+			if (javaEntity != null) {
+				return javaEntity.getCacheable().isCacheable();
+			}
+		}
+		
+		CacheableHolder2_0 parentEntity = (CacheableHolder2_0) getParentEntity();
+		if (parentEntity != null) {
+			return parentEntity.getCacheable().isCacheable();
+		}
+		return ((PersistenceUnit2_0) getPersistenceUnit()).calculateDefaultCacheable();
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		getCacheable().update();
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEnumeratedConverter.java
new file mode 100644
index 0000000..ad4abac
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEnumeratedConverter.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.EnumType;
+import org.eclipse.jpt.core.context.EnumeratedConverter;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmEnumeratedConverter extends AbstractOrmXmlContextNode
+	implements EnumeratedConverter, OrmConverter
+{
+	protected EnumType specifiedEnumType;
+	
+	protected XmlConvertibleMapping resourceConvertibleMapping;
+	
+	public GenericOrmEnumeratedConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping) {
+		super(parent);
+		this.initialize(resourceMapping);
+	}
+	
+	@Override
+	public OrmAttributeMapping getParent() {
+		return (OrmAttributeMapping) super.getParent();
+	}
+
+	public String getType() {
+		return Converter.ENUMERATED_CONVERTER;
+	}
+	
+	public EnumType getEnumType() {
+		return getSpecifiedEnumType() == null ? getDefaultEnumType() : getSpecifiedEnumType();
+	}
+	
+	public EnumType getDefaultEnumType() {
+		//there is no default enumType in xml, if you specify the enumerated element, you must
+		//specify either ORDINAL or STRING
+		return null;
+	}
+	
+	public EnumType getSpecifiedEnumType() {
+		return this.specifiedEnumType;
+	}
+	
+	public void setSpecifiedEnumType(EnumType newSpecifiedEnumType) {
+		EnumType oldSpecifiedEnumType = this.specifiedEnumType;
+		this.specifiedEnumType = newSpecifiedEnumType;
+		this.resourceConvertibleMapping.setEnumerated(EnumType.toOrmResourceModel(newSpecifiedEnumType));
+		firePropertyChanged(EnumeratedConverter.SPECIFIED_ENUM_TYPE_PROPERTY, oldSpecifiedEnumType, newSpecifiedEnumType);
+	}
+
+	protected void setSpecifiedEnumType_(EnumType newSpecifiedEnumType) {
+		EnumType oldSpecifiedEnumType = this.specifiedEnumType;
+		this.specifiedEnumType = newSpecifiedEnumType;
+		firePropertyChanged(EnumeratedConverter.SPECIFIED_ENUM_TYPE_PROPERTY, oldSpecifiedEnumType, newSpecifiedEnumType);
+	}
+	
+	protected void initialize(XmlConvertibleMapping resourceConvertibleMapping) {
+		this.resourceConvertibleMapping = resourceConvertibleMapping;
+		this.specifiedEnumType = this.specifiedEnumType();
+	}
+	
+	public void update() {
+		this.setSpecifiedEnumType_(this.specifiedEnumType());
+	}
+	
+	protected EnumType specifiedEnumType() {
+		return EnumType.fromOrmResourceModel(this.resourceConvertibleMapping.getEnumerated());
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.resourceConvertibleMapping.getEnumeratedTextRange();
+	}
+
+	public void addToResourceModel() {
+		this.resourceConvertibleMapping.setEnumerated(org.eclipse.jpt.core.resource.orm.EnumType.ORDINAL);
+	}
+	
+	public void removeFromResourceModel() {
+		this.resourceConvertibleMapping.setEnumerated(null);
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java
new file mode 100644
index 0000000..860d5a8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmGeneratedValue.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jpt.core.context.GeneratedValue;
+import org.eclipse.jpt.core.context.GenerationType;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmGeneratedValue;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * 
+ */
+public class GenericOrmGeneratedValue
+	extends AbstractOrmXmlContextNode
+	implements OrmGeneratedValue
+{
+	protected XmlGeneratedValue resourceGeneratedValue;
+	
+	protected GenerationType specifiedStrategy;
+
+	protected String specifiedGenerator;
+	protected String defaultGenerator;
+
+
+	public GenericOrmGeneratedValue(XmlContextNode parent, XmlGeneratedValue resourceGeneratedValue) {
+		super(parent);
+		this.initialize(resourceGeneratedValue);
+	}
+	
+	protected void initialize(XmlGeneratedValue xmlGeneratedValue) {
+		this.resourceGeneratedValue = xmlGeneratedValue;
+		this.specifiedStrategy = this.buildStrategy();
+		this.specifiedGenerator = xmlGeneratedValue.getGenerator();
+		//TODO
+		this.defaultGenerator = null;
+	}
+
+	@Override
+	public XmlContextNode getParent() {
+		return (XmlContextNode) super.getParent();
+	}
+
+
+	// ********** strategy **********
+
+	public GenerationType getStrategy() {
+		return (this.specifiedStrategy != null) ? this.specifiedStrategy : this.getDefaultStrategy();
+	}
+
+	public GenerationType getDefaultStrategy() {
+		return GeneratedValue.DEFAULT_STRATEGY;
+	}
+	
+	public GenerationType getSpecifiedStrategy() {
+		return this.specifiedStrategy;
+	}
+
+	public void setSpecifiedStrategy(GenerationType strategy) {
+		GenerationType old = this.specifiedStrategy;
+		this.specifiedStrategy = strategy;
+		this.resourceGeneratedValue.setStrategy(GenerationType.toOrmResourceModel(strategy));
+		this.firePropertyChanged(SPECIFIED_STRATEGY_PROPERTY, old, strategy);
+	}
+	
+	protected void setSpecifiedStrategy_(GenerationType strategy) {
+		GenerationType old = this.specifiedStrategy;
+		this.specifiedStrategy = strategy;
+		this.firePropertyChanged(SPECIFIED_STRATEGY_PROPERTY, old, strategy);
+	}
+
+
+	// ********** generator **********
+
+	public String getGenerator() {
+		return (this.specifiedGenerator != null) ? this.specifiedGenerator : this.defaultGenerator;
+	}
+
+	public String getDefaultGenerator() {
+		return this.defaultGenerator;
+	}
+	
+	protected void setDefaultGenerator(String generator) {
+		String old = this.defaultGenerator;
+		this.defaultGenerator = generator;
+		this.firePropertyChanged(DEFAULT_GENERATOR_PROPERTY, old, generator);
+	}
+
+	public String getSpecifiedGenerator() {
+		return this.specifiedGenerator;
+	}
+
+	public void setSpecifiedGenerator(String generator) {
+		String old = this.specifiedGenerator;
+		this.specifiedGenerator = generator;
+		this.resourceGeneratedValue.setGenerator(generator);
+		this.firePropertyChanged(SPECIFIED_GENERATOR_PROPERTY, old, generator);
+	}
+
+	protected void setSpecifiedGenerator_(String generator) {
+		String old = this.specifiedGenerator;
+		this.specifiedGenerator = generator;
+		this.firePropertyChanged(SPECIFIED_GENERATOR_PROPERTY, old, generator);
+	}
+
+
+	// ********** text ranges **********
+
+	public TextRange getValidationTextRange() {
+		TextRange validationTextRange = this.resourceGeneratedValue.getValidationTextRange();
+		return validationTextRange != null ? validationTextRange : getParent().getValidationTextRange();
+	}
+
+	public TextRange getGeneratorTextRange() {
+		TextRange textRange =  this.resourceGeneratedValue.getGeneratorTextRange();
+		return textRange != null ? textRange : getValidationTextRange();
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+
+		String generator = this.getGenerator();
+		if (generator == null) {
+			return;
+		}
+
+		for (Iterator<Generator> stream = this.getPersistenceUnit().generators(); stream.hasNext(); ) {
+			if (generator.equals(stream.next().getName())) {
+				return;
+			}
+		}
+
+		messages.add(
+			DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.ID_MAPPING_UNRESOLVED_GENERATOR_NAME,
+				new String[] {generator},
+				this.getParent(),
+				this.getGeneratorTextRange()
+			)
+		);
+	}
+
+
+	// ********** update from resource model **********
+
+	public void update(XmlGeneratedValue xmlGeneratedValue) {
+		this.resourceGeneratedValue = xmlGeneratedValue;
+		this.setSpecifiedStrategy_(this.buildStrategy());
+		this.setSpecifiedGenerator_(xmlGeneratedValue.getGenerator());
+		//TODO
+		this.setDefaultGenerator(null);
+	}
+
+	protected GenerationType buildStrategy() {
+		return GenerationType.fromOrmResourceModel(this.resourceGeneratedValue.getStrategy());
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java
new file mode 100644
index 0000000..2ec03ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmGeneratorContainer.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jpt.core.context.Generator;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmGenerator;
+import org.eclipse.jpt.core.context.orm.OrmGeneratorContainer;
+import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator;
+import org.eclipse.jpt.core.context.orm.OrmTableGenerator;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmGeneratorContainer extends AbstractOrmXmlContextNode
+	implements OrmGeneratorContainer
+{
+	protected OrmSequenceGenerator sequenceGenerator;
+
+	protected OrmTableGenerator tableGenerator;
+	
+	protected final XmlGeneratorContainer resourceGeneratorContainer;
+	
+	public GenericOrmGeneratorContainer(XmlContextNode parent, XmlGeneratorContainer resourceGeneratorContainer) {
+		super(parent);
+		this.resourceGeneratorContainer = resourceGeneratorContainer;
+		this.initializeSequenceGenerator();
+		this.initializeTableGenerator();
+	}
+	
+	public OrmSequenceGenerator addSequenceGenerator() {
+		if (getSequenceGenerator() != null) {
+			throw new IllegalStateException("sequenceGenerator already exists"); //$NON-NLS-1$
+		}
+		XmlSequenceGenerator resourceSequenceGenerator = buildResourceSequenceGenerator();
+		this.sequenceGenerator = buildSequenceGenerator(resourceSequenceGenerator);
+		this.resourceGeneratorContainer.setSequenceGenerator(resourceSequenceGenerator);
+		firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, null, this.sequenceGenerator);
+		return this.sequenceGenerator;
+	}
+	
+	public void removeSequenceGenerator() {
+		if (getSequenceGenerator() == null) {
+			throw new IllegalStateException("sequenceGenerator does not exist, cannot be removed"); //$NON-NLS-1$
+		}
+		OrmSequenceGenerator oldSequenceGenerator = this.sequenceGenerator;
+		this.sequenceGenerator = null;
+		this.resourceGeneratorContainer.setSequenceGenerator(null);
+		firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, oldSequenceGenerator, null);
+	}
+	
+	public OrmSequenceGenerator getSequenceGenerator() {
+		return this.sequenceGenerator;
+	}
+
+	protected void setSequenceGenerator(OrmSequenceGenerator newSequenceGenerator) {
+		OrmSequenceGenerator oldSequenceGenerator = this.sequenceGenerator;
+		this.sequenceGenerator = newSequenceGenerator;
+		firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, oldSequenceGenerator, newSequenceGenerator);
+	}
+
+	public OrmTableGenerator addTableGenerator() {
+		if (getTableGenerator() != null) {
+			throw new IllegalStateException("tableGenerator already exists"); //$NON-NLS-1$
+		}
+		XmlTableGenerator resourceTableGenerator = buildResourceTableGenerator();
+		this.tableGenerator = buildTableGenerator(resourceTableGenerator);
+		this.resourceGeneratorContainer.setTableGenerator(resourceTableGenerator);
+		firePropertyChanged(TABLE_GENERATOR_PROPERTY, null, this.tableGenerator);
+		return this.tableGenerator;
+	}
+	
+	public void removeTableGenerator() {
+		if (getTableGenerator() == null) {
+			throw new IllegalStateException("tableGenerator does not exist, cannot be removed"); //$NON-NLS-1$
+		}
+		OrmTableGenerator oldTableGenerator = this.tableGenerator;
+		this.tableGenerator = null;
+		this.resourceGeneratorContainer.setTableGenerator(null);
+		firePropertyChanged(TABLE_GENERATOR_PROPERTY, oldTableGenerator, null);
+	}
+	
+	public OrmTableGenerator getTableGenerator() {
+		return this.tableGenerator;
+	}
+
+	protected void setTableGenerator(OrmTableGenerator newTableGenerator) {
+		OrmTableGenerator oldTableGenerator = this.tableGenerator;
+		this.tableGenerator = newTableGenerator;
+		firePropertyChanged(TABLE_GENERATOR_PROPERTY, oldTableGenerator, newTableGenerator);
+	}
+	
+	protected void initializeSequenceGenerator() {
+		if (this.resourceGeneratorContainer.getSequenceGenerator() != null) {
+			this.sequenceGenerator = buildSequenceGenerator(this.resourceGeneratorContainer.getSequenceGenerator());
+		}
+	}
+	
+	protected XmlSequenceGenerator buildResourceSequenceGenerator() {
+		return OrmFactory.eINSTANCE.createXmlSequenceGenerator();
+	}
+	
+	protected OrmSequenceGenerator buildSequenceGenerator(XmlSequenceGenerator resourceSequenceGenerator) {
+		return getXmlContextNodeFactory().buildOrmSequenceGenerator(this, resourceSequenceGenerator);
+	}
+
+	protected void initializeTableGenerator() {
+		if (this.resourceGeneratorContainer.getTableGenerator() != null) {
+			this.tableGenerator = buildTableGenerator(this.resourceGeneratorContainer.getTableGenerator());
+		}
+	}
+	
+	protected XmlTableGenerator buildResourceTableGenerator() {
+		return OrmFactory.eINSTANCE.createXmlTableGenerator();
+	}
+	
+	protected OrmTableGenerator buildTableGenerator(XmlTableGenerator resourceTableGenerator) {
+		return getXmlContextNodeFactory().buildOrmTableGenerator(this, resourceTableGenerator);
+	}
+	
+	public void update() {
+		this.updateSequenceGenerator();
+		this.updateTableGenerator();
+	}
+	
+	protected void updateSequenceGenerator() {
+		if (this.resourceGeneratorContainer.getSequenceGenerator() == null) {
+			if (getSequenceGenerator() != null) {
+				setSequenceGenerator(null);
+			}
+		}
+		else {
+			if (getSequenceGenerator() == null) {
+				setSequenceGenerator(buildSequenceGenerator(this.resourceGeneratorContainer.getSequenceGenerator()));
+			}
+			else {
+				getSequenceGenerator().update(this.resourceGeneratorContainer.getSequenceGenerator());
+			}
+		}
+	}
+	
+	protected void updateTableGenerator() {
+		if (this.resourceGeneratorContainer.getTableGenerator() == null) {
+			if (getTableGenerator() != null) {
+				setTableGenerator(null);
+			}
+		}
+		else {
+			if (getTableGenerator() == null) {
+				setTableGenerator(buildTableGenerator(this.resourceGeneratorContainer.getTableGenerator()));
+			}
+			else {
+				getTableGenerator().update(this.resourceGeneratorContainer.getTableGenerator());
+			}
+		}
+	}
+
+	// **************** validation *********************************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateGenerators(messages);
+	}
+	
+	protected void validateGenerators(List<IMessage> messages) {
+		for (Iterator<OrmGenerator> localGenerators = this.generators(); localGenerators.hasNext(); ) {
+			OrmGenerator localGenerator = localGenerators.next();
+			for (Iterator<Generator> globalGenerators = this.getPersistenceUnit().generators(); globalGenerators.hasNext(); ) {
+				if (localGenerator.duplicates(globalGenerators.next())) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.GENERATOR_DUPLICATE_NAME,
+							new String[] {localGenerator.getName()},
+							localGenerator,
+							localGenerator.getNameTextRange()
+						)
+					);
+				}
+			}
+		}
+	}
+	
+	protected Iterator<OrmGenerator> generators() {
+		ArrayList<OrmGenerator> generators = new ArrayList<OrmGenerator>();
+		this.addGeneratorsTo(generators);
+		return generators.iterator();
+	}
+
+	protected void addGeneratorsTo(ArrayList<OrmGenerator> generators) {
+		if (this.sequenceGenerator != null) {
+			generators.add(this.sequenceGenerator);
+		}
+		if (this.tableGenerator != null) {
+			generators.add(this.tableGenerator);
+		}
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.resourceGeneratorContainer.getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmIdMapping.java
new file mode 100644
index 0000000..7675b12
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmIdMapping.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmIdMapping;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+
+public class GenericOrmIdMapping extends AbstractOrmIdMapping<XmlId>
+{
+	
+	public GenericOrmIdMapping(OrmPersistentAttribute parent, XmlId resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
new file mode 100644
index 0000000..c9b27ba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmBaseColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class GenericOrmJoinColumn extends AbstractOrmBaseColumn<XmlJoinColumn> implements OrmJoinColumn
+{
+
+	protected String specifiedReferencedColumnName;
+
+	protected String defaultReferencedColumnName;
+
+	protected XmlJoinColumn resourceJoinColumn;
+
+	public GenericOrmJoinColumn(XmlContextNode parent, OrmJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn) {
+		super(parent, owner);
+		this.initialize(resourceJoinColumn);
+	}
+
+	public void initializeFrom(JoinColumn oldColumn) {
+		super.initializeFrom(oldColumn);
+		setSpecifiedReferencedColumnName(oldColumn.getSpecifiedReferencedColumnName());
+	}
+	
+	public String getReferencedColumnName() {
+		return (this.getSpecifiedReferencedColumnName() == null) ? getDefaultReferencedColumnName() : this.getSpecifiedReferencedColumnName();
+	}
+
+	public String getSpecifiedReferencedColumnName() {
+		return this.specifiedReferencedColumnName;
+	}
+
+	public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		getResourceColumn().setReferencedColumnName(newSpecifiedReferencedColumnName);
+		firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+	
+	protected void setSpecifiedReferencedColumnName_(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+
+	public String getDefaultReferencedColumnName() {
+		return this.defaultReferencedColumnName;
+	}
+
+	protected void setDefaultReferencedColumnName(String newDefaultReferencedColumnName) {
+		String oldDefaultReferencedColumnName = this.defaultReferencedColumnName;
+		this.defaultReferencedColumnName = newDefaultReferencedColumnName;
+		firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, oldDefaultReferencedColumnName, newDefaultReferencedColumnName);
+	}
+
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+	
+	@Override
+	public OrmJoinColumn.Owner getOwner() {
+		return (OrmJoinColumn.Owner) this.owner;
+	}
+
+	public Table getReferencedColumnDbTable() {
+		return getOwner().getReferencedColumnDbTable();
+	}
+
+	public Column getReferencedDbColumn() {
+		Table table = getReferencedColumnDbTable();
+		return (table == null) ? null : table.getColumnForIdentifier(getReferencedColumnName());
+	}
+
+	public boolean isReferencedColumnResolved() {
+		return getReferencedDbColumn() != null;
+	}
+
+	public TextRange getReferencedColumnNameTextRange() {
+		if (getResourceColumn() != null) {
+			TextRange textRange = getResourceColumn().getReferencedColumnNameTextRange();
+			if (textRange != null) {
+				return textRange;
+			}
+		}
+		return getOwner().getValidationTextRange();
+	}
+
+
+	@Override
+	protected XmlJoinColumn getResourceColumn() {
+		return this.resourceJoinColumn;
+	}
+
+	@Override
+	protected void addResourceColumn() {
+		//joinColumns are part of a collection, the join-column element will be removed/added
+		//when the XmlJoinColumn is removed/added to the XmlEntity collection
+	}
+	
+	@Override
+	protected void removeResourceColumn() {
+		//joinColumns are part of a collection, the pk-join-column element will be removed/added
+		//when the XmlJoinColumn is removed/added to the XmlEntity collection
+	}
+	
+	
+	@Override
+	protected void initialize(XmlJoinColumn xjc) {
+		this.resourceJoinColumn = xjc;
+		super.initialize(xjc);
+		this.specifiedReferencedColumnName = buildSpecifiedReferencedColumnName(xjc);
+		this.defaultReferencedColumnName = buildDefaultReferencedColumnName();
+	}
+	
+	@Override
+	public void update(XmlJoinColumn xjc) {
+		this.resourceJoinColumn = xjc;
+		super.update(xjc);
+		this.setSpecifiedReferencedColumnName_(buildSpecifiedReferencedColumnName(xjc));
+		this.setDefaultReferencedColumnName(buildDefaultReferencedColumnName());
+	}
+
+	protected String buildSpecifiedReferencedColumnName(XmlJoinColumn xjc) {
+		return (xjc == null) ? null : xjc.getReferencedColumnName();
+	}
+
+	@Override
+	protected String buildDefaultName() {
+		return MappingTools.buildJoinColumnDefaultName(this, this.getOwner());
+	}
+	
+	protected String buildDefaultReferencedColumnName() {
+		return MappingTools.buildJoinColumnDefaultReferencedColumnName(this.getOwner());
+	}
+	
+	
+	//******************* validation ***********************
+
+	@Override
+	//this method will only be called if the table validates correctly
+	protected void validateName(List<IMessage> messages) {
+		//do not call super here, first need to check for multiple join columns errors
+		this.validateJoinColumnName(messages);
+		this.validateReferencedColumnName(messages);
+	}
+
+	protected void validateJoinColumnName(List<IMessage> messages) {
+		if (this.getSpecifiedName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedNameMultipleJoinColumnsMessage());
+		}
+		else if (this.getName() != null){
+			super.validateName(messages);
+		}
+		//If the name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+
+	protected void validateReferencedColumnName(List<IMessage> messages) {
+		if (this.getSpecifiedReferencedColumnName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage());
+		}
+		else if (this.getSpecifiedReferencedColumnName() != null) {
+			Table refColumnDbTable = this.getReferencedColumnDbTable();
+			if (refColumnDbTable != null && ! this.isReferencedColumnResolved()) {
+				messages.add(getOwner().buildUnresolvedReferencedColumnNameMessage(this, this.getReferencedColumnNameTextRange()));
+			}
+		}
+		//If the referenced column name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+
+	protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
+		return getOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(this, getNameTextRange());
+	}
+
+	protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+		return getOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(this, getReferencedColumnNameTextRange());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
new file mode 100644
index 0000000..4f5d335
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
@@ -0,0 +1,766 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * orm.xml join table
+ */
+public class GenericOrmJoinTable
+	extends GenericOrmReferenceTable
+	implements OrmJoinTable
+{
+
+	protected OrmJoinColumn defaultInverseJoinColumn;
+
+	protected final Vector<OrmJoinColumn> specifiedInverseJoinColumns = new Vector<OrmJoinColumn>();
+	protected final OrmJoinColumn.Owner inverseJoinColumnOwner;
+
+
+	public GenericOrmJoinTable(OrmJoinTableJoiningStrategy parent, XmlJoinTable resourceJoinTable) {
+		super(parent);
+		this.inverseJoinColumnOwner = this.buildInverseJoinColumnOwner();
+		this.initialize(resourceJoinTable);
+	}
+
+	@Override
+	protected OrmJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	protected OrmJoinColumn.Owner buildInverseJoinColumnOwner() {
+		return new InverseJoinColumnOwner();
+	}
+
+	public RelationshipMapping getRelationshipMapping() {
+		return getParent().getRelationshipReference().getRelationshipMapping();
+	}
+
+	public void initializeFrom(JoinTable oldJoinTable) {
+		super.initializeFrom(oldJoinTable);
+		for (Iterator<OrmJoinColumn> stream = oldJoinTable.specifiedInverseJoinColumns(); stream.hasNext(); ) {
+			this.addSpecifiedInverseJoinColumnFrom(stream.next());
+		}
+	}
+
+	protected void initialize(XmlJoinTable joinTable) {
+		super.initialize(joinTable);
+		this.initializeSpecifiedInverseJoinColumns(joinTable);
+		this.initializeDefaultInverseJoinColumn();
+	}
+
+	@Override
+	protected void update(AbstractXmlReferenceTable joinTable) {
+		super.update(joinTable);
+		this.updateSpecifiedInverseJoinColumns((XmlJoinTable) joinTable);
+		this.updateDefaultInverseJoinColumn();
+	}
+
+	public PersistentAttribute getPersistentAttribute() {
+		return getRelationshipMapping().getPersistentAttribute();
+	}
+
+
+	// ********** AbstractOrmTable implementation **********
+
+	@Override
+	public OrmJoinTableJoiningStrategy getParent() {
+		return (OrmJoinTableJoiningStrategy) super.getParent();
+	}
+
+	@Override
+	protected String buildDefaultName() {
+		return this.getParent().getJoinTableDefaultName();
+	}
+
+	@Override
+	protected XmlJoinTable getResourceTable() {
+		return this.getParent().getResourceJoinTable();
+	}
+
+	@Override
+	protected XmlJoinTable addResourceTable() {
+		return getParent().addResourceJoinTable();
+	}
+
+	@Override
+	protected void removeResourceTable() {
+		getParent().removeResourceJoinTable();
+	}
+
+
+	// ********** inverse join columns **********
+
+	public ListIterator<OrmJoinColumn> inverseJoinColumns() {
+		return this.hasSpecifiedInverseJoinColumns() ? this.specifiedInverseJoinColumns() : this.defaultInverseJoinColumns();
+	}
+
+	public int inverseJoinColumnsSize() {
+		return this.hasSpecifiedInverseJoinColumns() ? this.specifiedInverseJoinColumnsSize() : this.defaultInverseJoinColumnsSize();
+	}
+
+	public void convertDefaultToSpecifiedInverseJoinColumn() {
+		MappingTools.convertJoinTableDefaultToSpecifiedInverseJoinColumn(this);
+	}
+
+
+	// ********** default inverse join column **********
+
+	public OrmJoinColumn getDefaultInverseJoinColumn() {
+		return this.defaultInverseJoinColumn;
+	}
+
+	protected void setDefaultInverseJoinColumn(OrmJoinColumn defaultInverseJoinColumn) {
+		OrmJoinColumn old = this.defaultInverseJoinColumn;
+		this.defaultInverseJoinColumn = defaultInverseJoinColumn;
+		this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, old, defaultInverseJoinColumn);
+	}
+
+	protected ListIterator<OrmJoinColumn> defaultInverseJoinColumns() {
+		if (this.defaultInverseJoinColumn != null) {
+			return new SingleElementListIterator<OrmJoinColumn>(this.defaultInverseJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+
+	protected int defaultInverseJoinColumnsSize() {
+		return (this.defaultInverseJoinColumn == null) ? 0 : 1;
+	}
+
+	protected void initializeDefaultInverseJoinColumn() {
+		if (this.shouldBuildDefaultInverseJoinColumn()) {
+			this.defaultInverseJoinColumn = this.buildInverseJoinColumn(null);
+		}
+	}
+
+	protected void updateDefaultInverseJoinColumn() {
+		if (this.shouldBuildDefaultInverseJoinColumn()) {
+			if (this.defaultInverseJoinColumn == null) {
+				this.setDefaultInverseJoinColumn(this.buildInverseJoinColumn(null));
+			} else {
+				this.defaultInverseJoinColumn.update(null);
+			}
+		} else {
+			this.setDefaultInverseJoinColumn(null);
+		}
+	}
+
+	protected boolean shouldBuildDefaultInverseJoinColumn() {
+		return ! this.hasSpecifiedInverseJoinColumns();
+	}
+
+
+	// ********** specified inverse join columns **********
+
+	public ListIterator<OrmJoinColumn> specifiedInverseJoinColumns() {
+		return new CloneListIterator<OrmJoinColumn>(this.specifiedInverseJoinColumns);
+	}
+
+	public int specifiedInverseJoinColumnsSize() {
+		return this.specifiedInverseJoinColumns.size();
+	}
+
+	public boolean hasSpecifiedInverseJoinColumns() {
+		return !this.specifiedInverseJoinColumns.isEmpty();
+	}
+
+	protected void addSpecifiedInverseJoinColumnFrom(OrmJoinColumn oldJoinColumn) {
+		OrmJoinColumn newJoinColumn = this.addSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumns.size());
+		newJoinColumn.initializeFrom(oldJoinColumn);
+	}
+
+	public OrmJoinColumn addSpecifiedInverseJoinColumn(int index) {
+		if (this.getResourceTable() == null) {
+			this.addResourceTable();
+		}
+		XmlJoinColumn xmlJoinColumn = OrmFactory.eINSTANCE.createXmlJoinColumn();
+		OrmJoinColumn joinColumn = this.buildInverseJoinColumn(xmlJoinColumn);
+		this.specifiedInverseJoinColumns.add(index, joinColumn);
+		this.getResourceTable().getInverseJoinColumns().add(index, xmlJoinColumn);
+		this.fireItemAdded(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST, index, joinColumn);
+		return joinColumn;
+	}
+
+	protected void addSpecifiedInverseJoinColumn(int index, OrmJoinColumn joinColumn) {
+		this.addItemToList(index, joinColumn, this.specifiedInverseJoinColumns, SPECIFIED_INVERSE_JOIN_COLUMNS_LIST);
+	}
+
+	protected void addSpecifiedInverseJoinColumn(OrmJoinColumn joinColumn) {
+		this.addSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumns.size(), joinColumn);
+	}
+
+	public void removeSpecifiedInverseJoinColumn(JoinColumn joinColumn) {
+		this.removeSpecifiedInverseJoinColumn(this.specifiedInverseJoinColumns.indexOf(joinColumn));
+	}
+
+	public void removeSpecifiedInverseJoinColumn(int index) {
+		OrmJoinColumn removedJoinColumn = this.specifiedInverseJoinColumns.remove(index);
+		if ( ! this.hasSpecifiedInverseJoinColumns()) {
+			//create the defaultInverseJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultInverseJoinColumn = this.buildInverseJoinColumn(null);
+		}
+		this.getResourceTable().getInverseJoinColumns().remove(index);
+		this.fireItemRemoved(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST, index, removedJoinColumn);
+		if (this.defaultInverseJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, null, this.defaultInverseJoinColumn);
+		}
+	}
+
+	protected void removeSpecifiedInverseJoinColumn_(OrmJoinColumn joinColumn) {
+		this.removeItemFromList(joinColumn, this.specifiedInverseJoinColumns, SPECIFIED_INVERSE_JOIN_COLUMNS_LIST);
+	}
+
+	public void moveSpecifiedInverseJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedInverseJoinColumns, targetIndex, sourceIndex);
+		this.getResourceTable().getInverseJoinColumns().move(targetIndex, sourceIndex);
+		this.fireItemMoved(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);
+	}
+
+	public void clearSpecifiedInverseJoinColumns() {
+		this.specifiedInverseJoinColumns.clear();
+		this.defaultInverseJoinColumn = this.buildInverseJoinColumn(null);
+		this.getResourceTable().getInverseJoinColumns().clear();
+		this.fireListCleared(SPECIFIED_INVERSE_JOIN_COLUMNS_LIST);
+		this.firePropertyChanged(DEFAULT_INVERSE_JOIN_COLUMN, null, this.defaultInverseJoinColumn);
+	}
+
+	protected OrmJoinColumn buildInverseJoinColumn(XmlJoinColumn resourceJoinColumn) {
+		return this.buildJoinColumn(resourceJoinColumn, this.inverseJoinColumnOwner);
+	}
+
+	protected void initializeSpecifiedInverseJoinColumns(XmlJoinTable xmlJoinTable) {
+		if (xmlJoinTable != null) {
+			for (XmlJoinColumn xmlJoinColumn : xmlJoinTable.getInverseJoinColumns()) {
+				this.specifiedInverseJoinColumns.add(this.buildInverseJoinColumn(xmlJoinColumn));
+			}
+		}
+	}
+
+	protected void updateSpecifiedInverseJoinColumns(XmlJoinTable xmlJoinTable) {
+		Iterator<XmlJoinColumn> xmlJoinColumns = this.xmlInverseJoinColumns(xmlJoinTable);
+
+		for (ListIterator<OrmJoinColumn> contextJoinColumns = this.specifiedInverseJoinColumns(); contextJoinColumns.hasNext(); ) {
+			OrmJoinColumn contextColumn = contextJoinColumns.next();
+			if (xmlJoinColumns.hasNext()) {
+				contextColumn.update(xmlJoinColumns.next());
+			} else {
+				this.removeSpecifiedInverseJoinColumn_(contextColumn);
+			}
+		}
+
+		while (xmlJoinColumns.hasNext()) {
+			this.addSpecifiedInverseJoinColumn(this.buildInverseJoinColumn(xmlJoinColumns.next()));
+		}
+	}
+
+	protected Iterator<XmlJoinColumn> xmlInverseJoinColumns(XmlJoinTable xmlJoinTable) {
+		// make a copy of the XML join columns (to prevent ConcurrentModificationException)
+		return (xmlJoinTable == null) ? EmptyIterator.<XmlJoinColumn>instance()
+			: new CloneIterator<XmlJoinColumn>(xmlJoinTable.getInverseJoinColumns());
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+		super.validateJoinColumns(messages, reporter);
+		this.validateJoinColumns(this.inverseJoinColumns(), messages, reporter);
+	}
+
+	@Override
+	protected boolean shouldValidateAgainstDatabase() {
+		return getParent().shouldValidateAgainstDatabase();
+	}
+
+	@Override
+	protected String getUnresolvedCatalogMessageId() {
+		return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_CATALOG;
+	}
+
+	@Override
+	protected String getUnresolvedNameMessageId() {
+		return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_NAME;
+	}
+
+	@Override
+	protected String getUnresolvedSchemaMessageId() {
+		return JpaValidationMessages.JOIN_TABLE_UNRESOLVED_SCHEMA;
+	}
+
+	@Override
+	protected String getVirtualAttributeUnresolvedCatalogMessageId() {
+		return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG;
+	}
+
+	@Override
+	protected String getVirtualAttributeUnresolvedNameMessageId() {
+		return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME;
+	}
+
+	@Override
+	protected String getVirtualAttributeUnresolvedSchemaMessageId() {
+		return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA;
+	}
+
+	// ********** join column owner adapters **********
+
+	/**
+	 * just a little common behavior
+	 */
+	protected abstract class AbstractJoinColumnOwner
+		implements OrmJoinColumn.Owner
+	{
+		protected AbstractJoinColumnOwner() {
+			super();
+		}
+
+		public TypeMapping getTypeMapping() {
+			return GenericOrmJoinTable.this.getParent().getRelationshipReference().getTypeMapping();
+		}
+
+		public PersistentAttribute getPersistentAttribute() {
+			return GenericOrmJoinTable.this.getRelationshipMapping().getPersistentAttribute();
+		}
+
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the join table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+
+		/**
+		 * the join column can only be on the join table itself
+		 */
+		public boolean tableIsAllowed() {
+			return false;
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			String joinTableName = GenericOrmJoinTable.this.getName();
+			return (joinTableName == null) ? null : (joinTableName.equals(tableName)) ? GenericOrmJoinTable.this.getDbTable() : null;
+		}
+
+		/**
+		 * by default, the join column is, obviously, in the join table;
+		 * not sure whether it can be anywhere else...
+		 */
+		public String getDefaultTableName() {
+			return GenericOrmJoinTable.this.getName();
+		}
+
+		public TextRange getValidationTextRange() {
+			return GenericOrmJoinTable.this.getValidationTextRange();
+		}
+
+		protected boolean isPersistentAttributeVirtual() {
+			return getPersistentAttribute().isVirtual();
+		}
+
+		protected String getPersistentAttributeName() {
+			return getPersistentAttribute().getName();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			if (isPersistentAttributeVirtual()) {
+				return this.buildVirtualTableNotValidMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getTableNotValidMessage(),
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getVirtualTableNotValidMessage(),
+				new String[] {
+					getName(),
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_JOIN_TABLE},
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getTableNotValidMessage();
+
+		protected abstract String getVirtualTableNotValidMessage();
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getUnresolvedNameMessage(),
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getVirtualUnresolvedNameMessage(),
+				new String[] {getPersistentAttributeName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getUnresolvedNameMessage();
+
+		protected abstract String getVirtualUnresolvedNameMessage();
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			if (isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedReferencedColumnNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getUnresolvedReferencedColumnNameMessage(),
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getVirtualUnresolvedReferencedColumnNameMessage(),
+				new String[] {this.getPersistentAttributeName(), column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getUnresolvedReferencedColumnNameMessage();
+
+		protected abstract String getVirtualUnresolvedReferencedColumnNameMessage();
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				getUnspecifiedNameMultipleJoinColumnsMessage(),
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				getVirtualUnspecifiedNameMultipleJoinColumnsMessage(),
+				new String[] {this.getPersistentAttributeName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getUnspecifiedNameMultipleJoinColumnsMessage();
+
+		protected abstract String getVirtualUnspecifiedNameMultipleJoinColumnsMessage();
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				getVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
+				new String[] {this.getPersistentAttributeName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected abstract String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
+
+		protected abstract String getVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage();
+	}
+
+
+	/**
+	 * owner for "back-pointer" JoinColumns;
+	 * these point at the source/owning entity
+	 */
+	protected class JoinColumnOwner
+		extends AbstractJoinColumnOwner
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+
+		public Entity getRelationshipTarget() {
+			return GenericOrmJoinTable.this.getParent().getRelationshipReference().getEntity();
+		}
+
+		public String getAttributeName() {
+			RelationshipMapping relationshipMapping = GenericOrmJoinTable.this.getRelationshipMapping();
+			if (relationshipMapping == null) {
+				return null;
+			}
+			Entity targetEntity = relationshipMapping.getResolvedTargetEntity();
+			if (targetEntity == null) {
+				return null;
+			}
+			for (PersistentAttribute each : CollectionTools.iterable(targetEntity.getPersistentType().allAttributes())) {
+				if (each.getMapping().isOwnedBy(relationshipMapping)) {
+					return each.getName();
+				}
+			}
+			return null;
+		}
+
+		@Override
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			org.eclipse.jpt.db.Table dbTable = super.getDbTable(tableName);
+			return (dbTable != null) ? dbTable : this.getTypeMapping().getDbTable(tableName);
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			return getTypeMapping().getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericOrmJoinTable.this.defaultJoinColumn == joinColumn;
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public int joinColumnsSize() {
+			return GenericOrmJoinTable.this.joinColumnsSize();
+		}
+
+		@Override
+		protected String getTableNotValidMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		public String getVirtualTableNotValidMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		protected String getUnresolvedNameMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME;
+		}
+
+		@Override
+		protected String getVirtualUnresolvedNameMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME;
+		}
+
+		@Override
+		public String getUnresolvedReferencedColumnNameMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+		}
+
+		@Override
+		public String getVirtualUnresolvedReferencedColumnNameMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+		}
+
+		@Override
+		public String getUnspecifiedNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		public String getVirtualUnspecifiedNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		public String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		public String getVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+	}
+
+
+	/**
+	 * owner for "forward-pointer" JoinColumns;
+	 * these point at the target/inverse entity
+	 */
+	protected class InverseJoinColumnOwner
+		extends AbstractJoinColumnOwner
+	{
+		protected InverseJoinColumnOwner() {
+			super();
+		}
+
+		public Entity getRelationshipTarget() {
+			RelationshipMapping relationshipMapping = GenericOrmJoinTable.this.getRelationshipMapping();
+			return relationshipMapping == null ? null : relationshipMapping.getResolvedTargetEntity();
+		}
+
+		public String getAttributeName() {
+			RelationshipMapping relationshipMapping = GenericOrmJoinTable.this.getRelationshipMapping();
+			return relationshipMapping == null ? null : relationshipMapping.getName();
+		}
+
+		@Override
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			org.eclipse.jpt.db.Table dbTable = super.getDbTable(tableName);
+			if (dbTable != null) {
+				return dbTable;
+			}
+			Entity relationshipTarget = this.getRelationshipTarget();
+			return (relationshipTarget == null) ? null : relationshipTarget.getDbTable(tableName);
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			Entity relationshipTarget = this.getRelationshipTarget();
+			return (relationshipTarget == null) ? null : relationshipTarget.getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericOrmJoinTable.this.defaultInverseJoinColumn == joinColumn;
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public int joinColumnsSize() {
+			return GenericOrmJoinTable.this.inverseJoinColumnsSize();
+		}
+
+		@Override
+		protected String getTableNotValidMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		public String getVirtualTableNotValidMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		public String getUnresolvedNameMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_UNRESOLVED_NAME;
+		}
+
+		@Override
+		public String getVirtualUnresolvedNameMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME;
+		}
+
+		@Override
+		public String getUnresolvedReferencedColumnNameMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+		}
+
+		@Override
+		public String getVirtualUnresolvedReferencedColumnNameMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME;
+		}
+
+		@Override
+		public String getUnspecifiedNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		public String getVirtualUnspecifiedNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		public String getUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+
+		@Override
+		public String getVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmLobConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmLobConverter.java
new file mode 100644
index 0000000..7710579
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmLobConverter.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.LobConverter;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmLobConverter extends AbstractOrmXmlContextNode
+	implements LobConverter, OrmConverter
+{
+	protected XmlConvertibleMapping resourceConvertibleMapping;
+	
+	public GenericOrmLobConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceMapping) {
+		super(parent);
+		this.initialize(resourceMapping);
+	}
+	
+	@Override
+	public OrmAttributeMapping getParent() {
+		return (OrmAttributeMapping) super.getParent();
+	}
+	
+	public String getType() {
+		return Converter.LOB_CONVERTER;
+	}
+	
+	public void initialize(XmlConvertibleMapping resourceConvertibleMapping) {
+		this.resourceConvertibleMapping = resourceConvertibleMapping;
+	}
+	
+	public void update() {
+		//do nothing
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.resourceConvertibleMapping.getLobTextRange();
+	}
+	
+	public void addToResourceModel() {
+		this.resourceConvertibleMapping.setLob(true);
+	}
+	
+	public void removeFromResourceModel() {
+		this.resourceConvertibleMapping.setLob(false);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java
new file mode 100644
index 0000000..517a92c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmManyToManyMapping.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmManyToManyMapping;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+
+public class GenericOrmManyToManyMapping
+	extends AbstractOrmManyToManyMapping<XmlManyToMany>
+{
+	public GenericOrmManyToManyMapping(OrmPersistentAttribute parent, XmlManyToMany resourceMapping) {
+		super(parent, resourceMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java
new file mode 100644
index 0000000..be6988b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmManyToOneMapping.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmManyToOneMapping;
+import org.eclipse.jpt.core.internal.context.orm.GenericOrmManyToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+public class GenericOrmManyToOneMapping 
+	extends AbstractOrmManyToOneMapping<XmlManyToOne>
+{
+	public GenericOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	@Override
+	protected OrmManyToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericOrmManyToOneRelationshipReference(this, this.resourceAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java
new file mode 100644
index 0000000..bbb9ea1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmMappedSuperclass.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmMappedSuperclass;
+import org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass;
+
+
+public class GenericOrmMappedSuperclass extends AbstractOrmMappedSuperclass
+{
+	
+	public GenericOrmMappedSuperclass(OrmPersistentType parent, XmlMappedSuperclass resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java
new file mode 100644
index 0000000..43fa8e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNamedNativeQuery.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.NamedNativeQuery;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmNamedNativeQuery;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery;
+
+
+public class GenericOrmNamedNativeQuery extends AbstractOrmQuery<XmlNamedNativeQuery>
+	implements OrmNamedNativeQuery
+{
+
+	protected String resultClass;
+
+	protected String resultSetMapping;
+
+
+	public GenericOrmNamedNativeQuery(XmlContextNode parent, XmlNamedNativeQuery resourceQuery) {
+		super(parent, resourceQuery);
+	}
+	
+	public char getResultClassEnclosingTypeSeparator() {
+		return '$';
+	}
+	
+	public String getResultClass() {
+		return this.resultClass;
+	}
+
+	public void setResultClass(String newResultClass) {
+		String oldResultClass = this.resultClass;
+		this.resultClass = newResultClass;
+		getResourceQuery().setResultClass(newResultClass);
+		firePropertyChanged(NamedNativeQuery.RESULT_CLASS_PROPERTY, oldResultClass, newResultClass);
+	}
+
+	public String getResultSetMapping() {
+		return this.resultSetMapping;
+	}
+
+	public void setResultSetMapping(String newResultSetMapping) {
+		String oldResultSetMapping = this.resultSetMapping;
+		this.resultSetMapping = newResultSetMapping;
+		getResourceQuery().setResultSetMapping(newResultSetMapping);
+		firePropertyChanged(NamedNativeQuery.RESULT_SET_MAPPING_PROPERTY, oldResultSetMapping, newResultSetMapping);
+	}
+
+
+	@Override
+	protected void initialize(XmlNamedNativeQuery resourceQuery) {
+		super.initialize(resourceQuery);
+		this.resultClass = resourceQuery.getResultClass();
+		this.resultSetMapping = resourceQuery.getResultSetMapping();
+	}
+	
+	@Override
+	public void update(XmlNamedNativeQuery resourceQuery) {
+		super.update(resourceQuery);
+		this.setResultClass(resourceQuery.getResultClass());
+		this.setResultSetMapping(resourceQuery.getResultSetMapping());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java
new file mode 100644
index 0000000..94c0693
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNamedQuery.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmNamedQuery;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+
+
+public class GenericOrmNamedQuery extends AbstractOrmQuery<XmlNamedQuery> implements OrmNamedQuery
+{
+
+	public GenericOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
+		super(parent, resourceNamedQuery);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java
new file mode 100644
index 0000000..90fab75
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNullAttributeMapping.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmAttributeMapping;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+
+
+public class GenericOrmNullAttributeMapping 
+	extends AbstractOrmAttributeMapping<XmlNullAttributeMapping>
+{
+
+	public GenericOrmNullAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	public int getXmlSequence() {
+		return -1;
+	}
+
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmAttributeMapping(this);
+	}
+
+	public String getKey() {
+		return null;
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ********** metamodel **********  
+
+	@Override
+	public MetamodelField getMetamodelField() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNullConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNullConverter.java
new file mode 100644
index 0000000..a69d79a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmNullConverter.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmNullConverter extends AbstractOrmXmlContextNode
+	implements OrmConverter
+{
+	
+	public GenericOrmNullConverter(OrmAttributeMapping parent) {
+		super(parent);
+	}
+	
+	@Override
+	public OrmAttributeMapping getParent() {
+		return (OrmAttributeMapping) super.getParent();
+	}
+	
+	public String getType() {
+		return Converter.NO_CONVERTER;
+	}
+	
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+	
+	public void update() {
+		// do nothing, null implementation		
+	}
+	
+	public void addToResourceModel() {
+		// do nothing, null implementation
+	}
+	
+	public void removeFromResourceModel() {
+		// do nothing, null implementation		
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java
new file mode 100644
index 0000000..facb180
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToManyMapping.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToManyMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+
+
+public class GenericOrmOneToManyMapping extends AbstractOrmOneToManyMapping<XmlOneToMany>
+{
+	
+	public GenericOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	@Override
+	protected OrmRelationshipReference buildRelationshipReference() {
+		return new GenericOrmOneToManyRelationshipReference(this, this.resourceAttributeMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToManyRelationshipReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToManyRelationshipReference.java
new file mode 100644
index 0000000..2dc8d15
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToManyRelationshipReference.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToManyRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+
+public class GenericOrmOneToManyRelationshipReference
+	extends AbstractOrmOneToManyRelationshipReference
+{	
+
+	public GenericOrmOneToManyRelationshipReference(
+			OrmOneToManyMapping parent, XmlOneToMany resource) {
+		
+		super(parent, resource);
+	}
+	
+	@Override
+	protected OrmJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new NullOrmJoinColumnJoiningStrategy(this);
+	}
+	
+	
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+
+
+	// **************** join columns *******************************************
+	
+	@Override
+	public boolean usesJoinColumnJoiningStrategy() {
+		return false;
+	}
+	
+	@Override
+	public void setJoinColumnJoiningStrategy() {
+		throw new UnsupportedOperationException("join column joining strategy not supported on a 1.0 1-m mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public void unsetJoinColumnJoiningStrategy() {
+		throw new UnsupportedOperationException("join column joining strategy not supported on a 1.0 1-m mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java
new file mode 100644
index 0000000..6045734
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOneToOneMapping.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToOneMapping;
+import org.eclipse.jpt.core.internal.context.orm.GenericOrmOneToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+
+public class GenericOrmOneToOneMapping 
+	extends AbstractOrmOneToOneMapping<XmlOneToOne>
+{
+
+	// ********** constructor **********
+	public GenericOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	@Override
+	protected OrmOneToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericOrmOneToOneRelationshipReference(this, this.resourceAttributeMapping);
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOrderable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOrderable.java
new file mode 100644
index 0000000..ec57ce6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmOrderable.java
@@ -0,0 +1,336 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmNamedColumn;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderable2_0;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+import org.eclipse.jpt.core.resource.orm.XmlOrderable;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * ORM multi-relationship (m:m, 1:m) mapping
+ */
+public class GenericOrmOrderable
+	extends AbstractOrmXmlContextNode
+	implements OrmOrderable2_0
+{
+
+	protected String specifiedOrderBy;
+	protected boolean noOrdering = false;
+	protected boolean pkOrdering = false;
+	protected boolean customOrdering = false;
+	
+	//JPA 2.0
+	protected final Orderable.Owner owner; //the owner is only used for 2.0 projects
+	protected boolean orderColumnOrdering = false;
+	protected final OrmOrderColumn2_0 orderColumn;
+	
+	public GenericOrmOrderable(OrmAttributeMapping parent, Orderable.Owner owner) {
+		super(parent);
+		this.owner = owner;
+		this.orderColumn = getXmlContextNodeFactory().buildOrmOrderColumn(this, new OrderColumnOwner());
+		this.initializeOrdering();
+	}
+
+	public void update() {
+		this.updateOrdering();
+	}
+
+	@Override
+	public OrmAttributeMapping getParent() {
+		return (OrmAttributeMapping) super.getParent();
+	}
+
+	protected OrmPersistentAttribute getPersistentAttribute() {
+		return getParent().getPersistentAttribute();
+	}
+
+	protected XmlOrderable getResourceOrderable() {
+		return (XmlOrderable) getParent().getResourceAttributeMapping();
+	}
+
+	// **************** order by ***********************************************
+	
+	public String getSpecifiedOrderBy() {
+		return this.specifiedOrderBy;
+	}
+
+	public void setSpecifiedOrderBy(String orderBy) {
+		String old = this.specifiedOrderBy;
+		this.specifiedOrderBy = orderBy;
+		this.getResourceOrderable().setOrderBy(orderBy);
+		this.firePropertyChanged(SPECIFIED_ORDER_BY_PROPERTY, old, orderBy);
+	}
+	
+	protected void setSpecifiedOrderBy_(String orderBy) {
+		String old = this.specifiedOrderBy;
+		this.specifiedOrderBy = orderBy;
+		this.firePropertyChanged(SPECIFIED_ORDER_BY_PROPERTY, old, orderBy);
+	}
+
+	protected void initializeOrdering() {
+		this.specifiedOrderBy = this.getXmlOrderBy();
+		XmlOrderColumn resourceOrderColumn = getXmlOrderColumn();
+		if (this.specifiedOrderBy == null && resourceOrderColumn == null) { 
+			this.noOrdering = true;
+		} else if (this.specifiedOrderBy != null && this.specifiedOrderBy.equals("")) { //$NON-NLS-1$
+			this.pkOrdering = true;
+		} else if (resourceOrderColumn == null) {
+			this.customOrdering = true;
+		} else {
+			this.orderColumnOrdering = true;
+		}
+	}
+	
+	protected void updateOrdering() {
+		this.setSpecifiedOrderBy_(this.getXmlOrderBy());
+		XmlOrderColumn resourceOrderColumn = getXmlOrderColumn();
+		if (this.specifiedOrderBy == null && resourceOrderColumn == null) { 
+			this.setNoOrdering_(true);
+			this.setPkOrdering_(false);
+			this.setCustomOrdering_(false);
+			this.setOrderColumnOrdering_(false);
+		} else if (this.specifiedOrderBy != null && this.specifiedOrderBy.equals("")) { //$NON-NLS-1$
+			this.setNoOrdering_(false);
+			this.setPkOrdering_(true);
+			this.setCustomOrdering_(false);
+			this.setOrderColumnOrdering_(false);
+		} else if (resourceOrderColumn == null){
+			this.setNoOrdering_(false);
+			this.setPkOrdering_(false);
+			this.setCustomOrdering_(true);
+			this.setOrderColumnOrdering_(false);
+		} else {
+			this.setNoOrdering_(false);
+			this.setPkOrdering_(false);
+			this.setCustomOrdering_(false);
+			this.setOrderColumnOrdering_(true);
+		}
+		this.orderColumn.update(this.getResourceOrderable());
+	}
+	
+	protected String getXmlOrderBy() {
+		return this.getResourceOrderable().getOrderBy();
+	}
+	
+	protected XmlOrderColumn getXmlOrderColumn() {
+		return ((XmlOrderable_2_0) this.getResourceOrderable()).getOrderColumn();
+	}
+	
+	// **************** no ordering ***********************************************
+		
+	public boolean isNoOrdering() {
+		return this.noOrdering;
+	}
+
+	public void setNoOrdering(boolean noOrdering) {
+		boolean old = this.noOrdering;
+		this.noOrdering = noOrdering;
+		if (noOrdering) {
+			this.getResourceOrderable().setOrderBy(null);
+			this.removeXmlOrderColumn();
+		}
+		this.firePropertyChanged(NO_ORDERING_PROPERTY, old, noOrdering);			
+	}
+	
+	protected void setNoOrdering_(boolean noOrdering) {
+		boolean old = this.noOrdering;
+		this.noOrdering = noOrdering;
+		this.firePropertyChanged(NO_ORDERING_PROPERTY, old, noOrdering);			
+	}
+	
+	
+	// **************** pk ordering ***********************************************
+		
+	public boolean isPkOrdering() {
+		return this.pkOrdering;
+	}
+	
+	public void setPkOrdering(boolean pkOrdering) {
+		boolean old = this.pkOrdering;
+		this.pkOrdering = pkOrdering;
+		if (pkOrdering) {
+			this.getResourceOrderable().setOrderBy(""); //$NON-NLS-1$
+			this.removeXmlOrderColumn();
+		}
+		this.firePropertyChanged(PK_ORDERING_PROPERTY, old, pkOrdering);	
+	}
+	
+	protected void setPkOrdering_(boolean pkOrdering) {
+		boolean old = this.pkOrdering;
+		this.pkOrdering = pkOrdering;
+		this.firePropertyChanged(PK_ORDERING_PROPERTY, old, pkOrdering);	
+	}
+	
+	
+	// **************** custom ordering ***********************************************
+		
+	public boolean isCustomOrdering() {
+		return this.customOrdering;
+	}
+
+	public void setCustomOrdering(boolean customOrdering) {
+		boolean old = this.customOrdering;
+		this.customOrdering = customOrdering;
+		if (customOrdering) {
+			this.setSpecifiedOrderBy(""); //$NON-NLS-1$
+			this.removeXmlOrderColumn();
+		}
+		this.firePropertyChanged(CUSTOM_ORDERING_PROPERTY, old, customOrdering);
+	}
+	
+	protected void setCustomOrdering_(boolean customOrdering) {
+		boolean old = this.customOrdering;
+		this.customOrdering = customOrdering;
+		this.firePropertyChanged(CUSTOM_ORDERING_PROPERTY, old, customOrdering);
+	}
+
+	// ********** Orderable2_0 implementation **********  
+	// **************** order column ordering ***********************************************
+	
+	public boolean isOrderColumnOrdering() {
+		return this.orderColumnOrdering;
+	}
+
+	public void setOrderColumnOrdering(boolean orderColumnOrdering) {
+		boolean old = this.orderColumnOrdering;
+		this.orderColumnOrdering = orderColumnOrdering;
+		if (orderColumnOrdering) {
+			this.getResourceOrderable().setOrderBy(null);
+			addXmlOrderColumn();
+		}
+		this.firePropertyChanged(ORDER_COLUMN_ORDERING_PROPERTY, old, orderColumnOrdering);			
+	}
+	
+	protected void setOrderColumnOrdering_(boolean orderColumnOrdering) {
+		boolean old = this.orderColumnOrdering;
+		this.orderColumnOrdering = orderColumnOrdering;
+		this.firePropertyChanged(ORDER_COLUMN_ORDERING_PROPERTY, old, orderColumnOrdering);			
+	}
+	
+	public OrmOrderColumn2_0 getOrderColumn() {
+		return this.orderColumn;
+	}
+	
+	protected void addXmlOrderColumn() {
+		((XmlOrderable_2_0) getResourceOrderable()).setOrderColumn(OrmFactory.eINSTANCE.createXmlOrderColumn());
+	}
+	
+	protected void removeXmlOrderColumn() {
+		((XmlOrderable_2_0) getResourceOrderable()).setOrderColumn(null);
+	}
+
+	public String getDefaultTableName() {
+		return getOwner().getTableName();
+	}
+	
+	/**
+	 * Only call this for 2.0 projects
+	 */
+	protected Orderable2_0.Owner getOwner() {
+		return (Orderable2_0.Owner) this.owner;
+	}
+	
+	
+	// ********** Validation **********  
+
+	public TextRange getValidationTextRange() {
+		TextRange textRange = getResourceOrderable().getValidationTextRange();
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange();	
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		//order-column and order-by both specified is handled with schema validation
+		if (isOrderColumnOrdering()) {
+			//TODO validation message if type is not List
+			this.getOrderColumn().validate(messages, reporter);
+		}
+	}
+
+	public String getUnresolvedNameMessage() {
+		return JpaValidationMessages.ORDER_COLUMN_UNRESOLVED_NAME;
+	}
+
+
+	// ********** OrmNamedColumn implementation **********  
+
+	protected class OrderColumnOwner implements OrmNamedColumn.Owner {
+			
+		public String getDefaultTableName() {
+			return GenericOrmOrderable.this.getDefaultTableName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return getOwner().getDbTable(tableName);
+		}
+
+		public String getDefaultColumnName() {
+			return getPersistentAttribute().getName() + "_ORDER"; //$NON-NLS-1$
+		}
+
+		public TypeMapping getTypeMapping() {
+			return getPersistentAttribute().getOwningTypeMapping();
+		}
+
+		public TextRange getValidationTextRange() {
+			return GenericOrmOrderable.this.getValidationTextRange();
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.ORDER_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME,
+				new String[] {getPersistentAttributeName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected boolean isPersistentAttributeVirtual() {
+			return getPersistentAttribute().isVirtual();
+		}
+
+		protected String getPersistentAttributeName() {
+			return getPersistentAttribute().getName();
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
new file mode 100644
index 0000000..076d2c4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+
+public class GenericOrmPersistentAttribute extends AbstractOrmPersistentAttribute
+{
+	
+	public GenericOrmPersistentAttribute(OrmPersistentType parent, Owner owner, XmlAttributeMapping resourceMapping) {
+		super(parent, owner, resourceMapping);
+	}
+	
+	//****************** AccessHolder implementation *******************
+	
+	/**
+	 * GenericOrmPersistentAttribute does not support specified access (no access element in 1.0), so we return null
+	 */
+	public AccessType getSpecifiedAccess() {
+		return null;
+	}
+	
+	public void setSpecifiedAccess(AccessType newSpecifiedAccess) {
+		throw new UnsupportedOperationException("specifiedAccess is not supported for GenericOrmPersistentAttribute"); //$NON-NLS-1$
+	}
+	
+	@Override
+	protected void validateAttribute(List<IMessage> messages) {
+		super.validateAttribute(messages);
+		if (this.javaPersistentAttribute != null) {
+			JavaPersistentType javaPersistentType = getOwningPersistentType().getJavaPersistentType();
+			if (javaPersistentType != null && javaPersistentType.getAttributeNamed(this.javaPersistentAttribute.getName()) == null) {
+				messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.NORMAL_SEVERITY,
+							JpaValidationMessages.PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED,
+							new String[] {this.getName(), this.getOwningPersistentType().getMapping().getClass_()},
+							this.attributeMapping, 
+							this.attributeMapping.getNameTextRange()
+						)
+					);				
+			}
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
new file mode 100644
index 0000000..cf52e6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
@@ -0,0 +1,1080 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmStructureNodes;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentType2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmPersistentType2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlTypeMapping;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+import org.eclipse.jpt.core.utility.BodySourceWriter;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.Tools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.ChainIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * ORM persistent type:<ul>
+ * <li>mapping
+ * <li>access
+ * <li>attributes
+ * <li>super persistent type
+ * <li>Java persistent type
+ * </ul>
+ */
+public class GenericOrmPersistentType
+	extends AbstractOrmXmlContextNode
+	implements OrmPersistentType2_0
+{
+	protected OrmTypeMapping mapping;
+
+	protected AccessType defaultAccess;
+
+	protected AccessType specifiedAccess;
+
+	protected final Vector<OrmPersistentAttribute> specifiedAttributes = new Vector<OrmPersistentAttribute>();
+
+	protected final Vector<OrmPersistentAttribute> virtualAttributes = new Vector<OrmPersistentAttribute>();
+
+	protected PersistentType superPersistentType;
+
+	protected String declaringTypeName;
+
+	protected JavaPersistentType javaPersistentType;
+
+	protected final MetamodelSourceType.Synchronizer metamodelSynchronizer;
+
+
+	public GenericOrmPersistentType(EntityMappings parent, XmlTypeMapping resourceMapping) {
+		super(parent);
+		this.mapping = this.buildMapping(resourceMapping);
+		this.specifiedAccess = this.buildSpecifiedAccess();
+		this.defaultAccess = this.buildDefaultAccess();
+		this.javaPersistentType = this.buildJavaPersistentType();
+		this.superPersistentType = this.buildSuperPersistentType();
+		this.declaringTypeName = this.buildDeclaringTypeName();
+		this.initializeAttributes();
+		this.metamodelSynchronizer = this.buildMetamodelSynchronizer();
+	}
+
+	protected MetamodelSourceType.Synchronizer buildMetamodelSynchronizer() {
+		return this.isJpa2_0Compatible() ?
+				((JpaFactory2_0) this.getJpaFactory()).buildMetamodelSynchronizer(this) :
+				null;
+	}
+
+
+	// ********** update **********
+
+	public void update() {
+		this.setSpecifiedAccess(this.buildSpecifiedAccess());
+		this.setDefaultAccess(this.buildDefaultAccess());
+		this.mapping.update();
+		this.updateJavaPersistentType();
+		this.updateSuperPersistentType();
+		this.setDeclaringTypeName(this.buildDeclaringTypeName());
+		this.updateAttributes();
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.javaPersistentType != null) {
+			this.javaPersistentType.postUpdate();
+		}
+		this.mapping.postUpdate();
+		for (PersistentAttribute attribute : this.getAttributes()) {
+			attribute.postUpdate();
+		}
+	}
+
+
+	// ********** name **********
+
+	public String getName() {
+		String name = this.mapping.getClass_();
+		// nested class names are specified with a '$' in orm.xml
+		return (name == null) ? null : name.replace('$', '.');
+	}
+
+	public String getShortName(){
+		String className = this.getName();
+		return StringTools.stringIsEmpty(className) ? null : ClassName.getSimpleName(className);
+	}
+
+
+	// ********** mapping **********
+
+	public OrmTypeMapping getMapping() {
+		return this.mapping;
+	}
+
+	public void setMappingKey(String newMappingKey) {
+		if (this.valuesAreEqual(this.getMappingKey(), newMappingKey)) {
+			return;
+		}
+		OrmTypeMapping oldMapping = this.mapping;
+		OrmTypeMappingDefinition mappingDefinition = this.getMappingFileDefinition().getOrmTypeMappingDefinition(newMappingKey);
+		XmlTypeMapping resourceTypeMapping = mappingDefinition.buildResourceMapping(this.getResourceNodeFactory());
+		this.mapping = this.buildMapping(resourceTypeMapping);
+		this.getEntityMappings().changeMapping(this, oldMapping, this.mapping);
+		this.firePropertyChanged(MAPPING_PROPERTY, oldMapping, this.mapping);
+	}
+
+	protected OrmTypeMapping buildMapping(XmlTypeMapping resourceMapping) {
+		OrmTypeMappingDefinition mappingDefintion = this.getMappingFileDefinition().getOrmTypeMappingDefinition(resourceMapping.getMappingKey());
+		return mappingDefintion.buildContextMapping(this, resourceMapping, this.getXmlContextNodeFactory());
+	}
+
+
+	// ********** access **********
+
+	public AccessType getAccess() {
+		return (this.specifiedAccess != null) ? this.specifiedAccess : this.defaultAccess;
+	}
+
+	public AccessType getDefaultAccess() {
+		return this.defaultAccess;
+	}
+
+	protected void setDefaultAccess(AccessType defaultAccess) {
+		AccessType old = this.defaultAccess;
+		this.defaultAccess = defaultAccess;
+		this.firePropertyChanged(DEFAULT_ACCESS_PROPERTY, old, defaultAccess);
+	}
+
+	public AccessType getSpecifiedAccess() {
+		return this.specifiedAccess;
+	}
+
+	public void setSpecifiedAccess(AccessType specifiedAccess) {
+		AccessType old = this.specifiedAccess;
+		this.specifiedAccess = specifiedAccess;
+		this.getResourceTypeMapping().setAccess(AccessType.toOrmResourceModel(specifiedAccess));
+		this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, specifiedAccess);
+	}
+
+	protected AccessType buildDefaultAccess() {
+		if ( ! this.mapping.isMetadataComplete()) {
+			if (this.javaPersistentType != null) {
+				if (this.javaPersistentTypeHasSpecifiedAccess()) {
+					return this.javaPersistentType.getAccess();
+				}
+				if (this.superPersistentType != null) {
+					return this.superPersistentType.getAccess();
+				}
+			}
+		}
+		AccessType access = this.getMappingFileRoot().getAccess();
+		return (access != null) ? access : AccessType.FIELD; //default to FIELD if no specified access found
+	}
+
+	protected boolean javaPersistentTypeHasSpecifiedAccess() {
+		return (this.javaPersistentType.getSpecifiedAccess() != null) || 
+				this.javaPersistentType.hasAnyAnnotatedAttributes();
+	}
+
+	public AccessType getOwnerOverrideAccess() {
+		return this.getEntityMappings().getOverridePersistentTypeAccess();
+	}
+
+	public AccessType getOwnerDefaultAccess() {
+		return this.getEntityMappings().getDefaultPersistentTypeAccess();
+	}
+
+	protected AccessType buildSpecifiedAccess() {
+		return AccessType.fromOrmResourceModel(this.getResourceTypeMapping().getAccess());
+	}
+
+
+	// ********** attributes **********
+
+	@SuppressWarnings("unchecked")
+	public ListIterator<OrmPersistentAttribute> attributes() {
+		return new CompositeListIterator<OrmPersistentAttribute>(this.specifiedAttributes(), this.virtualAttributes());
+	}
+
+	@SuppressWarnings("unchecked")
+	protected Iterable<OrmPersistentAttribute> getAttributes() {
+		return new CompositeIterable<OrmPersistentAttribute>(this.getSpecifiedAttributes(), this.getVirtualAttributes());
+	}
+
+	public int attributesSize() {
+		return this.specifiedAttributesSize() + this.virtualAttributesSize();
+	}
+
+	public Iterator<String> allAttributeNames() {
+		return this.attributeNames(this.allAttributes());
+	}
+
+	public Iterator<PersistentAttribute> allAttributes() {
+		return new CompositeIterator<PersistentAttribute>(
+				new TransformationIterator<PersistentType, Iterator<PersistentAttribute>>(this.inheritanceHierarchy()) {
+					@Override
+					protected Iterator<PersistentAttribute> transform(PersistentType pt) {
+						return pt.attributes();
+					}
+				}
+			);
+	}
+
+	protected Iterator<OrmPersistentAttribute> attributesNamed(final String attributeName) {
+		return new FilteringIterator<OrmPersistentAttribute>(this.attributes()) {
+			@Override
+			protected boolean accept(OrmPersistentAttribute o) {
+				return Tools.valuesAreEqual(attributeName, o.getName());
+			}
+		};
+	}
+
+	public OrmPersistentAttribute getAttributeNamed(String attributeName) {
+		Iterator<OrmPersistentAttribute> stream = this.attributesNamed(attributeName);
+		return (stream.hasNext()) ? stream.next() : null;
+	}
+
+	public PersistentAttribute resolveAttribute(String attributeName) {
+		Iterator<OrmPersistentAttribute> attributes = this.attributesNamed(attributeName);
+		if (attributes.hasNext()) {
+			OrmPersistentAttribute attribute = attributes.next();
+			return attributes.hasNext() ? null /* more than one */: attribute;
+		}
+		return (this.superPersistentType == null) ? null : this.superPersistentType.resolveAttribute(attributeName);
+	}
+
+	public Iterator<String> attributeNames() {
+		return this.attributeNames(this.attributes());
+	}
+
+	protected Iterator<String> attributeNames(Iterator<? extends PersistentAttribute> attrs) {
+		return new TransformationIterator<PersistentAttribute, String>(attrs) {
+			@Override
+			protected String transform(PersistentAttribute attribute) {
+				return attribute.getName();
+			}
+		};
+	}
+
+	protected void initializeAttributes() {
+		this.initializeSpecifiedAttributes();
+		this.initializeVirtualAttributes();
+	}
+
+	protected void updateAttributes() {
+		this.updateSpecifiedAttributes();
+		this.updateVirtualAttributes();
+	}
+
+	protected Iterator<JavaResourcePersistentAttribute> javaPersistentAttributes() {
+		return (this.javaPersistentType == null) ?
+				EmptyListIterator.<JavaResourcePersistentAttribute>instance() :
+				this.javaPersistentAttributes(this.javaPersistentType.getResourcePersistentType());
+	}
+
+	protected Iterator<JavaResourcePersistentAttribute> javaPersistentAttributes(JavaResourcePersistentType resourcePersistentType) {
+		AccessType access = this.specifiedAccess;
+		if (access == null && ! this.mapping.isMetadataComplete()) {
+			access = this.getJavaPersistentType().getSpecifiedAccess();
+		}
+		if (access == null) {
+			access = this.defaultAccess;
+		}
+		return resourcePersistentType.persistableAttributes(AccessType.toJavaResourceModel(access));
+	}
+
+
+	// ********** specified attributes **********
+
+	public ListIterator<OrmPersistentAttribute> specifiedAttributes() {
+		return new CloneListIterator<OrmPersistentAttribute>(this.specifiedAttributes);
+	}
+
+	protected Iterable<OrmPersistentAttribute> getSpecifiedAttributes() {
+		return new LiveCloneIterable<OrmPersistentAttribute>(this.specifiedAttributes);
+	}
+
+	public int specifiedAttributesSize() {
+		return this.specifiedAttributes.size();
+	}
+
+	protected OrmPersistentAttribute getSpecifiedAttributeFor(final JavaResourcePersistentAttribute jrpa) {
+		for (OrmPersistentAttribute attribute : this.getSpecifiedAttributes()) {
+			JavaPersistentAttribute javaAttribute = attribute.getJavaPersistentAttribute();
+			if ((javaAttribute != null) && (javaAttribute.getResourcePersistentAttribute() == jrpa)) {
+				return attribute;
+			}
+		}
+		return null;
+	}
+
+	public OrmPersistentAttribute addSpecifiedAttribute(String mappingKey, String attributeName) {
+		Attributes resourceAttributes = this.getResourceAttributes();
+		if (resourceAttributes == null) {
+			resourceAttributes = this.createResourceAttributes();
+			this.mapping.getResourceTypeMapping().setAttributes(resourceAttributes);
+		}
+
+		OrmAttributeMappingDefinition mappingDefintion = this.getMappingFileDefinition().getOrmAttributeMappingDefinition(mappingKey);
+		XmlAttributeMapping resourceMapping = mappingDefintion.buildResourceMapping(getResourceNodeFactory());
+		OrmPersistentAttribute persistentAttribute = this.buildSpecifiedAttribute(resourceMapping);
+		int index = this.getSpecifiedAttributeInsertionIndex(persistentAttribute);
+		this.specifiedAttributes.add(index, persistentAttribute);
+		persistentAttribute.getMapping().addToResourceModel(resourceAttributes);
+
+		persistentAttribute.getSpecifiedMapping().setName(attributeName);
+		this.fireItemAdded(ATTRIBUTES_LIST, index, persistentAttribute);
+		return persistentAttribute;
+	}
+
+	public void changeMapping(OrmPersistentAttribute ormPersistentAttribute, OrmAttributeMapping oldMapping, OrmAttributeMapping newMapping) {
+		int sourceIndex = this.specifiedAttributes.indexOf(ormPersistentAttribute);
+		this.specifiedAttributes.remove(sourceIndex);
+		oldMapping.removeFromResourceModel(this.getResourceAttributes());
+		int targetIndex = getSpecifiedAttributeInsertionIndex(ormPersistentAttribute);
+		this.specifiedAttributes.add(targetIndex, ormPersistentAttribute);
+		newMapping.addToResourceModel(this.getResourceAttributes());
+		oldMapping.initializeOn(newMapping);
+		this.fireItemMoved(ATTRIBUTES_LIST, targetIndex, sourceIndex);
+	}
+
+	public void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute) {
+		this.makeAttributeSpecified(ormPersistentAttribute, ormPersistentAttribute.getMappingKey());
+	}
+
+	public void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute, String mappingKey) {
+		if ( ! ormPersistentAttribute.isVirtual()) {
+			throw new IllegalStateException("Attribute is already specified"); //$NON-NLS-1$
+		}
+		if (this.valuesAreEqual(mappingKey, MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY)) {
+			throw new IllegalStateException("Use makePersistentAttributeSpecified(OrmPersistentAttribute, String) instead and specify a mapping type"); //$NON-NLS-1$
+		}
+
+		Attributes resourceAttributes = this.getResourceAttributes();
+		if (resourceAttributes == null) {
+			resourceAttributes = this.createResourceAttributes();
+			this.mapping.getResourceTypeMapping().setAttributes(resourceAttributes);
+		}
+
+		OrmAttributeMappingDefinition mappingDefintion = this.getMappingFileDefinition().getOrmAttributeMappingDefinition(mappingKey);
+		XmlAttributeMapping resourceMapping = mappingDefintion.buildResourceMapping(getResourceNodeFactory());
+
+		OrmPersistentAttribute newAttribute = this.buildSpecifiedAttribute(resourceMapping);
+		int insertionIndex = this.getSpecifiedAttributeInsertionIndex(newAttribute);
+		this.specifiedAttributes.add(insertionIndex, newAttribute);
+		newAttribute.getMapping().addToResourceModel(resourceAttributes);
+
+		int removalIndex = this.virtualAttributes.indexOf(ormPersistentAttribute);
+		this.virtualAttributes.remove(ormPersistentAttribute);
+		newAttribute.getSpecifiedMapping().setName(ormPersistentAttribute.getName());
+		if (ormPersistentAttribute.getJavaPersistentAttribute().getSpecifiedAccess() != null) {
+			newAttribute.setSpecifiedAccess(ormPersistentAttribute.getJavaPersistentAttribute().getSpecifiedAccess());
+		}
+
+		this.fireItemAdded(ATTRIBUTES_LIST, insertionIndex, newAttribute);
+		this.fireItemRemoved(VIRTUAL_ATTRIBUTES_LIST, removalIndex, ormPersistentAttribute);
+	}
+
+	protected int getSpecifiedAttributeInsertionIndex(OrmPersistentAttribute specifiedAttribute) {
+		return CollectionTools.insertionIndexOf(this.specifiedAttributes, specifiedAttribute, this.getAttributeComparator());
+	}
+
+	protected Comparator<OrmPersistentAttribute> getAttributeComparator() {
+		return ATTRIBUTE_COMPARATOR;
+	}
+
+	protected static final Comparator<OrmPersistentAttribute> ATTRIBUTE_COMPARATOR = 
+		new Comparator<OrmPersistentAttribute>() {
+			public int compare(OrmPersistentAttribute o1, OrmPersistentAttribute o2) {
+				int o1Sequence = o1.getMapping().getXmlSequence();
+				int o2Sequence = o2.getMapping().getXmlSequence();
+				return (o1Sequence == o2Sequence) ? 0 : (o1Sequence < o2Sequence) ? -1 : 1;
+			}
+		};
+
+	protected Attributes getResourceAttributes() {
+		return this.getResourceTypeMapping().getAttributes();
+	}
+
+	protected Attributes createResourceAttributes() {
+		return EmfTools.create(this.getResourceNodeFactory(), OrmPackage.eINSTANCE.getAttributes(), Attributes.class);
+	}
+
+	protected void initializeSpecifiedAttributes() {
+		Attributes attributes = this.getResourceAttributes();
+		if (attributes == null) {
+			return;
+		}
+		for (XmlAttributeMapping resourceMapping : attributes.getAttributeMappings()) {
+			this.addSpecifiedAttribute(resourceMapping);
+		}
+	}
+
+	protected void updateSpecifiedAttributes() {
+		Attributes attributes = this.getResourceAttributes();
+		Collection<OrmPersistentAttribute> contextAttributesToRemove = CollectionTools.collection(this.specifiedAttributes());
+		Collection<OrmPersistentAttribute> contextAttributesToUpdate = new ArrayList<OrmPersistentAttribute>();
+		int resourceIndex = 0;
+
+		if (attributes != null) {
+			for (XmlAttributeMapping resourceMapping : attributes.getAttributeMappings()) {
+				boolean contextAttributeFound = false;
+				for (OrmPersistentAttribute contextAttribute : contextAttributesToRemove) {
+					if (contextAttribute.getMapping().getResourceAttributeMapping() == resourceMapping) {
+						this.moveSpecifiedAttribute_(resourceIndex, contextAttribute);
+						contextAttributesToRemove.remove(contextAttribute);
+						contextAttributesToUpdate.add(contextAttribute);
+						contextAttributeFound = true;
+						break;
+					}
+				}
+				if ( ! contextAttributeFound) {
+					OrmPersistentAttribute ormPersistentAttribute = this.addSpecifiedAttribute(resourceMapping);
+					this.fireItemAdded(ATTRIBUTES_LIST, specifiedAttributesSize(), ormPersistentAttribute);
+				}
+				resourceIndex++;
+			}
+		}
+		for (OrmPersistentAttribute contextAttribute : contextAttributesToRemove) {
+			this.removeSpecifiedAttribute_(contextAttribute);
+		}
+		//first handle adding/removing of the persistent attributes, then update the others last, 
+		//this causes less churn in the update process
+		for (OrmPersistentAttribute contextAttribute : contextAttributesToUpdate) {
+			contextAttribute.update();
+		}
+	}
+
+	protected void removeSpecifiedAttribute_(OrmPersistentAttribute ormPersistentAttribute) {
+		this.removeItemFromList(ormPersistentAttribute, this.specifiedAttributes, ATTRIBUTES_LIST);
+	}
+
+	//not firing change notification so this can be reused in initialize and update
+	protected OrmPersistentAttribute addSpecifiedAttribute(XmlAttributeMapping resourceMapping) {
+		OrmPersistentAttribute ormPersistentAttribute = this.buildSpecifiedAttribute(resourceMapping);
+		this.specifiedAttributes.add(ormPersistentAttribute);
+		return ormPersistentAttribute;
+	}
+
+	protected void moveSpecifiedAttribute_(int index, OrmPersistentAttribute attribute) {
+		this.moveItemInList(index, this.specifiedAttributes.indexOf(attribute), this.specifiedAttributes, ATTRIBUTES_LIST);
+	}
+
+	public void removeSpecifiedAttribute(OrmPersistentAttribute ormPersistentAttribute) {
+		int index = this.specifiedAttributes.indexOf(ormPersistentAttribute);
+		this.specifiedAttributes.remove(ormPersistentAttribute);
+		ormPersistentAttribute.getMapping().removeFromResourceModel(this.getResourceAttributes());
+		if (this.getResourceAttributes().isUnset()) {
+			this.mapping.getResourceTypeMapping().setAttributes(null);
+		}
+		this.fireItemRemoved(ATTRIBUTES_LIST, index, ormPersistentAttribute);
+	}
+
+	protected OrmPersistentAttribute buildSpecifiedAttribute(XmlAttributeMapping resourceMapping) {
+		return this.buildOrmPersistentAttribute(this.buildSpecifiedAttributeOwner(), resourceMapping);
+	}
+
+	protected OrmPersistentAttribute.Owner buildSpecifiedAttributeOwner() {
+		return new SpecifiedAttributeOwner();
+	}
+
+	protected JavaPersistentAttribute buildJavaPersistentAttribute(JavaResourcePersistentAttribute jrpa) {
+		return this.getJpaFactory().buildJavaPersistentAttribute(this, jrpa);
+	}
+
+
+	// ********** virtual attributes **********
+
+	public ListIterator<OrmPersistentAttribute> virtualAttributes() {
+		return new CloneListIterator<OrmPersistentAttribute>(this.virtualAttributes);
+	}
+
+	protected Iterable<OrmPersistentAttribute> getVirtualAttributes() {
+		return new LiveCloneIterable<OrmPersistentAttribute>(this.virtualAttributes);
+	}
+
+	public int virtualAttributesSize() {
+		return this.virtualAttributes.size();
+	}
+
+	protected void addVirtualAttribute(OrmPersistentAttribute virtualAttribute) {
+		this.addItemToList(virtualAttribute, this.virtualAttributes, VIRTUAL_ATTRIBUTES_LIST);
+	}
+
+	protected void removeVirtualAttribute(OrmPersistentAttribute virtualAttribute) {
+		this.removeItemFromList(virtualAttribute, this.virtualAttributes, VIRTUAL_ATTRIBUTES_LIST);
+	}
+
+	public boolean containsVirtualAttribute(OrmPersistentAttribute ormPersistentAttribute) {
+		return this.virtualAttributes.contains(ormPersistentAttribute);
+	}
+
+	public void makeAttributeVirtual(OrmPersistentAttribute ormPersistentAttribute) {
+		if (ormPersistentAttribute.isVirtual()) {
+			throw new IllegalStateException("Attribute is already virtual"); //$NON-NLS-1$
+		}
+		JavaPersistentAttribute javaPersistentAttribute = ormPersistentAttribute.getJavaPersistentAttribute();
+		OrmPersistentAttribute virtualAttribute = null;
+		if (javaPersistentAttribute != null) {
+			virtualAttribute = this.addVirtualAttribute(javaPersistentAttribute.getResourcePersistentAttribute());
+		}
+		this.removeSpecifiedAttribute(ormPersistentAttribute);
+		if (virtualAttribute != null) {
+			this.fireItemAdded(VIRTUAL_ATTRIBUTES_LIST, virtualAttributesSize() - 1, virtualAttribute);
+		}
+	}
+
+	protected void initializeVirtualAttributes() {
+		for (Iterator<JavaResourcePersistentAttribute> stream = this.javaPersistentAttributes(); stream.hasNext(); ) {
+			JavaResourcePersistentAttribute javaResourceAttribute = stream.next();
+			if (this.getSpecifiedAttributeFor(javaResourceAttribute) == null) {
+				this.addVirtualAttribute(javaResourceAttribute);
+			}
+		}
+	}
+
+	protected void updateVirtualAttributes() {
+		Collection<OrmPersistentAttribute> contextAttributesToRemove = CollectionTools.collection(this.virtualAttributes());
+		Collection<OrmPersistentAttribute> contextAttributesToUpdate = new ArrayList<OrmPersistentAttribute>();
+		int resourceIndex = 0;
+
+		for (Iterator<JavaResourcePersistentAttribute> stream = this.javaPersistentAttributes(); stream.hasNext(); ) {
+			JavaResourcePersistentAttribute javaResourceAttribute = stream.next();
+			OrmPersistentAttribute specifiedAttribute = this.getSpecifiedAttributeFor(javaResourceAttribute);
+			if (specifiedAttribute == null) {
+				JavaPersistentAttribute javaAttribute = this.getJpaFactory().buildJavaPersistentAttribute(this, javaResourceAttribute);
+				JavaAttributeMapping javaAttributeMapping = javaAttribute.getMapping();
+				if (this.mapping.isMetadataComplete()) {
+					javaAttributeMapping = javaAttribute.getDefaultMapping();
+				}
+				boolean contextAttributeFound = false;
+				for (OrmPersistentAttribute contextAttribute : contextAttributesToRemove) {
+					JavaPersistentAttribute javaPersistentAttribute = contextAttribute.getJavaPersistentAttribute();
+					if (javaPersistentAttribute.getResourcePersistentAttribute() == javaResourceAttribute) {
+						if (this.valuesAreEqual(contextAttribute.getMappingKey(), javaAttributeMapping.getKey())) { 
+							//the mapping key would change if metaDataComplete flag changes, rebuild the orm attribute
+							contextAttributesToRemove.remove(contextAttribute);
+							contextAttributesToUpdate.add(contextAttribute);
+							contextAttributeFound = true;
+							break;
+						}
+					}
+				}
+				if ( ! contextAttributeFound) {
+					OrmPersistentAttribute virtualAttribute = this.addVirtualAttribute(javaAttributeMapping);
+					this.fireItemAdded(VIRTUAL_ATTRIBUTES_LIST, virtualAttributesSize() - 1, virtualAttribute);
+				}
+				resourceIndex++;
+			}
+		}
+
+		for (OrmPersistentAttribute contextAttribute : contextAttributesToRemove) {
+			this.removeVirtualAttribute(contextAttribute);
+		}
+		//first handle adding/removing of the persistent attributes, then update the others last, 
+		//this causes less churn in the update process
+		for (OrmPersistentAttribute contextAttribute : contextAttributesToUpdate) {
+			contextAttribute.update();
+		}
+	}
+
+	protected OrmPersistentAttribute addVirtualAttribute(JavaResourcePersistentAttribute resourceAttribute) {
+		JavaPersistentAttribute javaAttribute = this.getJpaFactory().buildJavaPersistentAttribute(this, resourceAttribute);
+		JavaAttributeMapping javaAttributeMapping = javaAttribute.getMapping();
+		if (this.mapping.isMetadataComplete()) {
+			javaAttributeMapping = javaAttribute.getDefaultMapping();
+		}
+		return this.addVirtualAttribute(javaAttributeMapping);
+	}
+
+	//not firing change notification so this can be reused in initialize and update
+	protected OrmPersistentAttribute addVirtualAttribute(JavaAttributeMapping javaAttributeMapping) {
+		OrmAttributeMappingDefinition mappingDefintion = this.getMappingFileDefinition().getOrmAttributeMappingDefinition(javaAttributeMapping.getKey());
+		XmlAttributeMapping resourceMapping = mappingDefintion.buildVirtualResourceMapping(this.mapping, javaAttributeMapping, this.getXmlContextNodeFactory());
+		OrmPersistentAttribute virtualAttribute = this.buildVirtualOrmPersistentAttribute(javaAttributeMapping, resourceMapping);
+		this.virtualAttributes.add(virtualAttribute);
+		return virtualAttribute;
+	}
+
+	protected OrmPersistentAttribute buildVirtualOrmPersistentAttribute(JavaAttributeMapping javaAttributeMapping, XmlAttributeMapping resourceMapping) {
+		return this.buildOrmPersistentAttribute(this.buildVirtualAttributeOwner(javaAttributeMapping.getPersistentAttribute()), resourceMapping);
+	}
+
+	protected OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentAttribute.Owner owner, XmlAttributeMapping resourceMapping) {
+		return this.getXmlContextNodeFactory().buildOrmPersistentAttribute(this, owner, resourceMapping);
+	}
+
+	protected OrmPersistentAttribute.Owner buildVirtualAttributeOwner(final JavaPersistentAttribute javaPersistentAttribute) {
+		return new OrmPersistentAttribute.Owner() {
+			public JavaPersistentAttribute findJavaPersistentAttribute(OrmPersistentAttribute ormPersistentAttribute) {
+				return javaPersistentAttribute;
+			}
+
+			public void updateJavaPersistentAttribute() {
+				//update the attribute, since we own it and it will not get updated otherwise
+				javaPersistentAttribute.update();
+			}
+		};
+	}
+
+
+	// ********** Java persistent type **********
+
+	public JavaPersistentType getJavaPersistentType() {
+		return this.javaPersistentType;
+	}
+
+	protected void setJavaPersistentType(JavaPersistentType javaPersistentType) {
+		JavaPersistentType old = this.javaPersistentType;
+		this.javaPersistentType = javaPersistentType;
+		this.firePropertyChanged(JAVA_PERSISTENT_TYPE_PROPERTY, old, javaPersistentType);
+	}
+
+	protected JavaPersistentType buildJavaPersistentType() {
+		JavaResourcePersistentType jrpt = this.getJavaResourcePersistentType();
+		return (jrpt == null) ? null : this.buildJavaPersistentType(jrpt);
+	}
+
+	protected JavaResourcePersistentType getJavaResourcePersistentType() {
+		return this.getEntityMappings().resolveJavaResourcePersistentType(this.getName());
+	}
+
+	protected JavaResourcePersistentType getJavaResourcePersistentType(String className) {
+		return this.getJpaProject().getJavaResourcePersistentType(className);
+	}
+
+	protected JavaPersistentType buildJavaPersistentType(JavaResourcePersistentType jrpt) {
+		return getJpaFactory().buildJavaPersistentType(this, jrpt);
+	}
+
+	protected void updateJavaPersistentType() {
+		JavaResourcePersistentType jrpt = this.getJavaResourcePersistentType();
+		if (jrpt == null) {
+			this.setJavaPersistentType(null);
+		} else { 
+			if (this.javaPersistentType == null) {
+				this.setJavaPersistentType(this.buildJavaPersistentType(jrpt));
+			} else {
+				this.javaPersistentType.update(jrpt);
+			}
+		}
+	}
+
+
+	// ********** super persistent type **********
+
+	public PersistentType getSuperPersistentType() {
+		return this.superPersistentType;
+	}
+
+	protected void setSuperPersistentType(PersistentType superPersistentType) {
+		PersistentType old = this.superPersistentType;
+		this.superPersistentType = superPersistentType;
+		this.firePropertyChanged(SUPER_PERSISTENT_TYPE_PROPERTY, old, superPersistentType);
+	}
+
+	protected void updateSuperPersistentType() {
+		PersistentType spt = this.buildSuperPersistentType();
+		// check for circular inheritance
+		if ((spt == null) || CollectionTools.contains(spt.inheritanceHierarchy(), this)) {
+			this.setSuperPersistentType(null);
+		} else {
+			this.setSuperPersistentType(spt);
+		}
+	}
+
+	protected PersistentType buildSuperPersistentType() {
+		return (this.javaPersistentType == null) ? null : this.javaPersistentType.getSuperPersistentType();
+	}
+
+
+	// ********** inheritance **********
+
+	public Iterator<PersistentType> inheritanceHierarchy() {
+		return this.inheritanceHierarchyOf(this);
+	}
+
+	public Iterator<PersistentType> ancestors() {
+		return this.inheritanceHierarchyOf(this.superPersistentType);
+	}
+
+	protected Iterator<PersistentType> inheritanceHierarchyOf(PersistentType start) {
+		// using a chain iterator to traverse up the inheritance tree
+		return new ChainIterator<PersistentType>(start) {
+			@Override
+			protected PersistentType nextLink(PersistentType persistentType) {
+				return persistentType.getSuperPersistentType();
+			}
+		};
+	}
+
+
+	// ********** declaring type name **********
+
+	public String getDeclaringTypeName() {
+		return this.declaringTypeName;
+	}
+
+	protected void setDeclaringTypeName(String declaringTypeName) {
+		String old = this.declaringTypeName;
+		this.declaringTypeName = declaringTypeName;
+		this.firePropertyChanged(DECLARING_TYPE_NAME_PROPERTY, old, declaringTypeName);
+	}
+
+	protected String buildDeclaringTypeName() {
+		return this.isJpa2_0Compatible() ? buildDeclaringTypeName_() : null;
+	}
+
+	protected String buildDeclaringTypeName_() {
+		return (this.javaPersistentType == null) ?
+				null : ((JavaPersistentType2_0) this.javaPersistentType).getDeclaringTypeName();
+	}
+
+
+	// ********** metamodel **********
+
+	public IFile getMetamodelFile() {
+		return (this.javaPersistentType == null) ? null : this.metamodelSynchronizer.getFile();
+	}
+
+	public void initializeMetamodel() {
+		// do nothing - probably shouldn't be called...
+	}
+
+	public boolean isManaged() {
+		return true;
+	}
+
+	/**
+	 * All orm.xml persistent types must be able to generate a static metamodel
+	 * because 1.0 orm.xml files can be referenced from 2.0 persistence.xml files.
+	 */
+	public void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		if (this.javaPersistentType != null) {
+			this.metamodelSynchronizer.synchronize(memberTypeTree);
+		}
+	}
+
+	public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		if (this.javaPersistentType != null) {
+			this.metamodelSynchronizer.printBodySourceOn(pw, memberTypeTree);
+		}
+	}
+
+	public void disposeMetamodel() {
+		// do nothing - probably shouldn't be called...
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return OrmStructureNodes.PERSISTENT_TYPE_ID;
+	}
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		for (OrmPersistentAttribute attribute : this.getSpecifiedAttributes()) {
+			if (attribute.contains(textOffset)) {
+				return attribute;
+			}
+		}
+		return this;
+	}
+
+	public TextRange getSelectionTextRange() {
+		return this.mapping.getSelectionTextRange();
+	}
+
+	public void dispose() {
+		if (this.javaPersistentType != null) {
+			this.javaPersistentType.dispose();
+		}
+	}
+
+
+	// ********** PersistentType.Owner implementation **********
+
+	public AccessType getOverridePersistentTypeAccess() {
+		if (this.specifiedAccess != null) {
+			return this.specifiedAccess;
+		}
+
+		if (this.superPersistentType instanceof OrmPersistentType) {
+			AccessType accessType = ((OrmPersistentType) this.superPersistentType).getSpecifiedAccess();
+			if (accessType != null) {
+				return accessType;
+			}
+		}
+
+		if (this.mapping.isMetadataComplete()) {
+			AccessType accessType = this.getOwnerDefaultAccess();
+			if (accessType != null) {
+				return accessType;
+			}
+		}
+
+		// no override access type
+		return null;
+	}
+
+	public AccessType getDefaultPersistentTypeAccess() {
+		if (this.superPersistentType instanceof OrmPersistentType) {
+			AccessType accessType = ((OrmPersistentType) this.superPersistentType).getDefaultAccess();
+			if (accessType != null) {
+				return accessType;
+			}
+		}
+
+		return this.getOwnerDefaultAccess();
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateClass(messages);
+		this.validateMapping(messages, reporter);
+		this.validateAttributes(messages, reporter);
+	}
+
+	protected void validateClass(List<IMessage> messages) {
+		if (this.javaPersistentType == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENT_TYPE_UNRESOLVED_CLASS,
+					new String[] {this.getName()},
+					this, 
+					this.mapping.getClassTextRange()
+				)
+			);
+		}
+	}
+
+	protected void validateMapping(List<IMessage> messages, IReporter reporter) {
+		try {
+			this.mapping.validate(messages, reporter);
+		} catch(Throwable t) {
+			JptCorePlugin.log(t);
+		}
+	}
+
+	protected void validateAttributes(List<IMessage> messages, IReporter reporter) {
+		for (Iterator<OrmPersistentAttribute> stream = this.attributes(); stream.hasNext(); ) {
+			this.validateAttribute(stream.next(), messages, reporter);
+		}
+	}
+
+	protected void validateAttribute(OrmPersistentAttribute attribute, List<IMessage> messages, IReporter reporter) {
+		try {
+			attribute.validate(messages, reporter);
+		} catch(Throwable t) {
+			JptCorePlugin.log(t);
+		}
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.mapping.getValidationTextRange();
+	}
+
+
+	// ********** misc **********
+
+	@Override
+	public EntityMappings getParent() {
+		return (EntityMappings) super.getParent();
+	}
+
+	public String getDefaultPackage() {
+		return this.getEntityMappings().getPackage();
+	}
+
+	public boolean isDefaultMetadataComplete() {
+		return this.getEntityMappings().isDefaultPersistentTypeMetadataComplete();
+	}
+
+	public boolean isFor(String typeName) {
+		String className = this.getName();
+		if (className == null) {
+			return false;
+		}
+		if (className.equals(typeName)) {
+			return true;
+		}
+		String defaultPackage = this.getDefaultPackage();
+		if (defaultPackage == null) {
+			return false;
+		}
+		return (defaultPackage + '.' +  className).equals(typeName);
+	}
+
+	public boolean contains(int textOffset) {
+		return this.mapping.containsOffset(textOffset);
+	}
+
+	public void classChanged(String oldClass, String newClass) {
+		this.firePropertyChanged(NAME_PROPERTY, oldClass, newClass);
+	}
+
+	public boolean isMapped() {
+		return true;
+	}
+
+	public String getMappingKey() {
+		return this.mapping.getKey();
+	}
+
+	protected EntityMappings getEntityMappings() {
+		return this.getParent();
+	}
+
+	protected XmlTypeMapping getResourceTypeMapping() {
+		return this.mapping.getResourceTypeMapping();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ********** specified persistent attribute owner **********
+
+	protected class SpecifiedAttributeOwner
+		implements OrmPersistentAttribute.Owner
+	{
+		private JavaPersistentAttribute cachedJavaPersistentAttribute;
+
+		public SpecifiedAttributeOwner() {
+			super();
+		}
+
+		public JavaPersistentAttribute findJavaPersistentAttribute(OrmPersistentAttribute ormPersistentAttribute) {
+			if (GenericOrmPersistentType.this.javaPersistentType == null) {
+				return null;
+			}
+			String ormName = ormPersistentAttribute.getName();
+			if (ormName == null) {
+				return null;
+			}
+			AccessType ormAccess = ormPersistentAttribute.getAccess();
+
+			JavaPersistentAttribute javaPersistentAttribute = this.findExistingJavaPersistentAttribute(ormName);
+			if ((javaPersistentAttribute != null) && (javaPersistentAttribute.getAccess() == ormAccess)) {
+				this.cachedJavaPersistentAttribute = null;  // we only want to cache the persistent attribute if we build it
+				return javaPersistentAttribute;
+			}
+
+			// if 'javaPersistentAttribute' is null, it might exist in a superclass that is not persistent, we need to build it ourselves.
+			// if access is different, we won't be able to find the corresponding java persistent attribute, it won't exist so we build it ourselves
+			return this.buildJavaPersistentAttribute(ormName, ormAccess);
+		}
+
+		protected JavaPersistentAttribute findExistingJavaPersistentAttribute(String attributeName) {
+			return GenericOrmPersistentType.this.javaPersistentType.getAttributeNamed(attributeName);
+		}
+
+		protected JavaPersistentAttribute buildJavaPersistentAttribute(String ormName, AccessType ormAccess) {
+			JavaResourcePersistentAttribute jrpa = this.getJavaResourcePersistentAttribute(this.getJavaResourcePersistentType(), ormName, ormAccess);
+			if (this.cachedJavaPersistentAttribute != null &&
+					this.cachedJavaPersistentAttribute.getResourcePersistentAttribute() == jrpa) {
+				return this.cachedJavaPersistentAttribute;
+			}
+			return this.cachedJavaPersistentAttribute = (jrpa == null) ? null : GenericOrmPersistentType.this.buildJavaPersistentAttribute(jrpa);
+		}
+
+		protected JavaResourcePersistentType getJavaResourcePersistentType() {
+			return GenericOrmPersistentType.this.javaPersistentType.getResourcePersistentType();
+		}
+
+		protected JavaResourcePersistentAttribute getJavaResourcePersistentAttribute(JavaResourcePersistentType javaResourcePersistentType, String ormName, AccessType ormAccess) {
+			for (Iterator<JavaResourcePersistentAttribute> stream = this.attributes(javaResourcePersistentType, ormAccess); stream.hasNext(); ) {
+				JavaResourcePersistentAttribute jrpa = stream.next();
+				if (jrpa.getName().equals(ormName)) {
+					return jrpa;
+				}
+			}
+			// climb up inheritance hierarchy
+			String superclassName = javaResourcePersistentType.getSuperclassQualifiedName();
+			if (superclassName == null) {
+				return null;
+			}
+			JavaResourcePersistentType superclass = GenericOrmPersistentType.this.getJavaResourcePersistentType(superclassName);
+			if (superclass == null) {
+				return null;
+			}
+			// recurse
+			return this.getJavaResourcePersistentAttribute(superclass, ormName, ormAccess);
+		}
+
+		protected Iterator<JavaResourcePersistentAttribute> attributes(JavaResourcePersistentType javaResourcePersistentType, AccessType ormAccess) {
+			return (ormAccess == AccessType.PROPERTY) ? javaResourcePersistentType.persistableProperties() : javaResourcePersistentType.persistableFields();
+		}
+
+		public void updateJavaPersistentAttribute() {
+			if (this.cachedJavaPersistentAttribute != null) {
+				this.cachedJavaPersistentAttribute.update();
+			}
+			//else {
+				//don't update, we don't own the java persistent attribute, 
+				//it will be updated through the java context model
+			//}
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..4e4f893
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
@@ -0,0 +1,201 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmBaseJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmNamedColumn;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class GenericOrmPrimaryKeyJoinColumn extends AbstractOrmNamedColumn<XmlPrimaryKeyJoinColumn>
+	implements OrmPrimaryKeyJoinColumn
+{
+	protected String specifiedReferencedColumnName;
+
+	protected String defaultReferencedColumnName;
+
+	protected XmlPrimaryKeyJoinColumn resourcePkJoinColumn;
+	
+	public GenericOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePkJoinColumn) {
+		super(parent, owner);
+		this.initialize(resourcePkJoinColumn);
+	}
+
+	public void initializeFrom(PrimaryKeyJoinColumn oldPkJoinColumn) {
+		super.initializeFrom(oldPkJoinColumn);
+		setSpecifiedReferencedColumnName(oldPkJoinColumn.getSpecifiedReferencedColumnName());
+	}
+	
+	@Override
+	protected XmlPrimaryKeyJoinColumn getResourceColumn() {
+		return this.resourcePkJoinColumn;
+	}
+	
+	@Override
+	protected void addResourceColumn() {
+		//primaryKeyJoinColumns are part of a collection, the pk-join-column element will be removed/added
+		//when the XmlPrimaryKeyJoinColumn is removed/added to the XmlEntity collection
+	}
+	
+	@Override
+	protected void removeResourceColumn() {
+		//primaryKeyJoinColumns are part of a collection, the pk-join-column element will be removed/added
+		//when the XmlPrimaryKeyJoinColumn is removed/added to the XmlEntity collection
+	}
+	
+	public String getReferencedColumnName() {
+		return (this.getSpecifiedReferencedColumnName() == null) ? getDefaultReferencedColumnName() : this.getSpecifiedReferencedColumnName();
+	}
+
+	public String getSpecifiedReferencedColumnName() {
+		return this.specifiedReferencedColumnName;
+	}
+
+	public void setSpecifiedReferencedColumnName(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		getResourceColumn().setReferencedColumnName(newSpecifiedReferencedColumnName);
+		firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+	
+	protected void setSpecifiedReferencedColumnName_(String newSpecifiedReferencedColumnName) {
+		String oldSpecifiedReferencedColumnName = this.specifiedReferencedColumnName;
+		this.specifiedReferencedColumnName = newSpecifiedReferencedColumnName;
+		firePropertyChanged(SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY, oldSpecifiedReferencedColumnName, newSpecifiedReferencedColumnName);
+	}
+
+	public String getDefaultReferencedColumnName() {
+		return this.defaultReferencedColumnName;
+	}
+
+	protected void setDefaultReferencedColumnName(String newDefaultReferencedColumnName) {
+		String oldDefaultReferencedColumnName = this.defaultReferencedColumnName;
+		this.defaultReferencedColumnName = newDefaultReferencedColumnName;
+		firePropertyChanged(DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY, oldDefaultReferencedColumnName, newDefaultReferencedColumnName);
+	}
+
+	@Override
+	public OrmBaseJoinColumn.Owner getOwner() {
+		return (OrmBaseJoinColumn.Owner) this.owner;
+	}
+
+	public Column getReferencedDbColumn() {
+		Table table = this.getReferencedColumnDbTable();
+		return (table == null) ? null : table.getColumnForIdentifier(this.getReferencedColumnName());
+	}
+
+	public Table getReferencedColumnDbTable() {
+		return getOwner().getReferencedColumnDbTable();
+	}
+
+	public boolean isReferencedColumnResolved() {
+		return getReferencedDbColumn() != null;
+	}
+
+	public TextRange getReferencedColumnNameTextRange() {
+		if (getResourceColumn() != null) {
+			TextRange textRange = getResourceColumn().getReferencedColumnNameTextRange();
+			if (textRange != null) {
+				return textRange;
+			}
+		}
+		return getOwner().getValidationTextRange();
+	}
+
+		
+	public boolean isVirtual() {
+		return getOwner().isVirtual(this);
+	}
+
+	@Override
+	public String getTable() {
+		return getOwner().getDefaultTableName();
+	}
+	
+	@Override
+	protected void initialize(XmlPrimaryKeyJoinColumn resourcePkJoinColumn) {
+		this.resourcePkJoinColumn = resourcePkJoinColumn;
+		super.initialize(resourcePkJoinColumn);
+		this.specifiedReferencedColumnName = getResourceReferencedColumnName();
+		this.defaultReferencedColumnName = buildDefaultReferencedColumnName();
+	}
+	
+	@Override
+	public void update(XmlPrimaryKeyJoinColumn resourcePkJoinColumn) {
+		this.resourcePkJoinColumn = resourcePkJoinColumn;
+		super.update(resourcePkJoinColumn);
+		this.setSpecifiedReferencedColumnName_(getResourceReferencedColumnName());
+		this.setDefaultReferencedColumnName(buildDefaultReferencedColumnName());
+	}
+	
+	protected String getResourceReferencedColumnName() {
+		return this.resourcePkJoinColumn == null ? null : this.resourcePkJoinColumn.getReferencedColumnName();
+	}
+	
+	//TODO not correct when we start supporting primaryKeyJoinColumns in 1-1 mappings
+	protected String buildDefaultReferencedColumnName() {
+		return buildDefaultName();
+	}
+
+
+	//******************* validation ***********************
+
+	@Override
+	//this method will only be called if the table validates correctly
+	protected void validateName(List<IMessage> messages) {
+		//do not call super here, first need to check for multiple join columns errors
+		this.validateJoinColumnName(messages);
+		this.validateReferencedColumnName(messages);
+	}
+
+	protected void validateJoinColumnName(List<IMessage> messages) {
+		if (this.getSpecifiedName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedNameMultipleJoinColumnsMessage());
+		}
+		else if (this.getName() != null){
+			super.validateName(messages);
+		}
+		//If the name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+
+	protected void validateReferencedColumnName(List<IMessage> messages) {
+		if (this.getSpecifiedReferencedColumnName() == null && this.getOwner().joinColumnsSize() > 1) {
+			messages.add(this.buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage());
+		}
+		else if (this.getReferencedColumnName() != null) {
+			Table refColumnDbTable = this.getReferencedColumnDbTable();
+			if (refColumnDbTable != null && ! this.isReferencedColumnResolved()) {
+				messages.add(getOwner().buildUnresolvedReferencedColumnNameMessage(this, this.getReferencedColumnNameTextRange()));
+			}
+		}
+		//If the referenced column name is null and there is only one join-column, one of these validation messages will apply
+		// 1. target entity does not have a primary key
+		// 2. target entity is not specified
+		// 3. target entity is not an entity
+	}
+
+	protected IMessage buildUnspecifiedNameMultipleJoinColumnsMessage() {
+		return getOwner().buildUnspecifiedNameMultipleJoinColumnsMessage(this, getNameTextRange());
+	}
+
+	protected IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage() {
+		return getOwner().buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(this, getReferencedColumnNameTextRange());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
new file mode 100644
index 0000000..0fdb1b9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmQueryContainer.java
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.NamedNativeQuery;
+import org.eclipse.jpt.core.context.NamedQuery;
+import org.eclipse.jpt.core.context.Query;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmNamedNativeQuery;
+import org.eclipse.jpt.core.context.orm.OrmNamedQuery;
+import org.eclipse.jpt.core.context.orm.OrmQuery;
+import org.eclipse.jpt.core.context.orm.OrmQueryContainer;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+import org.eclipse.jpt.core.resource.orm.XmlQueryContainer;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmQueryContainer extends AbstractOrmXmlContextNode
+	implements OrmQueryContainer
+{
+	protected final XmlQueryContainer resourceQueryContainer;
+	
+	protected final List<OrmNamedQuery> namedQueries;
+
+	protected final List<OrmNamedNativeQuery> namedNativeQueries;
+
+
+	public GenericOrmQueryContainer(XmlContextNode parent, XmlQueryContainer resourceQueryContainer) {
+		super(parent);
+		this.resourceQueryContainer = resourceQueryContainer;
+		this.namedQueries = new ArrayList<OrmNamedQuery>();
+		this.namedNativeQueries = new ArrayList<OrmNamedNativeQuery>();
+		this.initializeNamedQueries();
+		this.initializeNamedNativeQueries();
+	}
+
+	public ListIterator<OrmNamedQuery> namedQueries() {
+		return new CloneListIterator<OrmNamedQuery>(this.namedQueries);
+	}
+	
+	public int namedQueriesSize() {
+		return this.namedQueries.size();
+	}
+	
+	public OrmNamedQuery addNamedQuery(int index) {
+		XmlNamedQuery resourceNamedQuery = OrmFactory.eINSTANCE.createXmlNamedQuery();
+		OrmNamedQuery contextNamedQuery = buildNamedQuery(resourceNamedQuery);
+		this.namedQueries.add(index, contextNamedQuery);
+		this.resourceQueryContainer.getNamedQueries().add(index, resourceNamedQuery);
+		this.fireItemAdded(NAMED_QUERIES_LIST, index, contextNamedQuery);
+		return contextNamedQuery;
+	}
+	
+	protected void addNamedQuery(int index, OrmNamedQuery namedQuery) {
+		addItemToList(index, namedQuery, this.namedQueries, NAMED_QUERIES_LIST);
+	}
+		
+	protected void addNamedQuery(OrmNamedQuery namedQuery) {
+		this.addNamedQuery(this.namedQueries.size(), namedQuery);
+	}
+		
+	public void removeNamedQuery(NamedQuery namedQuery) {
+		removeNamedQuery(this.namedQueries.indexOf(namedQuery));
+	}
+	
+	public void removeNamedQuery(int index) {
+		OrmNamedQuery namedQuery = this.namedQueries.remove(index);
+		this.resourceQueryContainer.getNamedQueries().remove(index);
+		fireItemRemoved(NAMED_QUERIES_LIST, index, namedQuery);
+	}
+	
+	protected void removeNamedQuery_(OrmNamedQuery namedQuery) {
+		removeItemFromList(namedQuery, this.namedQueries, NAMED_QUERIES_LIST);
+	}
+	
+	public void moveNamedQuery(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.namedQueries, targetIndex, sourceIndex);
+		this.resourceQueryContainer.getNamedQueries().move(targetIndex, sourceIndex);
+		fireItemMoved(NAMED_QUERIES_LIST, targetIndex, sourceIndex);		
+	}
+	
+	public ListIterator<OrmNamedNativeQuery> namedNativeQueries() {
+		return new CloneListIterator<OrmNamedNativeQuery>(this.namedNativeQueries);
+	}
+	
+	public int namedNativeQueriesSize() {
+		return this.namedNativeQueries.size();
+	}
+	
+	public OrmNamedNativeQuery addNamedNativeQuery(int index) {
+		XmlNamedNativeQuery resourceNamedNativeQuery = OrmFactory.eINSTANCE.createXmlNamedNativeQuery();
+		OrmNamedNativeQuery contextNamedNativeQuery = buildNamedNativeQuery(resourceNamedNativeQuery);
+		this.namedNativeQueries.add(index, contextNamedNativeQuery);
+		this.resourceQueryContainer.getNamedNativeQueries().add(index, resourceNamedNativeQuery);
+		this.fireItemAdded(NAMED_NATIVE_QUERIES_LIST, index, contextNamedNativeQuery);
+		return contextNamedNativeQuery;
+	}
+	
+	protected void addNamedNativeQuery(int index, OrmNamedNativeQuery namedNativeQuery) {
+		addItemToList(index, namedNativeQuery, this.namedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+	}
+	
+	protected void addNamedNativeQuery(OrmNamedNativeQuery namedNativeQuery) {
+		this.addNamedNativeQuery(this.namedNativeQueries.size(), namedNativeQuery);
+	}
+	
+	public void removeNamedNativeQuery(NamedNativeQuery namedNativeQuery) {
+		this.removeNamedNativeQuery(this.namedNativeQueries.indexOf(namedNativeQuery));
+	}
+	
+	public void removeNamedNativeQuery(int index) {
+		OrmNamedNativeQuery namedNativeQuery = this.namedNativeQueries.remove(index);
+		this.resourceQueryContainer.getNamedNativeQueries().remove(index);
+		fireItemRemoved(NAMED_NATIVE_QUERIES_LIST, index, namedNativeQuery);
+	}
+
+	protected void removeNamedNativeQuery_(OrmNamedNativeQuery namedNativeQuery) {
+		removeItemFromList(namedNativeQuery, this.namedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+	}
+		
+	public void moveNamedNativeQuery(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.namedNativeQueries, targetIndex, sourceIndex);
+		this.resourceQueryContainer.getNamedNativeQueries().move(targetIndex, sourceIndex);
+		fireItemMoved(NAMED_NATIVE_QUERIES_LIST, targetIndex, sourceIndex);		
+	}
+	
+	
+	protected void initializeNamedQueries() {
+		for (XmlNamedQuery namedQuery : this.resourceQueryContainer.getNamedQueries()) {
+			this.namedQueries.add(buildNamedQuery(namedQuery));
+		}
+	}
+	
+	protected void initializeNamedNativeQueries() {
+		for (XmlNamedNativeQuery namedNativeQuery : this.resourceQueryContainer.getNamedNativeQueries()) {
+			this.namedNativeQueries.add(buildNamedNativeQuery(namedNativeQuery));
+		}
+	}
+	
+	public void update() {
+		this.updateNamedQueries();
+		this.updateNamedNativeQueries();
+	}
+	
+	protected void updateNamedQueries() {
+		// make a copy of the XML queries (to prevent ConcurrentModificationException)
+		Iterator<XmlNamedQuery> xmlQueries = new CloneIterator<XmlNamedQuery>(this.resourceQueryContainer.getNamedQueries());
+		
+		for (Iterator<OrmNamedQuery> contextQueries = this.namedQueries(); contextQueries.hasNext(); ) {
+			OrmNamedQuery contextQuery = contextQueries.next();
+			if (xmlQueries.hasNext()) {
+				contextQuery.update(xmlQueries.next());
+			}
+			else {
+				removeNamedQuery_(contextQuery);
+			}
+		}
+		
+		while (xmlQueries.hasNext()) {
+			addNamedQuery(buildNamedQuery(xmlQueries.next()));
+		}
+	}
+
+	protected OrmNamedQuery buildNamedQuery(XmlNamedQuery resourceNamedQuery) {
+		return getXmlContextNodeFactory().buildOrmNamedQuery(this, resourceNamedQuery);
+	}
+
+	protected void updateNamedNativeQueries() {
+		// make a copy of the XML queries (to prevent ConcurrentModificationException)
+		Iterator<XmlNamedNativeQuery> xmlQueries = new CloneIterator<XmlNamedNativeQuery>(this.resourceQueryContainer.getNamedNativeQueries());
+		
+		for (Iterator<OrmNamedNativeQuery> contextQueries = this.namedNativeQueries(); contextQueries.hasNext(); ) {
+			OrmNamedNativeQuery contextQuery = contextQueries.next();
+			if (xmlQueries.hasNext()) {
+				contextQuery.update(xmlQueries.next());
+			}
+			else {
+				removeNamedNativeQuery_(contextQuery);
+			}
+		}
+		
+		while (xmlQueries.hasNext()) {
+			addNamedNativeQuery(buildNamedNativeQuery(xmlQueries.next()));
+		}
+	}
+
+	protected OrmNamedNativeQuery buildNamedNativeQuery(XmlNamedNativeQuery resourceNamedNativeQuery) {
+		return getXmlContextNodeFactory().buildOrmNamedNativeQuery(this, resourceNamedNativeQuery);
+	}
+	
+	
+	//************ validation ***************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateQueries(messages);
+	}
+	
+	protected void validateQueries(List<IMessage> messages) {
+		for (Iterator<OrmQuery> localQueries = this.queries(); localQueries.hasNext(); ) {
+			OrmQuery localQuery = localQueries.next();
+			for (Iterator<Query> globalQueries = this.getPersistenceUnit().queries(); globalQueries.hasNext(); ) {
+				if (localQuery.duplicates(globalQueries.next())) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.QUERY_DUPLICATE_NAME,
+							new String[] {localQuery.getName()},
+							localQuery,
+							localQuery.getNameTextRange())
+					);
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Return all the queries, named and named native.
+	 */
+	@SuppressWarnings("unchecked")
+	protected Iterator<OrmQuery> queries() {
+		return new CompositeIterator<OrmQuery>(
+						namedQueries(),
+						namedNativeQueries()
+				);
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.resourceQueryContainer.getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmQueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmQueryHint.java
new file mode 100644
index 0000000..ff733e3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmQueryHint.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.QueryHint;
+import org.eclipse.jpt.core.context.orm.OrmQuery;
+import org.eclipse.jpt.core.context.orm.OrmQueryHint;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlQueryHint;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+public class GenericOrmQueryHint extends AbstractOrmXmlContextNode implements OrmQueryHint
+{
+
+	protected String name;
+
+	protected String value;
+
+	protected XmlQueryHint resourceQueryHint;
+	
+	public GenericOrmQueryHint(OrmQuery parent, XmlQueryHint resourceQueryHint) {
+		super(parent);
+		this.initialize(resourceQueryHint);
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String newName) {
+		String oldName = this.name;
+		this.name = newName;
+		this.resourceQueryHint.setName(newName);
+		firePropertyChanged(QueryHint.NAME_PROPERTY, oldName, newName);
+	}
+
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String newValue) {
+		String oldValue = this.value;
+		this.value = newValue;
+		this.resourceQueryHint.setValue(newValue);
+		firePropertyChanged(QueryHint.VALUE_PROPERTY, oldValue, newValue);
+	}
+
+	protected void initialize(XmlQueryHint resourceQueryHint) {
+		this.resourceQueryHint = resourceQueryHint;
+		this.name = resourceQueryHint.getName();
+		this.value = resourceQueryHint.getValue();
+	}
+	
+	public void update(XmlQueryHint resourceQueryHint) {
+		this.resourceQueryHint = resourceQueryHint;
+		this.setName(resourceQueryHint.getName());
+		this.setValue(resourceQueryHint.getValue());
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.resourceQueryHint.getValidationTextRange();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
new file mode 100644
index 0000000..03a9825
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
@@ -0,0 +1,400 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.ReferenceTable;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmReferenceTable;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmTable;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public abstract class GenericOrmReferenceTable
+	extends AbstractOrmTable
+	implements OrmReferenceTable
+{
+	protected OrmJoinColumn defaultJoinColumn;
+
+	protected final Vector<OrmJoinColumn> specifiedJoinColumns = new Vector<OrmJoinColumn>();
+	protected final OrmJoinColumn.Owner joinColumnOwner;
+
+
+	protected GenericOrmReferenceTable(XmlContextNode parent) {
+		super(parent);
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+	}
+
+	protected abstract OrmJoinColumn.Owner buildJoinColumnOwner();
+
+	public void initializeFrom(ReferenceTable oldReferenceTable) {
+		super.initializeFrom(oldReferenceTable);
+		for (Iterator<OrmJoinColumn> stream = oldReferenceTable.specifiedJoinColumns(); stream.hasNext(); ) {
+			this.addSpecifiedJoinColumnFrom(stream.next());
+		}
+	}
+
+	protected void initialize(AbstractXmlReferenceTable xmlReferenceTable) {
+		super.initialize(xmlReferenceTable);
+		this.initializeSpecifiedJoinColumns(xmlReferenceTable);
+		this.initializeDefaultJoinColumn();
+	}
+
+	public void update() {
+		this.update(this.getResourceTable());
+	}
+
+	protected void update(AbstractXmlReferenceTable xmlReferenceTable) {
+		super.update(xmlReferenceTable);
+		this.updateSpecifiedJoinColumns(xmlReferenceTable);
+		this.updateDefaultJoinColumn();
+	}
+
+
+	// ********** AbstractOrmTable implementation **********
+
+	/**
+	 * if the join table is on the "mappedBy" side, it's bogus;
+	 * so don't give it a default schema
+	 */
+	@Override
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	@Override
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+	@Override
+	protected abstract AbstractXmlReferenceTable getResourceTable();
+
+
+	// ********** join columns **********
+
+	public ListIterator<OrmJoinColumn> joinColumns() {
+		return this.hasSpecifiedJoinColumns() ? this.specifiedJoinColumns() : this.defaultJoinColumns();
+	}
+
+	public int joinColumnsSize() {
+		return this.hasSpecifiedJoinColumns() ? this.specifiedJoinColumnsSize() : this.defaultJoinColumnsSize();
+	}
+
+	public void convertDefaultToSpecifiedJoinColumn() {
+		MappingTools.convertReferenceTableDefaultToSpecifiedJoinColumn(this);
+	}
+
+
+	// ********** default join column **********
+
+	public OrmJoinColumn getDefaultJoinColumn() {
+		return this.defaultJoinColumn;
+	}
+
+	protected void setDefaultJoinColumn(OrmJoinColumn defaultJoinColumn) {
+		OrmJoinColumn old = this.defaultJoinColumn;
+		this.defaultJoinColumn = defaultJoinColumn;
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN, old, defaultJoinColumn);
+	}
+
+	protected ListIterator<OrmJoinColumn> defaultJoinColumns() {
+		if (this.defaultJoinColumn != null) {
+			return new SingleElementListIterator<OrmJoinColumn>(this.defaultJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+
+	protected int defaultJoinColumnsSize() {
+		return (this.defaultJoinColumn == null) ? 0 : 1;
+	}
+
+	protected void initializeDefaultJoinColumn() {
+		if (this.shouldBuildDefaultJoinColumn()) {
+			this.defaultJoinColumn = this.buildJoinColumn(null);
+		}
+	}
+
+	protected void updateDefaultJoinColumn() {
+		if (this.shouldBuildDefaultJoinColumn()) {
+			if (this.defaultJoinColumn == null) {
+				this.setDefaultJoinColumn(this.buildJoinColumn(null));
+			} else {
+				this.defaultJoinColumn.update(null);
+			}
+		} else {
+			this.setDefaultJoinColumn(null);
+		}
+	}
+
+	protected boolean shouldBuildDefaultJoinColumn() {
+		return ! this.hasSpecifiedJoinColumns();
+	}
+
+
+	// ********** specified join columns **********
+
+	public ListIterator<OrmJoinColumn> specifiedJoinColumns() {
+		return new CloneListIterator<OrmJoinColumn>(this.specifiedJoinColumns);
+	}
+
+	public int specifiedJoinColumnsSize() {
+		return this.specifiedJoinColumns.size();
+	}
+
+	public boolean hasSpecifiedJoinColumns() {
+		return this.specifiedJoinColumns.size() != 0;
+	}
+
+	protected void addSpecifiedJoinColumnFrom(OrmJoinColumn oldJoinColumn) {
+		OrmJoinColumn newJoinColumn = this.addSpecifiedJoinColumn(this.specifiedJoinColumns.size());
+		newJoinColumn.initializeFrom(oldJoinColumn);
+	}
+
+	public OrmJoinColumn addSpecifiedJoinColumn(int index) {
+		if (this.getResourceTable() == null) {
+			this.addResourceTable();
+		}
+		XmlJoinColumn xmlJoinColumn = OrmFactory.eINSTANCE.createXmlJoinColumn();
+		OrmJoinColumn joinColumn = this.buildJoinColumn(xmlJoinColumn);
+		this.specifiedJoinColumns.add(index, joinColumn);
+		this.getResourceTable().getJoinColumns().add(index, xmlJoinColumn);
+		this.fireItemAdded(SPECIFIED_JOIN_COLUMNS_LIST, index, joinColumn);
+		return joinColumn;
+	}
+
+	protected void addSpecifiedJoinColumn(int index, OrmJoinColumn joinColumn) {
+		this.addItemToList(index, joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+
+	protected void addSpecifiedJoinColumn(OrmJoinColumn joinColumn) {
+		this.addSpecifiedJoinColumn(this.specifiedJoinColumns.size(), joinColumn);
+	}
+
+	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
+		this.removeSpecifiedJoinColumn(this.specifiedJoinColumns.indexOf(joinColumn));
+	}
+
+	public void removeSpecifiedJoinColumn(int index) {
+		OrmJoinColumn removedJoinColumn = this.specifiedJoinColumns.remove(index);
+		if ( ! this.hasSpecifiedJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultJoinColumn = this.buildJoinColumn(null);
+		}
+		this.getResourceTable().getJoinColumns().remove(index);
+		this.fireItemRemoved(SPECIFIED_JOIN_COLUMNS_LIST, index, removedJoinColumn);
+		if (this.defaultJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(DEFAULT_JOIN_COLUMN, null, this.defaultJoinColumn);
+		}
+	}
+
+	protected void removeSpecifiedJoinColumn_(OrmJoinColumn joinColumn) {
+		this.removeItemFromList(joinColumn, this.specifiedJoinColumns, SPECIFIED_JOIN_COLUMNS_LIST);
+	}
+
+	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedJoinColumns, targetIndex, sourceIndex);
+		this.getResourceTable().getJoinColumns().move(targetIndex, sourceIndex);
+		this.fireItemMoved(SPECIFIED_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);
+	}
+
+	public void clearSpecifiedJoinColumns() {
+		this.specifiedJoinColumns.clear();
+		this.defaultJoinColumn = this.buildJoinColumn(null);
+		this.getResourceTable().getJoinColumns().clear();
+		this.fireListCleared(SPECIFIED_JOIN_COLUMNS_LIST);
+		this.firePropertyChanged(DEFAULT_JOIN_COLUMN, null, this.defaultJoinColumn);
+	}
+
+	protected OrmJoinColumn buildJoinColumn(XmlJoinColumn resourceJoinColumn) {
+		return this.buildJoinColumn(resourceJoinColumn, this.joinColumnOwner);
+	}
+
+	protected void initializeSpecifiedJoinColumns(AbstractXmlReferenceTable xmlReferenceTable) {
+		if (xmlReferenceTable != null) {
+			for (XmlJoinColumn xmlJoinColumn : xmlReferenceTable.getJoinColumns()) {
+				this.specifiedJoinColumns.add(this.buildJoinColumn(xmlJoinColumn));
+			}
+		}
+	}
+
+	protected void updateSpecifiedJoinColumns(AbstractXmlReferenceTable xmlReferenceTable) {
+		Iterator<XmlJoinColumn> xmlJoinColumns = this.xmlJoinColumns(xmlReferenceTable);
+
+		for (Iterator<OrmJoinColumn> contextJoinColumns = this.specifiedJoinColumns(); contextJoinColumns.hasNext(); ) {
+			OrmJoinColumn contextJoinColumn = contextJoinColumns.next();
+			if (xmlJoinColumns.hasNext()) {
+				contextJoinColumn.update(xmlJoinColumns.next());
+			} else {
+				this.removeSpecifiedJoinColumn_(contextJoinColumn);
+			}
+		}
+
+		while (xmlJoinColumns.hasNext()) {
+			this.addSpecifiedJoinColumn(this.buildJoinColumn(xmlJoinColumns.next()));
+		}
+	}
+
+	protected Iterator<XmlJoinColumn> xmlJoinColumns(AbstractXmlReferenceTable xmlReferenceTable) {
+		// make a copy of the XML join columns (to prevent ConcurrentModificationException)
+		return (xmlReferenceTable == null) ? EmptyIterator.<XmlJoinColumn>instance()
+			: new CloneIterator<XmlJoinColumn>(xmlReferenceTable.getJoinColumns());
+	}
+
+
+	// ********** misc **********
+
+	protected OrmJoinColumn buildJoinColumn(XmlJoinColumn resourceJoinColumn, OrmJoinColumn.Owner owner) {
+		return this.getXmlContextNodeFactory().buildOrmJoinColumn(this, owner, resourceJoinColumn);
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		boolean continueValidating = true;
+		if (this.shouldValidateAgainstDatabase()) {
+			continueValidating = this.validateAgainstDatabase(messages, reporter);
+		}
+		//join column validation will handle the check for whether to validate against the database
+		//some validation messages are not database specific. If the database validation for the
+		//table fails we will stop there and not validate the join columns at all
+		if (continueValidating) {
+			this.validateJoinColumns(messages, reporter);
+		}
+	}
+	protected abstract boolean shouldValidateAgainstDatabase();
+	
+	protected boolean validateAgainstDatabase(List<IMessage> messages, IReporter reporter) {
+		PersistentAttribute persistentAttribute = this.getPersistentAttribute();
+		if ( ! this.hasResolvedCatalog()) {
+			if (persistentAttribute.isVirtual()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						getVirtualAttributeUnresolvedCatalogMessageId(),
+						new String[] {persistentAttribute.getName(), this.getCatalog(), this.getName()}, 
+						this,
+						this.getCatalogTextRange()
+					)
+				);
+			} else {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						getUnresolvedCatalogMessageId(),
+						new String[] {this.getCatalog(), this.getName()}, 
+						this,
+						this.getCatalogTextRange()
+					)
+				);
+			}
+			return false;
+		}
+
+		if ( ! this.hasResolvedSchema()) {
+			if (persistentAttribute.isVirtual()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						getVirtualAttributeUnresolvedSchemaMessageId(),
+						new String[] {persistentAttribute.getName(), this.getSchema(), this.getName()}, 
+						this,
+						this.getSchemaTextRange()
+					)
+				);
+			} else {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						getUnresolvedSchemaMessageId(),
+						new String[] {this.getSchema(), this.getName()}, 
+						this,
+						this.getSchemaTextRange()
+					)
+				);
+			}
+			return false;
+		}
+		if ( ! this.isResolved()) {
+			if (getName() != null) { //if name is null, the validation will be handled elsewhere, such as the target entity is not defined
+				if (persistentAttribute.isVirtual()) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							getVirtualAttributeUnresolvedNameMessageId(),
+							new String[] {persistentAttribute.getName(), this.getName()}, 
+							this,
+							this.getNameTextRange()
+						)
+					);
+				} 
+				else {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+								IMessage.HIGH_SEVERITY,
+								getUnresolvedNameMessageId(),
+								new String[] {this.getName()}, 
+								this, 
+								this.getNameTextRange())
+						);
+				}
+			}
+			return false;
+		}
+		return true;
+	}
+
+	protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+		this.validateJoinColumns(this.joinColumns(), messages, reporter);		
+	}
+
+	protected void validateJoinColumns(Iterator<OrmJoinColumn> joinColumns, List<IMessage> messages, IReporter reporter) {
+		while (joinColumns.hasNext()) {
+			joinColumns.next().validate(messages, reporter);
+		}
+	}
+	
+	protected abstract String getUnresolvedCatalogMessageId();
+	
+	protected abstract String getUnresolvedSchemaMessageId();
+	
+	protected abstract String getUnresolvedNameMessageId();
+	
+	protected abstract String getVirtualAttributeUnresolvedCatalogMessageId();
+	
+	protected abstract String getVirtualAttributeUnresolvedSchemaMessageId();
+	
+	protected abstract String getVirtualAttributeUnresolvedNameMessageId();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
new file mode 100644
index 0000000..ad7faba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
@@ -0,0 +1,509 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.SecondaryTable;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmBaseJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.context.orm.OrmPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmSecondaryTable;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmTable;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlSecondaryTable;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * orm.xml secondary table
+ */
+public class GenericOrmSecondaryTable
+	extends AbstractOrmTable
+	implements OrmSecondaryTable
+{
+	protected XmlSecondaryTable secondaryTable;
+	
+	protected final Vector<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns = new Vector<OrmPrimaryKeyJoinColumn>();
+	
+	protected OrmPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
+
+	protected final OrmBaseJoinColumn.Owner joinColumnOwner;
+
+
+	public GenericOrmSecondaryTable(OrmEntity parent, XmlSecondaryTable xmlSecondaryTable) {
+		super(parent);
+		this.joinColumnOwner = this.buildJoinColumnOwner();
+		this.initialize(xmlSecondaryTable);
+	}
+	
+	protected OrmBaseJoinColumn.Owner buildJoinColumnOwner() {
+		return new PrimaryKeyJoinColumnOwner();
+	}
+
+	public void initializeFrom(SecondaryTable oldSecondaryTable) {
+		super.initializeFrom(oldSecondaryTable);
+		for (PrimaryKeyJoinColumn oldPkJoinColumn : CollectionTools.iterable(oldSecondaryTable.specifiedPrimaryKeyJoinColumns())) {
+			OrmPrimaryKeyJoinColumn newPkJoinColumn = addSpecifiedPrimaryKeyJoinColumn(specifiedPrimaryKeyJoinColumnsSize());
+			newPkJoinColumn.initializeFrom(oldPkJoinColumn);
+		}
+	}
+	
+	@Override
+	public OrmEntity getParent() {
+		return (OrmEntity) super.getParent();
+	}
+	
+	public OrmEntity getOrmEntity() {
+		return getParent();
+	}
+	
+	public OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn() {
+		return this.defaultPrimaryKeyJoinColumn;
+	}
+	
+	protected void setDefaultPrimaryKeyJoinColumn(OrmPrimaryKeyJoinColumn newPkJoinColumn) {
+		OrmPrimaryKeyJoinColumn oldPkJoinColumn = this.defaultPrimaryKeyJoinColumn;
+		this.defaultPrimaryKeyJoinColumn = newPkJoinColumn;
+		firePropertyChanged(SecondaryTable.DEFAULT_PRIMARY_KEY_JOIN_COLUMN, oldPkJoinColumn, newPkJoinColumn);
+	}
+	
+	public ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns() {
+		return this.containsSpecifiedPrimaryKeyJoinColumns() ? this.specifiedPrimaryKeyJoinColumns() : this.defaultPrimaryKeyJoinColumns();
+	}
+	
+	public int primaryKeyJoinColumnsSize() {
+		return this.containsSpecifiedPrimaryKeyJoinColumns() ? this.specifiedPrimaryKeyJoinColumnsSize() : this.defaultPrimaryKeyJoinColumnsSize();
+	}
+
+	public ListIterator<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns() {
+		return new CloneListIterator<OrmPrimaryKeyJoinColumn>(this.specifiedPrimaryKeyJoinColumns);
+	}
+
+	public int specifiedPrimaryKeyJoinColumnsSize() {
+		return this.specifiedPrimaryKeyJoinColumns.size();
+	}
+	
+	protected ListIterator<OrmPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns() {
+		if (this.defaultPrimaryKeyJoinColumn != null) {
+			return new SingleElementListIterator<OrmPrimaryKeyJoinColumn>(this.defaultPrimaryKeyJoinColumn);
+		}
+		return EmptyListIterator.instance();
+	}
+	
+	protected int defaultPrimaryKeyJoinColumnsSize() {
+		return (this.defaultPrimaryKeyJoinColumn == null) ? 0 : 1;
+	}
+	
+	public boolean containsSpecifiedPrimaryKeyJoinColumns() {
+		return !this.specifiedPrimaryKeyJoinColumns.isEmpty();
+	}	
+
+	public OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index) {
+		OrmPrimaryKeyJoinColumn oldDefaultPkJoinColumn = this.getDefaultPrimaryKeyJoinColumn();
+		if (oldDefaultPkJoinColumn != null) {
+			//null the default join column now if one already exists.
+			//if one does not exist, there is already a specified join column.
+			//Remove it now so that it doesn't get removed during an update and
+			//cause change notifications to be sent to the UI in the wrong order
+			this.defaultPrimaryKeyJoinColumn = null;
+		}
+		XmlPrimaryKeyJoinColumn resourcePkJoinColumn = OrmFactory.eINSTANCE.createXmlPrimaryKeyJoinColumn();
+		OrmPrimaryKeyJoinColumn contextPkJoinColumn = buildPrimaryKeyJoinColumn(resourcePkJoinColumn);
+		this.specifiedPrimaryKeyJoinColumns.add(index, contextPkJoinColumn);
+		this.secondaryTable.getPrimaryKeyJoinColumns().add(index, resourcePkJoinColumn);
+		
+		this.fireItemAdded(SecondaryTable.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, contextPkJoinColumn);
+		if (oldDefaultPkJoinColumn != null) {
+			this.firePropertyChanged(SecondaryTable.DEFAULT_PRIMARY_KEY_JOIN_COLUMN, oldDefaultPkJoinColumn, null);
+		}
+		return contextPkJoinColumn;
+	}
+	
+	protected void addSpecifiedPrimaryKeyJoinColumn(int index, OrmPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		addItemToList(index, primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, SecondaryTable.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	protected void addSpecifiedPrimaryKeyJoinColumn(OrmPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		this.addSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.size(), primaryKeyJoinColumn);
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(PrimaryKeyJoinColumn pkJoinColumn) {
+		this.removeSpecifiedPrimaryKeyJoinColumn(this.specifiedPrimaryKeyJoinColumns.indexOf(pkJoinColumn));
+	}
+	
+	public void removeSpecifiedPrimaryKeyJoinColumn(int index) {
+		OrmPrimaryKeyJoinColumn removedPrimaryKeyJoinColumn = this.specifiedPrimaryKeyJoinColumns.remove(index);
+		if (!containsSpecifiedPrimaryKeyJoinColumns()) {
+			//create the defaultJoinColumn now or this will happen during project update 
+			//after removing the join column from the resource model. That causes problems 
+			//in the UI because the change notifications end up in the wrong order.
+			this.defaultPrimaryKeyJoinColumn = buildPrimaryKeyJoinColumn(null);
+		}
+		this.secondaryTable.getPrimaryKeyJoinColumns().remove(index);
+		fireItemRemoved(SecondaryTable.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, index, removedPrimaryKeyJoinColumn);
+		if (this.defaultPrimaryKeyJoinColumn != null) {
+			//fire change notification if a defaultJoinColumn was created above
+			this.firePropertyChanged(Entity.DEFAULT_PRIMARY_KEY_JOIN_COLUMN, null, this.defaultPrimaryKeyJoinColumn);
+		}
+	}
+
+	protected void removeSpecifiedPrimaryKeyJoinColumn_(OrmPrimaryKeyJoinColumn primaryKeyJoinColumn) {
+		removeItemFromList(primaryKeyJoinColumn, this.specifiedPrimaryKeyJoinColumns, SecondaryTable.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST);
+	}
+	
+	public void moveSpecifiedPrimaryKeyJoinColumn(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.specifiedPrimaryKeyJoinColumns, targetIndex, sourceIndex);
+		this.secondaryTable.getPrimaryKeyJoinColumns().move(targetIndex, sourceIndex);
+		fireItemMoved(SecondaryTable.SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);		
+	}
+
+	
+	public boolean isVirtual() {
+		return getOrmEntity().containsVirtualSecondaryTable(this);
+	}
+	
+	@Override
+	protected XmlSecondaryTable getResourceTable() {
+		return this.secondaryTable;
+	}
+
+	@Override
+	protected XmlSecondaryTable addResourceTable() {
+		//secondaryTables are part of a collection, the secondary-table element will be removed/added
+		//when the XmlSecondaryTable is removed/added to the XmlEntity collection
+		throw new IllegalStateException("resource table is missing"); //$NON-NLS-1$
+	}
+	
+	@Override
+	protected void removeResourceTable() {
+		//secondaryTables are part of a collection, the secondary-table element will be removed/added
+		//when the XmlSecondaryTable is removed/added to the XmlEntity collection
+	}
+
+	protected void initialize(XmlSecondaryTable xst) {
+		this.secondaryTable = xst;
+		super.initialize(xst);
+		this.initializeSpecifiedPrimaryKeyJoinColumns();
+		this.initializeDefaultPrimaryKeyJoinColumn();
+	}
+	
+	protected void initializeSpecifiedPrimaryKeyJoinColumns() {
+		for (XmlPrimaryKeyJoinColumn resourcePkJoinColumn : this.secondaryTable.getPrimaryKeyJoinColumns()) {
+			this.specifiedPrimaryKeyJoinColumns.add(buildPrimaryKeyJoinColumn(resourcePkJoinColumn));
+		}
+	}
+	
+	protected boolean shouldBuildDefaultPrimaryKeyJoinColumn() {
+		return !containsSpecifiedPrimaryKeyJoinColumns();
+	}
+
+	protected void initializeDefaultPrimaryKeyJoinColumn() {
+		if (!shouldBuildDefaultPrimaryKeyJoinColumn()) {
+			return;
+		}
+		this.defaultPrimaryKeyJoinColumn = buildPrimaryKeyJoinColumn(null);
+	}	
+
+	public void update(XmlSecondaryTable xst) {
+		this.secondaryTable = xst;
+		super.update(xst);
+		this.updateSpecifiedPrimaryKeyJoinColumns();
+		this.updateDefaultPrimaryKeyJoinColumn();
+	}
+		
+	protected void updateSpecifiedPrimaryKeyJoinColumns() {
+		// make a copy of the XML PK join columns (to prevent ConcurrentModificationException)
+		Iterator<XmlPrimaryKeyJoinColumn> xmlPkJoinColumns = new CloneIterator<XmlPrimaryKeyJoinColumn>(this.secondaryTable.getPrimaryKeyJoinColumns());
+		
+		for (Iterator<OrmPrimaryKeyJoinColumn> contextPkJoinColumns = this.specifiedPrimaryKeyJoinColumns(); contextPkJoinColumns.hasNext(); ) {
+			OrmPrimaryKeyJoinColumn contextPkJoinColumn = contextPkJoinColumns.next();
+			if (xmlPkJoinColumns.hasNext()) {
+				contextPkJoinColumn.update(xmlPkJoinColumns.next());
+			}
+			else {
+				removeSpecifiedPrimaryKeyJoinColumn_(contextPkJoinColumn);
+			}
+		}
+		
+		while (xmlPkJoinColumns.hasNext()) {
+			addSpecifiedPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(xmlPkJoinColumns.next()));
+		}
+	}
+	
+	protected void updateDefaultPrimaryKeyJoinColumn() {
+		if (!shouldBuildDefaultPrimaryKeyJoinColumn()) {
+			setDefaultPrimaryKeyJoinColumn(null);
+			return;
+		}
+		if (getDefaultPrimaryKeyJoinColumn() == null) {
+			this.setDefaultPrimaryKeyJoinColumn(buildPrimaryKeyJoinColumn(null));
+		}
+		else {
+			this.defaultPrimaryKeyJoinColumn.update(null);
+		}
+	}	
+
+	protected OrmPrimaryKeyJoinColumn buildPrimaryKeyJoinColumn(XmlPrimaryKeyJoinColumn resourcePkJoinColumn) {
+		return getXmlContextNodeFactory().buildOrmPrimaryKeyJoinColumn(this, this.joinColumnOwner, resourcePkJoinColumn);
+	}
+
+	/**
+	 * a secondary table doesn't have a default name
+	 */
+	@Override
+	protected String buildDefaultName() {
+		return null;
+	}
+
+	@Override
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+	
+	@Override
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		if (this.connectionProfileIsActive()) {
+			this.validateAgainstDatabase(messages);
+		}
+		for (Iterator<OrmPrimaryKeyJoinColumn> stream = this.primaryKeyJoinColumns(); stream.hasNext(); ) {
+			stream.next().validate(messages, reporter);
+		}
+	}
+
+	protected void validateAgainstDatabase(List<IMessage> messages) {
+		if ( ! this.hasResolvedCatalog()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_CATALOG,
+					new String[] {this.getCatalog(), this.getName()}, 
+					this,
+					this.getCatalogTextRange()
+				)
+			);
+			return;
+		}
+		
+		if ( ! this.hasResolvedSchema()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_SCHEMA,
+					new String[] {this.getSchema(), this.getName()}, 
+					this,
+					this.getSchemaTextRange()
+				)
+			);
+			return;
+		}
+		
+		if ( ! this.isResolved()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.SECONDARY_TABLE_UNRESOLVED_NAME,
+					new String[] {this.getName()}, 
+					this, 
+					this.getNameTextRange()
+				)
+			);
+			return;
+		}
+	}
+
+
+	// ********** pk join column owner adapter **********
+
+	protected class PrimaryKeyJoinColumnOwner
+		implements OrmBaseJoinColumn.Owner
+	{
+		public TypeMapping getTypeMapping() {
+			return GenericOrmSecondaryTable.this.getOrmEntity();
+		}
+
+		public String getDefaultTableName() {
+			return GenericOrmSecondaryTable.this.getName();
+		}
+
+		public Table getDbTable(String tableName) {
+			return GenericOrmSecondaryTable.this.getDbTable();
+		}
+
+		public Table getReferencedColumnDbTable() {
+			return getTypeMapping().getPrimaryDbTable();
+		}
+
+		public int joinColumnsSize() {
+			return GenericOrmSecondaryTable.this.primaryKeyJoinColumnsSize();
+		}
+		
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericOrmSecondaryTable.this.defaultPrimaryKeyJoinColumn == joinColumn;
+		}
+		
+		public String getDefaultColumnName() {
+			if (joinColumnsSize() != 1) {
+				return null;
+			}
+			Entity parentEntity = getOrmEntity().getParentEntity();
+			return (parentEntity == null) ? getOrmEntity().getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
+		}
+		
+		public TextRange getValidationTextRange() {
+			return GenericOrmSecondaryTable.this.getValidationTextRange();
+		}
+
+		protected boolean isSecondaryTableVirtual() {
+			return GenericOrmSecondaryTable.this.isVirtual();
+		}
+
+		protected String getSecondaryTableName() {
+			return GenericOrmSecondaryTable.this.getName();
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (isSecondaryTableVirtual()) {
+				return buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			if (((BaseJoinColumn) column).isVirtual()) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME,
+					new String[] {column.getName(), column.getTable()}, 
+					column, 
+					textRange
+				);				
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getTable()}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {this.getSecondaryTableName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			if (isSecondaryTableVirtual()) {
+				return buildVirtualUnresolvedReferencedColumnNameMessage(column, textRange);
+			}
+			if (column.isVirtual()) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+					new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+					column, 
+					textRange
+				);				
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {this.getSecondaryTableName(), column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isSecondaryTableVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {this.getSecondaryTableName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isSecondaryTableVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {this.getSecondaryTableName()},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java
new file mode 100644
index 0000000..a7805c1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmSequenceGenerator.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+
+/**
+ * 
+ */
+public class GenericOrmSequenceGenerator
+	extends AbstractOrmSequenceGenerator
+{
+
+	public GenericOrmSequenceGenerator(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator) {
+		super(parent, resourceSequenceGenerator);
+	}
+
+	// ********** database stuff **********
+
+	/**
+	 * The JPA spec does not allow a sequence to have a schema.
+	 */
+	@Override
+	protected String getSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	/**
+	 * The JPA spec does not allow a sequence to have a catalog.
+	 */
+	@Override
+	protected String getCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTable.java
new file mode 100644
index 0000000..63fcf35
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTable.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.orm.OrmEntity;
+import org.eclipse.jpt.core.context.orm.OrmTable;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmTable;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.core.resource.orm.XmlTable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * 
+ */
+public class GenericOrmTable
+	extends AbstractOrmTable
+	implements OrmTable
+{
+	protected XmlEntity resourceEntity;
+	
+	public GenericOrmTable(OrmEntity parent) {
+		super(parent);
+	}
+
+	public OrmEntity getOrmEntity() {
+		return (OrmEntity) super.getParent();
+	}
+	
+	@Override
+	protected XmlTable getResourceTable() {
+		return this.resourceEntity.getTable();
+	}
+
+	@Override
+	protected XmlTable addResourceTable() {
+		XmlTable resourceTable = OrmFactory.eINSTANCE.createXmlTable();
+		this.resourceEntity.setTable(resourceTable);
+		return resourceTable;
+	}
+	
+	@Override
+	protected void removeResourceTable() {
+		this.resourceEntity.setTable(null);
+	}
+	
+	public void initialize(XmlEntity xmlEntity) {
+		this.resourceEntity = xmlEntity;
+		this.initialize(this.getResourceTable());
+	}
+	
+	public void update(XmlEntity xmlEntity) {
+		this.resourceEntity = xmlEntity;
+		this.update(this.getResourceTable());
+	}
+
+	@Override
+	protected String buildDefaultName() {
+		return this.getOrmEntity().getDefaultTableName();
+	}
+	
+	@Override
+	protected String buildDefaultSchema() {
+		return this.getOrmEntity().getDefaultSchema();
+	}
+	
+	@Override
+	protected String buildDefaultCatalog() {
+		return this.getOrmEntity().getDefaultCatalog();
+	}
+	
+	//*********** Validation *******************************
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		if (this.connectionProfileIsActive()) {
+			this.validateAgainstDatabase(messages);
+		}
+	}
+
+	protected void validateAgainstDatabase(List<IMessage> messages) {
+		if ( ! this.hasResolvedCatalog()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TABLE_UNRESOLVED_CATALOG,
+					new String[] {this.getCatalog(), this.getName()}, 
+					this,
+					this.getCatalogTextRange()
+				)
+			);
+			return;
+		}
+		
+		if ( ! this.hasResolvedSchema()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TABLE_UNRESOLVED_SCHEMA,
+					new String[] {this.getSchema(), this.getName()}, 
+					this,
+					this.getSchemaTextRange()
+				)
+			);
+			return;
+		}
+		
+		if ( ! this.isResolved()) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.TABLE_UNRESOLVED_NAME,
+					new String[] {this.getName()}, 
+					this, 
+					this.getNameTextRange()
+				)
+			);
+			return;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java
new file mode 100644
index 0000000..f9910b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTableGenerator.java
@@ -0,0 +1,420 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.TableGenerator;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmTableGenerator;
+import org.eclipse.jpt.core.context.orm.OrmUniqueConstraint;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmGenerator;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+/**
+ * 
+ */
+public class GenericOrmTableGenerator
+	extends AbstractOrmGenerator<XmlTableGenerator>
+	implements OrmTableGenerator, UniqueConstraint.Owner
+{
+	protected String specifiedTable;
+	protected String defaultTable;
+
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+
+	protected String specifiedPkColumnName;
+	protected String defaultPkColumnName;
+
+	protected String specifiedValueColumnName;
+	protected String defaultValueColumnName;
+
+	protected String specifiedPkColumnValue;
+	protected String defaultPkColumnValue;
+
+	protected final List<OrmUniqueConstraint> uniqueConstraints;
+
+
+	// ********** constructor **********
+
+	public GenericOrmTableGenerator(XmlContextNode parent, XmlTableGenerator resourceTableGenerator) {
+		super(parent);
+		this.uniqueConstraints = new ArrayList<OrmUniqueConstraint>();
+		this.initialize(resourceTableGenerator);
+	}
+
+	@Override
+	public int getDefaultInitialValue() {
+		return TableGenerator.DEFAULT_INITIAL_VALUE;
+	}
+	
+	// ********** table **********
+
+	public String getTable() {
+		return (this.specifiedTable != null) ? this.specifiedTable : this.defaultTable;
+	}
+
+	public String getSpecifiedTable() {
+		return this.specifiedTable;
+	}
+
+	public void setSpecifiedTable(String table) {
+		String old = this.specifiedTable;
+		this.specifiedTable = table;
+		this.getResourceGenerator().setTable(table);
+		this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
+	}
+	
+	protected void setSpecifiedTable_(String table) {
+		String old = this.specifiedTable;
+		this.specifiedTable = table;
+		this.firePropertyChanged(SPECIFIED_TABLE_PROPERTY, old, table);
+	}
+
+	public String getDefaultTable() {
+		return this.defaultTable;
+	}
+	
+	protected void setDefaultTable(String table) {
+		String old = this.defaultTable;
+		this.defaultTable = table;
+		this.firePropertyChanged(DEFAULT_TABLE_PROPERTY, old, table);
+	}
+
+
+	// ********** schema **********
+
+	@Override
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.getResourceGenerator().setSchema(schema);
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	protected void setSpecifiedSchema_(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+	
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+
+	// ********** catalog **********
+
+	@Override
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.getResourceGenerator().setCatalog(catalog);
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+	
+	protected void setSpecifiedCatalog_(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+	
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+
+	// ********** primary key column name **********
+
+	public String getPkColumnName() {
+		return (this.specifiedPkColumnName != null) ? this.specifiedPkColumnName : this.defaultPkColumnName;
+	}
+
+	public String getSpecifiedPkColumnName() {
+		return this.specifiedPkColumnName;
+	}
+	
+	public void setSpecifiedPkColumnName(String name) {
+		String old = this.specifiedPkColumnName;
+		this.specifiedPkColumnName = name;
+		this.getResourceGenerator().setPkColumnName(name);
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	protected void setSpecifiedPkColumnName_(String name) {
+		String old = this.specifiedPkColumnName;
+		this.specifiedPkColumnName = name;
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	public String getDefaultPkColumnName() {
+		return this.defaultPkColumnName;
+	}
+	
+	protected void setDefaultPkColumnName(String name) {
+		String old = this.defaultPkColumnName;
+		this.defaultPkColumnName = name;
+		this.firePropertyChanged(DEFAULT_PK_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** value column name **********
+
+	public String getValueColumnName() {
+		return (this.specifiedValueColumnName != null) ? this.specifiedValueColumnName : this.defaultValueColumnName;
+	}
+
+	public String getSpecifiedValueColumnName() {
+		return this.specifiedValueColumnName;
+	}
+
+	public void setSpecifiedValueColumnName(String name) {
+		String old = this.specifiedValueColumnName;
+		this.specifiedValueColumnName = name;
+		this.getResourceGenerator().setValueColumnName(name);
+		this.firePropertyChanged(SPECIFIED_VALUE_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	protected void setSpecifiedValueColumnName_(String name) {
+		String old = this.specifiedValueColumnName;
+		this.specifiedValueColumnName = name;
+		this.firePropertyChanged(SPECIFIED_VALUE_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+	public String getDefaultValueColumnName() {
+		return this.defaultValueColumnName;
+	}
+	
+	protected void setDefaultValueColumnName(String name) {
+		String old = this.defaultValueColumnName;
+		this.defaultValueColumnName = name;
+		this.firePropertyChanged(DEFAULT_VALUE_COLUMN_NAME_PROPERTY, old, name);
+	}
+
+
+	// ********** primary key column value **********
+
+	public String getPkColumnValue() {
+		return (this.specifiedPkColumnValue != null) ? this.specifiedPkColumnValue : this.defaultPkColumnValue;
+	}
+
+	public String getSpecifiedPkColumnValue() {
+		return this.specifiedPkColumnValue;
+	}
+
+	public void setSpecifiedPkColumnValue(String value) {
+		String old = this.specifiedPkColumnValue;
+		this.specifiedPkColumnValue = value;
+		this.getResourceGenerator().setPkColumnValue(value);
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_VALUE_PROPERTY, old, value);
+	}
+
+	protected void setSpecifiedPkColumnValue_(String value) {
+		String old = this.specifiedPkColumnValue;
+		this.specifiedPkColumnValue = value;
+		this.firePropertyChanged(SPECIFIED_PK_COLUMN_VALUE_PROPERTY, old, value);
+	}
+
+	public String getDefaultPkColumnValue() {
+		return this.defaultPkColumnValue;
+	}
+	
+	public void setDefaultPkColumnValue(String value) {
+		String old = this.defaultPkColumnValue;
+		this.defaultPkColumnValue = value;
+		this.firePropertyChanged(DEFAULT_PK_COLUMN_VALUE_PROPERTY, old, value);
+	}
+
+
+	// ********** unique constraints **********
+	
+	public ListIterator<OrmUniqueConstraint> uniqueConstraints() {
+		return new CloneListIterator<OrmUniqueConstraint>(this.uniqueConstraints);
+	}
+	
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+	
+	public OrmUniqueConstraint addUniqueConstraint(int index) {
+		XmlUniqueConstraint resourceUC = OrmFactory.eINSTANCE.createXmlUniqueConstraint();
+		OrmUniqueConstraint contextUC = this.buildUniqueConstraint(resourceUC);
+		this.uniqueConstraints.add(index, contextUC);
+		this.getResourceGenerator().getUniqueConstraints().add(index, resourceUC);
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, contextUC);
+		return contextUC;
+	}
+	
+	protected void addUniqueConstraint(int index, OrmUniqueConstraint uniqueConstraint) {
+		this.addItemToList(index, uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+	
+	protected void addUniqueConstraint(OrmUniqueConstraint uniqueConstraint) {
+		this.addUniqueConstraint(this.uniqueConstraints.size(), uniqueConstraint);
+	}
+	
+	public void removeUniqueConstraint(UniqueConstraint uniqueConstraint) {
+		this.removeUniqueConstraint(this.uniqueConstraints.indexOf(uniqueConstraint));
+	}
+	
+	public void removeUniqueConstraint(int index) {
+		OrmUniqueConstraint uniqueConstraint = this.uniqueConstraints.remove(index);
+		this.getResourceGenerator().getUniqueConstraints().remove(index);
+		this.fireItemRemoved(UNIQUE_CONSTRAINTS_LIST, index, uniqueConstraint);
+	}
+	
+	protected void removeUniqueConstraint_(OrmUniqueConstraint uniqueConstraint) {
+		this.removeItemFromList(uniqueConstraint, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+	
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.uniqueConstraints, targetIndex, sourceIndex);
+		this.getResourceGenerator().getUniqueConstraints().move(targetIndex, sourceIndex);
+		this.fireItemMoved(UNIQUE_CONSTRAINTS_LIST, targetIndex, sourceIndex);		
+	}
+
+
+	//******************* UniqueConstraint.Owner implementation ******************
+
+	public Iterator<String> candidateUniqueConstraintColumnNames() {
+		org.eclipse.jpt.db.Table dbTable = this.getDbTable();
+		return (dbTable != null) ? dbTable.getSortedColumnIdentifiers().iterator() : EmptyIterator.<String>instance();
+	}
+
+
+	// ********** resource => context **********
+
+	@Override
+	protected void initialize(XmlTableGenerator xmlTableGenerator) {
+		super.initialize(xmlTableGenerator);
+		this.specifiedTable = xmlTableGenerator.getTable();
+		this.defaultSchema = this.buildDefaultSchema();
+		this.specifiedSchema = xmlTableGenerator.getSchema();
+		this.defaultCatalog = this.buildDefaultCatalog();
+		this.specifiedCatalog = xmlTableGenerator.getCatalog();
+		this.specifiedPkColumnName = xmlTableGenerator.getPkColumnName();
+		this.specifiedValueColumnName = xmlTableGenerator.getValueColumnName();
+		this.specifiedPkColumnValue = xmlTableGenerator.getPkColumnValue();
+		this.initializeUniqueContraints();
+	}
+	
+	protected void initializeUniqueContraints() {
+		if (this.resourceGenerator == null) {
+			return;
+		}
+		for (XmlUniqueConstraint uniqueConstraint : this.resourceGenerator.getUniqueConstraints()) {
+			this.uniqueConstraints.add(this.buildUniqueConstraint(uniqueConstraint));
+		}
+	}
+	
+	@Override
+	public void update(XmlTableGenerator xmlTableGenerator) {
+		super.update(xmlTableGenerator);
+		this.setSpecifiedTable_(xmlTableGenerator.getTable());
+		this.setDefaultSchema(this.buildDefaultSchema());
+		this.setSpecifiedSchema_(xmlTableGenerator.getSchema());
+		this.setDefaultCatalog(this.buildDefaultCatalog());
+		this.setSpecifiedCatalog_(xmlTableGenerator.getCatalog());
+		this.setSpecifiedPkColumnName_(xmlTableGenerator.getPkColumnName());
+		this.setSpecifiedValueColumnName_(xmlTableGenerator.getValueColumnName());
+		this.setSpecifiedPkColumnValue_(xmlTableGenerator.getPkColumnValue());
+		// TODO defaults
+		this.updateUniqueConstraints();
+	}
+	
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+	
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+	protected void updateUniqueConstraints() {
+		Iterator<XmlUniqueConstraint> xmlConstraints = this.xmlUniqueConstraints();
+		
+		for (Iterator<OrmUniqueConstraint> contextConstraints = this.uniqueConstraints(); contextConstraints.hasNext(); ) {
+			OrmUniqueConstraint contextConstraint = contextConstraints.next();
+			if (xmlConstraints.hasNext()) {
+				contextConstraint.update(xmlConstraints.next());
+			}
+			else {
+				this.removeUniqueConstraint_(contextConstraint);
+			}
+		}
+		
+		while (xmlConstraints.hasNext()) {
+			this.addUniqueConstraint(this.buildUniqueConstraint(xmlConstraints.next()));
+		}
+	}
+
+	protected Iterator<XmlUniqueConstraint> xmlUniqueConstraints() {
+		// make a copy of the XML constraints (to prevent ConcurrentModificationException)
+		return (this.resourceGenerator == null) ? EmptyIterator.<XmlUniqueConstraint>instance()
+					: new CloneIterator<XmlUniqueConstraint>(this.resourceGenerator.getUniqueConstraints());
+	}
+
+	protected OrmUniqueConstraint buildUniqueConstraint(XmlUniqueConstraint resourceUniqueConstraint) {
+		return this.getXmlContextNodeFactory().buildOrmUniqueConstraint(this, this, resourceUniqueConstraint);
+	}
+
+
+	// ********** database stuff **********
+
+	public Table getDbTable() {
+		Schema dbSchema = this.getDbSchema();
+		return (dbSchema == null) ? null : dbSchema.getTableForIdentifier(this.getTable());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTemporalConverter.java
new file mode 100644
index 0000000..8adc7a5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTemporalConverter.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.TemporalConverter;
+import org.eclipse.jpt.core.context.TemporalType;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmTemporalConverter extends AbstractOrmXmlContextNode
+	implements TemporalConverter, OrmConverter
+{
+	protected TemporalType temporalType;
+	
+	protected XmlConvertibleMapping resourceConvertibleMapping;
+	
+	public GenericOrmTemporalConverter(OrmAttributeMapping parent, XmlConvertibleMapping resourceConvertableMapping) {
+		super(parent);
+		this.initialize(resourceConvertableMapping);
+	}
+
+	@Override
+	public OrmAttributeMapping getParent() {
+		return (OrmAttributeMapping) super.getParent();
+	}
+
+	public String getType() {
+		return Converter.TEMPORAL_CONVERTER;
+	}
+	
+	public TemporalType getTemporalType() {
+		return this.temporalType;
+	}
+
+	public void setTemporalType(TemporalType newTemporalType) {
+		TemporalType oldTemporalType = this.temporalType;
+		this.temporalType = newTemporalType;
+		this.resourceConvertibleMapping.setTemporal(TemporalType.toOrmResourceModel(newTemporalType));
+		firePropertyChanged(TEMPORAL_TYPE_PROPERTY, oldTemporalType, newTemporalType);
+	}
+	
+	protected void setTemporalType_(TemporalType newTemporalType) {
+		TemporalType oldTemporalType = this.temporalType;
+		this.temporalType = newTemporalType;
+		firePropertyChanged(TEMPORAL_TYPE_PROPERTY, oldTemporalType, newTemporalType);
+	}
+
+	
+	protected void initialize(XmlConvertibleMapping resourceConvertibleMapping) {
+		this.resourceConvertibleMapping = resourceConvertibleMapping;
+		this.temporalType = this.temporalType();
+	}
+	
+	public void update() {		
+		this.setTemporalType_(this.temporalType());
+	}
+	
+	protected TemporalType temporalType() {
+		return TemporalType.fromOrmResourceModel(this.resourceConvertibleMapping.getTemporal());
+	}
+
+	
+	public TextRange getValidationTextRange() {
+		return this.resourceConvertibleMapping.getTemporalTextRange();
+	}
+	
+	public void addToResourceModel() {
+		this.resourceConvertibleMapping.setTemporal(org.eclipse.jpt.core.resource.orm.TemporalType.DATE);
+	}
+	
+	public void removeFromResourceModel() {
+		this.resourceConvertibleMapping.setTemporal(null);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java
new file mode 100644
index 0000000..be02c1f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmTransientMapping.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTransientMapping;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmAttributeMapping;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+
+
+public class GenericOrmTransientMapping
+	extends AbstractOrmAttributeMapping<XmlTransient> 
+	implements OrmTransientMapping
+{
+	
+	public GenericOrmTransientMapping(OrmPersistentAttribute parent, XmlTransient resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmTransientMapping(this);
+	}
+
+	public int getXmlSequence() {
+		return 90;
+	}
+
+	public String getKey() {
+		return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getTransients().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getTransients().remove(this.resourceAttributeMapping);
+	}
+
+	// ********** metamodel **********  
+
+	@Override
+	public MetamodelField getMetamodelField() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java
new file mode 100644
index 0000000..6eb27d5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmUniqueConstraint.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmUniqueConstraint;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+public class GenericOrmUniqueConstraint
+	extends AbstractOrmXmlContextNode
+	implements OrmUniqueConstraint
+{
+	
+	protected final List<String> columnNames;
+	
+	protected XmlUniqueConstraint resourceUniqueConstraint;
+	
+	protected Owner owner;
+	
+	public GenericOrmUniqueConstraint(XmlContextNode parent, Owner owner, XmlUniqueConstraint resourceUniqueConstraint) {
+		super(parent);
+		this.owner = owner;
+		this.columnNames = new ArrayList<String>();
+		this.initialize(resourceUniqueConstraint);
+	}
+	
+	public ListIterator<String> columnNames() {
+		return new CloneListIterator<String>(this.columnNames);
+	}
+
+	public int columnNamesSize() {
+		return this.columnNames.size();
+	}
+
+	public void addColumnName(int index, String columnName) {
+		this.columnNames.add(index, columnName);
+		this.resourceUniqueConstraint.getColumnNames().add(index, columnName);
+		fireItemAdded(COLUMN_NAMES_LIST, index, columnName);		
+	}	
+	
+	protected void addColumnName_(int index, String columnName) {
+		this.addItemToList(index, columnName, this.columnNames, COLUMN_NAMES_LIST);
+	}	
+
+	protected void addColumnName_(String columnName) {
+		this.addItemToList(columnName, this.columnNames, COLUMN_NAMES_LIST);
+	}	
+
+	protected void setColumnName_(int index, String columnName) {
+		this.setItemInList(index, columnName, this.columnNames, COLUMN_NAMES_LIST);
+	}	
+
+	public void removeColumnName(String columnName) {
+		this.removeColumnName(this.columnNames.indexOf(columnName));
+	}
+
+	public void removeColumnName(int index) {
+		String removedColumnName = this.columnNames.remove(index);
+		this.resourceUniqueConstraint.getColumnNames().remove(index);
+		fireItemRemoved(COLUMN_NAMES_LIST, index, removedColumnName);
+	}
+	
+	protected void removeColumnName_(int index) {
+		this.removeItemFromList(index, this.columnNames, COLUMN_NAMES_LIST);
+	}
+
+	public void moveColumnName(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.columnNames, targetIndex, sourceIndex);
+		this.resourceUniqueConstraint.getColumnNames().move(targetIndex, sourceIndex);
+		fireItemMoved(COLUMN_NAMES_LIST, targetIndex, sourceIndex);		
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.resourceUniqueConstraint.getValidationTextRange();
+	}
+	
+	protected void initialize(XmlUniqueConstraint xmlUniqueConstraint) {
+		this.resourceUniqueConstraint = xmlUniqueConstraint;
+		this.initializeColumnNames();
+	}
+	
+	protected void initializeColumnNames() {
+		for (String annotationColumnName : this.resourceUniqueConstraint.getColumnNames()) {
+			this.columnNames.add(annotationColumnName);
+		}
+	}
+	
+	public void update(XmlUniqueConstraint xmlUniqueConstraint) {
+		this.resourceUniqueConstraint = xmlUniqueConstraint;
+		this.updateColumnNames();
+	}
+	
+	protected void updateColumnNames() {
+		int index = 0;
+		for (String xmlColumnName : this.resourceUniqueConstraint.getColumnNames()) {
+			if (this.columnNames.size() > index) {
+				if ( ! this.columnNames.get(index).equals(xmlColumnName)) {
+					this.setColumnName_(index, xmlColumnName);
+				}
+			}
+			else {
+				this.addColumnName_(xmlColumnName);			
+			}
+			index++;
+		}
+		
+		while (index < this.columnNames.size()) {
+			this.removeColumnName_(index);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java
new file mode 100644
index 0000000..0d74de7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmVersionMapping.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmVersionMapping;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+
+
+public class GenericOrmVersionMapping extends AbstractOrmVersionMapping<XmlVersion>
+{
+	
+	public GenericOrmVersionMapping(OrmPersistentAttribute parent, XmlVersion resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmXml.java
new file mode 100644
index 0000000..9b39249
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmXml.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.List;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.MappingFileRoot;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmXml;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * JPA <code>orm.xml</code> file.
+ */
+public class GenericOrmXml
+	extends AbstractOrmXmlContextNode
+	implements OrmXml
+{
+	/**
+	 * If the XML resource's content type changes, the mapping file
+	 * ref will dispose its current mapping file and build a new one.
+	 */
+	protected final JpaXmlResource xmlResource;
+	
+	/**
+	 * The resouce type will only change if the XML file's version changes
+	 * (since, if the content type changes, we get garbage-collected).
+	 */
+	protected JpaResourceType resourceType;
+
+	protected EntityMappings entityMappings;
+
+
+	public GenericOrmXml(MappingFileRef parent, JpaXmlResource xmlResource) {
+		super(parent);
+		this.checkXmlResource(xmlResource);
+		this.xmlResource = xmlResource;
+		this.resourceType = xmlResource.getResourceType();
+
+		XmlEntityMappings xmlEntityMappings = (XmlEntityMappings) xmlResource.getRootObject();
+		if (xmlEntityMappings != null) {
+			this.entityMappings = this.buildEntityMappings(xmlEntityMappings);
+		}
+	}
+
+	protected void checkXmlResource(JpaXmlResource resource) {
+		if (resource == null) {
+			throw new NullPointerException();
+		}
+		if ( ! resource.getContentType().isKindOf(JptCorePlugin.MAPPING_FILE_CONTENT_TYPE)) {
+			throw new IllegalArgumentException("Content type is not 'mapping file': " + resource); //$NON-NLS-1$
+		}
+	}
+
+	// ********** overrides **********
+
+	@Override
+	public MappingFileRef getParent() {
+		return (MappingFileRef) super.getParent();
+	}
+
+	@Override
+	public IResource getResource() {
+		return this.xmlResource.getFile();
+	}
+
+	@Override
+	public JpaResourceType getResourceType() {
+		return this.resourceType;
+	}
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		// isn't actually displayed, so needs no details page
+		return null;
+	}
+
+	public JpaStructureNode getStructureNode(int textOffset) {
+		if ((this.entityMappings != null) && this.entityMappings.containsOffset(textOffset)) {
+			return this.entityMappings.getStructureNode(textOffset);
+		}
+		return this;
+	}
+
+	// never actually selected
+	public TextRange getSelectionTextRange() {
+		return TextRange.Empty.instance();
+	}
+
+	public void dispose() {
+		if (this.entityMappings != null) {
+			this.entityMappings.dispose();
+		}
+		JpaFile jpaFile = getJpaFile();
+		if (jpaFile != null) {
+			jpaFile.removeRootStructureNode(this.xmlResource);
+		}
+	}
+
+	// ********** MappingFile implementation **********
+
+	public JpaXmlResource getXmlResource() {
+		return this.xmlResource;
+	}
+
+	public MappingFileRoot getRoot() {
+		return this.entityMappings;
+	}
+
+	public OrmPersistentType getPersistentType(String name) {
+		return (this.entityMappings == null) ? null : this.entityMappings.getPersistentType(name);
+	}
+
+	// ********** PersistentTypeContainer implementation **********
+
+	/**
+	 * All orm.xml mapping files must be able to generate a static metamodel
+	 * because 1.0 orm.xml files can be referenced from 2.0 persistence.xml
+	 * files.
+	 */
+	public Iterable<? extends PersistentType> getPersistentTypes() {
+		return (this.entityMappings != null) ? this.entityMappings.getPersistentTypes() : EmptyIterable.<JavaPersistentType> instance();
+	}
+
+	// ********** entity mappings **********
+
+	public EntityMappings getEntityMappings() {
+		return this.entityMappings;
+	}
+
+	protected void setEntityMappings(EntityMappings entityMappings) {
+		EntityMappings old = this.entityMappings;
+		this.entityMappings = entityMappings;
+		this.firePropertyChanged(ENTITY_MAPPINGS_PROPERTY, old, entityMappings);
+	}
+
+	protected EntityMappings buildEntityMappings(XmlEntityMappings xmlEntityMappings) {
+		return this.getXmlContextNodeFactory().buildEntityMappings(this, xmlEntityMappings);
+	}
+
+	// ********** updating **********
+
+	public void update() {
+		XmlEntityMappings oldXmlEntityMappings = (this.entityMappings == null) ? null : this.entityMappings.getXmlEntityMappings();
+		XmlEntityMappings newXmlEntityMappings = (XmlEntityMappings) this.xmlResource.getRootObject();
+		JpaResourceType newResourceType = this.xmlResource.getResourceType();
+		
+		// If the old and new xml entity mappings are different instances,
+		// we scrap the old context entity mappings and rebuild. This can
+		// happen when the resource model drastically changes, such as
+		// a cvs checkout or an edit reversion.
+		if ((oldXmlEntityMappings != newXmlEntityMappings)
+				|| (newXmlEntityMappings == null)
+				|| this.valuesAreDifferent(this.resourceType, newResourceType)) {
+			
+			if (this.entityMappings != null) {
+				getJpaFile().removeRootStructureNode(this.xmlResource);
+				this.entityMappings.dispose();
+				setEntityMappings(null);
+			}
+		}
+		
+		this.resourceType = newResourceType;
+		
+		if (newXmlEntityMappings != null) {
+			if (this.entityMappings != null) {
+				this.entityMappings.update();
+			}
+			else {
+				setEntityMappings(buildEntityMappings(newXmlEntityMappings));
+			}
+			
+			this.getJpaFile().addRootStructureNode(this.xmlResource, this.entityMappings);
+		}
+	}
+
+	protected JpaFile getJpaFile() {
+		return this.getJpaFile(this.xmlResource.getFile());
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.entityMappings != null) {
+			this.entityMappings.postUpdate();
+		}
+	}
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange() {
+		return TextRange.Empty.instance();
+	}
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		if (this.entityMappings != null) {
+			this.entityMappings.validate(messages, reporter);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java
new file mode 100644
index 0000000..d6b52f3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmXmlDefinition.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.orm.NullOrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.orm.OrmXmlDefinition;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlDefinition;
+import org.eclipse.jpt.core.internal.context.orm.GenericOrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.internal.context.orm.OrmBasicMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEmbeddableDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEmbeddedIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEmbeddedMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEntityDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmManyToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmManyToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmMappedSuperclassDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmOneToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmOneToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmTransientMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmVersionMappingDefinition;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+
+public class GenericOrmXmlDefinition
+	extends AbstractOrmXmlDefinition
+{
+	// singleton
+	private static final OrmXmlDefinition INSTANCE = 
+			new GenericOrmXmlDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmXmlDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private GenericOrmXmlDefinition() {
+		super();
+	}
+	
+	
+	public EFactory getResourceNodeFactory() {
+		return OrmFactory.eINSTANCE;
+	}
+	
+	@Override
+	protected OrmXmlContextNodeFactory buildContextNodeFactory() {
+		return new GenericOrmXmlContextNodeFactory();
+	}
+	
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.ORM_XML_1_0_RESOURCE_TYPE;
+	}
+	
+	
+	// ********** ORM type mappings **********
+	
+	@Override
+	protected OrmTypeMappingDefinition[] buildOrmTypeMappingDefinitions() {
+		// order should not matter here, but we'll use the same order as for java 
+		// (@see {@link GenericJpaPlatformProvider})
+		return new OrmTypeMappingDefinition[] {
+			OrmEntityDefinition.instance(),
+			OrmEmbeddableDefinition.instance(),
+			OrmMappedSuperclassDefinition.instance()};
+	}
+	
+	
+	// ********** ORM attribute mappings **********
+	
+	@Override
+	protected OrmAttributeMappingDefinition[] buildOrmAttributeMappingDefinitions() {
+		// order should not matter here, but we'll use the same order as for java
+		// (@see {@link GenericJpaPlatformProvider})
+		return new OrmAttributeMappingDefinition[] {
+			OrmTransientMappingDefinition.instance(),
+			OrmIdMappingDefinition.instance(),
+			OrmVersionMappingDefinition.instance(),
+			OrmBasicMappingDefinition.instance(),
+			OrmEmbeddedMappingDefinition.instance(),
+			OrmEmbeddedIdMappingDefinition.instance(),
+			OrmManyToManyMappingDefinition.instance(),
+			OrmManyToOneMappingDefinition.instance(),
+			OrmOneToManyMappingDefinition.instance(),
+			OrmOneToOneMappingDefinition.instance(),
+			NullOrmAttributeMappingDefinition.instance()};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericPersistenceUnitDefaults.java
new file mode 100644
index 0000000..503f5ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericPersistenceUnitDefaults.java
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.orm.PersistenceUnitMetadata;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmPersistenceUnitDefaults2_0;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults;
+import org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Catalog;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.SchemaContainer;
+
+/**
+ * <code>orm.xml</code> file
+ * <br>
+ * <code>persistence-unit-defaults</code> element
+ */
+public class GenericPersistenceUnitDefaults
+	extends AbstractOrmXmlContextNode
+	implements OrmPersistenceUnitDefaults2_0
+{
+	protected AccessType access;
+
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+
+	protected boolean cascadePersist;
+	protected boolean delimitedIdentifiers;
+
+
+	// ********** constructor/initialization **********
+
+	public GenericPersistenceUnitDefaults(PersistenceUnitMetadata parent) {
+		super(parent);
+		XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
+		if (xmlDefaults != null) {
+			this.access = AccessType.fromOrmResourceModel(xmlDefaults.getAccess());
+			this.specifiedCatalog = xmlDefaults.getCatalog();
+			this.specifiedSchema = xmlDefaults.getSchema();
+			this.cascadePersist = xmlDefaults.isCascadePersist();
+			this.delimitedIdentifiers = xmlDefaults.isDelimitedIdentifiers();
+		}
+		this.defaultCatalog = this.getJpaProject().getDefaultCatalog();
+		this.defaultSchema = this.getJpaProject().getDefaultSchema();
+	}
+
+	public boolean resourceExists() {
+		return this.getXmlDefaults() != null;
+	}
+
+	@Override
+	public PersistenceUnitMetadata getParent() {
+		return (PersistenceUnitMetadata) super.getParent();
+	}
+
+	protected XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata() {
+		return this.getParent().getXmlPersistenceUnitMetadata();
+	}
+
+	protected XmlEntityMappings getXmlEntityMappings() {
+		return this.getParent().getXmlEntityMappings();
+	}
+
+	// ********** access **********
+
+	public AccessType getAccess() {
+		return this.access;
+	}
+
+	public void setAccess(AccessType access) {
+		AccessType old = this.access;
+		this.access = access;
+		if (access != old) {
+			XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
+			xmlDefaults.setAccess(AccessType.toOrmResourceModel(access));
+			this.checkXmlDefaults(xmlDefaults);
+			this.firePropertyChanged(ACCESS_PROPERTY, old, access);
+		}
+	}
+
+	protected void setAccess_(AccessType access) {
+		AccessType old = this.access;
+		this.access = access;
+		this.firePropertyChanged(ACCESS_PROPERTY, old, access);
+	}
+
+
+	// ********** schema container **********
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em> catalog),
+	 * then the database probably does not support catalogs; and we need to
+	 * get the schema directly from the database.
+	 */
+	public SchemaContainer getDbSchemaContainer() {
+		String catalog = this.getCatalog();
+		return (catalog != null) ? this.getDbCatalog(catalog) : this.getDatabase();
+	}
+
+
+	// ********** catalog **********
+
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		if (this.attributeValueHasChanged(old, catalog)) {
+			XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
+			xmlDefaults.setCatalog(catalog);
+			this.checkXmlDefaults(xmlDefaults);
+			this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+		}
+	}
+
+	protected void setSpecifiedCatalog_(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		this.firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+	/**
+	 * If we don't have a catalog (i.e. we don't even have a <em>default</em>
+	 * catalog), then the database probably does not support catalogs.
+	 */
+	public Catalog getDbCatalog() {
+		String catalog = this.getCatalog();
+		return (catalog == null) ? null : this.getDbCatalog(catalog);
+	}
+
+
+	// ********** schema **********
+
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		if (this.attributeValueHasChanged(old, schema)) {
+			XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
+			xmlDefaults.setSchema(schema);
+			this.checkXmlDefaults(xmlDefaults);
+			this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+		}
+	}
+
+	protected void setSpecifiedSchema_(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public Schema getDbSchema() {
+		SchemaContainer dbSchemaContainer = this.getDbSchemaContainer();
+		return (dbSchemaContainer == null) ? null : dbSchemaContainer.getSchemaForIdentifier(this.getSchema());
+	}
+
+
+	// ********** cascade persist **********
+
+	public boolean isCascadePersist() {
+		return this.cascadePersist;
+	}
+
+	public void setCascadePersist(boolean cascadePersist) {
+		boolean old = this.cascadePersist;
+		this.cascadePersist = cascadePersist;
+		if (cascadePersist != old) {
+			XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
+			xmlDefaults.setCascadePersist(cascadePersist);
+			this.checkXmlDefaults(xmlDefaults);
+			this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, cascadePersist);
+		}
+	}
+
+	protected void setCascadePersist_(boolean cp) {
+		boolean old = this.cascadePersist;
+		this.cascadePersist = cp;
+		this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, cp);
+	}
+
+
+	// ********** delimited identifiers **********
+
+	public boolean isDelimitedIdentifiers() {
+		return this.delimitedIdentifiers;
+	}
+
+	public void setDelimitedIdentifiers(boolean delimitedIdentifiers) {
+		boolean old = this.delimitedIdentifiers;
+		this.delimitedIdentifiers = delimitedIdentifiers;
+		if (delimitedIdentifiers != old) {
+			XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaultsForUpdate();
+			xmlDefaults.setDelimitedIdentifiers(delimitedIdentifiers);
+			this.checkXmlDefaults(xmlDefaults);
+			this.firePropertyChanged(DELIMITED_IDENTIFIERS_PROPERTY, old, delimitedIdentifiers);
+		}
+	}
+
+	protected void setDelimitedIdentifiers_(boolean di) {
+		boolean old = this.delimitedIdentifiers;
+		this.delimitedIdentifiers = di;
+		this.firePropertyChanged(DELIMITED_IDENTIFIERS_PROPERTY, old, di);
+	}
+
+
+	// ********** behavior **********
+
+	/**
+	 * If the XML does not exist, build it before returning it
+	 */
+	protected XmlPersistenceUnitDefaults getXmlDefaultsForUpdate() {
+		XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
+		return (xmlDefaults != null) ? xmlDefaults : this.buildXmlDefaults();
+	}
+
+	/**
+	 * build the XML defaults and the XML metadata if necessary
+	 */
+	protected XmlPersistenceUnitDefaults buildXmlDefaults() {
+		XmlPersistenceUnitMetadata resourceMetadata = this.getXmlPersistenceUnitMetadata();
+		if (resourceMetadata == null) {
+			resourceMetadata = this.buildXmlPersistenceUnitMetadata();
+			this.getXmlEntityMappings().setPersistenceUnitMetadata(resourceMetadata);
+		}
+		XmlPersistenceUnitDefaults xmlDefaults = OrmFactory.eINSTANCE.createXmlPersistenceUnitDefaults();
+		resourceMetadata.setPersistenceUnitDefaults(xmlDefaults);
+		return xmlDefaults;
+	}
+
+	protected XmlPersistenceUnitMetadata buildXmlPersistenceUnitMetadata() {
+		return this.getParent().buildXmlPersistenceUnitMetadata();
+	}
+
+	/**
+	 * clear the resource defaults and the resource metadata if appropriate
+	 */
+	protected void checkXmlDefaults(XmlPersistenceUnitDefaults xmlDefaults) {
+		if (xmlDefaults.isUnset()) {
+			XmlPersistenceUnitMetadata metadata = this.getXmlEntityMappings().getPersistenceUnitMetadata();
+			metadata.setPersistenceUnitDefaults(null);
+			if (metadata.isUnset()) {
+				this.getXmlEntityMappings().setPersistenceUnitMetadata(null);
+			}
+		}
+	}
+
+	public void update() {
+		XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
+		if (xmlDefaults == null) {
+			this.setAccess_(null);
+			this.setSpecifiedCatalog_(null);
+			this.setSpecifiedSchema_(null);
+			this.setCascadePersist_(false);
+			this.setDelimitedIdentifiers_(false);
+		} else {
+			this.setAccess_(AccessType.fromOrmResourceModel(xmlDefaults.getAccess()));
+			this.setSpecifiedCatalog_(xmlDefaults.getCatalog());
+			this.setSpecifiedSchema_(xmlDefaults.getSchema());
+			this.setCascadePersist_(xmlDefaults.isCascadePersist());
+			this.setDelimitedIdentifiers_(xmlDefaults.isDelimitedIdentifiers());
+		}
+		this.setDefaultCatalog(this.getJpaProject().getDefaultCatalog());
+		this.setDefaultSchema(this.getJpaProject().getDefaultSchema());
+	}
+
+	public TextRange getValidationTextRange() {
+		XmlPersistenceUnitDefaults xmlDefaults = this.getXmlDefaults();
+		return (xmlDefaults != null) ? xmlDefaults.getValidationTextRange() : this.getXmlEntityMappings().getValidationTextRange();
+	}
+
+	protected XmlPersistenceUnitDefaults getXmlDefaults() {
+		XmlPersistenceUnitMetadata metadata = this.getXmlPersistenceUnitMetadata();
+		return (metadata == null) ? null : metadata.getPersistenceUnitDefaults();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericPersistenceUnitMetadata.java
new file mode 100644
index 0000000..1d7f8d7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericPersistenceUnitMetadata.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.EntityMappings;
+import org.eclipse.jpt.core.context.orm.OrmPersistenceUnitDefaults;
+import org.eclipse.jpt.core.context.orm.PersistenceUnitMetadata;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <code>orm.xml</code> file
+ * <br>
+ * <code>persistence-unit-metadata</code> element
+ */
+public class GenericPersistenceUnitMetadata
+	extends AbstractOrmXmlContextNode
+	implements PersistenceUnitMetadata
+{
+	protected boolean xmlMappingMetadataComplete;
+
+	protected final OrmPersistenceUnitDefaults persistenceUnitDefaults;
+
+
+	public GenericPersistenceUnitMetadata(EntityMappings parent) {
+		super(parent);
+		this.xmlMappingMetadataComplete = this.getResourceXmlMappingMetadataComplete();
+		this.persistenceUnitDefaults = this.getXmlContextNodeFactory().buildPersistenceUnitDefaults(this);
+	}
+
+	@Override
+	public EntityMappings getParent() {
+		return (EntityMappings) super.getParent();
+	}
+
+	public XmlEntityMappings getXmlEntityMappings() {
+		return this.getParent().getXmlEntityMappings();
+	}
+
+
+	// ********** persistence unit metadata **********
+
+	public XmlPersistenceUnitMetadata buildXmlPersistenceUnitMetadata() {
+		return EmfTools.create(
+				this.getResourceNodeFactory(),
+				OrmPackage.eINSTANCE.getXmlPersistenceUnitMetadata(),
+				XmlPersistenceUnitMetadata.class
+			);
+	}
+
+	public XmlPersistenceUnitMetadata getXmlPersistenceUnitMetadata() {
+		return this.getXmlEntityMappings().getPersistenceUnitMetadata();
+	}
+
+
+	// ********** XML mapping metadata complete **********
+
+	public boolean isXmlMappingMetadataComplete() {
+		return this.xmlMappingMetadataComplete;
+	}
+
+	public void setXmlMappingMetadataComplete(boolean xmlMappingMetadataComplete) {
+		boolean old = this.xmlMappingMetadataComplete;
+		this.xmlMappingMetadataComplete = xmlMappingMetadataComplete;
+		if (old != xmlMappingMetadataComplete) {
+			XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
+			if (xmlMetadata != null) {
+				xmlMetadata.setXmlMappingMetadataComplete(xmlMappingMetadataComplete);
+				if (xmlMetadata.isUnset()) {
+					this.getXmlEntityMappings().setPersistenceUnitMetadata(null);
+				}
+			}
+			else if (xmlMappingMetadataComplete) {
+				xmlMetadata = this.buildXmlPersistenceUnitMetadata();
+				this.getXmlEntityMappings().setPersistenceUnitMetadata(xmlMetadata);
+				xmlMetadata.setXmlMappingMetadataComplete(xmlMappingMetadataComplete);
+			}
+			this.firePropertyChanged(XML_MAPPING_METADATA_COMPLETE_PROPERTY, old, xmlMappingMetadataComplete);
+		}
+	}
+
+	protected void setXmlMappingMetadataComplete_(boolean xmlMappingMetadataComplete) {
+		boolean old = this.xmlMappingMetadataComplete;
+		this.xmlMappingMetadataComplete = xmlMappingMetadataComplete;
+		this.firePropertyChanged(XML_MAPPING_METADATA_COMPLETE_PROPERTY, old, xmlMappingMetadataComplete);
+	}
+
+	protected boolean getResourceXmlMappingMetadataComplete() {
+		XmlPersistenceUnitMetadata xmlMetadata = this.getXmlPersistenceUnitMetadata();
+		return (xmlMetadata != null) ? xmlMetadata.isXmlMappingMetadataComplete() : false;
+	}
+
+
+	// ********** persistence unit defaults **********
+
+	public OrmPersistenceUnitDefaults getPersistenceUnitDefaults() {
+		return this.persistenceUnitDefaults;
+	}
+
+
+	// ********** miscellaneous **********
+
+	public void update() {
+		this.setXmlMappingMetadataComplete_(this.getResourceXmlMappingMetadataComplete());
+		this.persistenceUnitDefaults.update();
+	}
+
+	public TextRange getValidationTextRange() {
+		if (this.getXmlPersistenceUnitMetadata() != null) {
+			return this.getXmlPersistenceUnitMetadata().getValidationTextRange();
+		}
+		return this.getXmlEntityMappings().getValidationTextRange();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/NullOrmJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/NullOrmJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..96833ee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/NullOrmJoinColumnJoiningStrategy.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+
+public class NullOrmJoinColumnJoiningStrategy 
+	extends AbstractOrmXmlContextNode
+	implements OrmJoinColumnJoiningStrategy
+{
+	
+	protected NullOrmJoinColumnJoiningStrategy(JoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+	}
+	
+	public void initializeFrom(JoinColumnJoiningStrategy oldStrategy) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public JoinColumnEnabledRelationshipReference getParent() {
+		return (JoinColumnEnabledRelationshipReference) super.getParent();
+	}
+	
+	public JoinColumnEnabledRelationshipReference getRelationshipReference() {
+		return this.getParent();
+	}
+	
+	public RelationshipMapping getRelationshipMapping() {
+		return this.getRelationshipReference().getRelationshipMapping();
+	}
+	
+	public void addStrategy() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeStrategy() {
+		//do nothing, no join column to remove
+	}
+	
+	public boolean isTargetForeignKeyRelationship() {
+		return false;
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		return null;
+	}
+
+	// **************** join columns *******************************************
+	
+	public ListIterator<OrmJoinColumn> joinColumns() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public int joinColumnsSize() {
+		throw new UnsupportedOperationException();
+	}
+	
+	
+	// **************** default join column ************************************
+	
+	public OrmJoinColumn getDefaultJoinColumn() {
+		throw new UnsupportedOperationException();
+	}
+
+	// **************** specified join columns *********************************
+	
+	public ListIterator<OrmJoinColumn> specifiedJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+	public int specifiedJoinColumnsSize() {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean hasSpecifiedJoinColumns() {
+		return false;
+	}
+
+	public OrmJoinColumn addSpecifiedJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeSpecifiedJoinColumn(JoinColumn joinColumn) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeSpecifiedJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void moveSpecifiedJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// **************** resource => context ************************************
+	
+	public void update() {
+		//no-op
+	}
+
+	public TextRange getValidationTextRange() {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getColumnTableNotValidDescription() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Table getDbTable(String tableName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Table getReferencedColumnDbTable() {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getTableName() {
+		return null;
+	}
+
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+
+	public boolean tableNameIsInvalid(String tableName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TypeMapping getRelationshipSource() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java
new file mode 100644
index 0000000..cdc8829
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/UnsupportedOrmAttributeMapping.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmAttributeMapping;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+
+/**
+ * This will be used in cases where the java support attribute mapping types
+ * that are not supported by the particular version of the orm.xml file.  For example,
+ * EclipseLink supports variable 1-1 mappings, but the generic orm.xml file does not.
+ */
+public class UnsupportedOrmAttributeMapping 
+	extends AbstractOrmAttributeMapping<XmlNullAttributeMapping>
+{
+
+	public UnsupportedOrmAttributeMapping(OrmPersistentAttribute parent, XmlNullAttributeMapping resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	public int getXmlSequence() {
+		return -1;
+	}
+
+	public void initializeOn(OrmAttributeMapping newMapping) {
+		newMapping.initializeFromOrmAttributeMapping(this);
+	}
+
+	public String getKey() {
+		//this ends up returning the java attribute mapping key
+		return this.resourceAttributeMapping.getMappingKey();
+	}
+	
+	public void addToResourceModel(Attributes resourceAttributes) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ********** metamodel **********  
+
+	@Override
+	public MetamodelField getMetamodelField() {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericClassRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericClassRef.java
new file mode 100644
index 0000000..7b679a0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericClassRef.java
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.persistence.ClassRef;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.PersistenceStructureNodes;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.Tools;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * Context persistence.xml class reference
+ */
+public class GenericClassRef
+	extends AbstractPersistenceXmlContextNode
+	implements ClassRef
+{
+	// this is null for an "implied" class ref
+	protected final XmlJavaClassRef xmlJavaClassRef;
+
+	protected String className;
+
+	protected JavaPersistentType javaPersistentType;
+
+
+	// ********** construction/initialization **********
+
+	/**
+	 * Construct an "specified" class ref; i.e. a class ref with
+	 * an explicit entry in the persistence.xml.
+	 */
+	public GenericClassRef(PersistenceUnit parent, XmlJavaClassRef classRef) {
+		this(parent, classRef, classRef.getJavaClass());
+	}
+
+	/**
+	 * Construct an "implied" class ref; i.e. a class ref without
+	 * an explicit entry in the persistence.xml.
+	 */
+	public GenericClassRef(PersistenceUnit parent, String className) {
+		this(parent, null, className);
+	}
+
+	protected GenericClassRef(PersistenceUnit parent, XmlJavaClassRef classRef, String className) {
+		super(parent);
+		this.xmlJavaClassRef = classRef;
+		this.initialize(className);
+	}
+
+	protected void initialize(String typeName) {
+		this.className = typeName;
+		this.javaPersistentType = this.buildJavaPersistentType();
+	}
+
+	@Override
+	public PersistenceUnit getParent() {
+		return (PersistenceUnit) super.getParent();
+	}
+	
+	public XmlJavaClassRef getResourceClassRef() {
+		return this.xmlJavaClassRef;
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public String getId() {
+		return PersistenceStructureNodes.CLASS_REF_ID;
+	}
+	
+	public JpaStructureNode getStructureNode(int textOffset) {
+		return this;
+	}
+
+	public TextRange getSelectionTextRange() {
+		return this.isVirtual() ? null : this.xmlJavaClassRef.getSelectionTextRange();
+	}
+
+	public void dispose() {
+		if (this.javaPersistentType != null) {
+			this.javaPersistentType.dispose();
+		}
+	}
+
+
+	// ********** PersistentType.Owner implementation **********
+
+	public AccessType getOverridePersistentTypeAccess() {
+		// no access type at this level overrides any local access type specification
+		return null;
+	}
+
+	public AccessType getDefaultPersistentTypeAccess() {
+		return this.getPersistenceUnit().getDefaultAccess();
+	}
+
+
+	// ********** queries **********
+
+	public boolean isFor(String typeName) {
+		return Tools.valuesAreEqual(typeName, this.getJavaClassName());
+	}
+
+	public boolean isVirtual() {
+		return this.xmlJavaClassRef == null;
+	}
+
+	public boolean containsOffset(int textOffset) {
+		return this.isNotVirtual() && this.xmlJavaClassRef.containsOffset(textOffset);
+	}
+
+	protected boolean isNotVirtual() {
+		return ! this.isVirtual();
+	}
+
+
+	// ********** class name **********
+
+	public String getClassName() {
+		return this.className;
+	}
+
+	public void setClassName(String className) {
+		String old = this.className;
+		this.className = className;
+		this.xmlJavaClassRef.setJavaClass(className);
+		this.firePropertyChanged(CLASS_NAME_PROPERTY, old, className);
+	}
+
+	protected void setClassName_(String newClassName) {
+		String old = this.className;
+		this.className = newClassName;
+		this.firePropertyChanged(CLASS_NAME_PROPERTY, old, newClassName);
+	}
+
+	/**
+	 * Nested classes will be qualified with a '$'; the Java name is qualified
+	 * with a '.'. Like <code>className</code>, this can be <code>null</code>.
+	 */
+	protected String getJavaClassName() {
+		return StringTools.stringIsEmpty(this.className) ? null : this.className.replace('$', '.');
+	}
+
+
+	// ********** java persistent type **********
+
+	public JavaPersistentType getJavaPersistentType() {
+		return this.javaPersistentType;
+	}
+
+	protected void setJavaPersistentType(JavaPersistentType javaPersistentType) {
+		JavaPersistentType old = this.javaPersistentType;
+		this.javaPersistentType = javaPersistentType;
+		this.firePropertyChanged(JAVA_PERSISTENT_TYPE_PROPERTY, old, javaPersistentType);
+	}
+
+	protected JavaPersistentType buildJavaPersistentType() {
+		JavaResourcePersistentType jrpt = this.getJavaResourcePersistentType();
+		return (jrpt == null) ? null : this.buildJavaPersistentType(jrpt);
+	}
+
+	protected JavaPersistentType buildJavaPersistentType(JavaResourcePersistentType jrpt) {
+		return this.getJpaFactory().buildJavaPersistentType(this, jrpt);
+	}
+
+	protected void updateJavaPersistentType() {
+		JavaResourcePersistentType jrpt = this.getJavaResourcePersistentType();
+		if (jrpt == null) {
+			if (this.javaPersistentType != null) {
+				this.javaPersistentType.dispose();
+				this.setJavaPersistentType(null);
+			}
+		} else { 
+			if (this.javaPersistentType == null) {
+				this.setJavaPersistentType(this.buildJavaPersistentType(jrpt));
+			} else {
+				this.javaPersistentType.update(jrpt);
+			}
+		}
+	}
+
+	protected JavaResourcePersistentType getJavaResourcePersistentType() {
+		String javaClassName = this.getJavaClassName();
+		return (javaClassName == null) ? null : this.getJpaProject().getJavaResourcePersistentType(javaClassName);
+	}
+
+
+	// ********** updating **********
+
+	public void update() {
+		this.update(this.xmlJavaClassRef.getJavaClass());
+	}
+
+	public void update(String typeName) {
+		this.setClassName_(typeName);
+		this.updateJavaPersistentType();
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.javaPersistentType != null) {
+			this.javaPersistentType.postUpdate();
+		}
+	}
+	
+	// ********** XmlContextNode implementation **********
+
+	public TextRange getValidationTextRange() {
+		return this.isVirtual() ? null : this.xmlJavaClassRef.getValidationTextRange();
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+
+		if (StringTools.stringIsEmpty(this.className)) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_UNIT_UNSPECIFIED_CLASS,
+					this,
+					this.getValidationTextRange()
+				)
+			);
+			return;
+		}
+
+		if (this.javaPersistentType == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_UNIT_NONEXISTENT_CLASS,
+					new String[] {this.getJavaClassName()}, 
+					this, 
+					this.getValidationTextRange()
+				)
+			);
+			return;
+		}
+
+		// 190062 validate Java class only if this is the only reference to it;
+		// i.e. the persistence.xml ref is the only ref - none of the mapping
+		// files reference the same class
+		boolean validateJavaPersistentType = true;
+		for (Iterator<MappingFileRef> stream = this.getPersistenceUnit().mappingFileRefsContaining(this.getJavaClassName()); stream.hasNext(); ) {
+			validateJavaPersistentType = false;
+			MappingFileRef mappingFileRef = stream.next();
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.LOW_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_UNIT_REDUNDANT_CLASS,
+					new String[] {this.getJavaClassName(), mappingFileRef.getFileName()},
+					this,
+					this.getValidationTextRange()
+				)
+			);
+		}
+
+		if (validateJavaPersistentType) {
+			this.validateJavaPersistentType(messages, reporter);
+		}
+	}
+
+	protected void validateJavaPersistentType(List<IMessage> messages, IReporter reporter) {
+		try {
+			this.javaPersistentType.validate(messages, reporter);
+		} catch (Throwable t) {
+			JptCorePlugin.log(t);
+		}
+	}
+
+
+	// ********** misc **********
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getJavaClassName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericJarFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericJarFileRef.java
new file mode 100644
index 0000000..80b33e7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericJarFileRef.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractJarFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
+
+/**
+ * Context JAR file reference (from the persistence unit)
+ */
+public class GenericJarFileRef 
+	extends AbstractJarFileRef
+{
+	public GenericJarFileRef(PersistenceUnit parent, XmlJarFileRef xmlJarFileRef) {
+		super(parent, xmlJarFileRef);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericMappingFileRef.java
new file mode 100644
index 0000000..1b09a7f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericMappingFileRef.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractMappingFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <code>persistence.xml</code> file
+ * <br>
+ * <code>mapping-file</code> element
+ */
+public class GenericMappingFileRef
+	extends AbstractMappingFileRef
+{
+	protected XmlMappingFileRef xmlMappingFileRef;
+
+
+	// ********** construction/initialization **********
+
+	public GenericMappingFileRef(PersistenceUnit parent, XmlMappingFileRef xmlMappingFileRef) {
+		super(parent, xmlMappingFileRef.getFileName());
+		this.xmlMappingFileRef = xmlMappingFileRef;
+	}
+
+
+	// ********** file name **********
+
+	public void setFileName(String fileName) {
+		String old = this.fileName;
+		this.fileName = fileName;
+		this.xmlMappingFileRef.setFileName(fileName);
+		this.firePropertyChanged(FILE_NAME_PROPERTY, old, fileName);
+	}
+
+	protected void setFileName_(String newFileName) {
+		String old = this.fileName;
+		this.fileName = newFileName;
+		this.firePropertyChanged(FILE_NAME_PROPERTY, old, newFileName);
+	}
+
+
+	// ********** MappingFileRef implementation **********
+
+	public void update(XmlMappingFileRef mappingFileRef) {
+		this.xmlMappingFileRef = mappingFileRef;
+		this.setFileName_(mappingFileRef.getFileName());
+		this.update();
+	}
+
+	public boolean isImplied() {
+		return false;
+	}
+
+	public boolean containsOffset(int textOffset) {
+		return this.xmlMappingFileRef.containsOffset(textOffset);
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public TextRange getSelectionTextRange() {
+		return this.xmlMappingFileRef.getSelectionTextRange();
+	}
+
+
+	// ********** XmlContextNode implementation **********
+
+	public TextRange getValidationTextRange() {
+		return this.xmlMappingFileRef.getValidationTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistence.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistence.java
new file mode 100644
index 0000000..38b80c7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistence.java
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.persistence.PersistenceStructureNodes;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.persistence.Persistence2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
+import org.eclipse.jpt.core.resource.persistence.PersistenceFactory;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.SingleElementIterable;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementListIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericPersistence
+	extends AbstractPersistenceXmlContextNode
+	implements Persistence2_0
+{	
+	protected XmlPersistence xmlPersistence;
+	
+	// The implementation here is a single persistence unit, although the API
+	// is for a list. We want to support multiple persistence units someday....
+	protected PersistenceUnit persistenceUnit;
+
+	public GenericPersistence(PersistenceXml parent, XmlPersistence xmlPersistence) {
+		super(parent);
+		this.xmlPersistence = xmlPersistence;
+		this.initializePersistenceUnits();
+	}
+	
+	public String getId() {
+		return PersistenceStructureNodes.PERSISTENCE_ID;
+	}
+	
+	public XmlPersistence getXmlPersistence() {
+		return this.xmlPersistence;
+	}
+	
+	@Override
+	public PersistenceXml getParent() {
+		return (PersistenceXml) super.getParent();
+	}
+	
+	// **************** persistence units **************************************
+	
+	public ListIterator<PersistenceUnit> persistenceUnits() {
+		return (this.persistenceUnit == null) ? EmptyListIterator.<PersistenceUnit>instance() : this.persistenceUnits_();
+	}
+	
+	protected ListIterator<PersistenceUnit> persistenceUnits_() {
+		return new SingleElementListIterator<PersistenceUnit>(this.persistenceUnit);
+	}
+
+	protected Iterable<PersistenceUnit> getPersistenceUnits() {
+		return (this.persistenceUnit == null) ? EmptyIterable.<PersistenceUnit>instance() : this.getPersistenceUnits_();
+	}
+	
+	protected Iterable<PersistenceUnit> getPersistenceUnits_() {
+		return new SingleElementIterable<PersistenceUnit>(this.persistenceUnit);
+	}
+	
+	public int persistenceUnitsSize() {
+		return (this.persistenceUnit == null) ? 0 : 1;
+	}
+	
+	public PersistenceUnit addPersistenceUnit() {
+		return addPersistenceUnit(persistenceUnitsSize());
+	}
+	
+	public PersistenceUnit addPersistenceUnit(int index) {
+		if (index > 0 || this.persistenceUnit != null) {
+			throw new IllegalStateException("This implementation does not support multiple persistence units."); //$NON-NLS-1$
+		}
+		XmlPersistenceUnit xmlPersistenceUnit = PersistenceFactory.eINSTANCE.createXmlPersistenceUnit();
+		this.persistenceUnit = buildPersistenceUnit(xmlPersistenceUnit);
+		this.xmlPersistence.getPersistenceUnits().add(xmlPersistenceUnit);
+		fireItemAdded(PERSISTENCE_UNITS_LIST, index, this.persistenceUnit);
+		return this.persistenceUnit;
+	}
+	
+	public void removePersistenceUnit(PersistenceUnit pu) {
+		if (pu != this.persistenceUnit) {
+			throw new IllegalArgumentException("Invalid persistence unit: " + pu); //$NON-NLS-1$
+		}
+		removePersistenceUnit(0);
+	}
+	
+	public void removePersistenceUnit(int index) {
+		if (index > 0 || this.persistenceUnit == null) {
+			throw new IndexOutOfBoundsException("index: " + index); //$NON-NLS-1$
+		}
+		PersistenceUnit oldPersistenceUnit = this.persistenceUnit;
+		this.persistenceUnit.dispose();
+		this.persistenceUnit = null;
+		this.xmlPersistence.getPersistenceUnits().remove(index);
+		fireItemRemoved(PERSISTENCE_UNITS_LIST, index, oldPersistenceUnit);
+	}
+	
+	protected void addPersistenceUnit_(PersistenceUnit newPersistenceUnit) {
+		this.persistenceUnit = newPersistenceUnit;
+		fireItemAdded(PERSISTENCE_UNITS_LIST, 0, this.persistenceUnit);
+	}
+	
+	protected void removePersistenceUnit_(PersistenceUnit oldPersistenceUnit) {
+		this.persistenceUnit.dispose();
+		this.persistenceUnit = null;
+		fireItemRemoved(PERSISTENCE_UNITS_LIST, 0, oldPersistenceUnit);
+	}
+	
+
+	// **************** metamodel **********************************
+
+	public void initializeMetamodel() {
+		for (PersistenceUnit pu : this.getPersistenceUnits()) {
+			((PersistenceUnit2_0) pu).initializeMetamodel();
+		}
+	}
+
+	public void synchronizeMetamodel() {
+		for (PersistenceUnit pu : this.getPersistenceUnits()) {
+			((PersistenceUnit2_0) pu).synchronizeMetamodel();
+		}
+	}
+
+	public void disposeMetamodel() {
+		for (PersistenceUnit pu : this.getPersistenceUnits()) {
+			((PersistenceUnit2_0) pu).disposeMetamodel();
+		}
+	}
+
+
+	// **************** updating ***********************************************
+	
+	protected void initializePersistenceUnits() {
+		// only adding one here, until we support multiple persistence units
+		if (this.xmlPersistence.getPersistenceUnits().size() > 0) {
+			this.persistenceUnit = buildPersistenceUnit(this.xmlPersistence.getPersistenceUnits().get(0));
+		}
+	}
+	
+	public void update(XmlPersistence persistence) {
+		this.xmlPersistence = persistence;
+		XmlPersistenceUnit xmlPersistenceUnit = null;
+		if (persistence.getPersistenceUnits().size() > 0) {
+			xmlPersistenceUnit = persistence.getPersistenceUnits().get(0);
+		}
+				
+		if (this.persistenceUnit != null) {
+			if (xmlPersistenceUnit != null) {
+				this.persistenceUnit.update(xmlPersistenceUnit);
+			}
+			else {
+				removePersistenceUnit_(this.persistenceUnit);
+			}
+		}
+		else {
+			if (xmlPersistenceUnit != null) {
+				addPersistenceUnit_(buildPersistenceUnit(xmlPersistenceUnit));
+			}
+		}
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.persistenceUnit != null) {
+			this.persistenceUnit.postUpdate();
+		}
+	}
+	
+	protected PersistenceUnit buildPersistenceUnit(XmlPersistenceUnit xmlPersistenceUnit) {
+		return this.getContextNodeFactory().buildPersistenceUnit(this, xmlPersistenceUnit);
+	}
+	
+	
+	// *************************************************************************
+	
+	public JpaStructureNode getStructureNode(int textOffset) {
+		for (PersistenceUnit pu : this.getPersistenceUnits()) {
+			if (pu.containsOffset(textOffset)) {
+				return pu.getStructureNode(textOffset);
+			}
+		}
+		return this;
+	}
+	
+	public boolean containsOffset(int textOffset) {
+		return (this.xmlPersistence == null) ? false : this.xmlPersistence.containsOffset(textOffset);
+	}
+	
+	public TextRange getSelectionTextRange() {
+		return this.xmlPersistence.getSelectionTextRange();
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.xmlPersistence.getValidationTextRange();
+	}
+
+	public void dispose() {
+		for (PersistenceUnit pu : this.getPersistenceUnits()) {
+			pu.dispose();
+		}
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		validateVersion(messages);
+		this.checkForMultiplePersistenceUnits(messages);
+		this.validatePersistenceUnit(messages, reporter);
+	}
+	
+	protected void validateVersion(List<IMessage> messages) {
+		if (! latestDocumentVersion().equals(this.xmlPersistence.getVersion())) {
+			messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.LOW_SEVERITY,
+						JpaValidationMessages.XML_VERSION_NOT_LATEST,
+						this,
+						this.xmlPersistence.getVersionTextRange()));
+		}
+	}
+	
+	protected String latestDocumentVersion() {
+		return getJpaPlatform().getMostRecentSupportedResourceType(
+				JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE).getVersion();
+	}
+	
+	/**
+	 * extraneous persistence units can be
+	 * accessed through the XmlPersistence resource object
+	 */
+	protected void checkForMultiplePersistenceUnits(List<IMessage> messages) {
+		if (this.xmlPersistence.getPersistenceUnits().size() > 1) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.NORMAL_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS,
+					this, 
+					this.getValidationTextRange()
+				)
+			);
+		}
+	}
+	
+	protected void validatePersistenceUnit(List<IMessage> messages, IReporter reporter) {
+		if (this.persistenceUnit == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_NO_PERSISTENCE_UNIT,
+					this, 
+					this.getValidationTextRange()
+				)
+			);
+			return;
+		}
+		this.persistenceUnit.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java
new file mode 100644
index 0000000..f64d46c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceUnit.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnit;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+
+/**
+ * generic persistence-unit
+ */
+public class GenericPersistenceUnit
+	extends AbstractPersistenceUnit
+{
+	public GenericPersistenceUnit(Persistence parent, XmlPersistenceUnit xmlPersistenceUnit) {
+		super(parent, xmlPersistenceUnit);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java
new file mode 100644
index 0000000..b5f4aa8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceUnitProperty.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
+import org.eclipse.jpt.core.resource.persistence.XmlProperty;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Straightforward implementation of the persistence unit property.
+ * Notifies the persistence unit of any changes to the property.
+ */
+public class GenericPersistenceUnitProperty
+	extends AbstractPersistenceXmlContextNode
+	implements PersistenceUnit.Property
+{
+	protected final XmlProperty xmlProperty;
+	protected String name;
+	protected String value;
+
+
+	public GenericPersistenceUnitProperty(PersistenceUnit parent, XmlProperty xmlProperty) {
+		super(parent);
+		this.xmlProperty = xmlProperty;
+		this.name = xmlProperty.getName();
+		this.value = xmlProperty.getValue();
+	}
+
+	@Override
+	public PersistenceUnit getParent() {
+		return (PersistenceUnit) super.getParent();
+	}
+
+	public XmlProperty getXmlProperty() {
+		return this.xmlProperty;
+	}
+	
+	// ********** name **********
+
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		if (attributeValueHasChanged(old, name)) {
+			this.xmlProperty.setName(name);
+			this.firePropertyChanged(NAME_PROPERTY, old, name);
+			getParent().propertyNameChanged(old, this.name, this.value);
+		}
+	}
+
+
+	// ********** value **********
+
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		String old = this.value;
+		this.value = value;
+		if (attributeValueHasChanged(old, value)) {
+			this.xmlProperty.setValue(value);
+			this.firePropertyChanged(VALUE_PROPERTY, old, value);
+			getParent().propertyValueChanged(this.name, value);
+		}
+	}
+
+
+	// ********** updating **********
+
+	public void update() {
+		this.setName(this.xmlProperty.getName());
+		this.setValue(this.xmlProperty.getValue());
+	}
+
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange() {
+		return this.xmlProperty.getValidationTextRange();
+	}
+
+
+	// ********** misc **********
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+		sb.append(" = "); //$NON-NLS-1$
+		sb.append(this.value);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceXml.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceXml.java
new file mode 100644
index 0000000..80d40f7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceXml.java
@@ -0,0 +1,228 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import java.util.List;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JpaStructureNode;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.persistence.Persistence2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceXml2_0;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * context model persistence.xml
+ */
+public class GenericPersistenceXml
+	extends AbstractPersistenceXmlContextNode
+	implements PersistenceXml2_0
+{
+	/**
+	 * If the XML resource's content type changes a new instance of this object will be built 
+	 */
+	protected JpaXmlResource xmlResource;  // never null
+	
+	/**
+	 * The resouce type will only change if the XML file's version changes
+	 * (since, if the content type changes, we get garbage-collected).
+	 */
+	protected JpaResourceType resourceType;
+	
+	protected Persistence persistence;
+	
+	
+	public GenericPersistenceXml(JpaRootContextNode parent, JpaXmlResource resource) {
+		super(parent);
+		if ( ! resource.getContentType().isKindOf(JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
+			throw new IllegalArgumentException("Resource " + resource + " must have persistence xml content type"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		this.xmlResource = resource;
+		if (resource.getRootObject() != null) {
+			this.persistence = this.buildPersistence((XmlPersistence) resource.getRootObject());
+			this.resourceType = resource.getResourceType();
+		}
+	}
+	
+	
+	// ********** XmlFile implementation **********
+	
+	public JpaXmlResource getXmlResource() {
+		return this.xmlResource;
+	}
+	
+	
+	// ********** AbstractJpaNode overrides **********
+	
+	@Override
+	public IResource getResource() {
+		return this.xmlResource.getFile();
+	}
+	
+	
+	// ********** AbstractJpaContextNode overrides **********
+	
+	@Override
+	public JpaResourceType getResourceType() {
+		return this.xmlResource.getResourceType();
+	}
+	
+	
+	// ********** persistence **********
+	
+	public Persistence getPersistence() {
+		return this.persistence;
+	}
+	
+	protected void setPersistence(Persistence persistence) {
+		Persistence old = this.persistence;
+		this.persistence = persistence;
+		this.firePropertyChanged(PERSISTENCE_PROPERTY, old, persistence);
+	}
+	
+	protected Persistence buildPersistence(XmlPersistence xmlPersistence) {
+		return this.getContextNodeFactory().buildPersistence(this, xmlPersistence);
+	}
+	
+	
+	// ********** metamodel **********
+	
+	public void initializeMetamodel() {
+		if (this.persistence != null) {
+			((Persistence2_0) this.persistence).initializeMetamodel();
+		}
+	}
+	
+	public void synchronizeMetamodel() {
+		if (this.persistence != null) {
+			((Persistence2_0) this.persistence).synchronizeMetamodel();
+		}
+	}
+	
+	public void disposeMetamodel() {
+		if (this.persistence != null) {
+			((Persistence2_0) this.persistence).disposeMetamodel();
+		}
+	}
+	
+	
+	// ********** updating **********
+	
+	public void update() {
+		XmlPersistence oldXmlPersistence = (this.persistence == null) ? null : this.persistence.getXmlPersistence();
+		XmlPersistence newXmlPersistence = (XmlPersistence) this.xmlResource.getRootObject();
+		JpaResourceType newResourceType = this.xmlResource.getResourceType();
+		
+		// if the old and new xml persistences are different instances,
+		// we scrap the old and rebuild.  this can happen when the resource
+		// model drastically changes, such as a cvs checkout or an edit reversion
+		if ((oldXmlPersistence != newXmlPersistence) 
+				|| (newXmlPersistence == null) 
+				|| this.valuesAreDifferent(this.resourceType, newResourceType)) {
+			
+			if (this.persistence != null) {
+				getJpaFile().removeRootStructureNode(this.xmlResource);
+				this.persistence.dispose();
+				setPersistence(null);
+			}
+		}
+		
+		this.resourceType = newResourceType;
+		
+		if (newXmlPersistence != null) {
+			if (this.persistence != null) {
+				this.persistence.update(newXmlPersistence);
+			}
+			else {
+				setPersistence(buildPersistence(newXmlPersistence));
+			}
+			
+			this.getJpaFile().addRootStructureNode(this.xmlResource, this.persistence);
+		}
+	}
+	
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		if (this.persistence != null) {
+			this.persistence.postUpdate();
+		}
+	}
+	
+	
+	// ********** JpaStructureNode implementation **********
+	
+	public String getId() {
+		// isn't actually displayed, so needs no details page
+		return null;
+	}
+	
+	public JpaStructureNode getStructureNode(int textOffset) {
+		if (this.persistence.containsOffset(textOffset)) {
+			return this.persistence.getStructureNode(textOffset);
+		}
+		return this;
+	}
+	
+	// never actually selected
+	public TextRange getSelectionTextRange() {
+		return TextRange.Empty.instance();
+	}
+	
+	public void dispose() {
+		if (this.persistence != null) {
+			this.persistence.dispose();
+		}
+		JpaFile jpaFile = getJpaFile();
+		if (jpaFile != null) {
+			jpaFile.removeRootStructureNode(this.xmlResource);
+		}
+	}
+	
+	protected JpaFile getJpaFile() {
+		return this.getJpaFile(this.xmlResource.getFile());
+	}
+	
+	
+	// ********** validation **********
+	
+	// never actually selected
+	public TextRange getValidationTextRange() {
+		return TextRange.Empty.instance();
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		
+		if (this.persistence == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.PERSISTENCE_XML_INVALID_CONTENT,
+					this
+				)
+			);
+			return;
+		}
+		
+		this.persistence.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java
new file mode 100644
index 0000000..1a79b2c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/GenericPersistenceXmlDefinition.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlDefinition;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlDefinition;
+import org.eclipse.jpt.core.internal.context.persistence.GenericPersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.resource.persistence.PersistenceFactory;
+
+public class GenericPersistenceXmlDefinition
+	extends AbstractPersistenceXmlDefinition
+{
+	// singleton
+	private static final PersistenceXmlDefinition INSTANCE = 
+			new GenericPersistenceXmlDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static PersistenceXmlDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private GenericPersistenceXmlDefinition() {
+		super();
+	}
+	
+	
+	public EFactory getResourceNodeFactory() {
+		return PersistenceFactory.eINSTANCE;
+	}
+	
+	@Override
+	protected PersistenceXmlContextNodeFactory buildContextNodeFactory() {
+		return new GenericPersistenceXmlContextNodeFactory();
+	}
+	
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java
new file mode 100644
index 0000000..b7c93ef
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/persistence/ImpliedMappingFileRef.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractMappingFileRef;
+import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Used by the persistence unit for the
+ * <code>META-INF/orm.xml</code> file when it is not explicitly listed
+ * in the <code>persistence.xml</code> file.
+ */
+public class ImpliedMappingFileRef
+	extends AbstractMappingFileRef
+{
+
+	// ********** construction/initialization **********
+
+	public ImpliedMappingFileRef(PersistenceUnit parent, String resourceFileName) {
+		super(parent, resourceFileName);
+	}
+
+
+	// ********** MappingFileRef implementation **********
+
+	public boolean isImplied() {
+		return true;
+	}
+
+	public void setFileName(String fileName) {
+		throw new UnsupportedOperationException("Cannot set an implied mapping file ref's 'fileName': " + fileName); //$NON-NLS-1$
+	}
+
+	public boolean containsOffset(int textOffset) {
+		return false;
+	}
+
+	public void update(XmlMappingFileRef mappingFileRef) {
+		if (mappingFileRef != null) {
+			throw new IllegalArgumentException("an implied mapping file ref's xml mapping file ref must be null: " + mappingFileRef); //$NON-NLS-1$
+		}
+		this.update();
+	}
+
+
+	// ********** JpaStructureNode implementation **********
+
+	public TextRange getSelectionTextRange() {
+		return null;
+	}
+
+
+	// ********** XmlContextNode implementation **********
+
+	public TextRange getValidationTextRange() {
+		return this.getPersistenceUnit().getValidationTextRange();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java
new file mode 100644
index 0000000..2837174
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryAssociationOverride1_0Annotation.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public final class BinaryAssociationOverride1_0Annotation
+	extends BinaryAssociationOverrideAnnotation
+{
+
+	public BinaryAssociationOverride1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryAssociationOverrides1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryAssociationOverrides1_0Annotation.java
new file mode 100644
index 0000000..6648edb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryAssociationOverrides1_0Annotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public final class BinaryAssociationOverrides1_0Annotation
+	extends BinaryAssociationOverridesAnnotation
+{
+
+	public BinaryAssociationOverrides1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	@Override
+	protected NestableAssociationOverrideAnnotation buildAssociationOverride(Object jdtAssociationOverride) {
+		return new BinaryAssociationOverride1_0Annotation(this, (IAnnotation) jdtAssociationOverride);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryNamedQueries1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryNamedQueries1_0Annotation.java
new file mode 100644
index 0000000..5d64351
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryNamedQueries1_0Annotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public final class BinaryNamedQueries1_0Annotation
+	extends BinaryNamedQueriesAnnotation
+{
+	public BinaryNamedQueries1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	@Override
+	protected NamedQueryAnnotation buildNamedQuery(Object jdtQuery) {
+		return new BinaryNamedQuery1_0Annotation(this, (IAnnotation) jdtQuery);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java
new file mode 100644
index 0000000..3ddb035
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinaryNamedQuery1_0Annotation.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public final class BinaryNamedQuery1_0Annotation
+	extends BinaryNamedQueryAnnotation
+{
+
+	public BinaryNamedQuery1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java
new file mode 100644
index 0000000..573dfee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/binary/BinarySequenceGenerator1_0Annotation.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinarySequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+
+/**
+ * javax.persistence.SequenceGenerator
+ */
+public final class BinarySequenceGenerator1_0Annotation
+	extends BinarySequenceGeneratorAnnotation
+{
+
+	public BinarySequenceGenerator1_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
new file mode 100644
index 0000000..6177475
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public final class SourceAssociationOverride1_0Annotation
+	extends SourceAssociationOverrideAnnotation
+{
+
+	// ********** construction/initialization **********
+
+	public SourceAssociationOverride1_0Annotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+	}
+
+	// ********** static methods **********
+
+	public static SourceAssociationOverride1_0Annotation buildAssociationOverride(JavaResourceNode parent, Member member) {
+		return new SourceAssociationOverride1_0Annotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+	}
+
+	static SourceAssociationOverride1_0Annotation buildNestedAssociationOverride(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+		return new SourceAssociationOverride1_0Annotation(parent, member, idaa, annotationAdapter);
+	}
+
+	protected static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(attributeOverridesAdapter, index, JPA.ASSOCIATION_OVERRIDE);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java
new file mode 100644
index 0000000..44bf07b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public final class SourceAssociationOverrides1_0Annotation
+	extends SourceAssociationOverridesAnnotation
+{
+
+	public SourceAssociationOverrides1_0Annotation(JavaResourceNode parent, Member member) {
+		super(parent, member);
+	}
+
+	@Override
+	protected NestableAssociationOverrideAnnotation buildAssociationOverride(int index) {
+		return SourceAssociationOverride1_0Annotation.buildNestedAssociationOverride(this, this.member, index, this.daa);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java
new file mode 100644
index 0000000..6e1de34
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceNamedQuery1_0Annotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public final class SourceNamedQuery1_0Annotation
+	extends SourceNamedQueryAnnotation
+{
+
+	// ********** constructors **********
+	public SourceNamedQuery1_0Annotation(JavaResourceNode parent, Type type) {
+		super(parent, type);
+	}
+	
+	public SourceNamedQuery1_0Annotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, type, daa, annotationAdapter);
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java
new file mode 100644
index 0000000..27ac7f4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceSequenceGenerator1_0Annotation.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa1.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceSequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SequenceGenerator
+ */
+public final class SourceSequenceGenerator1_0Annotation
+	extends SourceSequenceGeneratorAnnotation
+{
+
+	public SourceSequenceGenerator1_0Annotation(JavaResourceNode parent, Member member) {
+		super(parent, member);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java
new file mode 100644
index 0000000..69240f1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaAnnotationDefinitionProvider.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2;
+
+import java.util.List;
+import org.eclipse.jpt.core.JpaAnnotationDefinitionProvider;
+import org.eclipse.jpt.core.internal.AbstractJpaAnnotationDefintionProvider;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.Access2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.AssociationOverride2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.AssociationOverrides2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.Cacheable2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.CollectionTable2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.ElementCollection2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapKeyClass2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapKeyColumn2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapKeyEnumerated2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapKeyJoinColumn2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapKeyJoinColumns2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapKeyTemporal2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.MapsId2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.NamedQueries2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.NamedQuery2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.OrderColumn2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.SequenceGenerator2_0AnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.AttributeOverrideAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.AttributeOverridesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.BasicAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.ColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.DiscriminatorColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.DiscriminatorValueAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EmbeddableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EmbeddedAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EmbeddedIdAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EntityAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.EnumeratedAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.GeneratedValueAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.IdAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.IdClassAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.InheritanceAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.JoinColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.JoinColumnsAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.JoinTableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.LobAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.ManyToManyAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.ManyToOneAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.MapKeyAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.MappedSuperclassAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.NamedNativeQueriesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.NamedNativeQueryAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.OneToManyAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.OneToOneAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.OrderByAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.PrimaryKeyJoinColumnAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.PrimaryKeyJoinColumnsAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.SecondaryTableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.SecondaryTablesAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TableAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TableGeneratorAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TemporalAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.TransientAnnotationDefinition;
+import org.eclipse.jpt.core.internal.resource.java.VersionAnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+
+/**
+ * Support for existing JPA 1.0 annotations, new JPA 2.0 annotations, and 
+ * augmented support for annotations changed from 1.0 to 2.0
+ */
+public class Generic2_0JpaAnnotationDefinitionProvider
+	extends AbstractJpaAnnotationDefintionProvider
+{
+	// singleton
+	private static final JpaAnnotationDefinitionProvider INSTANCE = 
+			new Generic2_0JpaAnnotationDefinitionProvider();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JpaAnnotationDefinitionProvider instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private Generic2_0JpaAnnotationDefinitionProvider() {
+		super();
+	}
+	
+	
+	@Override
+	protected void addTypeAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
+		definitions.add(Access2_0AnnotationDefinition.instance());
+		definitions.add(AssociationOverride2_0AnnotationDefinition.instance());
+		definitions.add(AssociationOverrides2_0AnnotationDefinition.instance());
+		definitions.add(AttributeOverrideAnnotationDefinition.instance());
+		definitions.add(AttributeOverridesAnnotationDefinition.instance());
+		definitions.add(Cacheable2_0AnnotationDefinition.instance());
+		definitions.add(DiscriminatorColumnAnnotationDefinition.instance());
+		definitions.add(DiscriminatorValueAnnotationDefinition.instance());
+		definitions.add(EmbeddableAnnotationDefinition.instance());
+		definitions.add(EntityAnnotationDefinition.instance());
+		definitions.add(IdClassAnnotationDefinition.instance());
+		definitions.add(InheritanceAnnotationDefinition.instance());
+		definitions.add(MappedSuperclassAnnotationDefinition.instance());
+		definitions.add(NamedQuery2_0AnnotationDefinition.instance());
+		definitions.add(NamedQueries2_0AnnotationDefinition.instance());
+		definitions.add(NamedNativeQueryAnnotationDefinition.instance());
+		definitions.add(NamedNativeQueriesAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnsAnnotationDefinition.instance());
+		definitions.add(SecondaryTableAnnotationDefinition.instance());
+		definitions.add(SecondaryTablesAnnotationDefinition.instance());
+		definitions.add(SequenceGenerator2_0AnnotationDefinition.instance());
+		definitions.add(TableAnnotationDefinition.instance());
+		definitions.add(TableGeneratorAnnotationDefinition.instance());		
+	}
+	
+	@Override
+	protected void addTypeMappingAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
+		definitions.add(EmbeddableAnnotationDefinition.instance());
+		definitions.add(EntityAnnotationDefinition.instance());
+		definitions.add(MappedSuperclassAnnotationDefinition.instance());
+	}
+	
+	@Override
+	protected void addAttributeAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
+		definitions.add(Access2_0AnnotationDefinition.instance());
+		definitions.add(AssociationOverride2_0AnnotationDefinition.instance());
+		definitions.add(AssociationOverrides2_0AnnotationDefinition.instance());
+		definitions.add(AttributeOverrideAnnotationDefinition.instance());
+		definitions.add(AttributeOverridesAnnotationDefinition.instance());
+		definitions.add(BasicAnnotationDefinition.instance());
+		definitions.add(CollectionTable2_0AnnotationDefinition.instance());
+		definitions.add(ColumnAnnotationDefinition.instance());
+		definitions.add(ElementCollection2_0AnnotationDefinition.instance());
+		definitions.add(EmbeddedAnnotationDefinition.instance());
+		definitions.add(EmbeddedIdAnnotationDefinition.instance());
+		definitions.add(EnumeratedAnnotationDefinition.instance());
+		definitions.add(GeneratedValueAnnotationDefinition.instance());
+		definitions.add(IdAnnotationDefinition.instance());
+		definitions.add(JoinColumnAnnotationDefinition.instance());
+		definitions.add(JoinColumnsAnnotationDefinition.instance());
+		definitions.add(JoinTableAnnotationDefinition.instance());
+		definitions.add(LobAnnotationDefinition.instance());
+		definitions.add(ManyToManyAnnotationDefinition.instance());
+		definitions.add(ManyToOneAnnotationDefinition.instance());
+		definitions.add(MapsId2_0AnnotationDefinition.instance());
+		definitions.add(MapKeyAnnotationDefinition.instance());
+		definitions.add(MapKeyClass2_0AnnotationDefinition.instance());
+		definitions.add(MapKeyColumn2_0AnnotationDefinition.instance());
+		definitions.add(MapKeyEnumerated2_0AnnotationDefinition.instance());
+		definitions.add(MapKeyJoinColumn2_0AnnotationDefinition.instance());
+		definitions.add(MapKeyJoinColumns2_0AnnotationDefinition.instance());
+		definitions.add(MapKeyTemporal2_0AnnotationDefinition.instance());
+		definitions.add(OneToManyAnnotationDefinition.instance());
+		definitions.add(OneToOneAnnotationDefinition.instance());
+		definitions.add(OrderByAnnotationDefinition.instance());
+		definitions.add(OrderColumn2_0AnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnAnnotationDefinition.instance());
+		definitions.add(PrimaryKeyJoinColumnsAnnotationDefinition.instance());
+		definitions.add(SequenceGenerator2_0AnnotationDefinition.instance());
+		definitions.add(TableGeneratorAnnotationDefinition.instance());
+		definitions.add(TemporalAnnotationDefinition.instance());
+		definitions.add(TransientAnnotationDefinition.instance());
+		definitions.add(VersionAnnotationDefinition.instance());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
new file mode 100644
index 0000000..ac34884
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2;
+
+import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JpaPlatformFactory;
+import org.eclipse.jpt.core.JpaPlatformVariation;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.GenericJpaAnnotationProvider;
+import org.eclipse.jpt.core.internal.GenericJpaPlatform;
+import org.eclipse.jpt.core.internal.GenericJpaPlatformFactory.SimpleVersion;
+
+/**
+ * All the state in the JPA platform should be "static" (i.e. unchanging once
+ * it is initialized).
+ */
+public class Generic2_0JpaPlatformFactory
+	implements JpaPlatformFactory
+{
+	/**
+	 * zero-argument constructor
+	 */
+	public Generic2_0JpaPlatformFactory() {
+		super();
+	}
+	
+	
+	public JpaPlatform buildJpaPlatform(String id) {
+		return new GenericJpaPlatform(
+			id,
+			this.buildJpaVersion(),
+			new GenericJpaFactory2_0(),
+			new GenericJpaAnnotationProvider(Generic2_0JpaAnnotationDefinitionProvider.instance()),
+			Generic2_0JpaPlatformProvider.instance(),
+			this.buildJpaPlatformVariation());
+	}
+	
+	private JpaPlatform.Version buildJpaVersion() {
+		return new SimpleVersion(JptCorePlugin.JPA_FACET_VERSION_2_0);
+	}
+	
+	protected JpaPlatformVariation buildJpaPlatformVariation() {
+		return new JpaPlatformVariation() {
+			//table_per_class inheritance support is optional in the 2.0 spec
+			public Supported getTablePerConcreteClassInheritanceIsSupported() {
+				return Supported.MAYBE;
+			}
+			public boolean isJoinTableOverridable() {
+				return true;
+			}
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaPlatformProvider.java
new file mode 100644
index 0000000..6247e02
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/Generic2_0JpaPlatformProvider.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2;
+
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaPlatformProvider;
+import org.eclipse.jpt.core.JpaResourceModelProvider;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.ResourceDefinition;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.core.internal.AbstractJpaPlatformProvider;
+import org.eclipse.jpt.core.internal.JarResourceModelProvider;
+import org.eclipse.jpt.core.internal.JavaResourceModelProvider;
+import org.eclipse.jpt.core.internal.OrmResourceModelProvider;
+import org.eclipse.jpt.core.internal.PersistenceResourceModelProvider;
+import org.eclipse.jpt.core.internal.context.java.JavaBasicMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEmbeddableDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEmbeddedIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEmbeddedMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaEntityDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaManyToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaManyToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaMappedSuperclassDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaOneToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaOneToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaTransientMappingDefinition;
+import org.eclipse.jpt.core.internal.context.java.JavaVersionMappingDefinition;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmXmlDefinition;
+import org.eclipse.jpt.core.internal.jpa1.context.persistence.GenericPersistenceXmlDefinition;
+import org.eclipse.jpt.core.internal.jpa2.context.java.JavaElementCollectionMappingDefinition2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.JavaIdMappingDefinition2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.orm.GenericOrmXml2_0Definition;
+import org.eclipse.jpt.core.internal.jpa2.context.persistence.Generic2_0PersistenceXmlDefinition;
+
+/**
+ * All the state in the JPA platform should be "static" (i.e. unchanging once
+ * it is initialized).
+ */
+public class Generic2_0JpaPlatformProvider 
+	extends AbstractJpaPlatformProvider
+{
+	public static final String ID = "generic2_0"; //$NON-NLS-1$
+	
+	
+	// singleton
+	private static final JpaPlatformProvider INSTANCE = 
+			new Generic2_0JpaPlatformProvider();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static JpaPlatformProvider instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private Generic2_0JpaPlatformProvider() {
+		super();
+	}
+	
+	
+	// ********** resource models **********
+	
+	public JpaResourceType getMostRecentSupportedResourceType(IContentType contentType) {
+		if (contentType.equals(JptCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) {
+			return JptCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
+		}
+		else if (contentType.equals(JptCorePlugin.JAR_CONTENT_TYPE)) {
+			return JptCorePlugin.JAR_RESOURCE_TYPE;
+		}
+		else if (contentType.equals(JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
+			return JptCorePlugin.PERSISTENCE_XML_2_0_RESOURCE_TYPE;
+		}
+		else if (contentType.equals(JptCorePlugin.ORM_XML_CONTENT_TYPE)) {
+			return JptCorePlugin.ORM_XML_2_0_RESOURCE_TYPE;
+		}
+		else {
+			throw new IllegalArgumentException(contentType.toString());
+		}
+	}
+	
+	@Override
+	protected JpaResourceModelProvider[] buildResourceModelProviders() {
+		// order should not be important here
+		return new JpaResourceModelProvider[] {
+			JavaResourceModelProvider.instance(),
+			JarResourceModelProvider.instance(),
+			PersistenceResourceModelProvider.instance(),
+			OrmResourceModelProvider.instance()};
+	}
+	
+	
+	// ********** Java type mappings **********
+	
+	@Override
+	protected JavaTypeMappingDefinition[] buildNonNullJavaTypeMappingDefinitions() {
+		// order determined by analyzing order that reference implementation (eclipselink) uses
+		return new JavaTypeMappingDefinition[] {
+			JavaEntityDefinition.instance(),
+			JavaEmbeddableDefinition.instance(),
+			JavaMappedSuperclassDefinition.instance()};
+	}
+	
+	
+	// ********** Java attribute mappings **********
+	
+	@Override
+	protected JavaAttributeMappingDefinition[] buildNonNullDefaultJavaAttributeMappingDefinitions() {
+		// order determined by analyzing order that reference implementation (eclipselink) uses
+		return new JavaAttributeMappingDefinition[] {
+			JavaEmbeddedMappingDefinition.instance(),
+			JavaBasicMappingDefinition.instance()};
+	}
+	
+	@Override
+	protected JavaAttributeMappingDefinition[] buildNonNullSpecifiedJavaAttributeMappingDefinitions() {
+		// order determined by analyzing order that reference implementation (eclipselink) uses
+		return new JavaAttributeMappingDefinition[] {
+			JavaTransientMappingDefinition.instance(),
+			JavaElementCollectionMappingDefinition2_0.instance(),
+			JavaIdMappingDefinition2_0.instance(),
+			JavaVersionMappingDefinition.instance(),
+			JavaBasicMappingDefinition.instance(),
+			JavaEmbeddedMappingDefinition.instance(),
+			JavaEmbeddedIdMappingDefinition.instance(),
+			JavaManyToManyMappingDefinition.instance(),
+			JavaManyToOneMappingDefinition.instance(),
+			JavaOneToManyMappingDefinition.instance(),
+			JavaOneToOneMappingDefinition.instance()};
+	}
+	
+	
+	// ********** Mapping Files **********
+	
+	@Override
+	protected ResourceDefinition[] buildResourceDefinitions() {
+		return new ResourceDefinition[] {
+			GenericPersistenceXmlDefinition.instance(),
+			Generic2_0PersistenceXmlDefinition.instance(),
+			GenericOrmXmlDefinition.instance(),
+			GenericOrmXml2_0Definition.instance()};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java
new file mode 100644
index 0000000..7267049
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericJpaDatabaseIdentifierAdapter.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2;
+
+import java.util.Iterator;
+
+import org.eclipse.jpt.core.JpaDataSource;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
+import org.eclipse.jpt.db.DatabaseIdentifierAdapter;
+
+/**
+ * Conversions are determined by the <code>delimited-identifiers</code>
+ * flag in <code>orm.xml</code>.
+ * <p>
+ * Assume we are in a JPA 2.0-compatible project.
+ */
+public class GenericJpaDatabaseIdentifierAdapter
+	implements DatabaseIdentifierAdapter
+{
+	private final JpaDataSource dataSource;
+
+	public GenericJpaDatabaseIdentifierAdapter(JpaDataSource dataSource) {
+		super();
+		this.dataSource = dataSource;
+	}
+
+	/**
+	 * If the flag is set, "identifiers" are treated as "names".
+	 */
+	public String convertIdentifierToName(String identifier, DefaultCallback defaultCallback) {
+		return this.getDefaultDelimitedIdentifiers() ? identifier : defaultCallback.convertIdentifierToName(identifier);
+	}
+
+	/**
+	 * If the flag is set, "names" are treated as "identifiers".
+	 */
+	public String convertNameToIdentifier(String name, DefaultCallback defaultCallback) {
+		return this.getDefaultDelimitedIdentifiers() ? name : defaultCallback.convertNameToIdentifier(name);
+	}
+
+	protected boolean getDefaultDelimitedIdentifiers() {
+		PersistenceUnit2_0 pu = this.getPersistenceUnit();
+		return (pu != null) && pu.getDefaultDelimitedIdentifiers();
+	}
+
+	protected PersistenceUnit2_0 getPersistenceUnit() {
+		Persistence p = this.getPersistence();
+		if (p == null) {
+			return null;
+		}
+		Iterator<PersistenceUnit> units = this.getPersistence().persistenceUnits();
+		return (PersistenceUnit2_0) (units.hasNext() ? units.next() : null);
+	}
+
+	protected Persistence getPersistence() {
+		PersistenceXml pxml = this.getPersistenceXml();
+		return (pxml == null) ? null : pxml.getPersistence();
+	}
+
+	protected PersistenceXml getPersistenceXml() {
+		// TODO this null check can be removed if the data source is moved to the persistence unit;
+		// the root context node can be null during construction;
+		// this shouldn't be a problem since the default-delimiters flag
+		// is recalculated during the initial, post-project construction, "update"
+		JpaRootContextNode rcn = this.dataSource.getJpaProject().getRootContextNode();
+		return (rcn == null) ? null : rcn.getPersistenceXml();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericJpaFactory2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericJpaFactory2_0.java
new file mode 100644
index 0000000..32c814c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericJpaFactory2_0.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JpaProject.Config;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn.Owner;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaEmbeddable;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.context.java.JavaNamedQuery;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.internal.AbstractJpaFactory;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaColumn;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaAssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaCacheable2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaCollectionTable2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaEmbeddable2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaManyToOneMapping2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaNamedQuery2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaOneToManyMapping2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaOneToOneMapping2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaOrderColumn2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaOrphanRemoval2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaPersistentType2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaSequenceGenerator2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.java.VirtualAssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+
+/**
+ * Central class that allows extenders to easily replace implementations of
+ * various Dali interfaces.
+ */
+public class GenericJpaFactory2_0
+	extends AbstractJpaFactory
+{
+	
+	public GenericJpaFactory2_0() {
+		super();
+	}
+		
+	// ********** Core Model **********
+	
+	@Override
+	public JpaProject buildJpaProject(Config config) {
+		if ( ! (config instanceof JpaProject2_0.Config)) {
+			throw new IllegalArgumentException("config must be 2.0-compatible: " + config); //$NON-NLS-1$
+		}
+		return super.buildJpaProject(config);
+	}
+	
+	@Override
+	public MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType sourceType) {
+		return new GenericMetamodelSynchronizer(sourceType);
+	}
+	
+	
+	// ********** Java Context Model **********
+	
+	@Override
+	public JavaPersistentType buildJavaPersistentType(PersistentType.Owner owner, JavaResourcePersistentType jrpt) {
+		return new GenericJavaPersistentType2_0(owner, jrpt);
+	}
+	
+	@Override
+	public JavaPersistentAttribute buildJavaPersistentAttribute(PersistentType parent, JavaResourcePersistentAttribute jrpa) {
+		return new GenericJavaPersistentAttribute2_0(parent, jrpa);
+	}
+	
+	@Override
+	public JavaEmbeddable buildJavaEmbeddable(JavaPersistentType parent) {
+		return new GenericJavaEmbeddable2_0(parent);
+	}
+	
+	@Override
+	public JavaSequenceGenerator buildJavaSequenceGenerator(JavaJpaContextNode parent) {
+		return new GenericJavaSequenceGenerator2_0(parent);
+	}
+	
+	//The 2.0 JPA spec supports association overrides on an embedded mapping while the 1.0 spec did not
+	@Override
+	public JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaEmbeddedMapping2_0 parent, JavaAssociationOverrideContainer.Owner owner) {
+		return new GenericJavaAssociationOverrideContainer(parent, owner);
+	}
+	
+	@Override
+	public JavaAssociationOverrideRelationshipReference buildJavaAssociationOverrideRelationshipReference(JavaAssociationOverride parent) {
+		return new GenericJavaAssociationOverrideRelationshipReference2_0(parent);
+	}
+	
+	@Override
+	public AssociationOverrideAnnotation buildJavaVirtualAssociationOverrideAnnotation(JavaResourcePersistentMember jrpm, String name, JoiningStrategy joiningStrategy) {
+		return new VirtualAssociationOverride2_0Annotation(jrpm, name, joiningStrategy);
+	}
+	
+	@Override
+	public JavaDerivedIdentity2_0 buildJavaDerivedIdentity(JavaSingleRelationshipMapping2_0 parent) {
+		return new GenericJavaDerivedIdentity2_0(parent);
+	}
+	
+	@Override
+	public JavaElementCollectionMapping2_0 buildJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
+		return new GenericJavaElementCollectionMapping2_0(parent);
+	}
+	
+	@Override
+	public JavaCacheable2_0 buildJavaCacheable(JavaCacheableHolder2_0 parent) {
+		return new GenericJavaCacheable2_0(parent);
+	}
+	
+	@Override
+	public JavaOrphanRemovable2_0 buildJavaOrphanRemoval(JavaOrphanRemovalHolder2_0 parent) {
+		return new GenericJavaOrphanRemoval2_0(parent);
+	}
+
+	@Override
+	public JavaNamedQuery buildJavaNamedQuery(JavaJpaContextNode parent) {
+		return new GenericJavaNamedQuery2_0(parent);
+	}
+	
+	@Override
+	public JavaCollectionTable2_0 buildJavaCollectionTable(JavaElementCollectionMapping2_0 parent) {
+		return new GenericJavaCollectionTable2_0(parent);
+	}
+
+	@Override
+	public JavaOrderColumn2_0 buildJavaOrderColumn(JavaOrderable2_0 parent, JavaNamedColumn.Owner owner) {
+		return new GenericJavaOrderColumn2_0(parent, owner);
+	}
+
+	@Override
+	public JavaColumn buildJavaMapKeyColumn(JavaJpaContextNode parent, Owner owner) {
+		return new GenericJavaColumn(parent, owner);
+	}
+	
+	@Override
+	public JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaManyToOneMapping2_0(parent);
+	}
+
+	@Override
+	public JavaOneToManyMapping buildJavaOneToManyMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaOneToManyMapping2_0(parent);
+	}
+
+	@Override
+	public JavaOneToOneMapping buildJavaOneToOneMapping(JavaPersistentAttribute parent) {
+		return new GenericJavaOneToOneMapping2_0(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericMetamodelSynchronizer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericMetamodelSynchronizer.java
new file mode 100644
index 0000000..8dc8d64
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/GenericMetamodelSynchronizer.java
@@ -0,0 +1,432 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.core.jpa2.context.AttributeMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JavaResourcePersistentType2_0;
+import org.eclipse.jpt.core.utility.BodySourceWriter;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.SimpleStack;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+import com.ibm.icu.text.DateFormat;
+import com.ibm.icu.text.SimpleDateFormat;
+
+/**
+ * For now, the "synchronization" is simple brute-force: we generate the source
+ * code and then compare it with what is already present in the file.
+ * If the new source is different, we replace the file contents; otherwise, we
+ * leave the file unchanged.
+ */
+@SuppressWarnings("nls")
+public class GenericMetamodelSynchronizer
+	implements MetamodelSourceType.Synchronizer
+{
+	protected final MetamodelSourceType sourceType;
+
+
+	public GenericMetamodelSynchronizer(MetamodelSourceType sourceType) {
+		super();
+		this.sourceType = sourceType;
+	}
+
+	public IFile getFile() {
+		return (IFile) this.getPackageFragment().getCompilationUnit(this.getFileName()).getResource();
+	}
+
+
+	// ********** synchronize **********
+
+	public void synchronize(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		try {
+			this.synchronize_(memberTypeTree);
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+		}
+	}
+
+	protected void synchronize_(Map<String, Collection<MetamodelSourceType>> memberTypeTree) throws JavaModelException {
+		IPackageFragment pkg = this.getPackageFragment();
+		String fileName = this.getFileName();
+
+		ICompilationUnit compilationUnit = pkg.getCompilationUnit(fileName);
+		if (compilationUnit.exists()) {
+			// overwrite existing file if it has changed (ignoring the timestamp)
+			String newSource = this.buildSource(compilationUnit, memberTypeTree);
+			if (newSource != null) {
+				pkg.createCompilationUnit(fileName, newSource, true, null);  // true=force
+			}
+		} else {
+			// write a new file, creating the package folders if necessary
+			if ( ! pkg.exists()) {
+				this.getSourceFolder().createPackageFragment(pkg.getElementName(), true, null);  // true=force
+			}
+			pkg.createCompilationUnit(fileName, this.buildSource(memberTypeTree), false, null);  // false=no force
+		}
+	}
+
+	/**
+	 * pre-condition: the compilation unit exists
+	 * 
+	 * return null if the old source is not to be replaced
+	 */
+	protected String buildSource(ICompilationUnit compilationUnit, Map<String, Collection<MetamodelSourceType>> memberTypeTree) throws JavaModelException {
+		IFile file = (IFile) compilationUnit.getResource();
+		JavaResourcePersistentType2_0 genType = this.getJpaProject().getGeneratedMetamodelTopLevelType(file);
+		if (genType == null) {
+			return null;  // the file exists, but its source is not a generated metamodel top-level class
+		}
+
+		String oldSource = compilationUnit.getSource();
+		int oldLength = oldSource.length();
+
+		String newSource = this.buildSource(memberTypeTree);
+		int newLength = newSource.length();
+		if (newLength != oldLength) {
+			return newSource;
+		}
+
+		String date = genType.getGeneratedAnnotation().getDate();  // if we get here, this will be non-empty
+		int dateBegin = oldSource.indexOf(date);
+		if (dateBegin == -1) {
+			return null;  // hmmm...
+		}
+		int dateEnd = dateBegin + date.length();
+		if (dateEnd > oldLength) {
+			return null;  // hmmm...
+		}
+
+		if (newSource.regionMatches(0, oldSource, 0, dateBegin) &&
+					newSource.regionMatches(dateEnd, oldSource, dateEnd, oldLength - dateEnd)) {
+			return null;
+		}
+		return newSource;
+	}
+
+
+	// ********** package/file **********
+
+	protected IPackageFragment getPackageFragment() {
+		return this.getSourceFolder().getPackageFragment(this.getPackageName());
+	}
+
+	protected IPackageFragmentRoot getSourceFolder() {
+		return this.getJpaProject().getMetamodelPackageFragmentRoot();
+	}
+
+	protected JpaProject2_0 getJpaProject() {
+		return (JpaProject2_0) this.sourceType.getJpaProject();
+	}
+
+	protected String getPackageName() {
+		return this.buildPackageName(this.sourceType.getName());
+	}
+
+	protected String buildPackageName(String topLevelSourceTypeName) {
+		return this.buildPackageName_(ClassName.getPackageName(topLevelSourceTypeName));
+	}
+
+	// TODO
+	protected String buildPackageName_(String sourcePackageName) {
+		// the default is to store the metamodel class in the same package as the source type
+		return sourcePackageName;
+	}
+
+	protected String getFileName() {
+		return ClassName.getSimpleName(this.getClassName()) + ".java";
+	}
+
+	protected String getClassName() {
+		return this.buildClassName(this.sourceType.getName());
+	}
+
+	protected String buildClassName(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		return this.buildClassName(this.sourceType.getName(), memberTypeTree);
+	}
+
+	protected String buildClassName(String sourceTypeName, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		String current = sourceTypeName;
+		SimpleStack<String> stack = new SimpleStack<String>();
+
+		while (true) {
+			stack.push(ClassName.getSimpleName(current));
+			String declaringTypeName = this.getDeclaringTypeName(current, memberTypeTree);
+			if (declaringTypeName == null) {
+				break;
+			}
+			current = declaringTypeName;
+		}
+
+		StringBuilder sb = new StringBuilder(sourceTypeName.length() + 10);
+		sb.append(this.buildPackageName(current));
+		while ( ! stack.isEmpty()) {
+			sb.append('.');
+			sb.append(this.buildSimpleClassName(stack.pop()));
+		}
+		return sb.toString();
+	}
+
+	protected String buildClassName(String topLevelSourceTypeName) {
+		return this.buildPackageName(topLevelSourceTypeName) + '.' + this.buildSimpleClassName(ClassName.getSimpleName(topLevelSourceTypeName));
+	}
+
+	protected String getSimpleClassName() {
+		return this.buildSimpleClassName(ClassName.getSimpleName(this.sourceType.getName()));
+	}
+
+	// TODO
+	protected String buildSimpleClassName(String simpleSourceTypeName) {
+		// the default is to simply append an underscore to the source type name
+		return simpleSourceTypeName + '_';
+	}
+
+
+	// ********** source code **********
+
+	/**
+	 * build the "body" source first; then build the "package" and "imports" source
+	 * and concatenate the "body" source to it
+	 */
+	protected String buildSource(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		// build the body source first so we can gather up the import statements
+		BodySourceWriter bodySourceWriter = this.buildBodySourceWriter(memberTypeTree);
+
+		StringWriter sw = new StringWriter(bodySourceWriter.getLength() + 2000);
+		PrintWriter pw = new PrintWriter(sw);
+		this.printPackageAndImportsOn(pw, bodySourceWriter);
+		pw.print(bodySourceWriter.getSource());
+		return sw.toString();
+	}
+
+	protected BodySourceWriter buildBodySourceWriter(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		BodySourceWriter pw = new BodySourceWriter(this.getPackageName(), this.getClassName());
+		this.printBodySourceOn(pw, memberTypeTree);
+		return pw;
+	}
+
+	public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		this.printClassDeclarationOn(pw, memberTypeTree);
+		pw.print(" {");
+		pw.println();
+
+		pw.indent();
+			boolean attributesPrinted = this.printAttributesOn(pw);
+			this.printMemberTypesOn(pw, memberTypeTree, attributesPrinted);
+		pw.undent();
+
+		pw.print('}');
+		pw.println();  // EOF
+	}
+
+
+	// ********** class declaration **********
+
+	protected void printClassDeclarationOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		boolean topLevel = this.sourceTypeIsTopLevel(memberTypeTree);
+		if (topLevel) {
+			this.printGeneratedAnnotationOn(pw);
+		}
+		if (this.sourceType.isManaged()) {
+			this.printStaticMetamodelAnnotationOn(pw);
+		}
+
+		pw.print("public ");
+		if ( ! topLevel) {
+			pw.print("static ");
+		}
+		pw.print("class ");
+		pw.print(this.getSimpleClassName());  // this is always the simple name
+		PersistentType superPersistentType = this.sourceType.getSuperPersistentType();
+		if (superPersistentType != null) {
+			pw.print(" extends ");
+			pw.printTypeDeclaration(this.buildClassName(superPersistentType.getName(), memberTypeTree));
+		}
+	}
+
+	/**
+	 * Return whether the source type is a top level type.
+	 * This can be inferred from the specified member type tree.
+	 */
+	protected boolean sourceTypeIsTopLevel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		return this.sourceTypeIsTopLevel(this.sourceType.getName(), memberTypeTree);
+	}
+
+	/**
+	 * Return whether the specified source type is a top level type.
+	 * This can be inferred from the specified member type tree.
+	 */
+	protected boolean sourceTypeIsTopLevel(String sourceTypeName, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		return this.getDeclaringTypeName(sourceTypeName, memberTypeTree) == null;
+	}
+
+	/**
+	 * Return the name of the specified source type's declaring type, as
+	 * implied by the specified member type tree. Return null if the source
+	 * type is a top-level type.
+	 */
+	protected String getDeclaringTypeName(String sourceTypeName, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		int lastPeriod = sourceTypeName.lastIndexOf('.');
+		if (lastPeriod == -1) {
+			return null;  // default package top-level type
+		}
+		String declaringTypeName = sourceTypeName.substring(0, lastPeriod);
+		return (memberTypeTree.get(declaringTypeName) == null) ? null : declaringTypeName;
+	}
+
+	protected void printGeneratedAnnotationOn(BodySourceWriter pw) {
+		pw.printAnnotation("javax.annotation.Generated");
+		pw.print('(');
+		pw.print("value=");
+		pw.printStringLiteral(JavaResourcePersistentType2_0.METAMODEL_GENERATED_ANNOTATION_VALUE);
+		pw.print(", ");
+		pw.print("date=");
+		pw.printStringLiteral(format(new Date()));
+		pw.print(')');
+		pw.println();
+	}
+
+	protected void printStaticMetamodelAnnotationOn(BodySourceWriter pw) {
+		pw.printAnnotation(JPA2_0.STATIC_METAMODEL);
+		pw.print('(');
+		pw.printTypeDeclaration(this.sourceType.getName());
+		pw.print(".class");
+		pw.print(')');
+		pw.println();
+	}
+
+	/**
+	 * {@link SimpleDateFormat} is not thread-safe.
+	 */
+	protected static synchronized String format(Date date) {
+		return DATE_FORMAT.format(date);
+	}
+	/**
+	 * Recommended date format is ISO 8601.
+	 * @see javax.annotation.Generated
+	 */
+	private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
+
+
+	// ********** attributes **********
+
+	/**
+	 * Return whether any attributes were printed.
+	 */
+	protected boolean printAttributesOn(BodySourceWriter pw) {
+		boolean printed = false;
+		for (Iterator<PersistentAttribute> stream = this.sourceType.attributes(); stream.hasNext(); ) {
+			this.printAttributeOn(stream.next(), pw);
+			printed = true;
+		}
+		return printed;
+	}
+
+	protected void printAttributeOn(PersistentAttribute persistentAttribute, BodySourceWriter pw) {
+		AttributeMapping attributeMapping = persistentAttribute.getMapping();
+		if (attributeMapping != null) {  // probably shouldn't be null?
+			this.printAttributeMappingOn(attributeMapping, pw);
+		}
+	}
+
+	protected void printAttributeMappingOn(AttributeMapping attributeMapping, BodySourceWriter pw) {
+		MetamodelField field = ((AttributeMapping2_0) attributeMapping).getMetamodelField();
+		if (field != null) {
+			this.printFieldOn(field, pw);
+		}
+	}
+
+	protected void printFieldOn(MetamodelField field, BodySourceWriter pw) {
+		for (String modifier : field.getModifiers()) {
+			pw.print(modifier);
+			pw.print(' ');
+		}
+		pw.printTypeDeclaration(field.getTypeName());
+		pw.print('<');
+		for (Iterator<String> stream = field.getTypeArgumentNames().iterator(); stream.hasNext(); ) {
+			pw.printTypeDeclaration(stream.next());
+			if (stream.hasNext()) {
+				pw.print(", ");
+			}
+		}
+		pw.print('>');
+		pw.print(' ');
+		pw.print(field.getName());
+		pw.print(';');
+		pw.println();
+	}
+
+
+	// ********** member types **********
+
+	protected void printMemberTypesOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree, boolean attributesPrinted) {
+		Collection<MetamodelSourceType> memberTypes = memberTypeTree.get(this.sourceType.getName());
+		if (memberTypes != null) {
+			if (attributesPrinted) {
+				pw.println();
+			}
+			for (Iterator<MetamodelSourceType> stream = memberTypes.iterator(); stream.hasNext(); ) {
+				stream.next().printBodySourceOn(pw, memberTypeTree);
+				if (stream.hasNext()) {
+					pw.println();
+				}
+			}
+		}
+	}
+
+
+	// ********** package and imports **********
+
+	protected void printPackageAndImportsOn(PrintWriter pw, BodySourceWriter bodySourceWriter) {
+		if (this.getPackageName().length() != 0) {
+			pw.print("package ");
+			pw.print(this.getPackageName());
+			pw.print(';');
+			pw.println();
+			pw.println();
+		}
+
+		for (String import_ : bodySourceWriter.getImports()) {
+			pw.print("import ");
+			pw.print(import_);
+			pw.print(';');
+			pw.println();
+		}
+		pw.println();
+	}
+
+
+	// ********** misc **********
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.sourceType.getName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/SimpleMetamodelField.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/SimpleMetamodelField.java
new file mode 100644
index 0000000..4615c38
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/SimpleMetamodelField.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context;
+
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * Straightforward implementation.
+ */
+public class SimpleMetamodelField
+	implements MetamodelField
+{
+	protected final Iterable<String> modifiers;
+	protected final String typeName;
+	protected final Iterable<String> typeArgumentNames;
+	protected final String name;
+
+	public SimpleMetamodelField(
+			Iterable<String> modifiers,
+			String typeName,
+			Iterable<String> typeArgumentNames,
+			String name
+	) {
+		super();
+		if (modifiers == null) {
+			throw new NullPointerException();
+		}
+		if (typeName == null) {
+			throw new NullPointerException();
+		}
+		if (typeArgumentNames == null) {
+			throw new NullPointerException();
+		}
+		if (name == null) {
+			throw new NullPointerException();
+		}
+		this.modifiers = modifiers;
+		this.typeName = typeName;
+		this.typeArgumentNames = typeArgumentNames;
+		this.name = name;
+	}
+
+	public Iterable<String> getModifiers() {
+		return this.modifiers;
+	}
+
+	public String getTypeName() {
+		return this.typeName;
+	}
+
+	public Iterable<String> getTypeArgumentNames() {
+		return this.typeArgumentNames;
+	}
+
+	public String getName() {
+		return this.name;
+	}
+
+	@Override
+	public int hashCode() {
+		return CollectionTools.hashCode(this.modifiers) ^
+					this.typeName.hashCode() ^
+					CollectionTools.hashCode(this.typeArgumentNames) ^
+					this.name.hashCode();
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if ( ! (o instanceof MetamodelField)) {
+			return false;
+		}
+		MetamodelField other = (MetamodelField) o;
+		return CollectionTools.elementsAreEqual(this.getModifiers(), other.getModifiers()) &&
+					this.getTypeName().equals(other.getTypeName()) &&
+					CollectionTools.elementsAreEqual(this.getTypeArgumentNames(), other.getTypeArgumentNames()) &&
+					this.getName().equals(other.getName());
+	}
+
+	@Override
+	public String toString() {
+		StringBuilder sb = new StringBuilder();
+		for (String modifier : this.modifiers) {
+			sb.append(modifier);
+			sb.append(' ');
+		}
+		sb.append(this.typeName);
+		sb.append('<');
+		for (String typeArgumentName : this.typeArgumentNames) {
+			sb.append(typeArgumentName);
+			sb.append(", "); //$NON-NLS-1$
+		}
+		sb.setLength(sb.length() - 2);
+		sb.append('>');
+		sb.append(' ');
+		sb.append(this.name);
+		return sb.toString();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
new file mode 100644
index 0000000..8736b45
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
@@ -0,0 +1,1684 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.Fetchable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaConverter;
+import org.eclipse.jpt.core.context.java.JavaOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaAttributeMapping;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractJavaElementCollectionMapping2_0
+	extends AbstractJavaAttributeMapping<ElementCollection2_0Annotation>
+	implements JavaElementCollectionMapping2_0
+{
+	protected String specifiedTargetClass;
+	protected String defaultTargetClass;
+	protected String fullyQualifiedTargetClass;
+	protected PersistentType resolvedTargetType;
+	protected Embeddable resolvedTargetEmbeddable;
+	protected Entity resolvedTargetEntity;
+
+	protected FetchType specifiedFetch;
+	
+	protected final JavaOrderable2_0 orderable;
+	
+	protected final JavaCollectionTable2_0 collectionTable;
+
+	protected Type valueType;
+	
+	protected final JavaColumn valueColumn;
+	
+	protected JavaConverter valueConverter;
+
+	protected final JavaConverter nullConverter;
+	
+	protected final JavaAttributeOverrideContainer valueAttributeOverrideContainer;
+	
+	protected final JavaAssociationOverrideContainer valueAssociationOverrideContainer;
+	
+	protected Type keyType;
+	
+	//MapKey is not supported by the spec, so this is only for EclipseLink
+	//In the generic case we can handle this with validation and not showing the UI widgets
+	protected String specifiedMapKey;
+	protected boolean noMapKey = false;
+	protected boolean pkMapKey = false;
+	protected boolean customMapKey = false;
+
+	protected String specifiedMapKeyClass;
+	protected String defaultMapKeyClass;
+	protected String fullyQualifiedMapKeyClass;
+	protected PersistentType resolvedMapKeyType;
+	protected Embeddable resolvedMapKeyEmbeddable;
+	protected Entity resolvedMapKeyEntity;
+
+	protected final JavaColumn mapKeyColumn;
+
+	protected final JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer;
+
+	protected AbstractJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
+		super(parent);
+		this.orderable = getJpaFactory().buildJavaOrderable(this, buildOrderableOwner());
+		this.collectionTable = getJpaFactory().buildJavaCollectionTable(this);
+		this.valueColumn = getJpaFactory().buildJavaColumn(parent, new ValueColumnOwner());
+		this.nullConverter = getJpaFactory().buildJavaNullConverter(this);
+		this.valueConverter = this.nullConverter;
+		this.valueAttributeOverrideContainer = this.getJpaFactory().buildJavaAttributeOverrideContainer(this, new ValueAttributeOverrideContainerOwner());
+		this.valueAssociationOverrideContainer = this.getJpaFactory().buildJavaAssociationOverrideContainer(this, new ValueAssociationOverrideContainerOwner());
+		this.mapKeyColumn = getJpaFactory().buildJavaMapKeyColumn(parent, new MapKeyColumnOwner());
+		this.mapKeyAttributeOverrideContainer = this.getJpaFactory().buildJavaAttributeOverrideContainer(this, new MapKeyAttributeOverrideContainerOwner());
+	}
+
+	@Override
+	protected JpaFactory2_0 getJpaFactory() {
+		return (JpaFactory2_0) super.getJpaFactory();
+	}
+
+	@Override
+	protected void initialize() {
+		super.initialize();
+		this.specifiedFetch = this.getResourceFetch();
+		this.orderable.initialize();
+		this.defaultTargetClass = this.buildDefaultTargetClass();
+		this.specifiedTargetClass = this.getResourceTargetClass();
+		this.fullyQualifiedTargetClass = this.buildFullyQualifiedTargetClass();
+		this.resolvedTargetType = this.buildResolvedTargetType();
+		this.resolvedTargetEmbeddable = this.buildResolvedTargetEmbeddable();
+		this.resolvedTargetEntity = this.buildResolvedTargetEntity();
+		this.initializeCollectionTable();
+		this.initializeValueType();
+		this.initializeValueColumn();
+		this.initializeValueConverter();
+		this.valueAttributeOverrideContainer.initialize(getResourcePersistentAttribute());
+		this.valueAssociationOverrideContainer.initialize(getResourcePersistentAttribute());
+		this.defaultMapKeyClass = this.buildDefaultMapKeyClass();
+		this.specifiedMapKeyClass = this.getResourceMapKeyClass();
+		this.fullyQualifiedMapKeyClass = this.buildFullyQualifiedMapKeyClass();
+		this.resolvedMapKeyType = this.buildResolvedMapKeyType();
+		this.resolvedMapKeyEmbeddable = this.buildResolvedMapKeyEmbeddable();
+		this.resolvedMapKeyEntity = this.buildResolvedMapKeyEntity();
+		this.initializeKeyType();
+		this.initializeMapKey();
+		this.initializeMapKeyColumn();
+		this.mapKeyAttributeOverrideContainer.initialize(getResourcePersistentAttribute());
+	}
+
+	@Override
+	protected void update() {
+		super.update();
+		this.setSpecifiedFetch_(this.getResourceFetch());
+		this.orderable.update();
+		this.setDefaultTargetClass(this.buildDefaultTargetClass());
+		this.setSpecifiedTargetClass_(this.getResourceTargetClass());
+		this.setFullyQualifiedTargetClass(this.buildFullyQualifiedTargetClass());
+		this.resolvedTargetType = this.buildResolvedTargetType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.setResolvedTargetEmbeddable(this.buildResolvedTargetEmbeddable());
+		this.updateCollectionTable();
+		this.updateValueType();
+		this.updateValueColumn();
+		this.updateValueConverter();
+		this.valueAttributeOverrideContainer.update(getResourcePersistentAttribute());
+		this.valueAssociationOverrideContainer.update(getResourcePersistentAttribute());
+		this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
+		this.setSpecifiedMapKeyClass_(this.getResourceMapKeyClass());
+		this.setFullyQualifiedMapKeyClass(this.buildFullyQualifiedMapKeyClass());
+		this.resolvedMapKeyType = this.buildResolvedMapKeyType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.setResolvedMapKeyEmbeddable(this.buildResolvedMapKeyEmbeddable());
+		this.setResolvedMapKeyEntity(this.buildResolvedMapKeyEntity());
+		this.updateKeyType();
+		this.updateMapKey();
+		this.updateMapKeyColumn();
+		this.mapKeyAttributeOverrideContainer.update(getResourcePersistentAttribute());
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		this.valueAssociationOverrideContainer.postUpdate();
+	}
+	
+	public Entity getEntity() {
+		return getTypeMapping().getKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY ? (Entity) getTypeMapping() : null;
+	}
+
+	//************** JavaAttributeMapping implementation ***************
+
+	public String getKey() {
+		return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return ElementCollection2_0Annotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected void addSupportingAnnotationNamesTo(Vector<String> names) {
+		super.addSupportingAnnotationNamesTo(names);
+		names.add(JPA.ASSOCIATION_OVERRIDE);
+		names.add(JPA.ASSOCIATION_OVERRIDES);
+		names.add(JPA.ATTRIBUTE_OVERRIDE);
+		names.add(JPA.ATTRIBUTE_OVERRIDES);
+		names.add(JPA2_0.COLLECTION_TABLE);
+		names.add(JPA.COLUMN);
+		names.add(JPA.ENUMERATED);
+		names.add(JPA.LOB);
+		names.add(JPA.MAP_KEY);
+		names.add(JPA2_0.MAP_KEY_CLASS);
+		names.add(JPA2_0.MAP_KEY_COLUMN);
+		names.add(JPA2_0.MAP_KEY_ENUMERATED);
+		names.add(JPA2_0.MAP_KEY_JOIN_COLUMN);
+		names.add(JPA2_0.MAP_KEY_JOIN_COLUMNS);
+		names.add(JPA2_0.MAP_KEY_TEMPORAL);
+		names.add(JPA.ORDER_BY);
+		names.add(JPA2_0.ORDER_COLUMN);
+		names.add(JPA.TEMPORAL);
+	}
+	
+	// ********** target class **********
+
+	public String getTargetClass() {
+		return (this.specifiedTargetClass != null) ? this.specifiedTargetClass : this.defaultTargetClass;
+	}
+
+	public String getSpecifiedTargetClass() {
+		return this.specifiedTargetClass;
+	}
+
+	public void setSpecifiedTargetClass(String targetClass) {
+		String old = this.specifiedTargetClass;
+		this.specifiedTargetClass = targetClass;
+		this.mappingAnnotation.setTargetClass(targetClass);
+		this.firePropertyChanged(SPECIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	protected void setSpecifiedTargetClass_(String targetClass) {
+		String old = this.specifiedTargetClass;
+		this.specifiedTargetClass = targetClass;
+		this.firePropertyChanged(SPECIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	protected String getResourceTargetClass() {
+		return this.mappingAnnotation.getTargetClass();
+	}
+
+	public String getDefaultTargetClass() {
+		return this.defaultTargetClass;
+	}
+
+	protected void setDefaultTargetClass(String targetClass) {
+		String old = this.defaultTargetClass;
+		this.defaultTargetClass = targetClass;
+		this.firePropertyChanged(DEFAULT_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	protected String buildDefaultTargetClass() {
+		return this.getPersistentAttribute().getMultiReferenceTargetTypeName();
+	}
+
+	public String getFullyQualifiedTargetClass() {
+		return this.fullyQualifiedTargetClass;
+	}
+
+	protected void setFullyQualifiedTargetClass(String targetClass) {
+		String old = this.fullyQualifiedTargetClass;
+		this.fullyQualifiedTargetClass = targetClass;
+		this.firePropertyChanged(FULLY_QUALIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	protected String buildFullyQualifiedTargetClass() {
+		return (this.specifiedTargetClass == null) ?
+			this.defaultTargetClass :
+			this.mappingAnnotation.getFullyQualifiedTargetClassName();
+	}
+
+	public Embeddable getResolvedTargetEmbeddable() {
+		return this.resolvedTargetEmbeddable;
+	}
+
+	protected void setResolvedTargetEmbeddable(Embeddable embeddable) {
+		Embeddable old = this.resolvedTargetEmbeddable;
+		this.resolvedTargetEmbeddable = embeddable;
+		this.firePropertyChanged(RESOLVED_TARGET_EMBEDDABLE_PROPERTY, old, embeddable);
+	}
+
+	public PersistentType getResolvedTargetType() {
+		return this.resolvedTargetType;
+	}
+	
+	protected PersistentType buildResolvedTargetType() {
+		return (this.fullyQualifiedTargetClass == null) ? null : this.getPersistenceUnit().getPersistentType(this.fullyQualifiedTargetClass);
+	}
+
+	protected Embeddable buildResolvedTargetEmbeddable() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	protected Entity buildResolvedTargetEntity() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+
+	public char getTargetClassEnclosingTypeSeparator() {
+		return '.';
+	}
+	
+	// *************** Fetch ***************
+	
+	public FetchType getFetch() {
+		return (this.getSpecifiedFetch() == null) ? this.getDefaultFetch() : this.getSpecifiedFetch();
+	}
+
+	public FetchType getDefaultFetch() {
+		return DEFAULT_FETCH_TYPE;
+	}
+		
+	public FetchType getSpecifiedFetch() {
+		return this.specifiedFetch;
+	}
+	
+	public void setSpecifiedFetch(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		this.mappingAnnotation.setFetch(FetchType.toJavaResourceModel(newSpecifiedFetch));
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedFetch_(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+	
+	protected FetchType getResourceFetch() {
+		return FetchType.fromJavaResourceModel(this.mappingAnnotation.getFetch());
+	}
+	
+	// ********** collection table **********
+	
+	public JavaCollectionTable2_0 getCollectionTable() {
+		return this.collectionTable;
+	}
+	
+	protected void initializeCollectionTable() {
+		this.collectionTable.initialize(getCollectionTableAnnotation());
+	}
+	
+	protected void updateCollectionTable() {
+		this.collectionTable.update(getCollectionTableAnnotation());
+	}
+	
+	public CollectionTable2_0Annotation getCollectionTableAnnotation() {
+		return 	(CollectionTable2_0Annotation) this.getResourcePersistentAttribute().
+				getNonNullAnnotation(CollectionTable2_0Annotation.ANNOTATION_NAME);
+	}
+
+	// ***************** value column **************
+
+	public JavaColumn getValueColumn() {
+		return this.valueColumn;
+	}
+
+	protected void initializeValueColumn() {
+		this.valueColumn.initialize(getColumnAnnotation());
+	}
+
+	protected void updateValueColumn() {
+		getValueColumn().update(getColumnAnnotation());
+	}
+
+	public ColumnAnnotation getColumnAnnotation() {
+		return (ColumnAnnotation) this.getResourcePersistentAttribute().getNonNullAnnotation(ColumnAnnotation.ANNOTATION_NAME);
+	}
+
+
+	// ************ value converter ************
+	
+	public JavaConverter getConverter() {
+		return this.valueConverter;
+	}
+	
+	protected String getValueConverterType() {
+		return this.valueConverter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getValueConverterType(), converterType)) {
+			return;
+		}
+		JavaConverter oldConverter = this.valueConverter;
+		JavaConverter newConverter = buildConverter(converterType);
+		this.valueConverter = this.nullConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.valueConverter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(JavaConverter newConverter) {
+		JavaConverter oldConverter = this.valueConverter;
+		this.valueConverter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	
+	protected void initializeValueConverter() {
+		this.valueConverter = this.buildConverter(this.getResourceConverterType());
+	}
+	
+	protected void updateValueConverter() {
+		if (this.valuesAreEqual(getResourceConverterType(), getValueConverterType())) {
+			getConverter().update(this.getResourcePersistentAttribute());
+		}
+		else {
+			JavaConverter javaConverter = buildConverter(getResourceConverterType());
+			setConverter(javaConverter);
+		}
+	}
+	
+	protected JavaConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullConverter;			
+		}
+		if (this.valuesAreEqual(converterType, Converter.ENUMERATED_CONVERTER)) {
+			return getJpaFactory().buildJavaEnumeratedConverter(this, this.getResourcePersistentAttribute());
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getJpaFactory().buildJavaTemporalConverter(this, this.getResourcePersistentAttribute());
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.getResourcePersistentAttribute().getAnnotation(EnumeratedAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.ENUMERATED_CONVERTER;
+		}
+		if (this.getResourcePersistentAttribute().getAnnotation(TemporalAnnotation.ANNOTATION_NAME) != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		return Converter.NO_CONVERTER;
+	}
+
+
+	// ********** overrides **********
+		
+	public JavaAttributeOverrideContainer getValueAttributeOverrideContainer() {
+		return this.valueAttributeOverrideContainer;
+	}
+
+	public JavaAssociationOverrideContainer getValueAssociationOverrideContainer() {
+		return this.valueAssociationOverrideContainer;
+	}
+
+
+	// ***************** map key column **************
+
+	public JavaColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+
+	protected void initializeMapKeyColumn() {
+		this.mapKeyColumn.initialize(getMapKeyColumnAnnotation());
+	}
+
+	protected void updateMapKeyColumn() {
+		getMapKeyColumn().update(getMapKeyColumnAnnotation());
+	}
+
+	public MapKeyColumn2_0Annotation getMapKeyColumnAnnotation() {
+		return (MapKeyColumn2_0Annotation) this.getResourcePersistentAttribute().getNonNullAnnotation(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
+	}
+
+	public JavaAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
+		return this.mapKeyAttributeOverrideContainer;
+	}
+
+	// ********** ordering **********  
+	
+	public JavaOrderable2_0 getOrderable() {
+		return this.orderable;
+	}
+
+	protected Orderable2_0.Owner buildOrderableOwner() {
+		return new Orderable2_0.Owner() {
+			public String getTableName() {
+				return getCollectionTable().getName();
+			}
+			public Table getDbTable(String tableName) {
+				return getCollectionTable().getDbTable();
+			}
+		};
+	}
+
+
+	public Type getValueType() {
+		return this.valueType;
+	}
+
+	protected void setValueType(Type newValueType) {
+		Type old = this.valueType;
+		this.valueType = newValueType;
+		firePropertyChanged(VALUE_TYPE_PROPERTY, old, newValueType);
+	}
+
+	protected void initializeValueType() {
+		this.valueType = this.buildValueType();
+	}
+
+	protected void updateValueType() {
+		this.setValueType(this.buildValueType()); 
+	}
+
+	protected Type buildValueType() {
+		if (getResolvedTargetEmbeddable() != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		else if (this.resolvedTargetEntity != null) {
+			return Type.ENTITY_TYPE; 
+		}
+		else if (getTargetClass() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	public Type getKeyType() {
+		return this.keyType;
+	}
+
+	protected void setKeyType(Type newKeyType) {
+		Type old = this.keyType;
+		this.keyType = newKeyType;
+		firePropertyChanged(KEY_TYPE_PROPERTY, old, newKeyType);
+	}
+
+	protected void initializeKeyType() {
+		this.keyType = this.buildKeyType();
+	}
+
+	protected void updateKeyType() {
+		this.setKeyType(this.buildKeyType());
+	}
+
+	protected Type buildKeyType() {
+		if (getResolvedMapKeyEmbeddable() != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		if (getResolvedMapKeyEntity() != null) {
+			return Type.ENTITY_TYPE; 
+		}
+		else if (getMapKeyClass() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	// ********** map key **********  
+
+	public String getMapKey() {
+		if (this.noMapKey) {
+			return null;
+		}
+		if (this.pkMapKey) {
+			return null;//the target is either embeddable or basic, so a key will have to be specified
+		}
+		if (this.customMapKey) {
+			return this.specifiedMapKey;
+		}
+		throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
+	}
+
+	public String getSpecifiedMapKey() {
+		return this.specifiedMapKey;
+	}
+
+	public void setSpecifiedMapKey(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (mapKey == null) {
+			if (mapKeyAnnotation != null) {
+				this.removeMapKeyAnnotation();
+			}
+		} else {
+			if (mapKeyAnnotation == null) {
+				mapKeyAnnotation = this.addMapKeyAnnotation();
+			}
+			mapKeyAnnotation.setName(mapKey);
+		}
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+
+	protected void setSpecifiedMapKey_(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+
+	protected void initializeMapKey() {
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (mapKeyAnnotation == null) {
+			this.noMapKey = true;
+		} else {
+			this.specifiedMapKey = mapKeyAnnotation.getName();
+			if (this.specifiedMapKey == null) {
+				this.pkMapKey = true;
+			} else {
+				this.customMapKey = true;
+			}
+		}
+	}
+
+	protected void updateMapKey() {
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (mapKeyAnnotation == null) {
+			this.setSpecifiedMapKey_(null);
+			this.setNoMapKey_(true);
+			this.setPkMapKey_(false);
+			this.setCustomMapKey_(false);
+		} else {
+			String mk = mapKeyAnnotation.getName();
+			this.setSpecifiedMapKey_(mk);
+			this.setNoMapKey_(false);
+			this.setPkMapKey_(mk == null);
+			this.setCustomMapKey_(mk != null);
+		}
+	}
+
+	protected MapKeyAnnotation getMapKeyAnnotation() {
+		return (MapKeyAnnotation) this.getResourcePersistentAttribute().getAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+	protected MapKeyAnnotation addMapKeyAnnotation() {
+		return (MapKeyAnnotation) this.getResourcePersistentAttribute().addAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+	protected void removeMapKeyAnnotation() {
+		this.getResourcePersistentAttribute().removeAnnotation(MapKeyAnnotation.ANNOTATION_NAME);
+	}
+
+	protected boolean mapKeyNameTouches(int pos, CompilationUnit astRoot) {
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		return (mapKeyAnnotation != null) && mapKeyAnnotation.nameTouches(pos, astRoot);
+	}
+
+
+	// ********** no map key **********  
+
+	public boolean isNoMapKey() {
+		return this.noMapKey;
+	}
+
+	public void setNoMapKey(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		if (noMapKey) {
+			if (this.getMapKeyAnnotation() != null) {
+				this.removeMapKeyAnnotation();
+			}
+		} else {
+			// the 'noMapKey' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setNoMapKey_(boolean)
+		}
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);
+	}
+
+	protected void setNoMapKey_(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);	
+	}
+
+
+	// ********** pk map key **********  
+
+	public boolean isPkMapKey() {
+		return this.pkMapKey;
+	}
+
+	public void setPkMapKey(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		MapKeyAnnotation mapKeyAnnotation = this.getMapKeyAnnotation();
+		if (pkMapKey) {
+			if (mapKeyAnnotation == null) {
+				this.addMapKeyAnnotation();
+			} else {
+				mapKeyAnnotation.setName(null);
+			}
+		} else {
+			// the 'pkMapKey' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setPkMapKey_(boolean)
+		}
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
+	}
+
+	protected void setPkMapKey_(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);
+	}
+
+
+	// ********** custom map key **********  
+
+	public boolean isCustomMapKey() {
+		return this.customMapKey;
+	}
+
+	public void setCustomMapKey(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		if (customMapKey) {
+			this.setSpecifiedMapKey(""); //$NON-NLS-1$
+		} else {
+			// the 'customMapKey' flag is cleared as a
+			// side-effect of setting the other flags,
+			// via a call to #setCustomMapKey_(boolean)
+		}
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+
+	protected void setCustomMapKey_(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+
+	// *************** map key class *************
+
+	public String getMapKeyClass() {
+		return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
+	}
+
+	public String getSpecifiedMapKeyClass() {
+		return this.specifiedMapKeyClass;
+	}
+
+	public void setSpecifiedMapKeyClass(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		MapKeyClass2_0Annotation mapKeyClassAnnotation = this.getMapKeyClassAnnotation();
+		if (mapKeyClass == null) {
+			if (mapKeyClassAnnotation != null) {
+				this.removeMapKeyClassAnnotation();
+			}
+		} else {
+			if (mapKeyClassAnnotation == null) {
+				mapKeyClassAnnotation = this.addMapKeyClassAnnotation();
+			}
+			mapKeyClassAnnotation.setValue(mapKeyClass);
+		}
+
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected void setSpecifiedMapKeyClass_(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String getResourceMapKeyClass() {
+		MapKeyClass2_0Annotation annotation = getMapKeyClassAnnotation();
+		return annotation == null ? null : annotation.getValue();
+	}
+
+	public String getDefaultMapKeyClass() {
+		return this.defaultMapKeyClass;
+	}
+
+	protected void setDefaultMapKeyClass(String mapKeyClass) {
+		String old = this.defaultMapKeyClass;
+		this.defaultMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String buildDefaultMapKeyClass() {
+		return this.getPersistentAttribute().getMultiReferenceMapKeyTypeName();
+	}
+
+	public String getFullyQualifiedMapKeyClass() {
+		return this.fullyQualifiedMapKeyClass;
+	}
+
+	protected void setFullyQualifiedMapKeyClass(String mapKeyClass) {
+		String old = this.fullyQualifiedMapKeyClass;
+		this.fullyQualifiedMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String buildFullyQualifiedMapKeyClass() {
+		return (this.specifiedMapKeyClass == null) ?
+			this.defaultMapKeyClass :
+			this.getMapKeyClassAnnotation().getFullyQualifiedClassName();
+	}
+
+	public char getMapKeyClassEnclosingTypeSeparator() {
+		return '.';
+	}
+
+	protected MapKeyClass2_0Annotation getMapKeyClassAnnotation() {
+		return (MapKeyClass2_0Annotation) this.getResourcePersistentAttribute().getAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected MapKeyClass2_0Annotation addMapKeyClassAnnotation() {
+		return (MapKeyClass2_0Annotation) this.getResourcePersistentAttribute().addAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
+	}
+
+	protected void removeMapKeyClassAnnotation() {
+		this.getResourcePersistentAttribute().removeAnnotation(MapKeyClass2_0Annotation.ANNOTATION_NAME);
+	}
+
+	public Embeddable getResolvedMapKeyEmbeddable() {
+		return this.resolvedMapKeyEmbeddable;
+	}
+
+	protected void setResolvedMapKeyEmbeddable(Embeddable embeddable) {
+		Embeddable old = this.resolvedMapKeyEmbeddable;
+		this.resolvedMapKeyEmbeddable = embeddable;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_EMBEDDABLE_PROPERTY, old, embeddable);
+	}
+
+	public Entity getResolvedMapKeyEntity() {
+		return this.resolvedMapKeyEntity;
+	}
+
+	protected void setResolvedMapKeyEntity(Entity entity) {
+		Entity old = this.resolvedMapKeyEntity;
+		this.resolvedMapKeyEntity = entity;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_ENTITY_PROPERTY, old, entity);
+	}
+
+	public PersistentType getResolvedMapKeyType() {
+		return getResolvedMapKeyEmbeddable() == null ? null : getResolvedMapKeyEmbeddable().getPersistentType();
+	}
+
+	protected PersistentType buildResolvedMapKeyType() {
+		return (this.fullyQualifiedMapKeyClass == null) ? null : this.getPersistenceUnit().getPersistentType(this.fullyQualifiedMapKeyClass);
+	}
+
+	protected Embeddable buildResolvedMapKeyEmbeddable() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	protected Entity buildResolvedMapKeyEntity() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+
+
+	// ********** Java completion proposals **********  
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getCollectionTable().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getValueColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = getConverter().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getOrderable().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getValueAttributeOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getValueAssociationOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (this.mapKeyNameTouches(pos, astRoot)) {
+			return this.javaCandidateMapKeyNames(filter);
+		}
+		result = this.getMapKeyColumn().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.getMapKeyAttributeOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+//		result = this.getMapKeyAssociationOverrideContainer().javaCompletionProposals(pos, filter, astRoot);
+//		if (result != null) {
+//			return result;
+//		}
+		return null;
+	}
+
+	protected Iterator<String> javaCandidateMapKeyNames(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(this.candidateMapKeyNames(filter));
+	}
+
+	protected Iterator<String> candidateMapKeyNames(Filter<String> filter) {
+		return new FilteringIterator<String>(this.candidateMapKeyNames(), filter);
+	}
+
+	public Iterator<String> candidateMapKeyNames() {
+		return this.allTargetEmbeddableAttributeNames();
+	}
+
+	public Iterator<String> allTargetEmbeddableAttributeNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.allTargetEmbeddableAttributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+		});
+	}
+
+	@Override
+	public Iterator<String> allMappingNames() {
+		return new CompositeIterator<String>(this.getName(), this.allEmbeddableAttributeMappingNames());
+	}
+	
+	protected Iterator<String> allEmbeddableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+			}
+		);
+	}
+
+	protected Iterator<AttributeMapping> allTargetEmbeddableAttributeMappings() {
+		return (this.resolvedTargetEmbeddable != null) ?
+				this.resolvedTargetEmbeddable.allAttributeMappings() :
+				EmptyIterator.<AttributeMapping> instance();
+	}
+
+	protected Iterator<AttributeMapping> embeddableAttributeMappings() {
+		Embeddable targetEmbeddable = getResolvedTargetEmbeddable();
+		if (targetEmbeddable != null && targetEmbeddable != getPersistentAttribute().getOwningTypeMapping()) {
+			return targetEmbeddable.attributeMappings();
+		}
+		return EmptyIterator.instance();
+	}
+
+	@Override
+	public Iterator<String> allOverrideableAttributeMappingNames() {
+		return this.embeddableOverrideableAttributeMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAttributeMappingNames();
+				}
+			}
+		);
+	}
+	
+	@Override
+	public Iterator<String> allOverrideableAssociationMappingNames() {
+		return this.embeddableOverrideableAssociationMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAssociationMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAssociationMappingNames();
+				}
+			}
+		);
+	}
+	
+	protected Iterator<String> embeddableOverrideableMappingNames(Transformer<AttributeMapping, Iterator<String>> transformer) {
+		return new TransformationIterator<String, String>(
+			new CompositeIterator<String>(
+				new TransformationIterator<AttributeMapping, Iterator<String>>(this.embeddableAttributeMappings(), transformer))) 
+		{
+			@Override
+			protected String transform(String next) {
+				return getName() + '.' + next;
+			}
+		};
+	}
+
+	@Override
+	public AttributeMapping resolveAttributeMapping(String name) {
+		AttributeMapping resolvedMapping = super.resolveAttributeMapping(name);
+		if (resolvedMapping != null) {
+			return resolvedMapping;
+		}
+		int dotIndex = name.indexOf('.');
+		if (dotIndex != -1) {
+			if (getName().equals(name.substring(0, dotIndex))) {
+				for (AttributeMapping attributeMapping : CollectionTools.iterable(embeddableAttributeMappings())) {
+					resolvedMapping = attributeMapping.resolveAttributeMapping(name.substring(dotIndex + 1));
+					if (resolvedMapping != null) {
+						return resolvedMapping;
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public Column resolveOverriddenColumn(String attributeName) {
+		int dotIndex = attributeName.indexOf('.');
+		if (dotIndex != -1) {
+			if (getName().equals(attributeName.substring(0, dotIndex))) {
+				attributeName = attributeName.substring(dotIndex + 1);
+				AttributeOverride override = getValueAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+				if (override != null && !override.isVirtual()) {
+					return override.getColumn();
+				}
+				if (this.getResolvedTargetEmbeddable() == null) {
+					return null;
+				}
+				return this.getResolvedTargetEmbeddable().resolveOverriddenColumn(attributeName);
+			}
+		}
+		return null;
+	}
+
+	// ********** metamodel **********  
+	@Override
+	protected String getMetamodelFieldTypeName() {
+		return ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldTypeName();
+	}
+	
+	@Override
+	public String getMetamodelTypeName() {
+		return (this.fullyQualifiedTargetClass != null) ? this.fullyQualifiedTargetClass : MetamodelField.DEFAULT_TYPE_NAME;
+	}
+
+	@Override
+	protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
+		this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
+		super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
+	}
+
+	protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
+		String keyTypeName = ((JavaPersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldMapKeyTypeName();
+		if (keyTypeName != null) {
+			typeArgumentNames.add(keyTypeName);
+		}
+	}
+
+	public String getMetamodelFieldMapKeyTypeName() {
+		return MappingTools.getMetamodelFieldMapKeyTypeName(this);
+	}
+	
+	
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.validateTargetClass(messages, astRoot);
+		this.validateMapKeyClass(messages, astRoot);
+		this.getOrderable().validate(messages, reporter, astRoot);
+		this.getCollectionTable().validate(messages, reporter, astRoot);
+		this.validateValue(messages, reporter, astRoot);
+		this.validateMapKey(messages, reporter, astRoot);
+	}
+
+	protected void validateValue(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		//TODO should we handle validation when the type is embeddable, but a value column is specified, or things like that if that is invalid?
+		if (getValueType() == Type.BASIC_TYPE) {
+			this.getValueColumn().validate(messages, reporter, astRoot);
+			this.getConverter().validate(messages, reporter, astRoot);
+		}
+		else if (getValueType() == Type.EMBEDDABLE_TYPE) {
+			this.getValueAttributeOverrideContainer().validate(messages, reporter, astRoot);
+			this.getValueAssociationOverrideContainer().validate(messages, reporter, astRoot);
+		}
+	}
+
+	protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		if (getMapKey() != null) {
+			//TODO validate that the map key refers to an existing attribute
+			return;
+		}
+		if (getKeyType() == Type.BASIC_TYPE) {
+			this.getMapKeyColumn().validate(messages, reporter, astRoot);
+			//validate map key converter
+		}
+		else if (getKeyType() == Type.ENTITY_TYPE) {
+			//validate map key join columns
+		}
+		else if (getKeyType() == Type.EMBEDDABLE_TYPE) {
+			getMapKeyAttributeOverrideContainer().validate(messages, reporter, astRoot);
+			//getMapKeyAssociationOverrideContainer().validate(messages, reporter, astRoot);
+		}
+	}
+
+	protected void validateTargetClass(List<IMessage> messages, CompilationUnit astRoot) {
+		if (this.getTargetClass() == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
+					new String[0], 
+					this, 
+					this.getValidationTextRange(astRoot)
+				)
+			);
+		}
+		//TODO this does not give an error for unmapped, unlisted types that aren't basic - bug 310464
+		if (this.resolvedTargetType != null) {
+			if (getResolvedTargetEmbeddable() == null) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
+						new String[] {this.getTargetClass()}, 
+						this, 
+						this.getTargetClassTextRange(astRoot)
+					)
+				);
+			}
+		}
+	}
+
+	protected void validateMapKeyClass(List<IMessage> messages, CompilationUnit astRoot) {
+		if (!getPersistentAttribute().getJpaContainer().isMap()) {
+			return;
+		}
+		if (this.getMapKeyClass() == null) {
+			messages.add(
+				DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED,
+					new String[0], 
+					this, 
+					this.getValidationTextRange(astRoot)
+				)
+			);
+		}
+	}
+
+	protected TextRange getTargetClassTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.mappingAnnotation.getTargetClassTextRange(astRoot), astRoot);
+	}
+
+	protected TextRange getTextRange(TextRange textRange, CompilationUnit astRoot) {
+		return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+	}
+
+
+	protected abstract class ColumnOwner implements JavaBaseColumn.Owner {
+		public String getDefaultTableName() {
+			return getCollectionTable().getName();
+		}
+		
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaElementCollectionMapping2_0.this.getTypeMapping();
+		}
+		
+		public Table getDbTable(String tableName) {
+			if (getCollectionTable().getName() != null && getCollectionTable().getName().equals(tableName)) {
+				return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable().getDbTable();
+			}
+			return null;
+		}
+		
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the collection table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange(astRoot);
+		}
+		
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getColumnTableNotValidMessage(),
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column,
+				textRange
+			);
+		}
+
+		protected abstract String getColumnTableNotValidMessage();
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getColumnUnresolvedNameMessage(),
+				new String[] {
+					column.getName(),
+					column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected abstract String getColumnUnresolvedNameMessage();
+	}
+
+	protected class ValueColumnOwner extends ColumnOwner {		
+		public String getDefaultColumnName() {
+			return AbstractJavaElementCollectionMapping2_0.this.getName();
+		}
+
+		@Override
+		protected String getColumnTableNotValidMessage() {
+			return JpaValidationMessages.COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		protected String getColumnUnresolvedNameMessage() {
+			return JpaValidationMessages.COLUMN_UNRESOLVED_NAME;
+		}
+	}
+
+	protected class MapKeyColumnOwner extends ColumnOwner {		
+		public String getDefaultColumnName() {
+			return AbstractJavaElementCollectionMapping2_0.this.getName() + "_KEY"; //$NON-NLS-1$
+		}
+
+		@Override
+		protected String getColumnTableNotValidMessage() {
+			return JpaValidationMessages.MAP_KEY_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		protected String getColumnUnresolvedNameMessage() {
+			return JpaValidationMessages.MAP_KEY_COLUMN_UNRESOLVED_NAME;
+		}
+	}
+
+	// ********** override container owners **********
+
+	protected abstract class OverrideContainerOwner
+		implements JavaOverrideContainer.Owner
+	{
+		public TypeMapping getTypeMapping() {
+			return AbstractJavaElementCollectionMapping2_0.this.getTypeMapping();
+		}
+		
+		public String getDefaultTableName() {
+			return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable().getName();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractJavaElementCollectionMapping2_0.this.getCollectionTable().getDbTable();
+		}
+		
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+		
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the collection table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+		
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange(astRoot);
+		}
+	}
+	
+	protected class ValueAssociationOverrideContainerOwner
+		extends OverrideContainerOwner
+		implements JavaAssociationOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAssociationNames();
+		}
+		
+		public RelationshipReference resolveRelationshipReference(String associationOverrideName) {
+			return MappingTools.resolveRelationshipReference(getOverridableTypeMapping(), associationOverrideName);
+		}	
+		
+		public String getPossiblePrefix() {
+			return "value."; //$NON-NLS-1$
+		}
+		
+		public String getWritePrefix() {
+			return getPersistentAttribute().getJpaContainer().isMap() ? this.getPossiblePrefix() : null;
+		}
+		
+		//return false if the override is prefixed with "key.", these will be part of the MapKeyAttributeOverrideContainer.
+		//a prefix of "value." or no prefix at all is relevant. If the type is not a Map then return true since all attribute overrides
+		//need to apply to the value.
+		public boolean isRelevant(String overrideName) {
+			if (getKeyType() != Type.EMBEDDABLE_TYPE) {
+				return true;
+			}
+			return !overrideName.startsWith("key."); //$NON-NLS-1$
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {overrideName, column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+	}
+	
+	//********** AttributeOverrideContainer.Owner implementation *********	
+	
+	protected class ValueAttributeOverrideContainerOwner
+		extends OverrideContainerOwner
+		implements JavaAttributeOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAttributeNames();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public String getPossiblePrefix() {
+			return "value."; //$NON-NLS-1$
+		}
+		
+		public String getWritePrefix() {
+			return getPersistentAttribute().getJpaContainer().isMap() ? this.getPossiblePrefix() : null;
+		}
+		
+		//return false if the override is prefixed with "key.", these will be part of the MapKeyAttributeOverrideContainer.
+		//a prefix of "value." or no prefix at all is relevant. If the type is not a Map then return true since all attribute overrides
+		//need to apply to the value.
+		public boolean isRelevant(String overrideName) {
+			if (getKeyType() != Type.EMBEDDABLE_TYPE) {
+				return true;
+			}
+			return !overrideName.startsWith("key."); //$NON-NLS-1$
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column, 
+				textRange
+			);
+		}
+	}
+	
+	
+	protected class MapKeyAttributeOverrideContainerOwner
+		extends OverrideContainerOwner
+		implements JavaAttributeOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractJavaElementCollectionMapping2_0.this.getResolvedMapKeyEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAttributeNames();
+		}
+		
+		public String getPossiblePrefix() {
+			return "key."; //$NON-NLS-1$
+		}
+		
+		public String getWritePrefix() {
+			return this.getPossiblePrefix();
+		}
+		
+		//the only relevant overrides are those that start with "key.", no prefix will be a value attribute override
+		public boolean isRelevant(String overrideName) {
+			if (getValueType() != Type.EMBEDDABLE_TYPE) {
+				return true;
+			}
+			return overrideName.startsWith("key."); //$NON-NLS-1$
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {overrideName, column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (override.isVirtual()) {
+				return this.buildVirtualColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE }, 
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					overrideName,
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java
new file mode 100644
index 0000000..6ae03e0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaIdMappingDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+
+public abstract class AbstractJavaIdMappingDefinition2_0
+	extends AbstractJavaIdMappingDefinition
+{
+	protected AbstractJavaIdMappingDefinition2_0() {
+		super();
+	}
+	
+	
+	@Override
+	public boolean testSpecified(JavaPersistentAttribute persistentAttribute) {
+		return super.testSpecified(persistentAttribute) && ! testDerivedId(persistentAttribute);
+	}
+	
+	/**
+	 * Return whether the Id annotation, if present, is used as a supporting annotation for
+	 * 1-1 or M-1 mapping, rather than as a primary mapping annotation
+	 */
+	protected boolean testDerivedId(JavaPersistentAttribute persistentAttribute) {
+		JavaResourcePersistentAttribute resourceAttribute = 
+				persistentAttribute.getResourcePersistentAttribute();
+		return resourceAttribute.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME) != null
+				|| resourceAttribute.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME) != null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaAssociationOverrideRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaAssociationOverrideRelationshipReference2_0.java
new file mode 100644
index 0000000..357b69d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaAssociationOverrideRelationshipReference2_0.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.AssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaAssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaJoinTableInAssociationOverrideJoiningStrategy2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaAssociationOverrideRelationshipReference2_0 extends AbstractJavaAssociationOverrideRelationshipReference
+	implements JavaAssociationOverrideRelationshipReference2_0
+{
+
+	protected final JavaJoinTableInAssociationOverrideJoiningStrategy2_0 joinTableJoiningStrategy;
+
+	public GenericJavaAssociationOverrideRelationshipReference2_0(JavaAssociationOverride parent) {
+		super(parent);
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy();
+	}
+	
+	public void initializeFrom(AssociationOverrideRelationshipReference oldAssociationOverride) {
+		if (oldAssociationOverride.getJoinColumnJoiningStrategy().hasSpecifiedJoinColumns()) {
+			getJoinColumnJoiningStrategy().initializeFrom(oldAssociationOverride.getJoinColumnJoiningStrategy());
+		}
+		else {
+			getJoinTableJoiningStrategy().initializeFrom(((AssociationOverrideRelationshipReference2_0) oldAssociationOverride).getJoinTableJoiningStrategy());
+		}
+	}
+	
+	protected JavaJoinTableInAssociationOverrideJoiningStrategy2_0 buildJoinTableJoiningStrategy() {
+		return new GenericJavaJoinTableInAssociationOverrideJoiningStrategy2_0(this);
+	}
+
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		result = this.joinTableJoiningStrategy.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		return null;
+	}
+
+	@Override
+	protected void initializeJoiningStrategies(AssociationOverrideAnnotation associationOverride) {
+		super.initializeJoiningStrategies(associationOverride);
+		this.joinTableJoiningStrategy.initialize((AssociationOverride2_0Annotation) associationOverride);
+	}
+	
+	@Override
+	protected void updateJoiningStrategies(AssociationOverrideAnnotation associationOverride) {
+		super.updateJoiningStrategies(associationOverride);
+		this.joinTableJoiningStrategy.update((AssociationOverride2_0Annotation) associationOverride);
+	}
+		
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.joinColumnJoiningStrategy.hasSpecifiedJoinColumns()) {
+			return this.joinColumnJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+	
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		//this is not yet correctly supported so I am going to comment it out
+		//I end up with join-table validation when the association is for join-columns.
+		//bug 190319 covers the use case for validation of join tables in association overrides 
+		//this.joinTableJoiningStrategy.validate(messages, reporter, astRoot);
+	}
+
+
+
+	// **************** join columns *******************************************
+	
+
+	public JavaJoinTableInAssociationOverrideJoiningStrategy2_0 getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public void setJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.addStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public void unsetJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return getAssociationOverride().isVirtual();
+	}
+
+	@Override
+	public void setJoinColumnJoiningStrategy() {
+		super.setJoinColumnJoiningStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
new file mode 100644
index 0000000..e21fb8b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.Cacheable2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaCacheable2_0
+	extends AbstractJavaJpaContextNode 
+	implements JavaCacheable2_0
+{
+	protected boolean defaultCacheable;
+	protected Boolean specifiedCacheable;
+	
+	protected JavaResourcePersistentType resourcePersistentType;
+	
+	public GenericJavaCacheable2_0(JavaCacheableHolder2_0 parent) {
+		super(parent);
+	}
+
+	@Override
+	public JavaCacheableHolder2_0 getParent() {
+		return (JavaCacheableHolder2_0) super.getParent();
+	}
+	
+	protected String getCacheableAnnotationName() {
+		return Cacheable2_0Annotation.ANNOTATION_NAME;
+	}
+	
+	protected Cacheable2_0Annotation getResourceCacheable() {
+		return (Cacheable2_0Annotation) this.resourcePersistentType.getAnnotation(getCacheableAnnotationName());
+	}
+	
+	protected void addResourceCacheable() {
+		this.resourcePersistentType.addAnnotation(getCacheableAnnotationName());
+	}
+	
+	protected void removeResourceCacheable() {
+		this.resourcePersistentType.removeAnnotation(getCacheableAnnotationName());
+	}
+
+	protected boolean calculateDefaultCacheable() {		
+		return getParent().calculateDefaultCacheable();
+	}
+
+	public boolean isCacheable() {
+		return this.specifiedCacheable != null ? this.specifiedCacheable.booleanValue() : this.defaultCacheable; 
+	}
+	
+	public boolean isDefaultCacheable() {
+		return this.defaultCacheable;
+	}
+	
+	protected void setDefaultCacheable(boolean newDefaultCacheable) {
+		boolean oldDefaultCacheable = this.defaultCacheable;
+		this.defaultCacheable = newDefaultCacheable;
+		firePropertyChanged(DEFAULT_CACHEABLE_PROPERTY, oldDefaultCacheable, newDefaultCacheable);
+	}
+	
+	public Boolean getSpecifiedCacheable() {
+		return this.specifiedCacheable;
+	}
+	
+	public void setSpecifiedCacheable(Boolean newSpecifiedCacheable) {
+		if (this.specifiedCacheable == newSpecifiedCacheable) {
+			return;
+		}
+		Boolean oldSpecifiedCacheable = this.specifiedCacheable;
+		this.specifiedCacheable = newSpecifiedCacheable;
+
+		if (newSpecifiedCacheable != null) {
+			if (getResourceCacheable() == null) {
+				addResourceCacheable();
+			}
+			if (newSpecifiedCacheable.booleanValue()) {
+				if (getResourceCacheable().getValue() == Boolean.FALSE) {
+					getResourceCacheable().setValue(null);
+				}
+			}
+			else {
+				getResourceCacheable().setValue(Boolean.FALSE);
+			}
+		}
+		else {
+			removeResourceCacheable();
+		}
+		firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, oldSpecifiedCacheable, newSpecifiedCacheable);
+	}
+	
+	protected void setSpecifiedCacheable_(Boolean newSpecifiedCacheable) {
+		Boolean oldSpecifiedCacheable = this.specifiedCacheable;
+		this.specifiedCacheable = newSpecifiedCacheable;
+		firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, oldSpecifiedCacheable, newSpecifiedCacheable);
+	}
+	
+	public void initialize(JavaResourcePersistentType jrpt) {
+		this.resourcePersistentType = jrpt;
+		Cacheable2_0Annotation resourceCacheable = this.getResourceCacheable();
+		this.specifiedCacheable = this.specifiedCacheable(resourceCacheable);
+	}
+	
+	public void update(JavaResourcePersistentType jrpt) {
+		this.resourcePersistentType = jrpt;
+		Cacheable2_0Annotation resourceCacheable = this.getResourceCacheable();
+		this.setSpecifiedCacheable_(this.specifiedCacheable(resourceCacheable));
+		this.setDefaultCacheable(this.calculateDefaultCacheable());
+	}
+	
+	private Boolean specifiedCacheable(Cacheable2_0Annotation resourceCacheable) {
+		if (resourceCacheable == null) {
+			return null;
+		}
+		if (resourceCacheable.getValue() == null) { //@Cacheable is equivalent to @Cacheable(true)
+			return Boolean.TRUE;
+		}
+		return resourceCacheable.getValue();
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		Cacheable2_0Annotation resourceCacheable = this.getResourceCacheable();
+		return resourceCacheable == null ? null : resourceCacheable.getTextRange(astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
new file mode 100644
index 0000000..41dcc0c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.jpa1.context.java.GenericJavaReferenceTable;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * Java collection table
+ */
+public class GenericJavaCollectionTable2_0
+	extends GenericJavaReferenceTable
+	implements JavaCollectionTable2_0
+{
+
+	public GenericJavaCollectionTable2_0(JavaElementCollectionMapping2_0 parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	@Override
+	public JavaElementCollectionMapping2_0 getParent() {
+		return (JavaElementCollectionMapping2_0) super.getParent();
+	}
+
+	public PersistentAttribute getPersistentAttribute() {
+		return getParent().getPersistentAttribute();
+	}
+	
+	public void initialize(CollectionTable2_0Annotation collectionTable) {
+		super.initialize(collectionTable);
+	}
+
+	public void update(CollectionTable2_0Annotation collectionTable) {
+		super.update(collectionTable);
+	}
+
+	// ********** AbstractJavaTable implementation **********
+
+	@Override
+	protected String getAnnotationName() {
+		return CollectionTable2_0Annotation.ANNOTATION_NAME;
+	}
+
+	@Override
+	protected String buildDefaultName() {
+		return MappingTools.buildCollectionTableDefaultName(getParent());
+	}
+
+	@Override
+	protected CollectionTable2_0Annotation getAnnotation() {
+		return this.getParent().getCollectionTableAnnotation();
+	}
+
+
+
+	// ********** validation **********
+
+	@Override
+	protected boolean shouldValidateAgainstDatabase() {
+		return getParent().shouldValidateAgainstDatabase();
+	}
+
+	@Override
+	protected String getUnresolvedCatalogMessageId() {
+		return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_CATALOG;
+	}
+	
+	@Override
+	protected String getUnresolvedSchemaMessageId() {
+		return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_SCHEMA;
+	}
+	
+	@Override
+	protected String getUnresolvedNameMessageId() {
+		return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_NAME;
+	}
+
+
+	// ********** join column owner adapter **********
+
+	/**
+	 * owner for "back-pointer" JoinColumns;
+	 * these point at the source/owning entity
+	 */
+	protected class JoinColumnOwner
+		implements JavaJoinColumn.Owner
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+
+		//***** NamedColumn.Owner implementation *******
+		public TypeMapping getTypeMapping() {
+			return GenericJavaCollectionTable2_0.this.getParent().getTypeMapping();
+		}
+
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			String collectionTableName = GenericJavaCollectionTable2_0.this.getName();
+			return (collectionTableName == null) ? null : (collectionTableName.equals(tableName)) ? GenericJavaCollectionTable2_0.this.getDbTable() : null;
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+		
+		//***** JavaNamedColumn.Owner implementation *******
+		public TextRange getValidationTextRange(CompilationUnit astRoot) {
+			return GenericJavaCollectionTable2_0.this.getValidationTextRange(astRoot);
+		}
+
+		//***** BaseColumn.Owner implementation *******
+		/**
+		 * by default, the join column is, obviously, in the collection table
+		 */
+		public String getDefaultTableName() {
+			return GenericJavaCollectionTable2_0.this.getName();
+		}
+		
+
+		//***** BaseJoinColumn.Owner implementation *******
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			return getTypeMapping().getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericJavaCollectionTable2_0.this.defaultJoinColumn == joinColumn;
+		}
+
+		//***** JoinColumn.Owner implementation *******
+		/**
+		 * the default table name is always valid and a specified table name
+		 * is prohibited (which will be handled elsewhere)
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return false;
+		}
+
+		/**
+		 * the join column can only be on the collection table itself
+		 */
+		public Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		public Entity getRelationshipTarget() {
+			return GenericJavaCollectionTable2_0.this.getParent().getEntity();
+		}
+
+		public String getAttributeName() {
+			return null; //I *think* this is correct
+			//return GenericJavaCollectionTable2_0.this.getParent().getName();
+		}
+
+		public PersistentAttribute getPersistentAttribute() {
+			return GenericJavaCollectionTable2_0.this.getParent().getPersistentAttribute();
+		}
+
+		public int joinColumnsSize() {
+			return GenericJavaCollectionTable2_0.this.joinColumnsSize();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column,
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
new file mode 100644
index 0000000..67f5312
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaMapsIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaDerivedIdentity2_0 extends AbstractJavaJpaContextNode
+	implements JavaDerivedIdentity2_0
+{
+	// cache the strategy for property change notification
+	protected DerivedIdentityStrategy2_0 cachedPredominantDerivedIdentityStrategy;
+	
+	protected JavaIdDerivedIdentityStrategy2_0 idDerivedIdentityStrategy;
+	
+	protected JavaMapsIdDerivedIdentityStrategy2_0 mapsIdDerivedIdentityStrategy;
+	
+	
+	public GenericJavaDerivedIdentity2_0(JavaSingleRelationshipMapping2_0 parent) {
+		super(parent);
+		this.idDerivedIdentityStrategy = buildIdDerivedIdentityStrategy();
+		this.mapsIdDerivedIdentityStrategy = buildMapsIdDerivedIdentityStrategy();
+	}
+	
+	
+	protected JavaIdDerivedIdentityStrategy2_0 buildIdDerivedIdentityStrategy() {
+		return new GenericJavaIdDerivedIdentityStrategy2_0(this);
+	}
+	
+	protected JavaMapsIdDerivedIdentityStrategy2_0 buildMapsIdDerivedIdentityStrategy() {
+		return new GenericJavaMapsIdDerivedIdentityStrategy2_0(this);
+	}
+	
+	@Override
+	public JavaSingleRelationshipMapping2_0 getParent() {
+		return (JavaSingleRelationshipMapping2_0) super.getParent();
+	}
+	
+	public JavaSingleRelationshipMapping2_0 getMapping() {
+		return getParent();
+	}
+	
+	
+	// **************** predominant joining strategy ***************************
+	
+	public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy;
+	}
+	
+	protected void setPredominantJoiningStrategy() {
+		setPredominantJoiningStrategy(calculatePredominantDerivedIdentityStrategy());
+	}
+	
+	protected void setPredominantJoiningStrategy(DerivedIdentityStrategy2_0 newStrategy) {
+		DerivedIdentityStrategy2_0 oldStrategy = this.cachedPredominantDerivedIdentityStrategy;
+		this.cachedPredominantDerivedIdentityStrategy = newStrategy;
+		firePropertyChanged(PREDOMINANT_DERIVED_IDENTITY_STRATEGY_PROPERTY, oldStrategy, newStrategy);
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	public void initialize() {
+		this.idDerivedIdentityStrategy.initialize();
+		this.mapsIdDerivedIdentityStrategy.initialize();
+		this.cachedPredominantDerivedIdentityStrategy = calculatePredominantDerivedIdentityStrategy();
+	}
+	
+	public void update() {
+		this.idDerivedIdentityStrategy.update();
+		this.mapsIdDerivedIdentityStrategy.update();
+		setPredominantJoiningStrategy(calculatePredominantDerivedIdentityStrategy());
+	}
+	
+	protected DerivedIdentityStrategy2_0 calculatePredominantDerivedIdentityStrategy() {
+		if (this.mapsIdDerivedIdentityStrategy.isSpecified()) {
+			return this.mapsIdDerivedIdentityStrategy;
+		}
+		else if (this.idDerivedIdentityStrategy.isSpecified()) {
+			return this.idDerivedIdentityStrategy;
+		}
+		else {
+			return null;
+		}
+	}
+	
+	
+	// **************** no strategy *******************************************
+	
+	public void setNullDerivedIdentityStrategy() {
+		this.mapsIdDerivedIdentityStrategy.removeStrategy();
+		this.idDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesNullDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy == null;
+	}
+	
+	
+	// **************** maps id strategy **************************************
+	
+	public JavaMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
+		return this.mapsIdDerivedIdentityStrategy;
+	}
+	
+	public void setMapsIdDerivedIdentityStrategy() {
+		this.mapsIdDerivedIdentityStrategy.addStrategy();
+		this.idDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetMapsIdDerivedIdentityStrategy() {
+		this.mapsIdDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesMapsIdDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy == this.mapsIdDerivedIdentityStrategy;
+	}
+
+	
+	// **************** id strategy *******************************************
+	
+	public JavaIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
+		return this.idDerivedIdentityStrategy;
+	}
+	
+	public void setIdDerivedIdentityStrategy() {
+		this.idDerivedIdentityStrategy.addStrategy();
+		this.mapsIdDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetIdDerivedIdentityStrategy() {
+		this.idDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesIdDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy == this.idDerivedIdentityStrategy;
+	}
+	
+	
+	// **************** java completion ***************************************
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result == null) {
+			result = this.mapsIdDerivedIdentityStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		if (result == null) {
+			result = this.idDerivedIdentityStrategy.javaCompletionProposals(pos, filter, astRoot);
+		}
+		return result;
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return getMapping().getValidationTextRange(astRoot);
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		this.idDerivedIdentityStrategy.validate(messages, reporter, astRoot);
+		this.mapsIdDerivedIdentityStrategy.validate(messages, reporter, astRoot);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java
new file mode 100644
index 0000000..43cfc40
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaElementCollectionMapping2_0.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+
+
+public class GenericJavaElementCollectionMapping2_0
+	extends AbstractJavaElementCollectionMapping2_0
+{
+	public GenericJavaElementCollectionMapping2_0(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java
new file mode 100644
index 0000000..4e9bd83
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaEmbeddable2_0.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaEmbeddable;
+import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+
+public class GenericJavaEmbeddable2_0
+	extends AbstractJavaEmbeddable
+{
+	public GenericJavaEmbeddable2_0(JavaPersistentType parent) {
+		super(parent);
+	}
+	
+	@Override
+	public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
+		return ArrayTools.contains(ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
+	}
+
+	public static final String[] ALLOWED_ATTRIBUTE_MAPPING_KEYS =
+		new String[] {
+			MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY,
+			MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY
+		};
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..a53f2f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.java.IdAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaIdDerivedIdentityStrategy2_0
+	extends AbstractJavaJpaContextNode
+	implements JavaIdDerivedIdentityStrategy2_0
+{
+	protected boolean value;
+	
+	
+	public GenericJavaIdDerivedIdentityStrategy2_0(JavaDerivedIdentity2_0 parent) {
+		super(parent);
+	}
+	
+	
+	public JavaDerivedIdentity2_0 getDerivedIdentity() {
+		return (JavaDerivedIdentity2_0) super.getParent();
+	}
+	
+	public JavaSingleRelationshipMapping2_0 getMapping() {
+		return getDerivedIdentity().getMapping();
+	}
+	
+	protected JavaResourcePersistentAttribute getResourceAttribute() {
+		return getMapping().getPersistentAttribute().getResourcePersistentAttribute();
+	}
+	
+	protected IdAnnotation getAnnotation() {
+		return (IdAnnotation) getResourceAttribute().getAnnotation(JPA.ID);
+	}
+	
+	protected boolean getResourceValue() {
+		return getAnnotation() != null;
+	}
+	
+	protected void addAnnotation() {
+		getResourceAttribute().addAnnotation(JPA.ID);
+	}
+	
+	protected void removeAnnotation() {
+		getResourceAttribute().removeAnnotation(JPA.ID);
+	}
+	
+	public boolean getValue() {
+		return this.value;
+	}
+	
+	public void setValue(boolean newValue) {
+		if (this.value == newValue) {
+			return;
+		}
+		boolean oldValue = this.value;
+		this.value = newValue;
+		
+		if (newValue) {
+			addAnnotation();
+		}
+		else {
+			removeAnnotation();
+		}
+		firePropertyChanged(VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	protected void setValue_(boolean newValue) {
+		boolean oldValue = this.value;
+		this.value = newValue;
+		firePropertyChanged(VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	public boolean isSpecified() {
+		return getAnnotation() != null;
+	}
+	
+	public void addStrategy() {
+		if (getAnnotation() == null) {
+			addAnnotation();
+		}
+	}
+	
+	public void removeStrategy() {
+		if (getAnnotation() != null) {
+			removeAnnotation();
+		}
+	}
+	
+	public void initialize() {
+		this.value = getResourceValue();
+	}
+	
+	public void update() {
+		this.setValue_(getResourceValue());
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		IdAnnotation annotation = this.getAnnotation();
+		return annotation == null ? null : annotation.getTextRange(astRoot);
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		// no validation rules
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaJoinTableInAssociationOverrideJoiningStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaJoinTableInAssociationOverrideJoiningStrategy2_0.java
new file mode 100644
index 0000000..2dc037a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaJoinTableInAssociationOverrideJoiningStrategy2_0.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.jpa2.context.java.JavaAssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaJoinTableInAssociationOverrideJoiningStrategy2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericJavaJoinTableInAssociationOverrideJoiningStrategy2_0 
+	extends AbstractJavaJoinTableJoiningStrategy
+	implements JavaJoinTableInAssociationOverrideJoiningStrategy2_0
+{
+	protected transient AssociationOverride2_0Annotation associationOverrideAnnotation;
+	
+	public GenericJavaJoinTableInAssociationOverrideJoiningStrategy2_0(JavaAssociationOverrideRelationshipReference2_0 parent) {
+		super(parent);
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	@Override
+	public JavaAssociationOverrideRelationshipReference2_0 getRelationshipReference() {
+		return (JavaAssociationOverrideRelationshipReference2_0) super.getRelationshipReference();
+	}
+	
+	public boolean shouldValidateAgainstDatabase() {
+		return getRelationshipReference().getTypeMapping().shouldValidateAgainstDatabase();
+	}
+	
+	// **************** join table *********************************************
+	
+	public JoinTableAnnotation getAnnotation() {
+		return this.associationOverrideAnnotation.getNonNullJoinTable();
+	}
+	@Override
+	protected JoinTableAnnotation addAnnotation() {
+		return this.associationOverrideAnnotation.addJoinTable();
+	}
+	
+	@Override
+	protected void removeAnnotation() {
+		this.associationOverrideAnnotation.removeJoinTable();
+	}
+
+	
+	public void initialize(AssociationOverride2_0Annotation associationOverride) {
+		this.associationOverrideAnnotation = associationOverride;
+		super.initialize();
+	}
+	
+	public void update(AssociationOverride2_0Annotation associationOverride) {
+		this.associationOverrideAnnotation = associationOverride;
+		super.update();
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getRelationshipReference().getValidationTextRange(astRoot);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0.java
new file mode 100644
index 0000000..48057b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaManyToOneMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaManyToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneRelationshipReference2_0;
+
+
+public class GenericJavaManyToOneMapping2_0
+	extends AbstractJavaManyToOneMapping
+{
+	public GenericJavaManyToOneMapping2_0(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaManyToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericJavaManyToOneRelationshipReference2_0(this);
+	}	
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaManyToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaManyToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..cbc931c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaManyToOneRelationshipReference2_0.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaManyToOneRelationshipReference;
+import org.eclipse.jpt.core.internal.context.java.GenericJavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneMapping2_0;
+
+public class GenericJavaManyToOneRelationshipReference2_0
+	extends AbstractJavaManyToOneRelationshipReference
+{
+
+	public GenericJavaManyToOneRelationshipReference2_0(JavaManyToOneMapping2_0 parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new GenericJavaJoinTableJoiningStrategy(this);
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.joinTableJoiningStrategy.getJoinTable() != null) {
+			return this.joinTableJoiningStrategy;
+		}
+		return this.joinColumnJoiningStrategy;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..3ec591b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,299 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.EmbeddedIdMapping;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaMapsIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SingleElementIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericJavaMapsIdDerivedIdentityStrategy2_0
+	extends AbstractJavaJpaContextNode
+	implements JavaMapsIdDerivedIdentityStrategy2_0
+{
+	protected String specifiedValue;
+	
+	protected String defaultValue;
+	
+	
+	public GenericJavaMapsIdDerivedIdentityStrategy2_0(JavaDerivedIdentity2_0 parent) {
+		super(parent);
+	}
+	
+	
+	public JavaDerivedIdentity2_0 getDerivedIdentity() {
+		return (JavaDerivedIdentity2_0) super.getParent();
+	}
+	
+	public JavaSingleRelationshipMapping2_0 getMapping() {
+		return getDerivedIdentity().getMapping();
+	}
+	
+	protected JavaResourcePersistentAttribute getResourceAttribute() {
+		return getMapping().getPersistentAttribute().getResourcePersistentAttribute();
+	}
+	
+	protected MapsId2_0Annotation getAnnotation() {
+		return (MapsId2_0Annotation) getResourceAttribute().getNonNullAnnotation(JPA2_0.MAPS_ID);
+	}
+	
+	protected MapsId2_0Annotation getAnnotationOrNull() {
+		return (MapsId2_0Annotation) getResourceAttribute().getAnnotation(JPA2_0.MAPS_ID);
+	}
+	
+	protected String getResourceValue() {
+		return getAnnotation().getValue();
+	}
+	
+	protected String calculateDefaultValue() {
+		Iterable<AttributeMapping> validAttributeMappings = 
+			new FilteringIterable<AttributeMapping>(
+				CollectionTools.collection(getMapping().getPersistentAttribute().getOwningTypeMapping().allAttributeMappings())) {
+			@Override
+			protected boolean accept(AttributeMapping o) {
+				return StringTools.stringsAreEqual(o.getKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY)
+					|| StringTools.stringsAreEqual(o.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
+			}
+		};
+		if (CollectionTools.size(validAttributeMappings) == 1) {
+			return validAttributeMappings.iterator().next().getName();
+		}
+		return null;
+	}
+	
+	protected void addAnnotation() {
+		getResourceAttribute().addAnnotation(JPA2_0.MAPS_ID);
+	}
+	
+	protected void removeAnnotation() {
+		getResourceAttribute().removeAnnotation(JPA2_0.MAPS_ID);
+	}
+	
+	public String getSpecifiedValue() {
+		return this.specifiedValue;
+	}
+	
+	public void setSpecifiedValue(String newValue) {
+		if (StringTools.stringsAreEqual(this.specifiedValue, newValue)) {
+			return;
+		}
+		String oldValue = this.specifiedValue;
+		this.specifiedValue = newValue;
+		getAnnotation().setValue(newValue);	
+		firePropertyChanged(SPECIFIED_VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	protected void setSpecifiedValue_(String newValue) {
+		String oldValue = this.specifiedValue;
+		this.specifiedValue = newValue;
+		firePropertyChanged(SPECIFIED_VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	public boolean usesDefaultValue() {
+		return true;
+	}
+	
+	public String getDefaultValue() {
+		return this.defaultValue;
+	}
+	
+	protected void setDefaultValue_(String newValue) {
+		if (StringTools.stringsAreEqual(this.defaultValue, newValue)) {
+			return;
+		}
+		String oldValue = this.defaultValue;
+		this.defaultValue = newValue;
+		firePropertyChanged(SPECIFIED_VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	public String getValue() {
+		return (this.specifiedValue != null) ? this.specifiedValue : this.defaultValue;
+	}
+	
+	public Iterable<String> getSortedValueChoices() {
+		return CollectionTools.sort(
+			new TransformationIterable<AttributeMapping, String>(getAllAttributeMappingChoices()) {
+				@Override
+				protected String transform(AttributeMapping o) {
+					return o.getName();
+				}
+			});
+	}
+	
+	public Iterable<AttributeMapping> getAllAttributeMappingChoices() {
+		return 	new CompositeIterable<AttributeMapping>(
+			getAttributeMappingChoiceIterables(
+				CollectionTools.collection(getMapping().getPersistentAttribute().getOwningTypeMapping().allAttributeMappings())));
+	}
+	
+	protected Iterable<Iterable<AttributeMapping>> getAttributeMappingChoiceIterables(Iterable<AttributeMapping> availableMappings) {
+		return new TransformationIterable<AttributeMapping, Iterable<AttributeMapping>>(availableMappings) {
+			@Override
+			protected Iterable<AttributeMapping> transform(AttributeMapping o) {
+				if (StringTools.stringsAreEqual(o.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY)) {
+					return getEmbeddedIdMappingChoiceIterable((EmbeddedIdMapping) o);
+				}
+				return new SingleElementIterable<AttributeMapping>(o);
+			}
+		};
+	}
+	
+	protected Iterable<AttributeMapping> getEmbeddedIdMappingChoiceIterable(EmbeddedIdMapping mapping) {
+		Embeddable embeddable = mapping.getTargetEmbeddable();
+		if (embeddable == null) {
+			return new SingleElementIterable<AttributeMapping>(mapping);
+		}
+		return new CompositeIterable<AttributeMapping>(
+				mapping,
+				CollectionTools.collection(embeddable.allAttributeMappings()));
+	}
+	
+	public AttributeMapping getResolvedAttributeMappingValue() {
+		if (getValue() != null) {
+			for (AttributeMapping each : getAllAttributeMappingChoices()) {
+				if (each.getName().equals(getValue())) {
+					return each;
+				}
+			}
+		}
+		return null;
+	}
+	
+	public boolean isSpecified() {
+		return getAnnotationOrNull() != null;
+	}
+	
+	public void addStrategy() {
+		if (getAnnotationOrNull() == null) {
+			addAnnotation();
+		}
+	}
+	
+	public void removeStrategy() {
+		if (getAnnotationOrNull() != null) {
+			removeAnnotation();
+		}
+	}
+	
+	public void initialize() {
+		this.specifiedValue = getResourceValue();
+		this.defaultValue = calculateDefaultValue();
+	}
+	
+	public void update() {
+		this.setSpecifiedValue_(getResourceValue());
+		this.setDefaultValue_(calculateDefaultValue());
+	}
+	
+	@Override
+	public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
+		Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
+		if (result != null) {
+			return result;
+		}
+		if (getAnnotation().valueTouches(pos, astRoot)) {
+			result = sortedJavaValueChoices(filter);
+		}
+		return result;
+	}
+	
+	protected Iterator<String> sortedJavaValueChoices(Filter<String> filter) {
+		return StringTools.convertToJavaStringLiterals(
+				new FilteringIterator<String>(getSortedValueChoices(), filter));
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return this.getAnnotation().getTextRange(astRoot);
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		super.validate(messages, reporter, astRoot);
+		validateMapsId(messages, reporter, astRoot);
+	}
+	
+	protected void validateMapsId(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+		// shortcut out if maps id is not even used
+		if (! getDerivedIdentity().usesMapsIdDerivedIdentityStrategy()) {
+			return;
+		}
+		
+		// test whether value can be resolved
+		AttributeMapping attributeMappingValue = getResolvedAttributeMappingValue();
+		if (attributeMappingValue == null) {
+			// if value is not specified, use that message
+			if (getSpecifiedValue() == null) {
+				messages.add(buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_SPECIFIED, null, astRoot));
+			}
+			else {
+				messages.add(buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_RESOLVED, new String[] {getValue()}, astRoot));
+			}
+		}
+		
+		// test whether attribute mapping is allowable
+		if (attributeMappingValue != null) {
+			if (! CollectionTools.contains(getValidAttributeMappingChoices(), attributeMappingValue)) {
+				messages.add(buildMessage(JpaValidationMessages.MAPS_ID_VALUE_INVALID, new String[] {getValue()}, astRoot));
+			}
+		}
+	}
+	
+	protected Iterable<AttributeMapping> getValidAttributeMappingChoices() {
+		return 	new CompositeIterable<AttributeMapping>(
+			getAttributeMappingChoiceIterables(
+				new FilteringIterable<AttributeMapping>(
+						CollectionTools.collection(getMapping().getPersistentAttribute().getOwningTypeMapping().allAttributeMappings())) {
+					@Override
+					protected boolean accept(AttributeMapping o) {
+						return StringTools.stringsAreEqual(o.getKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY)
+							|| StringTools.stringsAreEqual(o.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
+					}
+				}));
+	}
+	
+	protected IMessage buildMessage(String msgID, String[] params, CompilationUnit astRoot) {
+		PersistentAttribute attribute = getDerivedIdentity().getMapping().getPersistentAttribute();
+		String attributeDesc = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
+		
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				msgID,
+				ArrayTools.add(params, 0, attributeDesc),
+				this,
+				this.getValidationTextRange(astRoot));
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java
new file mode 100644
index 0000000..dfb4303
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaNamedQuery2_0.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaQuery;
+import org.eclipse.jpt.core.jpa2.context.LockModeType2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaNamedQuery2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.NamedQuery2_0Annotation;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+
+/**
+ *  GenericJavaNamedQuery2_0
+ */
+public class GenericJavaNamedQuery2_0 extends AbstractJavaQuery 
+	implements JavaNamedQuery2_0
+{
+	protected LockModeType2_0 specifiedLockMode;
+	protected LockModeType2_0 defaultLockMode;
+
+	public GenericJavaNamedQuery2_0(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	// ********** NamedQuery2_0 implementation **********
+
+	public LockModeType2_0 getLockMode() {
+		return (this.specifiedLockMode != null) ? this.specifiedLockMode : this.defaultLockMode;
+	}
+
+	public LockModeType2_0 getSpecifiedLockMode() {
+		return this.specifiedLockMode;
+	}
+
+	public void setSpecifiedLockMode(LockModeType2_0 lockMode) {
+		LockModeType2_0 old = this.specifiedLockMode;
+		this.specifiedLockMode = lockMode;
+		this.getResourceQuery().setLockMode(LockModeType2_0.toJavaResourceModel(lockMode));
+		this.firePropertyChanged(SPECIFIED_LOCK_MODE_PROPERTY, old, lockMode);
+	}
+	
+	protected void setSpecifiedLockMode_(LockModeType2_0 lockMode) {
+		LockModeType2_0 old = this.specifiedLockMode;
+		this.specifiedLockMode = lockMode;
+		this.firePropertyChanged(SPECIFIED_LOCK_MODE_PROPERTY, old, lockMode);
+	}
+
+	public LockModeType2_0 getDefaultLockMode() {
+		return this.defaultLockMode;
+	}
+
+	protected void setDefaultLockMode(LockModeType2_0 lockMode) {
+		LockModeType2_0 old = this.defaultLockMode;
+		this.defaultLockMode = lockMode;
+		firePropertyChanged(DEFAULT_LOCK_MODE_PROPERTY, old, lockMode);
+	}
+
+	protected LockModeType2_0 buildDefaultLockMode() {
+		return LockModeType2_0.NONE;
+	}
+
+	// ********** resource => context **********
+
+	public void initialize(NamedQueryAnnotation resourceQuery) {
+		super.initialize(resourceQuery);
+		this.defaultLockMode = this.buildDefaultLockMode();
+		this.specifiedLockMode = this.getResourceQueryLockMode(resourceQuery);
+	}
+
+	public void update(NamedQueryAnnotation resourceQuery) {
+		super.update(resourceQuery);
+		this.setSpecifiedLockMode_(this.getResourceQueryLockMode(resourceQuery));
+	}
+	
+	@Override
+	protected NamedQuery2_0Annotation getResourceQuery() {
+		return (NamedQuery2_0Annotation) super.getResourceQuery();
+	}
+	
+	protected LockModeType2_0 getResourceQueryLockMode(NamedQueryAnnotation resourceQuery) {
+		return LockModeType2_0.fromJavaResourceModel(
+					((NamedQuery2_0Annotation)resourceQuery).getLockMode());
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0.java
new file mode 100644
index 0000000..075d3b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToManyMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaRelationshipReference;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToManyMapping;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+
+
+public class GenericJavaOneToManyMapping2_0
+	extends AbstractJavaOneToManyMapping<OneToMany2_0Annotation>
+{
+	public GenericJavaOneToManyMapping2_0(JavaPersistentAttribute parent) {
+		super(parent);
+	}	
+	
+	
+	@Override
+	protected JavaRelationshipReference buildRelationshipReference() {
+		return new GenericJavaOneToManyRelationshipReference2_0(this);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToManyRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToManyRelationshipReference2_0.java
new file mode 100644
index 0000000..66a2234
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToManyRelationshipReference2_0.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToManyRelationshipReference;
+
+public class GenericJavaOneToManyRelationshipReference2_0
+	extends AbstractJavaOneToManyRelationshipReference
+{	
+
+	public GenericJavaOneToManyRelationshipReference2_0(JavaOneToManyMapping parent) {
+		super(parent);
+	}	
+
+	@Override
+	protected JavaJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericJavaTargetForiegnKeyJoinColumnJoiningStrategy(this);
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		else if (this.joinColumnJoiningStrategy.hasSpecifiedJoinColumns()) {
+			return this.joinColumnJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0.java
new file mode 100644
index 0000000..de4b005
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToOneMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneRelationshipReference2_0;
+
+
+public class GenericJavaOneToOneMapping2_0
+	extends AbstractJavaOneToOneMapping
+{
+	public GenericJavaOneToOneMapping2_0(JavaPersistentAttribute parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaOneToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericJavaOneToOneRelationshipReference2_0(this);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..6087854
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOneToOneRelationshipReference2_0.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaOneToOneRelationshipReference;
+import org.eclipse.jpt.core.internal.context.java.GenericJavaJoinTableJoiningStrategy;
+
+public class GenericJavaOneToOneRelationshipReference2_0
+	extends AbstractJavaOneToOneRelationshipReference
+{
+	
+	public GenericJavaOneToOneRelationshipReference2_0(JavaOneToOneMapping parent) {
+		super(parent);
+	}
+
+	@Override
+	protected JavaJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new GenericJavaJoinTableJoiningStrategy(this);
+	}
+
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		else if (this.primaryKeyJoinColumnJoiningStrategy.primaryKeyJoinColumnsSize() > 0) {
+			return this.primaryKeyJoinColumnJoiningStrategy;
+		}
+		else if (this.joinTableJoiningStrategy.getJoinTable() != null) {
+			return this.joinTableJoiningStrategy;
+		}
+		return this.joinColumnJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java
new file mode 100644
index 0000000..b808073
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOrderColumn2_0.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaNamedColumn;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderable2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+
+public class GenericJavaOrderColumn2_0
+	extends AbstractJavaNamedColumn<OrderColumn2_0Annotation>
+	implements JavaOrderColumn2_0
+{
+	protected Boolean specifiedNullable;
+		
+	protected Boolean specifiedInsertable;
+		
+	protected Boolean specifiedUpdatable;
+
+	
+	public GenericJavaOrderColumn2_0(JavaOrderable2_0 parent, JavaNamedColumn.Owner owner) {
+		super(parent, owner);
+	}
+	
+	protected OrderColumn2_0Annotation getNonNullOrderColumnAnnotation(JavaResourcePersistentAttribute resource) {
+		return (OrderColumn2_0Annotation) resource.getNonNullAnnotation(OrderColumn2_0Annotation.ANNOTATION_NAME);
+	}
+	
+	public void initialize(JavaResourcePersistentAttribute resource) {
+		this.initialize(getNonNullOrderColumnAnnotation(resource));
+	}
+
+	@Override
+	public void initialize(OrderColumn2_0Annotation column) {
+		super.initialize(column);
+		this.specifiedNullable = this.getResourceNullable(column);
+		this.specifiedInsertable = this.getResourceInsertable(column);
+		this.specifiedUpdatable = this.getResourceUpdatable(column);
+	}
+
+	public void update(JavaResourcePersistentAttribute resource) {
+		this.update(getNonNullOrderColumnAnnotation(resource));
+	}
+	
+	@Override
+	public void update(OrderColumn2_0Annotation column) {
+		super.update(column);
+		this.setSpecifiedNullable_(this.getResourceNullable(column));
+		this.setSpecifiedInsertable_(this.getResourceInsertable(column));
+		this.setSpecifiedUpdatable_(this.getResourceUpdatable(column));
+	}
+
+	@Override
+	public JavaOrderable2_0 getParent() {
+		return (JavaOrderable2_0) super.getParent();
+	}
+
+	@Override
+	public String getTable() {
+		return getParent().getDefaultTableName();
+	}
+
+	public boolean isNullable() {
+		return (this.getSpecifiedNullable() == null) ? this.isDefaultNullable() : this.getSpecifiedNullable().booleanValue();
+	}
+	
+	public boolean isDefaultNullable() {
+		return BaseColumn.DEFAULT_NULLABLE;
+	}
+	
+	public Boolean getSpecifiedNullable() {
+		return this.specifiedNullable;
+	}
+	
+	public void setSpecifiedNullable(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		this.getResourceColumn().setNullable(newSpecifiedNullable);
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedNullable_(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+	
+	protected Boolean getResourceNullable(OrderColumn2_0Annotation column) {
+		return column.getNullable();
+	}
+	
+	public boolean isInsertable() {
+		return (this.getSpecifiedInsertable() == null) ? this.isDefaultInsertable() : this.getSpecifiedInsertable().booleanValue();
+	}
+	
+	public boolean isDefaultInsertable() {
+		return BaseColumn.DEFAULT_INSERTABLE;
+	}
+	
+	public Boolean getSpecifiedInsertable() {
+		return this.specifiedInsertable;
+	}
+	
+	public void setSpecifiedInsertable(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		this.getResourceColumn().setInsertable(newSpecifiedInsertable);
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+	
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedInsertable_(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+	
+	protected Boolean getResourceInsertable(OrderColumn2_0Annotation column) {
+		return column.getInsertable();
+	}
+	
+	public boolean isUpdatable() {
+		return (this.getSpecifiedUpdatable() == null) ? this.isDefaultUpdatable() : this.getSpecifiedUpdatable().booleanValue();
+	}
+	
+	public boolean isDefaultUpdatable() {
+		return BaseColumn.DEFAULT_UPDATABLE;
+	}
+	
+	public Boolean getSpecifiedUpdatable() {
+		return this.specifiedUpdatable;
+	}
+	
+	public void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		this.getResourceColumn().setUpdatable(newSpecifiedUpdatable);
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+
+	/**
+	 * internal setter used only for updating from the resource model.
+	 * There were problems with InvalidThreadAccess exceptions in the UI
+	 * when you set a value from the UI and the annotation doesn't exist yet.
+	 * Adding the annotation causes an update to occur and then the exception.
+	 */
+	protected void setSpecifiedUpdatable_(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+	
+	protected Boolean getResourceUpdatable(OrderColumn2_0Annotation column) {
+		return column.getUpdatable();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
new file mode 100644
index 0000000..8587f04
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OrphanRemovable2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  GenericJavaOrphanRemoval2_0
+ */
+public class GenericJavaOrphanRemoval2_0
+		extends AbstractJavaJpaContextNode 
+		implements JavaOrphanRemovable2_0
+{
+	protected boolean defaultOrphanRemoval;
+	protected Boolean specifiedOrphanRemoval;
+	
+	protected JavaResourcePersistentAttribute resourcePersistentAttribute;
+	
+	public GenericJavaOrphanRemoval2_0(JavaOrphanRemovalHolder2_0 parent) {
+		super(parent);
+	}
+	
+	@Override
+	public JavaOrphanRemovalHolder2_0 getParent() {
+		return (JavaOrphanRemovalHolder2_0) super.getParent();
+	}
+	
+	protected String getAnnotationName() {
+		return ((JavaAttributeMapping)getParent()).getAnnotationName();
+	}
+	
+	protected OrphanRemovable2_0Annotation getResourceOrphanRemovable() {
+		return (OrphanRemovable2_0Annotation) this.resourcePersistentAttribute.getAnnotation(this.getAnnotationName());
+	}
+	
+	// ********** OrphanRemovable2_0 implementation **********
+
+	public boolean isOrphanRemoval() {
+		return this.specifiedOrphanRemoval != null ? this.specifiedOrphanRemoval.booleanValue() : this.defaultOrphanRemoval; 
+	}
+	
+	public Boolean getSpecifiedOrphanRemoval() {
+		return this.specifiedOrphanRemoval;
+	}
+	
+	public boolean isDefaultOrphanRemoval() {
+		return this.defaultOrphanRemoval;
+	}
+	
+	protected void setDefaultOrphanRemoval(boolean newDefaultOrphanRemoval) {
+		boolean old = this.defaultOrphanRemoval;
+		this.defaultOrphanRemoval = newDefaultOrphanRemoval;
+		this.firePropertyChanged(DEFAULT_ORPHAN_REMOVAL_PROPERTY, old, newDefaultOrphanRemoval);
+	}
+	
+	public void setSpecifiedOrphanRemoval(Boolean newOrphanRemoval) {
+		Boolean old = this.specifiedOrphanRemoval;
+		this.specifiedOrphanRemoval = newOrphanRemoval;
+		this.getResourceOrphanRemovable().setOrphanRemoval(newOrphanRemoval);
+		this.firePropertyChanged(SPECIFIED_ORPHAN_REMOVAL_PROPERTY, old, newOrphanRemoval);
+	}
+	
+	protected void setSpecifiedOrphanRemoval_(Boolean newSpecifiedOrphanRemoval) {
+		Boolean old = this.specifiedOrphanRemoval;
+		this.specifiedOrphanRemoval = newSpecifiedOrphanRemoval;
+		this.firePropertyChanged(SPECIFIED_ORPHAN_REMOVAL_PROPERTY, old, newSpecifiedOrphanRemoval);
+	}
+
+	// ********** initialize/update **********
+	
+	public void initialize(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistentAttribute = jrpa;
+		OrphanRemovable2_0Annotation resource = this.getResourceOrphanRemovable();
+		this.specifiedOrphanRemoval = this.getSpecifiedOrphanRemovalFrom(resource);
+	}
+	
+	public void update(JavaResourcePersistentAttribute jrpa) {
+		this.resourcePersistentAttribute = jrpa;
+		OrphanRemovable2_0Annotation resource = this.getResourceOrphanRemovable();
+		this.setSpecifiedOrphanRemoval_(this.getSpecifiedOrphanRemovalFrom(resource));
+	}
+	
+	private Boolean getSpecifiedOrphanRemovalFrom(OrphanRemovable2_0Annotation resource) {
+		return (resource == null) ? null : resource.getOrphanRemoval();
+	}
+
+	// ********** validation **********
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		// TODO
+		return null;
+	}
+	
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0.java
new file mode 100644
index 0000000..9b979f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * JPA 2.0 Java persistent attribute
+ */
+public class GenericJavaPersistentAttribute2_0
+	extends AbstractJavaPersistentAttribute
+	implements JavaPersistentAttribute2_0
+{
+	protected AccessType specifiedAccess;
+
+
+	public GenericJavaPersistentAttribute2_0(PersistentType parent, JavaResourcePersistentAttribute resourcePersistentAttribute) {
+		super(parent, resourcePersistentAttribute);
+		this.specifiedAccess = this.buildSpecifiedAccess();
+	}
+
+
+	// ********** AccessHolder implementation **********
+
+	public AccessType getSpecifiedAccess() {
+		return this.specifiedAccess;
+	}
+
+	/**
+	 * Don't support changing to specified access on a java persistent attribute, this
+	 * involves a larger process of moving the annotations to the corresponding field/property
+	 * which may or may not exist or might need to be created.
+	 */
+	public void setSpecifiedAccess(AccessType specifiedAccess) {
+		throw new UnsupportedOperationException();
+	}
+
+	protected void setSpecifiedAccess_(AccessType specifiedAccess) {
+		AccessType old = this.specifiedAccess;
+		this.specifiedAccess = specifiedAccess;
+		this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, specifiedAccess);
+	}
+
+	protected AccessType buildSpecifiedAccess() {
+		Access2_0Annotation accessAnnotation = 
+				(Access2_0Annotation) this.resourcePersistentAttribute.
+					getAnnotation(Access2_0Annotation.ANNOTATION_NAME);
+		return accessAnnotation == null ? null : AccessType.fromJavaResourceModel(accessAnnotation.getValue());
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setSpecifiedAccess_(this.buildSpecifiedAccess());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java
new file mode 100644
index 0000000..46939ff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaPersistentType2_0.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaPersistentType;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.context.java.JavaPersistentType2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.BodySourceWriter;
+
+/**
+ * JPA 2.0 Java persistent type.
+ * Support for specified access and metamodel generation.
+ */
+public class GenericJavaPersistentType2_0
+	extends AbstractJavaPersistentType
+	implements JavaPersistentType2_0
+{
+	protected String declaringTypeName;
+
+	protected final MetamodelSourceType.Synchronizer metamodelSynchronizer;
+
+
+	public GenericJavaPersistentType2_0(PersistentType.Owner parent, JavaResourcePersistentType jrpt) {
+		super(parent, jrpt);
+		this.metamodelSynchronizer = this.buildMetamodelSynchronizer();
+	}
+
+	@Override
+	protected void initialize(JavaResourcePersistentType jrpt) {
+		super.initialize(jrpt);
+		this.declaringTypeName = this.buildDeclaringTypeName();
+	}
+
+	protected MetamodelSourceType.Synchronizer buildMetamodelSynchronizer() {
+		return ((JpaFactory2_0) this.getJpaFactory()).buildMetamodelSynchronizer(this);
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setDeclaringTypeName(this.buildDeclaringTypeName());
+	}
+
+
+	// ********** access **********
+
+	protected Access2_0Annotation getAccessAnnotation() {
+		return (Access2_0Annotation) this.resourcePersistentType.getNonNullAnnotation(this.getAccessAnnotationName());
+	}
+	
+	protected String getAccessAnnotationName() {
+		return Access2_0Annotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected AccessType buildSpecifiedAccess() {
+		return AccessType.fromJavaResourceModel(this.getAccessAnnotation().getValue());
+	}
+	
+	public void setSpecifiedAccess(AccessType specifiedAccess) {
+		AccessType old = this.specifiedAccess;
+		this.specifiedAccess = specifiedAccess;
+		this.getAccessAnnotation().setValue(AccessType.toJavaResourceModel(specifiedAccess));
+		this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, specifiedAccess);
+	}
+	
+	protected void setSpecifiedAccess_(AccessType specifiedAccess) {
+		AccessType old = this.specifiedAccess;
+		this.specifiedAccess = specifiedAccess;
+		this.firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, old, specifiedAccess);
+	}
+	
+	@Override
+	protected Iterator<JavaResourcePersistentAttribute> resourceAttributes() {
+		return (this.specifiedAccess == null) ?
+				super.resourceAttributes() :
+				this.resourcePersistentType.persistableAttributes(AccessType.toJavaResourceModel(this.specifiedAccess));
+	}
+	
+	@Override
+	public void updateAccess() {
+		super.updateAccess();
+		this.setSpecifiedAccess_(this.buildSpecifiedAccess());
+	}
+
+
+	// ********** declaring type name **********
+
+	public String getDeclaringTypeName() {
+		return this.declaringTypeName;
+	}
+
+	protected void setDeclaringTypeName(String declaringTypeName) {
+		String old = this.declaringTypeName;
+		this.declaringTypeName = declaringTypeName;
+		this.firePropertyChanged(DECLARING_TYPE_NAME_PROPERTY, old, declaringTypeName);
+	}
+
+	protected String buildDeclaringTypeName() {
+		return this.resourcePersistentType.getDeclaringTypeName();
+	}
+
+
+	// ********** metamodel **********
+
+	public IFile getMetamodelFile() {
+		return this.metamodelSynchronizer.getFile();
+	}
+
+	public void initializeMetamodel() {
+		// do nothing - probably shouldn't be called...
+	}
+
+	public boolean isManaged() {
+		return true;
+	}
+
+	public void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		this.metamodelSynchronizer.synchronize(memberTypeTree);
+	}
+	
+	public void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree) {
+		this.metamodelSynchronizer.printBodySourceOn(pw, memberTypeTree);
+	}
+
+	public void disposeMetamodel() {
+		// do nothing - probably shouldn't be called...
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java
new file mode 100644
index 0000000..242ab12
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaSequenceGenerator2_0.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaSequenceGenerator;
+import org.eclipse.jpt.core.jpa2.context.SequenceGenerator2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+
+/**
+ *  Generic2_0JavaSequenceGenerator
+ */
+public class GenericJavaSequenceGenerator2_0 extends AbstractJavaSequenceGenerator
+	implements SequenceGenerator2_0
+{
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+
+	public GenericJavaSequenceGenerator2_0(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	// ********** catalog **********
+
+	@Override
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.getResourceGenerator().setCatalog(catalog);
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+	
+	protected void setSpecifiedCatalog_(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+	// ********** schema **********
+
+	@Override
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.getResourceGenerator().setSchema(schema);
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	protected void setSpecifiedSchema_(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	// ********** resource => context **********
+
+	@Override
+	public void initialize(SequenceGeneratorAnnotation resourceSequenceGenerator) {
+		super.initialize(resourceSequenceGenerator);
+		SequenceGenerator2_0Annotation resource = (SequenceGenerator2_0Annotation) resourceSequenceGenerator;
+
+		this.defaultCatalog = this.buildDefaultCatalog();
+		this.specifiedCatalog = resource.getCatalog();
+		this.defaultSchema = this.buildDefaultSchema();
+		this.specifiedSchema = resource.getSchema();
+	}
+
+	@Override
+	public void update(SequenceGeneratorAnnotation resourceSequenceGenerator) {
+		super.update(resourceSequenceGenerator);
+		SequenceGenerator2_0Annotation resource = (SequenceGenerator2_0Annotation) resourceSequenceGenerator;
+
+		this.setDefaultCatalog(this.buildDefaultCatalog());
+		this.setSpecifiedCatalog_(resource.getCatalog());
+		this.setDefaultSchema(this.buildDefaultSchema());
+		this.setSpecifiedSchema_(resource.getSchema());
+	}
+	
+	@Override
+	protected SequenceGenerator2_0Annotation getResourceGenerator() {
+		return (SequenceGenerator2_0Annotation) super.getResourceGenerator();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaTargetForiegnKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaTargetForiegnKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..1241c2a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/GenericJavaTargetForiegnKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy;
+
+public class GenericJavaTargetForiegnKeyJoinColumnJoiningStrategy 
+	extends AbstractJavaJoinColumnInRelationshipMappingJoiningStrategy
+{
+
+	public GenericJavaTargetForiegnKeyJoinColumnJoiningStrategy(JavaJoinColumnEnabledRelationshipReference parent) {
+		super(parent);
+	}
+
+	public TypeMapping getRelationshipSource() {
+		RelationshipMapping relationshipMapping = getRelationshipMapping();
+		return relationshipMapping == null ? null : relationshipMapping.getResolvedTargetEntity();
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	@Override
+	protected Entity getRelationshipTargetEntity() {
+		TypeMapping relationshipTarget = getRelationshipTarget();
+		return relationshipTarget.getKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY ? (Entity) relationshipTarget : null;
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java
new file mode 100644
index 0000000..3a27637
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/JavaElementCollectionMappingDefinition2_0.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.jpa2.JpaFactory2_0;
+import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
+
+public class JavaElementCollectionMappingDefinition2_0
+	extends AbstractJavaAttributeMappingDefinition
+{
+	// singleton
+	private static final JavaElementCollectionMappingDefinition2_0 INSTANCE = 
+		new JavaElementCollectionMappingDefinition2_0();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaElementCollectionMappingDefinition2_0() {
+		super();
+	}
+	
+	public String getKey() {
+		return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public String getAnnotationName() {
+		return ElementCollection2_0Annotation.ANNOTATION_NAME;
+	}
+	
+	public JavaAttributeMapping buildMapping(JavaPersistentAttribute parent, JpaFactory factory) {
+		return ((JpaFactory2_0) factory).buildJavaElementCollectionMapping2_0(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java
new file mode 100644
index 0000000..d8948bc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/JavaIdMappingDefinition2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
+
+public class JavaIdMappingDefinition2_0
+	extends AbstractJavaIdMappingDefinition2_0
+{
+	// singleton
+	private static final JavaIdMappingDefinition2_0 INSTANCE = 
+		new JavaIdMappingDefinition2_0();
+	
+	
+	/**
+	 * Return the singleton.
+	 */
+	public static JavaAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private JavaIdMappingDefinition2_0() {
+		super();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
new file mode 100644
index 0000000..7110530
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheableHolder2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class NullJavaCacheable2_0
+	extends AbstractJavaJpaContextNode
+	implements JavaCacheable2_0
+{
+	public NullJavaCacheable2_0(JavaCacheableHolder2_0 parent) {
+		super(parent);
+	}
+	
+	public Boolean getSpecifiedCacheable() {
+		return null;
+	}
+	
+	public void setSpecifiedCacheable(Boolean newSpecifiedCacheable) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public boolean isCacheable() {
+		return false;
+	}
+	
+	public boolean isDefaultCacheable() {
+		return false;
+	}
+	
+	public void initialize(JavaResourcePersistentType jrpt) {
+		//no-op
+	}
+	
+	public void update(JavaResourcePersistentType jrpt) {
+		//no-op
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
new file mode 100644
index 0000000..96e0f78
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.IdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.MapsIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class NullJavaDerivedIdentity2_0
+	extends AbstractJavaJpaContextNode
+	implements JavaDerivedIdentity2_0
+{
+	public NullJavaDerivedIdentity2_0(JavaSingleRelationshipMapping2_0 parent) {
+		super(parent);
+	}
+	
+	
+	public JavaSingleRelationshipMapping2_0 getMapping() {
+		return (JavaSingleRelationshipMapping2_0) getParent();
+	}
+	
+	public void initialize() {
+		// no op
+	}
+	
+	public void update() {
+		// no op
+	}
+	
+	public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
+		return null;
+	}
+	
+	public MapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
+		return null;
+	}
+	
+	public boolean usesMapsIdDerivedIdentityStrategy() {
+		return false;
+	}
+	
+	public void setMapsIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public void unsetMapsIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public IdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
+		return null;
+	}
+	
+	public boolean usesIdDerivedIdentityStrategy() {
+		return false;
+	}
+	
+	public void setIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public void unsetIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public boolean usesNullDerivedIdentityStrategy() {
+		return true;
+	}
+	
+	public void setNullDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
new file mode 100644
index 0000000..9be2282
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Column;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+
+public class NullJavaMapKeyColumn2_0
+	extends AbstractJavaJpaContextNode
+	implements JavaColumn
+{
+
+	public NullJavaMapKeyColumn2_0(JavaJpaContextNode parent) {
+		super(parent);
+	}
+
+	public void initialize(JavaResourcePersistentAttribute resource) {
+		//no-op
+	}
+
+	public void update(JavaResourcePersistentAttribute resource) {
+		//no-op
+	}
+
+	public void initialize(ColumnAnnotation resourceColumn) {
+		//no-op
+	}
+
+	public void update(ColumnAnnotation resourceColumn) {
+		//no-op
+	}
+
+	public String getName() {
+		return null;
+	}
+
+	public String getSpecifiedName() {
+		return null;
+	}
+
+	public void setSpecifiedName(String newSpecifiedName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultName() {
+		return null;
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean isNullable() {
+		return false;
+	}
+
+	public boolean isDefaultNullable() {
+		return false;
+	}
+
+	public Boolean getSpecifiedNullable() {
+		return null;
+	}
+
+	public void setSpecifiedNullable(Boolean newSpecifiedNullable) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isInsertable() {
+		return false;
+	}
+
+	public boolean isDefaultInsertable() {
+		return false;
+	}
+
+	public Boolean getSpecifiedInsertable() {
+		return null;
+	}
+
+	public void setSpecifiedInsertable(Boolean newSpecifiedInsertable) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isUpdatable() {
+		return false;
+	}
+
+	public boolean isDefaultUpdatable() {
+		return false;
+	}
+
+	public Boolean getSpecifiedUpdatable() {
+		return null;
+	}
+
+	public void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public int getDefaultLength() {
+		return 0;
+	}
+
+	public int getDefaultPrecision() {
+		return 0;
+	}
+
+	public int getDefaultScale() {
+		return 0;
+	}
+
+	public int getLength() {
+		return 0;
+	}
+
+	public int getPrecision() {
+		return 0;
+	}
+
+	public int getScale() {
+		return 0;
+	}
+
+	public Integer getSpecifiedLength() {
+		return null;
+	}
+
+	public Integer getSpecifiedPrecision() {
+		return null;
+	}
+
+	public Integer getSpecifiedScale() {
+		return null;
+	}
+
+	public void setSpecifiedLength(Integer newSpecifiedLength) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void setSpecifiedPrecision(Integer newSpecifiedPrecision) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void setSpecifiedScale(Integer newSpecifiedScale) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Iterator<String> candidateTableNames() {
+		return EmptyIterator.instance();
+	}
+
+	public String getDefaultTable() {
+		return null;
+	}
+
+	public String getSpecifiedTable() {
+		return null;
+	}
+
+	public String getTable() {
+		return null;
+	}
+
+	public void setSpecifiedTable(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Boolean getSpecifiedUnique() {
+		return null;
+	}
+
+	public void setSpecifiedUnique(Boolean newSpecifiedUnique) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isDefaultUnique() {
+		return false;
+	}
+
+	public boolean isUnique() {
+		return false;
+	}
+
+	public String getColumnDefinition() {
+		return null;
+	}
+
+	public void setColumnDefinition(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean tableNameIsInvalid() {
+		return false;
+	}
+
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public Column getDbColumn() {
+		return null;
+	}
+
+	public Table getDbTable() {
+		return null;
+	}
+
+	public boolean isResolved() {
+		return false;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaOrderColumn2_0.java
new file mode 100644
index 0000000..b46cca3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaOrderColumn2_0.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaNamedColumn;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+public class NullJavaOrderColumn2_0
+	extends AbstractJavaNamedColumn<OrderColumn2_0Annotation>
+	implements JavaOrderColumn2_0
+{
+
+	public NullJavaOrderColumn2_0(JavaJpaContextNode parent, JavaNamedColumn.Owner owner) {
+		super(parent, owner);
+	}
+
+	public void initialize(JavaResourcePersistentAttribute resource) {
+		//no-op
+	}
+
+	public void update(JavaResourcePersistentAttribute resource) {
+		//no-op
+	}
+
+	public boolean isNullable() {
+		return false;
+	}
+
+	public boolean isDefaultNullable() {
+		return false;
+	}
+
+	public Boolean getSpecifiedNullable() {
+		return null;
+	}
+
+	public void setSpecifiedNullable(Boolean newSpecifiedNullable) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isInsertable() {
+		return false;
+	}
+
+	public boolean isDefaultInsertable() {
+		return false;
+	}
+
+	public Boolean getSpecifiedInsertable() {
+		return null;
+	}
+
+	public void setSpecifiedInsertable(Boolean newSpecifiedInsertable) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isUpdatable() {
+		return false;
+	}
+
+	public boolean isDefaultUpdatable() {
+		return false;
+	}
+
+	public Boolean getSpecifiedUpdatable() {
+		return null;
+	}
+
+	public void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
new file mode 100644
index 0000000..03633a8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  NullJavaOrphanRemoval2_0
+ */
+public class NullJavaOrphanRemoval2_0
+			extends AbstractJavaJpaContextNode
+			implements JavaOrphanRemovable2_0
+{
+	// ********** constructor **********
+	public NullJavaOrphanRemoval2_0(JavaOrphanRemovalHolder2_0 parent) {
+		super(parent);
+	}
+
+	// ********** OrphanRemovable2_0 implementation **********
+	
+	public boolean isOrphanRemoval() {
+		return false;
+	}
+	
+	public Boolean getSpecifiedOrphanRemoval() {
+		return null;
+	}
+	
+	public boolean isDefaultOrphanRemoval() {
+		return false;
+	}
+	
+	public void setSpecifiedOrphanRemoval(Boolean newSpecifiedOrphanRemoval) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ********** JavaOrphanRemovable2_0 implementation **********
+	
+	public void initialize(JavaResourcePersistentAttribute jrpa) {
+		// do nothing
+	}
+	
+	public void update(JavaResourcePersistentAttribute jrpa) {
+		// do nothing
+	}
+
+	// ********** validation **********
+	
+	public TextRange getValidationTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/VirtualAssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/VirtualAssociationOverride2_0Annotation.java
new file mode 100644
index 0000000..122c3f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/VirtualAssociationOverride2_0Annotation.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.internal.context.java.VirtualAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinTableAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public final class VirtualAssociationOverride2_0Annotation
+	extends VirtualAssociationOverrideAnnotation
+	implements AssociationOverride2_0Annotation
+{
+
+	private final JoinTableAnnotation joinTable;
+	
+	public VirtualAssociationOverride2_0Annotation(JavaResourcePersistentMember parent, String name, JoiningStrategy joiningStrategy) {
+		super(parent, name, joiningStrategy);
+		this.joinTable = this.buildJoinTable();
+	}
+	
+	protected JoinTableAnnotation buildJoinTable() {
+		if (this.joiningStrategy instanceof JoinTableJoiningStrategy) {
+			return new VirtualAssociationOverrideJoinTableAnnotation(this, ((JoinTableJoiningStrategy)this.joiningStrategy).getJoinTable());
+		}
+		return new NullJoinTableAnnotation(this);
+	}
+
+	// ***** join table
+	
+	public JoinTableAnnotation getJoinTable() {
+		return this.joinTable;
+	}
+
+	public JoinTableAnnotation getNonNullJoinTable() {
+		return this.joinTable;
+	}
+
+	public JoinTableAnnotation addJoinTable() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeJoinTable() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/VirtualAssociationOverrideJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/VirtualAssociationOverrideJoinTableAnnotation.java
new file mode 100644
index 0000000..62b0475
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/VirtualAssociationOverrideJoinTableAnnotation.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.java;
+
+import java.util.ListIterator;
+import java.util.Vector;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.internal.context.java.VirtualAssociationOverrideJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinTableAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public final class VirtualAssociationOverrideJoinTableAnnotation extends NullJoinTableAnnotation
+	implements JoinTableAnnotation
+{
+	private JoinTable joinTable; //TODO uniqueConstraints
+
+	private final Vector<JoinColumnAnnotation> joinColumns;
+	
+	private final Vector<JoinColumnAnnotation> inverseJoinColumns;
+
+	public VirtualAssociationOverrideJoinTableAnnotation(AssociationOverride2_0Annotation parent, JoinTable joinTable) {
+		super(parent);
+		this.joinTable = joinTable;
+		this.joinColumns = this.buildJoinColumns();
+		this.inverseJoinColumns = this.buildInverseJoinColumns();
+	}
+
+	@Override
+	protected JoinTableAnnotation addAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+	
+	private Vector<JoinColumnAnnotation> buildJoinColumns() {
+		Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(this.joinTable.joinColumnsSize());
+		for (JoinColumn joinColumn : CollectionTools.iterable(this.joinTable.joinColumns())) {
+			result.add(new VirtualAssociationOverrideJoinColumnAnnotation(this, joinColumn));
+		}
+		return result;
+	}
+	
+	private Vector<JoinColumnAnnotation> buildInverseJoinColumns() {
+		Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(this.joinTable.inverseJoinColumnsSize());
+		for (JoinColumn joinColumn : CollectionTools.iterable(this.joinTable.inverseJoinColumns())) {
+			result.add(new VirtualAssociationOverrideJoinColumnAnnotation(this, joinColumn));
+		}
+		return result;
+	}
+
+	@Override
+	public String getName() {
+		return this.joinTable.getSpecifiedName();
+	}
+
+	@Override
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public String getCatalog() {
+		return this.joinTable.getCatalog();
+	}
+	
+	@Override
+	public void setCatalog(String catalog) {
+		throw new UnsupportedOperationException();
+	}
+	
+	@Override
+	public String getSchema() {
+		return this.joinTable.getSchema();
+	}
+	
+	@Override
+	public void setSchema(String schema) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** join columns
+	@Override
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return this.joinColumns.listIterator();
+	}
+	
+	@Override
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.elementAt(index);
+	}
+	
+	@Override
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+	
+	@Override
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+	
+	// ***** inverse join columns
+	@Override
+	public ListIterator<JoinColumnAnnotation> inverseJoinColumns() {
+		return this.inverseJoinColumns.listIterator();
+	}
+	
+	@Override
+	public JoinColumnAnnotation inverseJoinColumnAt(int index) {
+		return this.inverseJoinColumns.elementAt(index);
+	}
+	
+	@Override
+	public int indexOfInverseJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.inverseJoinColumns.indexOf(joinColumn);
+	}
+	
+	@Override
+	public int inverseJoinColumnsSize() {
+		return this.inverseJoinColumns.size();
+	}
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
new file mode 100644
index 0000000..00b1d5b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
@@ -0,0 +1,1876 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.AttributeOverride;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.BaseOverride;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Converter;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.FetchType;
+import org.eclipse.jpt.core.context.Fetchable;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.context.orm.OrmConverter;
+import org.eclipse.jpt.core.context.orm.OrmOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmAttributeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAttributeOverrideColumn;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
+import org.eclipse.jpt.core.jpa2.context.MetamodelField;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.PersistentAttribute2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.Attributes;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+
+public abstract class AbstractOrmElementCollectionMapping2_0<T extends XmlElementCollection>
+	extends AbstractOrmAttributeMapping<T> 
+	implements OrmElementCollectionMapping2_0
+{
+	
+	protected String specifiedTargetClass;
+	protected String defaultTargetClass;
+	protected PersistentType resolvedTargetType;
+	protected Embeddable resolvedTargetEmbeddable;
+
+	protected FetchType specifiedFetch;
+	
+	protected final OrmOrderable2_0 orderable;
+
+	protected final OrmCollectionTable2_0 collectionTable;
+
+	protected Type valueType;
+	
+	protected final OrmColumn valueColumn;
+	
+	protected OrmConverter valueConverter;
+	
+	protected final OrmConverter nullValueConverter;
+
+	protected final OrmAttributeOverrideContainer valueAttributeOverrideContainer;
+	
+	protected final OrmAssociationOverrideContainer valueAssociationOverrideContainer;
+	
+	protected Type keyType;
+	
+	protected String specifiedMapKey;
+	protected boolean noMapKey = false;
+	protected boolean pkMapKey = false;
+	protected boolean customMapKey = false;
+	
+	protected String specifiedMapKeyClass;
+	protected String defaultMapKeyClass;
+	protected PersistentType resolvedMapKeyType;
+	protected Embeddable resolvedMapKeyEmbeddable;
+	protected Entity resolvedMapKeyEntity;
+	
+	protected final OrmColumn mapKeyColumn;
+
+	protected final OrmAttributeOverrideContainer mapKeyAttributeOverrideContainer;
+
+	protected AbstractOrmElementCollectionMapping2_0(OrmPersistentAttribute parent, T resourceMapping) {
+		super(parent, resourceMapping);
+		this.specifiedFetch = this.getResourceFetch();
+		this.orderable = getXmlContextNodeFactory().buildOrmOrderable(this, buildOrderableOwner());
+		this.specifiedTargetClass = getResourceTargetClass();
+		this.defaultTargetClass = buildDefaultTargetClass();
+		this.resolvedTargetType = this.resolveTargetType();
+		this.resolvedTargetEmbeddable = resolveTargetEmbeddable();
+		this.collectionTable = getXmlContextNodeFactory().buildOrmCollectionTable(this, getResourceCollectionTable());
+		this.valueType = this.buildValueType();
+		this.valueColumn = getXmlContextNodeFactory().buildOrmColumn(this, new ValueColumnOwner());
+		this.nullValueConverter = this.getXmlContextNodeFactory().buildOrmNullConverter(this);
+		this.valueConverter = this.buildConverter(this.getResourceConverterType());
+		this.valueAssociationOverrideContainer = buildValueAssociationOverrideContainer();
+		this.valueAttributeOverrideContainer = buildValueAttributeOverrideContainer();
+		this.resolvedMapKeyType = this.resolveMapKeyType();
+		this.resolvedMapKeyEmbeddable = this.resolveMapKeyEmbeddable();
+		this.resolvedMapKeyEntity = this.resolveMapKeyEntity();
+		this.initializeMapKey();
+		this.defaultMapKeyClass = this.buildDefaultMapKeyClass();
+		this.specifiedMapKeyClass = this.getResourceMapKeyClass();
+		this.mapKeyColumn = getXmlContextNodeFactory().buildOrmColumn(this, new MapKeyColumnOwner());
+		this.mapKeyAttributeOverrideContainer = this.buildMapKeyAttributeOverrideContainer();
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.setSpecifiedTargetClass_(this.getResourceTargetClass());
+		this.setDefaultTargetClass(this.buildDefaultTargetClass());
+		this.resolvedTargetType = this.resolveTargetType();
+		this.setResolvedTargetEmbeddable(this.resolveTargetEmbeddable());
+		this.setSpecifiedFetch_(this.getResourceFetch());
+		this.orderable.update();
+		this.collectionTable.update();
+		this.setValueType(buildValueType()); 
+		this.valueColumn.update(getResourceColumn());
+		this.valueAttributeOverrideContainer.update();
+		this.valueAssociationOverrideContainer.update();
+		this.updateValueConverter();
+		this.resolvedMapKeyType = this.resolveMapKeyType();//no need for change notification, use resolved target embeddable change notification instead?
+		this.setResolvedMapKeyEmbeddable(this.resolveMapKeyEmbeddable());
+		this.setResolvedMapKeyEntity(this.resolveMapKeyEntity());
+		this.setKeyType(buildKeyType()); 
+		this.updateMapKey();
+		this.setDefaultMapKeyClass(this.buildDefaultMapKeyClass());
+		this.setSpecifiedMapKeyClass_(this.getResourceMapKeyClass());
+		this.mapKeyColumn.update(getResourceMapKeyColumn());
+		this.mapKeyAttributeOverrideContainer.update();
+	}
+
+	@Override
+	public void postUpdate() {
+		super.postUpdate();
+		this.valueAssociationOverrideContainer.postUpdate();
+	}
+	
+	@Override
+	protected OrmXml2_0ContextNodeFactory getXmlContextNodeFactory() {
+		return super.getXmlContextNodeFactory();
+	}
+	
+	public Entity getEntity() {
+		return getTypeMapping().getKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY ? (Entity) getTypeMapping() : null;
+	}
+
+
+	//************* AttributeMapping implementation ***************
+
+	public String getKey() {
+		return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
+	}
+
+	//************* OrmAttributeMapping implementation ***************
+	public void initializeOn(OrmAttributeMapping newMapping) {
+ 		newMapping.initializeFromOrmAttributeMapping(this);
+	}
+
+	public int getXmlSequence() {
+		return 75;
+	}
+
+	public void addToResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getElementCollections().add(this.resourceAttributeMapping);
+	}
+	
+	public void removeFromResourceModel(Attributes resourceAttributes) {
+		resourceAttributes.getElementCollections().remove(this.resourceAttributeMapping);
+	}
+
+	
+	// **************** target class ******************************************
+
+	public char getTargetClassEnclosingTypeSeparator() {
+		return '$';
+	}
+	
+	public String getTargetClass() {
+		return (this.specifiedTargetClass != null) ? this.specifiedTargetClass : this.defaultTargetClass;
+	}
+
+	public String getSpecifiedTargetClass() {
+		return this.specifiedTargetClass;
+	}
+
+	public void setSpecifiedTargetClass(String targetClass) {
+		String old = this.specifiedTargetClass;
+		this.specifiedTargetClass = targetClass;
+		this.resourceAttributeMapping.setTargetClass(targetClass);
+		this.firePropertyChanged(SPECIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	protected void setSpecifiedTargetClass_(String targetClass) {
+		String old = this.specifiedTargetClass;
+		this.specifiedTargetClass = targetClass;
+		this.firePropertyChanged(SPECIFIED_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	public String getDefaultTargetClass() {
+		return this.defaultTargetClass;
+	}
+
+	protected void setDefaultTargetClass(String targetClass) {
+		String old = this.defaultTargetClass;
+		this.defaultTargetClass = targetClass;
+		this.firePropertyChanged(DEFAULT_TARGET_CLASS_PROPERTY, old, targetClass);
+	}
+
+	public Embeddable getResolvedTargetEmbeddable() {
+		return this.resolvedTargetEmbeddable;
+	}
+
+	protected void setResolvedTargetEmbeddable(Embeddable targetEmbeddable) {
+		Embeddable old = this.resolvedTargetEmbeddable;
+		this.resolvedTargetEmbeddable = targetEmbeddable;
+		this.firePropertyChanged(RESOLVED_TARGET_EMBEDDABLE_PROPERTY, old, targetEmbeddable);
+	}
+
+	public PersistentType getResolvedTargetType() {
+		return this.resolvedTargetType;
+	}
+
+	protected String getResourceTargetClass() {
+		return this.resourceAttributeMapping.getTargetClass();
+	}
+	
+	protected String buildDefaultTargetClass() {
+		if (this.getJavaPersistentAttribute() != null) {
+			return this.getJavaPersistentAttribute().getMultiReferenceTargetTypeName();
+		}
+		return null;
+	}
+	
+	protected PersistentType resolveTargetType() {
+		return this.resolvePersistentType(this.getTargetClass());
+	}
+
+	protected Embeddable resolveTargetEmbeddable() {
+		if (this.resolvedTargetType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedTargetType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+	
+	//************* Fetchable *************
+	
+	public FetchType getFetch() {
+		return (this.getSpecifiedFetch() == null) ? this.getDefaultFetch() : this.getSpecifiedFetch();
+	}
+
+	public FetchType getDefaultFetch() {
+		return DEFAULT_FETCH_TYPE;
+	}
+
+	public FetchType getSpecifiedFetch() {
+		return this.specifiedFetch;
+	}
+	
+	public void setSpecifiedFetch(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		this.resourceAttributeMapping.setFetch(FetchType.toOrmResourceModel(newSpecifiedFetch));
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+
+	protected void setSpecifiedFetch_(FetchType newSpecifiedFetch) {
+		FetchType oldFetch = this.specifiedFetch;
+		this.specifiedFetch = newSpecifiedFetch;
+		firePropertyChanged(Fetchable.SPECIFIED_FETCH_PROPERTY, oldFetch, newSpecifiedFetch);
+	}
+	
+	protected FetchType getResourceFetch() {
+		return FetchType.fromOrmResourceModel(this.resourceAttributeMapping.getFetch());
+	}
+	
+	// **************** collection table ***********************************************
+
+	public OrmCollectionTable2_0 getCollectionTable() {
+		return this.collectionTable;
+	}
+	
+	public XmlCollectionTable getResourceCollectionTable() {
+		return this.resourceAttributeMapping.getCollectionTable();
+	}
+
+
+	// ************** value column ********************************************
+
+	public OrmColumn getValueColumn() {
+		return this.valueColumn;
+	}
+	
+	protected XmlColumn getResourceColumn() {
+		return this.resourceAttributeMapping.getColumn();
+	}
+
+
+	// *********** value converter *************
+	
+	public OrmConverter getConverter() {
+		return this.valueConverter;
+	}
+	
+	protected String getConverterType() {
+		return this.valueConverter.getType();
+	}
+	
+	public void setConverter(String converterType) {
+		if (this.valuesAreEqual(getConverterType(), converterType)) {
+			return;
+		}
+		OrmConverter oldConverter = this.valueConverter;
+		OrmConverter newConverter = buildConverter(converterType);
+		this.valueConverter = this.nullValueConverter;
+		if (oldConverter != null) {
+			oldConverter.removeFromResourceModel();
+		}
+		this.valueConverter = newConverter;
+		if (newConverter != null) {
+			newConverter.addToResourceModel();
+		}
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}
+	
+	protected void setConverter(OrmConverter newConverter) {
+		OrmConverter oldConverter = this.valueConverter;
+		this.valueConverter = newConverter;
+		firePropertyChanged(CONVERTER_PROPERTY, oldConverter, newConverter);
+	}	
+	
+	protected OrmConverter buildConverter(String converterType) {
+		if (this.valuesAreEqual(converterType, Converter.NO_CONVERTER)) {
+			return this.nullValueConverter;
+		}
+		if (this.valuesAreEqual(converterType, Converter.ENUMERATED_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmEnumeratedConverter(this, this.resourceAttributeMapping);
+		}
+		if (this.valuesAreEqual(converterType, Converter.TEMPORAL_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmTemporalConverter(this, this.resourceAttributeMapping);
+		}
+		if (this.valuesAreEqual(converterType, Converter.LOB_CONVERTER)) {
+			return getXmlContextNodeFactory().buildOrmLobConverter(this, this.resourceAttributeMapping);
+		}
+		return null;
+	}
+	
+	protected String getResourceConverterType() {
+		if (this.resourceAttributeMapping.getEnumerated() != null) {
+			return Converter.ENUMERATED_CONVERTER;
+		}
+		else if (this.resourceAttributeMapping.getTemporal() != null) {
+			return Converter.TEMPORAL_CONVERTER;
+		}
+		else if (this.resourceAttributeMapping.isLob()) {
+			return Converter.LOB_CONVERTER;
+		}
+		
+		return Converter.NO_CONVERTER;
+	}
+
+	protected void updateValueConverter() {
+		if (this.valuesAreEqual(getResourceConverterType(), getConverterType())) {
+			getConverter().update();
+		}
+		else {
+			setConverter(buildConverter(getResourceConverterType()));
+		}
+	}
+
+
+	public Type getValueType() {
+		return this.valueType;
+	}
+
+	protected void setValueType(Type newValueType) {
+		Type old = this.valueType;
+		this.valueType = newValueType;
+		firePropertyChanged(VALUE_TYPE_PROPERTY, old, newValueType);
+	}
+
+	protected Type buildValueType() {
+		if (getResolvedTargetEmbeddable() != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		else if (getTargetClass() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+	
+	public Type getKeyType() {
+		return this.keyType;
+	}
+
+	protected void setKeyType(Type newKeyType) {
+		Type old = this.keyType;
+		this.keyType = newKeyType;
+		firePropertyChanged(KEY_TYPE_PROPERTY, old, newKeyType);
+	}
+
+	protected Type buildKeyType() {
+		if (getResolvedMapKeyEmbeddable() != null) {
+			return Type.EMBEDDABLE_TYPE; 
+		}
+		if (getResolvedMapKeyEntity() != null) {
+			return Type.ENTITY_TYPE; 
+		}
+		else if (getMapKeyClass() == null) {
+			return Type.NO_TYPE;
+		}
+		return Type.BASIC_TYPE;
+	}
+
+	// ************** value column ********************************************
+
+	public OrmColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+	
+	protected XmlColumn getResourceMapKeyColumn() {
+		return this.resourceAttributeMapping.getMapKeyColumn();
+	}
+	
+	// **************** ordering ***********************************************
+
+	public OrmOrderable2_0 getOrderable() {
+		return this.orderable;
+	}
+
+	protected Orderable2_0.Owner buildOrderableOwner() {
+		return new Orderable2_0.Owner() {
+			public String getTableName() {
+				return getCollectionTable().getName();
+			}
+			public Table getDbTable(String tableName) {
+				return getCollectionTable().getDbTable();
+			}
+		};
+	}
+
+
+	// **************** overrides ***********************************************
+
+	public OrmAttributeOverrideContainer getValueAttributeOverrideContainer() {
+		return this.valueAttributeOverrideContainer;
+	}
+
+	protected OrmAttributeOverrideContainer buildValueAttributeOverrideContainer() {
+		return getXmlContextNodeFactory().buildOrmAttributeOverrideContainer(this, new ValueAttributeOverrideContainerOwner());
+	}
+
+	protected JavaAttributeOverride getJavaValueAttributeOverrideNamed(String attributeName) {
+		if (getJavaElementCollectionMapping() != null) {
+			return getJavaElementCollectionMapping().getValueAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+		}
+		return null;
+	}	
+
+	public OrmAssociationOverrideContainer getValueAssociationOverrideContainer() {
+		return this.valueAssociationOverrideContainer;
+	}
+
+	protected OrmAssociationOverrideContainer buildValueAssociationOverrideContainer() {
+		return getXmlContextNodeFactory().buildOrmAssociationOverrideContainer(this, new AssociationOverrideContainerOwner());
+	}
+
+	protected JavaAssociationOverride getJavaValueAssociationOverrideNamed(String attributeName) {
+		if (getJavaElementCollectionMapping() != null) {
+			return getJavaElementCollectionMapping().getValueAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+		}
+		return null;
+	}
+
+	protected JavaElementCollectionMapping2_0 getJavaElementCollectionMapping() {
+		if (this.getJavaPersistentAttribute() == null) {
+			return null;
+		}
+		AttributeMapping javaAttributeMapping = this.getJavaPersistentAttribute().getMapping();
+		if (javaAttributeMapping.getKey() == MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY) {
+			return ((JavaElementCollectionMapping2_0) javaAttributeMapping);
+		}
+		return null;
+	}
+	
+	public OrmAttributeOverrideContainer getMapKeyAttributeOverrideContainer() {
+		return this.mapKeyAttributeOverrideContainer;
+	}
+
+	protected OrmAttributeOverrideContainer buildMapKeyAttributeOverrideContainer() {
+		return getXmlContextNodeFactory().buildOrmAttributeOverrideContainer(this, new MapKeyAttributeOverrideContainerOwner());
+	}
+
+	protected JavaAttributeOverride getJavaMapKeyAttributeOverrideNamed(String attributeName) {
+		if (getJavaElementCollectionMapping() != null) {
+			return getJavaElementCollectionMapping().getMapKeyAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+		}
+		return null;
+	}
+
+	// **************** map key ************************************************
+	
+	public String getMapKey() {
+		if (this.noMapKey) {
+			return null;
+		}
+		if (this.pkMapKey) {
+			return null;//the target is either embeddable or basic, so a key will have to be specified
+		}
+		if (this.customMapKey) {
+			return this.specifiedMapKey;
+		}
+		throw new IllegalStateException("unknown map key"); //$NON-NLS-1$
+	}
+	
+	public String getSpecifiedMapKey() {
+		return this.specifiedMapKey;
+	}
+
+	public void setSpecifiedMapKey(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		if (this.attributeValueHasChanged(old, mapKey)) {
+			MapKey xmlMapKey = this.getXmlMapKey();
+			if (mapKey == null) {
+				if (xmlMapKey != null) {
+					this.removeXmlMapKey();
+				}
+			} else {
+				if (xmlMapKey == null) {
+					xmlMapKey = this.addXmlMapKey();
+				}
+				xmlMapKey.setName(mapKey);
+			}
+		}
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+	
+	protected void setSpecifiedMapKey_(String mapKey) {
+		String old = this.specifiedMapKey;
+		this.specifiedMapKey = mapKey;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_PROPERTY, old, mapKey);
+	}
+	
+	protected void initializeMapKey() {
+		MapKey xmlMapKey = this.getXmlMapKey();
+		if (xmlMapKey == null) { 
+			this.noMapKey = true;
+		} else {
+			this.specifiedMapKey = xmlMapKey.getName();
+			if (this.specifiedMapKey == null) {
+				this.pkMapKey = true;
+			} else {
+				this.customMapKey = true;
+			}
+		}
+	}
+	
+	protected void updateMapKey() {
+		MapKey xmlMapKey = this.getXmlMapKey();
+		if (xmlMapKey == null) {
+			this.setSpecifiedMapKey_(null);
+			this.setNoMapKey_(true);
+			this.setPkMapKey_(false);
+			this.setCustomMapKey_(false);
+		} else {
+			String mk = xmlMapKey.getName();
+			this.setSpecifiedMapKey_(mk);
+			this.setNoMapKey_(false);
+			this.setPkMapKey_(mk == null);
+			this.setCustomMapKey_(mk != null);
+		}
+	}
+	
+	protected MapKey getXmlMapKey() {
+		return this.resourceAttributeMapping.getMapKey();
+	}
+	
+	protected MapKey addXmlMapKey() {
+		MapKey mapKey = OrmFactory.eINSTANCE.createMapKey();
+		this.resourceAttributeMapping.setMapKey(mapKey);
+		return mapKey;
+	}
+
+	protected void removeXmlMapKey() {
+		this.resourceAttributeMapping.setMapKey(null);
+	}
+	
+	public Iterator<String> candidateMapKeyNames() {
+		return this.allTargetEmbeddableAttributeNames();
+	}
+
+	public Iterator<String> allTargetEmbeddableAttributeNames() {
+		return new CompositeIterator<String>(
+			new TransformationIterator<AttributeMapping, Iterator<String>>(this.allTargetEmbeddableAttributeMappings()) {
+				@Override
+				protected Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+		});
+	}
+	
+	protected Iterator<String> allEmbeddableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allMappingNames();
+				}
+			}
+		);
+	}
+
+	@Override
+	public Iterator<String> allMappingNames() {
+		return new CompositeIterator<String>(this.getName(), this.allEmbeddableAttributeMappingNames());
+	}
+
+	protected Iterator<AttributeMapping> allTargetEmbeddableAttributeMappings() {
+		return (this.resolvedTargetEmbeddable != null) ?
+				this.resolvedTargetEmbeddable.allAttributeMappings() :
+				EmptyIterator.<AttributeMapping> instance();
+	}
+
+	protected Iterator<AttributeMapping> embeddableAttributeMappings() {
+		Embeddable targetEmbeddable = getResolvedTargetEmbeddable();
+		if (targetEmbeddable != null && targetEmbeddable != getPersistentAttribute().getOwningTypeMapping()) {
+			return targetEmbeddable.attributeMappings();
+		}
+		return EmptyIterator.instance();
+	}
+
+	@Override
+	public Iterator<String> allOverrideableAttributeMappingNames() {
+		return this.embeddableOverrideableAttributeMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAttributeMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAttributeMappingNames();
+				}
+			}
+		);
+	}
+	
+	@Override
+	public Iterator<String> allOverrideableAssociationMappingNames() {
+		return this.embeddableOverrideableAssociationMappingNames();
+	}
+	
+	protected Iterator<String> embeddableOverrideableAssociationMappingNames() {
+		return this.embeddableOverrideableMappingNames(
+			new Transformer<AttributeMapping, Iterator<String>>() {
+				public Iterator<String> transform(AttributeMapping mapping) {
+					return mapping.allOverrideableAssociationMappingNames();
+				}
+			}
+		);
+	}
+	
+	protected Iterator<String> embeddableOverrideableMappingNames(Transformer<AttributeMapping, Iterator<String>> transformer) {
+		return new TransformationIterator<String, String>(
+			new CompositeIterator<String>(
+				new TransformationIterator<AttributeMapping, Iterator<String>>(this.embeddableAttributeMappings(), transformer))) 
+		{
+			@Override
+			protected String transform(String next) {
+				return getName() + '.' + next;
+			}
+		};
+	}
+
+
+	@Override
+	public Column resolveOverriddenColumn(String attributeName) {
+		if (getName() == null) {
+			return null;
+		}
+		int dotIndex = attributeName.indexOf('.');
+		if (dotIndex != -1) {
+			if (getName().equals(attributeName.substring(0, dotIndex))) {
+				attributeName = attributeName.substring(dotIndex + 1);
+				AttributeOverride override = getValueAttributeOverrideContainer().getAttributeOverrideNamed(attributeName);
+				if (override != null && !override.isVirtual()) {
+					return override.getColumn();
+				}
+				if (this.getResolvedTargetEmbeddable() == null) {
+					return null;
+				}
+				return this.getResolvedTargetEmbeddable().resolveOverriddenColumn(attributeName);
+			}
+		}
+		return null;
+	}
+
+	protected Iterator<String> embeddableAttributeMappingNames() {
+		return new TransformationIterator<String, String>(
+			new CompositeIterator<String>(
+				new TransformationIterator<AttributeMapping, Iterator<String>>(this.embeddableAttributeMappings()) {
+					@Override
+					protected Iterator<String> transform(AttributeMapping mapping) {
+						return mapping.allMappingNames();
+					}
+				}
+			)
+		) {
+			@Override
+			protected String transform(String next) {
+				return getName() + '.' + next;
+			}
+		};
+	}
+
+	@Override
+	public AttributeMapping resolveAttributeMapping(String attributeName) {
+		if (getName() == null) {
+			return null;
+		}
+		AttributeMapping resolvedMapping = super.resolveAttributeMapping(attributeName);
+		if (resolvedMapping != null) {
+			return resolvedMapping;
+		}
+		int dotIndex = attributeName.indexOf('.');
+		if (dotIndex != -1) {
+			if (getName().equals(attributeName.substring(0, dotIndex))) {
+				for (AttributeMapping attributeMapping : CollectionTools.iterable(embeddableAttributeMappings())) {
+					resolvedMapping = attributeMapping.resolveAttributeMapping(attributeName.substring(dotIndex + 1));
+					if (resolvedMapping != null) {
+						return resolvedMapping;
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	@Override
+	public RelationshipReference resolveRelationshipReference(String attributeName) {
+		if (getName() == null) {
+			return null;
+		}
+		int dotIndex = attributeName.indexOf('.');
+		if (dotIndex != -1) {
+			if (getName().equals(attributeName.substring(0, dotIndex))) {
+				attributeName = attributeName.substring(dotIndex + 1);
+				AssociationOverride override = getValueAssociationOverrideContainer().getAssociationOverrideNamed(attributeName);
+				if (override != null && !override.isVirtual()) {
+					return override.getRelationshipReference();
+				}
+				if (this.getResolvedTargetEmbeddable() == null) {
+					return null;
+				}
+				return this.getResolvedTargetEmbeddable().resolveRelationshipReference(attributeName);
+			}
+		}
+		return null;
+	}
+	
+	// **************** no map key ***********************************************
+		
+	public boolean isNoMapKey() {
+		return this.noMapKey;
+	}
+
+	public void setNoMapKey(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		if (noMapKey) {
+			if (this.getXmlMapKey() != null) {
+				this.removeXmlMapKey();
+			}
+		}
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);			
+	}
+	
+	protected void setNoMapKey_(boolean noMapKey) {
+		boolean old = this.noMapKey;
+		this.noMapKey = noMapKey;
+		this.firePropertyChanged(NO_MAP_KEY_PROPERTY, old, noMapKey);			
+	}
+	
+	
+	// **************** pk map key ***********************************************
+		
+	public boolean isPkMapKey() {
+		return this.pkMapKey;
+	}
+	
+	public void setPkMapKey(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		MapKey xmlMapKey = this.getXmlMapKey();
+		if (pkMapKey) {
+			if (xmlMapKey == null) {
+				this.addXmlMapKey();
+			} else {
+				xmlMapKey.setName(null);
+			}
+		}
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);	
+	}
+	
+	protected void setPkMapKey_(boolean pkMapKey) {
+		boolean old = this.pkMapKey;
+		this.pkMapKey = pkMapKey;
+		this.firePropertyChanged(PK_MAP_KEY_PROPERTY, old, pkMapKey);	
+	}
+	
+	
+	// **************** custom map key ***********************************************
+		
+	public boolean isCustomMapKey() {
+		return this.customMapKey;
+	}
+
+	public void setCustomMapKey(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		if (customMapKey) {
+			this.setSpecifiedMapKey(""); //$NON-NLS-1$
+		}
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+	
+	protected void setCustomMapKey_(boolean customMapKey) {
+		boolean old = this.customMapKey;
+		this.customMapKey = customMapKey;
+		this.firePropertyChanged(CUSTOM_MAP_KEY_PROPERTY, old, customMapKey);
+	}
+
+	// **************** map key class ******************************************
+
+	public char getMapKeyClassEnclosingTypeSeparator() {
+		return '$';
+	}
+	
+	public String getMapKeyClass() {
+		return (this.specifiedMapKeyClass != null) ? this.specifiedMapKeyClass : this.defaultMapKeyClass;
+	}
+
+	public String getSpecifiedMapKeyClass() {
+		return this.specifiedMapKeyClass;
+	}
+
+	public void setSpecifiedMapKeyClass(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		if (this.attributeValueHasChanged(old, mapKeyClass)) {
+			XmlClassReference xmlMapKeyClass = this.getXmlMapKeyClass();
+			if (mapKeyClass == null) {
+				if (xmlMapKeyClass != null) {
+					this.removeXmlMapKeyClass();
+				}
+			} else {
+				if (xmlMapKeyClass == null) {
+					xmlMapKeyClass = this.addXmlMapKeyClass();
+				}
+				xmlMapKeyClass.setClassName(mapKeyClass);
+			}
+		}
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected void setSpecifiedMapKeyClass_(String mapKeyClass) {
+		String old = this.specifiedMapKeyClass;
+		this.specifiedMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(SPECIFIED_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+	
+	protected XmlClassReference getXmlMapKeyClass() {
+		return this.resourceAttributeMapping.getMapKeyClass();
+	}
+	
+	protected XmlClassReference addXmlMapKeyClass() {
+		XmlClassReference mapKeyClass = OrmFactory.eINSTANCE.createXmlClassReference();
+		this.resourceAttributeMapping.setMapKeyClass(mapKeyClass);
+		return mapKeyClass;
+	}
+
+	protected void removeXmlMapKeyClass() {
+		this.resourceAttributeMapping.setMapKeyClass(null);
+	}
+
+	public String getDefaultMapKeyClass() {
+		return this.defaultMapKeyClass;
+	}
+
+	protected void setDefaultMapKeyClass(String mapKeyClass) {
+		String old = this.defaultMapKeyClass;
+		this.defaultMapKeyClass = mapKeyClass;
+		this.firePropertyChanged(DEFAULT_MAP_KEY_CLASS_PROPERTY, old, mapKeyClass);
+	}
+
+	protected String getResourceMapKeyClass() {
+		XmlClassReference mapKeyClass = this.resourceAttributeMapping.getMapKeyClass();
+		return mapKeyClass == null ? null : mapKeyClass.getClassName();
+	}
+	
+	protected String buildDefaultMapKeyClass() {
+		if (this.getJavaPersistentAttribute() != null) {
+			return this.getJavaPersistentAttribute().getMultiReferenceMapKeyTypeName();
+		}
+		return null;
+	}
+	
+
+	public Embeddable getResolvedMapKeyEmbeddable() {
+		return this.resolvedMapKeyEmbeddable;
+	}
+
+	protected void setResolvedMapKeyEmbeddable(Embeddable embeddable) {
+		Embeddable old = this.resolvedMapKeyEmbeddable;
+		this.resolvedMapKeyEmbeddable = embeddable;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_EMBEDDABLE_PROPERTY, old, embeddable);
+	}
+
+	public Entity getResolvedMapKeyEntity() {
+		return this.resolvedMapKeyEntity;
+	}
+
+	protected void setResolvedMapKeyEntity(Entity entity) {
+		Entity old = this.resolvedMapKeyEntity;
+		this.resolvedMapKeyEntity = entity;
+		this.firePropertyChanged(RESOLVED_MAP_KEY_ENTITY_PROPERTY, old, entity);
+	}
+
+	public PersistentType getResolvedMapKeyType() {
+		return getResolvedMapKeyEmbeddable() == null ? null : getResolvedMapKeyEmbeddable().getPersistentType();
+	}
+	
+	protected PersistentType resolveMapKeyType() {
+		return this.resolvePersistentType(this.getMapKeyClass());
+	}
+
+	protected Embeddable resolveMapKeyEmbeddable() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Embeddable) ? (Embeddable) typeMapping : null;
+	}
+
+	protected Entity resolveMapKeyEntity() {
+		if (this.resolvedMapKeyType == null) {
+			return null;
+		}
+		TypeMapping typeMapping = this.resolvedMapKeyType.getMapping();
+		return (typeMapping instanceof Entity) ? (Entity) typeMapping : null;
+	}
+
+
+	// ********** metamodel **********  
+	@Override
+	protected String getMetamodelFieldTypeName() {
+		return ((PersistentAttribute2_0) getPersistentAttribute()).getMetamodelContainerFieldTypeName();
+	}
+	
+	@Override
+	public String getMetamodelTypeName() {
+		if (this.valueType == Type.BASIC_TYPE) {
+			return getTargetClass();
+		}
+		if (this.resolvedTargetType == null) {
+			return MetamodelField.DEFAULT_TYPE_NAME;
+		}
+		String targetTypeName = this.resolvedTargetType.getName();
+		return (targetTypeName != null) ? targetTypeName : MetamodelField.DEFAULT_TYPE_NAME;
+	}
+
+	@Override
+	protected void addMetamodelFieldTypeArgumentNamesTo(ArrayList<String> typeArgumentNames) {
+		this.addMetamodelFieldMapKeyTypeArgumentNameTo(typeArgumentNames);
+		super.addMetamodelFieldTypeArgumentNamesTo(typeArgumentNames);
+	}
+
+	protected void addMetamodelFieldMapKeyTypeArgumentNameTo(ArrayList<String> typeArgumentNames) {
+		String keyTypeName = ((PersistentAttribute2_0) this.getPersistentAttribute()).getMetamodelContainerFieldMapKeyTypeName();
+		if (keyTypeName != null) {
+			typeArgumentNames.add(keyTypeName);
+		}
+	}
+
+	public String getMetamodelFieldMapKeyTypeName() {
+		return MappingTools.getMetamodelFieldMapKeyTypeName(this);
+	}
+	
+
+	// ********** validation **********
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.validateTargetClass(messages);
+		this.validateMapKeyClass(messages);
+		this.getOrderable().validate(messages, reporter);
+		this.getCollectionTable().validate(messages, reporter);
+		this.validateValue(messages, reporter);
+		this.validateMapKey(messages, reporter);
+	}
+
+	public void validateValue(List<IMessage> messages, IReporter reporter) {
+		//TODO should we handle validation when the type is embeddable, but a value column is specified, or things like that if that is invalid?
+		if (getValueType() == Type.BASIC_TYPE) {
+			this.getValueColumn().validate(messages, reporter);
+			this.getConverter().validate(messages, reporter);
+		}
+		if (getValueType() == Type.EMBEDDABLE_TYPE) {
+			this.getValueAttributeOverrideContainer().validate(messages, reporter);
+			this.getValueAssociationOverrideContainer().validate(messages, reporter);
+		}
+	}
+
+	public void validateMapKey(List<IMessage> messages, IReporter reporter) {
+		if (getMapKey() != null) {
+			//TODO validate that the map key refers to an existing attribute
+			return;
+		}
+		if (getKeyType() == Type.BASIC_TYPE) {
+			this.getMapKeyColumn().validate(messages, reporter);
+			//validate map key converter
+		}
+		else if (getKeyType() == Type.ENTITY_TYPE) {
+			//validate map key join columns
+		}
+		else if (getKeyType() == Type.EMBEDDABLE_TYPE) {
+			this.getMapKeyAttributeOverrideContainer().validate(messages, reporter);
+			//validate map key association overrides
+		}
+	}
+
+	protected void validateTargetClass(List<IMessage> messages) {
+		if (getTargetClass() == null) {
+			if (getPersistentAttribute().isVirtual()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
+						new String[] {this.getName()}, 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+			else { 
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
+						new String[0], 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+		}
+		//TODO this does not give an error for unmapped, unlisted types that aren't basic - bug 310464
+		if (this.resolvedTargetType != null) {
+			if (getResolvedTargetEmbeddable() == null) {
+				if (getPersistentAttribute().isVirtual()) {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
+							new String[] {this.getName(), this.getTargetClass()}, 
+							this, 
+							this.getValidationTextRange()
+						)
+					);
+				}
+				else {
+					messages.add(
+						DefaultJpaValidationMessages.buildMessage(
+							IMessage.HIGH_SEVERITY,
+							JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
+							new String[] {this.getTargetClass(), this.getName()}, 
+							this, 
+							this.getTargetClassTextRange()
+						)
+					);				
+				}
+			}
+		}
+	}
+
+	protected void validateMapKeyClass(List<IMessage> messages) {
+		if (getJavaPersistentAttribute() != null && !getJavaPersistentAttribute().getJpaContainer().isMap()) {
+			return;
+		}
+		if (getMapKeyClass() == null) {
+			if (getPersistentAttribute().isVirtual()) {
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED,
+						new String[] {this.getName()}, 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+			else { 
+				messages.add(
+					DefaultJpaValidationMessages.buildMessage(
+						IMessage.HIGH_SEVERITY,
+						JpaValidationMessages.ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED,
+						new String[0], 
+						this, 
+						this.getValidationTextRange()
+					)
+				);
+			}
+		}
+	}	
+
+	protected TextRange getTargetClassTextRange() {
+		return this.resourceAttributeMapping.getTargetClassTextRange();
+	}
+
+	protected abstract class ColumnOwner implements OrmColumn.Owner {		
+		public String getDefaultTableName() {
+			return getCollectionTable().getName();
+		}
+		
+		public TypeMapping getTypeMapping() {
+			return AbstractOrmElementCollectionMapping2_0.this.getTypeMapping();
+		}
+		
+		public Table getDbTable(String tableName) {
+			if (getCollectionTable().getName().equals(tableName)) {
+				return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable().getDbTable();
+			}
+			return null;
+		}
+
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the collection table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualTableNotValidMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				getColumnTableNotValidMessage(),
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getVirtualAttributeColumnTableNotValidMessage(),
+				new String[] {
+					getName(),
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column,
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getColumnUnresolvedNameMessage(),
+				new String[] {
+					column.getName(),
+					column.getDbTable().getName()}, 
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				this.getVirtualAttributeColumnUnresolvedNameMessage(),
+				new String[] {getName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}		
+		protected abstract String getColumnTableNotValidMessage();
+
+		protected abstract String getVirtualAttributeColumnTableNotValidMessage();
+		
+		protected abstract String getColumnUnresolvedNameMessage();
+		
+		protected abstract String getVirtualAttributeColumnUnresolvedNameMessage();
+	}
+
+	protected class ValueColumnOwner extends ColumnOwner {
+
+		public XmlColumn getResourceColumn() {
+			return AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.getColumn();
+		}
+
+		public void addResourceColumn() {
+			AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.setColumn(OrmFactory.eINSTANCE.createXmlColumn());
+		}
+
+		public void removeResourceColumn() {
+			AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.setColumn(null);
+		}
+
+		public String getDefaultColumnName() {
+			return AbstractOrmElementCollectionMapping2_0.this.getName();
+		}
+
+		@Override
+		public String getColumnTableNotValidMessage() {
+			return JpaValidationMessages.COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		public String getVirtualAttributeColumnTableNotValidMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		public String getColumnUnresolvedNameMessage() {
+			return JpaValidationMessages.COLUMN_UNRESOLVED_NAME;
+		}
+		
+		@Override
+		public String getVirtualAttributeColumnUnresolvedNameMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME;
+		}
+	}
+
+	protected class MapKeyColumnOwner extends ColumnOwner {
+
+		public XmlColumn getResourceColumn() {
+			return AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.getMapKeyColumn();
+		}
+
+		public void addResourceColumn() {
+			AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.setMapKeyColumn(OrmFactory.eINSTANCE.createXmlColumn());
+		}
+
+		public void removeResourceColumn() {
+			AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.setMapKeyColumn(null);
+		}
+
+		public String getDefaultColumnName() {
+			return AbstractOrmElementCollectionMapping2_0.this.getName() + "_KEY"; //$NON-NLS-1$
+		}
+
+		@Override
+		protected String getColumnTableNotValidMessage() {
+			return JpaValidationMessages.MAP_KEY_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		protected String getVirtualAttributeColumnTableNotValidMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID;
+		}
+
+		@Override
+		public String getColumnUnresolvedNameMessage() {
+			return JpaValidationMessages.MAP_KEY_COLUMN_UNRESOLVED_NAME;
+		}
+		
+		@Override
+		public String getVirtualAttributeColumnUnresolvedNameMessage() {
+			return JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME;
+		}
+
+	}
+
+	protected abstract class OverrideContainerOwner implements OrmOverrideContainer.Owner {
+		public OrmTypeMapping getTypeMapping() {
+			return AbstractOrmElementCollectionMapping2_0.this.getTypeMapping();
+		}
+		
+		public String getDefaultTableName() {
+			return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable().getName();
+		}
+		
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			return AbstractOrmElementCollectionMapping2_0.this.getCollectionTable().getDbTable();
+		}
+
+		public java.util.Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		/**
+		 * If there is a specified table name it needs to be the same
+		 * the default table name.  the table is always the collection table
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return !StringTools.stringsAreEqual(getDefaultTableName(), tableName);
+		}
+	}
+
+	protected class AssociationOverrideContainerOwner
+		extends OverrideContainerOwner 
+		implements OrmAssociationOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAssociationNames();
+		}
+		
+		public EList<XmlAssociationOverride> getResourceAssociationOverrides() {
+			return AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.getAssociationOverrides();
+		}
+		
+		public RelationshipReference resolveRelationshipReference(String associationOverrideName) {
+			if (getPersistentAttribute().isVirtual() && !getTypeMapping().isMetadataComplete()) {
+				JavaAssociationOverride javaAssociationOverride = getJavaValueAssociationOverrideNamed(associationOverrideName);
+				if (javaAssociationOverride != null && !javaAssociationOverride.isVirtual()) {
+					return javaAssociationOverride.getRelationshipReference();
+				}
+			}
+			return MappingTools.resolveRelationshipReference(getOverridableTypeMapping(), associationOverrideName);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					AbstractOrmElementCollectionMapping2_0.this.getName(), 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] { 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column,
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					AbstractOrmElementCollectionMapping2_0.this.getName(), 
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnUnresolvedReferencedColumnNameMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedReferencedColumnNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {
+					column.getReferencedColumnName(),
+					column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME,
+					new String[] {
+						AbstractOrmElementCollectionMapping2_0.this.getName(),
+						overrideName,
+						column.getReferencedColumnName(),
+						column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedReferencedColumnNameMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+					new String[] {
+						overrideName,
+						column.getReferencedColumnName(),
+						column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {
+					column.getReferencedColumnName(),
+					column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {AbstractOrmElementCollectionMapping2_0.this.getName(), overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideUnspecifiedNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(AssociationOverride override, BaseJoinColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {
+					column.getReferencedColumnName(),
+					column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+				return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+						new String[] {AbstractOrmElementCollectionMapping2_0.this.getName(), overrideName},
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualOverrideUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(String overrideName, BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+					new String[] {overrideName},
+				column, 
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
+		}
+	}
+	
+	
+	//********** OrmAttributeOverrideContainer.Owner implementation *********	
+
+	protected class ValueAttributeOverrideContainerOwner
+		extends OverrideContainerOwner
+		implements OrmAttributeOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmElementCollectionMapping2_0.this.getResolvedTargetEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAttributeNames();
+		}
+		
+		public EList<XmlAttributeOverride> getResourceAttributeOverrides() {
+			return AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.getAttributeOverrides();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			if (getPersistentAttribute().isVirtual() && !getTypeMapping().isMetadataComplete()) {
+				JavaAttributeOverride javaAttributeOverride = getJavaValueAttributeOverrideNamed(attributeOverrideName);
+				if (javaAttributeOverride != null && !javaAttributeOverride.isVirtual()) {
+					return javaAttributeOverride.getColumn();
+				}
+			}
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public XmlColumn buildVirtualXmlColumn(Column overridableColumn, String attributeName, boolean isMetadataComplete) {
+			return new VirtualXmlAttributeOverrideColumn(overridableColumn);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					AbstractOrmElementCollectionMapping2_0.this.getName(), 
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					AbstractOrmElementCollectionMapping2_0.this.getName(), 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] { 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column,
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
+		}
+	}
+	
+	
+	protected class MapKeyAttributeOverrideContainerOwner
+		extends OverrideContainerOwner
+		implements OrmAttributeOverrideContainer.Owner
+	{
+		public TypeMapping getOverridableTypeMapping() {
+			return AbstractOrmElementCollectionMapping2_0.this.getResolvedMapKeyEmbeddable();
+		}
+		
+		public Iterator<String> allOverridableNames() {
+			TypeMapping typeMapping = getOverridableTypeMapping();
+			return (typeMapping == null) ? 
+					EmptyIterator.<String>instance()
+					: typeMapping.allOverridableAttributeNames();
+		}
+		
+		public EList<XmlAttributeOverride> getResourceAttributeOverrides() {
+			return AbstractOrmElementCollectionMapping2_0.this.resourceAttributeMapping.getMapKeyAttributeOverrides();
+		}
+		
+		public Column resolveOverriddenColumn(String attributeOverrideName) {
+			if (getPersistentAttribute().isVirtual() && !getTypeMapping().isMetadataComplete()) {
+				JavaAttributeOverride javaAttributeOverride = getJavaMapKeyAttributeOverrideNamed(attributeOverrideName);
+				if (javaAttributeOverride != null && !javaAttributeOverride.isVirtual()) {
+					return javaAttributeOverride.getColumn();
+				}
+			}
+			return MappingTools.resolveOverridenColumn(getOverridableTypeMapping(), attributeOverrideName);
+		}
+		
+		public XmlColumn buildVirtualXmlColumn(Column overridableColumn, String attributeName, boolean isMetadataComplete) {
+			return new VirtualXmlAttributeOverrideColumn(overridableColumn);
+		}
+		
+		public IMessage buildColumnUnresolvedNameMessage(BaseOverride override, NamedColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnUnresolvedNameMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					AbstractOrmElementCollectionMapping2_0.this.getName(), 
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnUnresolvedNameMessage(String overrideName, NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME,
+				new String[] {
+					overrideName, 
+					column.getName(), 
+					column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+		
+		public IMessage buildColumnTableNotValidMessage(BaseOverride override, BaseColumn column, TextRange textRange) {
+			if (isVirtual()) {
+				return this.buildVirtualAttributeColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			if (override.isVirtual()) {
+				return this.buildVirtualOverrideColumnTableNotValidMessage(override.getName(), column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+					IMessage.HIGH_SEVERITY,
+					JpaValidationMessages.COLUMN_TABLE_NOT_VALID,
+					new String[] {
+						column.getTable(),
+						column.getName(),
+						JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+					column, 
+					textRange
+				);
+		}
+		
+		protected IMessage buildVirtualAttributeColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					AbstractOrmElementCollectionMapping2_0.this.getName(), 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column,
+				textRange
+			);
+		}
+		
+		protected IMessage buildVirtualOverrideColumnTableNotValidMessage(String overrideName, BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID,
+				new String[] { 
+					overrideName, 
+					column.getTable(), 
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column,
+				textRange
+			);
+		}
+		
+		public TextRange getValidationTextRange() {
+			return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmAssociationOverrideRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmAssociationOverrideRelationshipReference2_0.java
new file mode 100644
index 0000000..ed4ef78
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmAssociationOverrideRelationshipReference2_0.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.AssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmAssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmJoinTableInAssociationOverrideJoiningStrategy2_0;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmAssociationOverrideRelationshipReference2_0 extends AbstractOrmAssociationOverrideRelationshipReference
+	implements OrmAssociationOverrideRelationshipReference2_0
+{
+
+	protected OrmJoinTableInAssociationOverrideJoiningStrategy2_0 joinTableJoiningStrategy;
+
+	// cache the strategy for property change notification
+	protected JoiningStrategy cachedPredominantJoiningStrategy;
+
+	public GenericOrmAssociationOverrideRelationshipReference2_0(OrmAssociationOverride parent, XmlAssociationOverride xao) {
+		super(parent, xao);
+	}
+	
+	protected OrmJoinTableInAssociationOverrideJoiningStrategy2_0 buildJoinTableJoiningStrategy(XmlAssociationOverride xao) {
+		return new GenericOrmJoinTableInAssociationOverrideJoiningStrategy2_0(this, xao);
+	}
+	
+	@Override
+	public void initializeFrom(AssociationOverrideRelationshipReference oldAssociationOverride) {
+		if (oldAssociationOverride.getJoinColumnJoiningStrategy().hasSpecifiedJoinColumns()) {
+			getJoinColumnJoiningStrategy().initializeFrom(oldAssociationOverride.getJoinColumnJoiningStrategy());
+		}
+		else {
+			getJoinTableJoiningStrategy().initializeFrom(((AssociationOverrideRelationshipReference2_0) oldAssociationOverride).getJoinTableJoiningStrategy());
+		}
+	}
+
+	@Override
+	protected void initializeJoiningStrategies(org.eclipse.jpt.core.resource.orm.XmlAssociationOverride xao) {
+		super.initializeJoiningStrategies(xao);
+		this.joinTableJoiningStrategy = buildJoinTableJoiningStrategy(xao);
+	}
+	
+	@Override
+	protected void updateJoiningStrategies(org.eclipse.jpt.core.resource.orm.XmlAssociationOverride xao) {
+		super.updateJoiningStrategies(xao);
+		this.joinTableJoiningStrategy.update(xao);
+	}
+		
+	@Override
+	protected JoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.joinColumnJoiningStrategy.hasSpecifiedJoinColumns()) {
+			return this.joinColumnJoiningStrategy;
+		}
+		return this.joinTableJoiningStrategy;
+	}
+	
+	// ********** validation **********
+
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+//		if (this.connectionProfileIsActive()) {
+//			this.validateJoinTable(messages, astRoot);
+//		}
+	}
+
+
+
+	// **************** join table *******************************************
+	
+
+	public OrmJoinTableInAssociationOverrideJoiningStrategy2_0 getJoinTableJoiningStrategy() {
+		return this.joinTableJoiningStrategy;
+	}
+	
+	public boolean usesJoinTableJoiningStrategy() {
+		return getPredominantJoiningStrategy() == this.joinTableJoiningStrategy;
+	}
+	
+	public void setJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.addStrategy();
+		this.joinColumnJoiningStrategy.removeStrategy();
+	}
+	
+	public void unsetJoinTableJoiningStrategy() {
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+	
+	public boolean mayHaveDefaultJoinTable() {
+		return getAssociationOverride().isVirtual();
+	}
+
+	@Override
+	public void setJoinColumnJoiningStrategy() {
+		super.setJoinColumnJoiningStrategy();
+		this.joinTableJoiningStrategy.removeStrategy();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java
new file mode 100644
index 0000000..da3d2fc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c)2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheableHolder2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmCacheable2_0 extends AbstractOrmXmlContextNode 
+	implements OrmCacheable2_0
+{
+	protected final XmlCacheable_2_0 resource;
+	
+	protected boolean defaultCacheable;
+	
+	protected Boolean specifiedCacheable;
+	
+	
+	public GenericOrmCacheable2_0(OrmCacheableHolder2_0 parent, XmlCacheable_2_0 resource) {
+		super(parent);
+		this.resource = resource;
+		this.specifiedCacheable = this.getResourceCacheable();
+	}
+
+	@Override
+	public OrmCacheableHolder2_0 getParent() {
+		return (OrmCacheableHolder2_0) super.getParent();
+	}
+	
+	public boolean isCacheable() {
+		return (this.specifiedCacheable != null) ? this.specifiedCacheable.booleanValue() : this.defaultCacheable;
+	}
+	
+	public boolean isDefaultCacheable() {
+		return this.defaultCacheable;
+	}
+	
+	protected void setDefaultCacheable(boolean newDefaultCacheable) {
+		boolean oldDefaultCacheable = this.defaultCacheable;
+		this.defaultCacheable = newDefaultCacheable;
+		firePropertyChanged(DEFAULT_CACHEABLE_PROPERTY, oldDefaultCacheable, newDefaultCacheable);
+	}
+	
+	public Boolean getSpecifiedCacheable() {
+		return this.specifiedCacheable;
+	}
+	
+	public void setSpecifiedCacheable(Boolean newSpecifiedCacheable) {
+		Boolean oldSpecifiedCacheable = this.specifiedCacheable;
+		this.specifiedCacheable = newSpecifiedCacheable;
+		this.resource.setCacheable(newSpecifiedCacheable);
+		firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, oldSpecifiedCacheable, newSpecifiedCacheable);
+	}
+	
+	protected void setSpecifiedCacheable_(Boolean newSpecifiedCacheable) {
+		Boolean oldSpecifiedCacheable = this.specifiedCacheable;
+		this.specifiedCacheable = newSpecifiedCacheable;
+		firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, oldSpecifiedCacheable, newSpecifiedCacheable);
+	}
+	
+	
+	// **************** initialize/update **************************************
+		
+	public void update() {
+		setSpecifiedCacheable_(this.getResourceCacheable());
+		setDefaultCacheable(this.calculateDefaultCacheable());
+	}
+	
+	protected Boolean getResourceCacheable() {
+		return this.resource.getCacheable();
+	}
+	
+	protected boolean calculateDefaultCacheable() {
+		return getParent().calculateDefaultCacheable();
+	}
+	
+	
+	// **************** validation **************************************
+	
+	public TextRange getValidationTextRange() {
+		return this.resource.getCacheableTextRange();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
new file mode 100644
index 0000000..31db53c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
@@ -0,0 +1,350 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.Iterator;
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.BaseJoinColumn;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.NamedColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.internal.context.MappingTools;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmReferenceTable;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.CollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * orm.xml collection table
+ */
+public class GenericOrmCollectionTable2_0
+	extends GenericOrmReferenceTable
+	implements OrmCollectionTable2_0
+{
+
+	public GenericOrmCollectionTable2_0(OrmElementCollectionMapping2_0 parent, XmlCollectionTable xmlCollectionTable) {
+		super(parent);
+		this.initialize(xmlCollectionTable);
+	}
+
+	@Override
+	protected OrmJoinColumn.Owner buildJoinColumnOwner() {
+		return new JoinColumnOwner();
+	}
+
+	public void initializeFrom(CollectionTable2_0 oldCollectionTable) {
+		super.initializeFrom(oldCollectionTable);
+	}
+	
+	// ********** AbstractOrmTable implementation **********
+
+	public PersistentAttribute getPersistentAttribute() {
+		return getParent().getPersistentAttribute();
+	}
+
+	@Override
+	public OrmElementCollectionMapping2_0 getParent() {
+		return (OrmElementCollectionMapping2_0) super.getParent();
+	}
+
+	@Override
+	protected String buildDefaultName() {
+		return MappingTools.buildCollectionTableDefaultName(getParent());
+	}
+
+	@Override
+	protected XmlCollectionTable getResourceTable() {
+		return this.getParent().getResourceAttributeMapping().getCollectionTable();
+	}
+
+	@Override
+	protected XmlCollectionTable addResourceTable() {
+		XmlCollectionTable xmlCollectionTable = OrmFactory.eINSTANCE.createXmlCollectionTable();
+		getParent().getResourceAttributeMapping().setCollectionTable(xmlCollectionTable);
+		return xmlCollectionTable;
+	}
+
+	@Override
+	protected void removeResourceTable() {
+		getParent().getResourceAttributeMapping().setCollectionTable(null);
+	}
+
+
+	// ********** validation **********
+
+	@Override
+	protected boolean shouldValidateAgainstDatabase() {
+		return getParent().shouldValidateAgainstDatabase();
+	}
+
+	@Override
+	protected String getUnresolvedCatalogMessageId() {
+		return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_CATALOG;
+	}
+
+	@Override
+	protected String getUnresolvedNameMessageId() {
+		return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_NAME;
+	}
+
+	@Override
+	protected String getUnresolvedSchemaMessageId() {
+		return JpaValidationMessages.COLLECTION_TABLE_UNRESOLVED_SCHEMA;
+	}
+
+	@Override
+	protected String getVirtualAttributeUnresolvedCatalogMessageId() {
+		return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG;
+	}
+
+	@Override
+	protected String getVirtualAttributeUnresolvedNameMessageId() {
+		return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME;
+	}
+
+	@Override
+	protected String getVirtualAttributeUnresolvedSchemaMessageId() {
+		return JpaValidationMessages.VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA;
+	}
+
+
+	// ********** join column owner adapters **********
+
+	/**
+	 * owner for "back-pointer" JoinColumns;
+	 * these point at the source/owning entity
+	 */
+	protected class JoinColumnOwner
+		implements OrmJoinColumn.Owner
+	{
+		protected JoinColumnOwner() {
+			super();
+		}
+		public TypeMapping getTypeMapping() {
+			return GenericOrmCollectionTable2_0.this.getParent().getTypeMapping();
+		}
+
+		public PersistentAttribute getPersistentAttribute() {
+			return GenericOrmCollectionTable2_0.this.getParent().getPersistentAttribute();
+		}
+
+		/**
+		 * the default table name is always valid and a specified table name
+		 * is prohibited (which will be handled elsewhere)
+		 */
+		public boolean tableNameIsInvalid(String tableName) {
+			return false;
+		}
+
+		public Iterator<String> candidateTableNames() {
+			return EmptyIterator.instance();
+		}
+
+		/**
+		 * the join column can only be on the collection table itself
+		 */
+		public boolean tableIsAllowed() {
+			return false;
+		}
+
+		public org.eclipse.jpt.db.Table getDbTable(String tableName) {
+			String collectionTableName = GenericOrmCollectionTable2_0.this.getName();
+			return (collectionTableName == null) ? null : (collectionTableName.equals(tableName)) ? GenericOrmCollectionTable2_0.this.getDbTable() : null;
+		}
+
+		/**
+		 * by default, the join column is, obviously, in the collection table;
+		 * not sure whether it can be anywhere else...
+		 */
+		public String getDefaultTableName() {
+			return GenericOrmCollectionTable2_0.this.getName();
+		}
+
+		public TextRange getValidationTextRange() {
+			return GenericOrmCollectionTable2_0.this.getValidationTextRange();
+		}
+
+		public Entity getRelationshipTarget() {
+			return GenericOrmCollectionTable2_0.this.getParent().getEntity();
+		}
+
+		public String getAttributeName() {
+			//TODO
+			return null; //I *think* this is correct
+//			//return GenericJavaCollectionTable2_0.this.getParent().getName();
+//			Entity targetEntity = GenericOrmCollectionTable2_0.this.getRelationshipMapping().getResolvedTargetEntity();
+//			if (targetEntity == null) {
+//				return null;
+//			}
+//			for (PersistentAttribute each : CollectionTools.iterable(targetEntity.getPersistentType().allAttributes())) {
+//				if (each.getMapping().isOwnedBy(getRelationshipMapping())) {
+//					return each.getName();
+//				}
+//			}
+//			return null;
+		}
+
+		public org.eclipse.jpt.db.Table getReferencedColumnDbTable() {
+			return getTypeMapping().getPrimaryDbTable();
+		}
+
+		public boolean isVirtual(BaseJoinColumn joinColumn) {
+			return GenericOrmCollectionTable2_0.this.defaultJoinColumn == joinColumn;
+		}
+
+		public String getDefaultColumnName() {
+			//built in MappingTools.buildJoinColumnDefaultName()
+			return null;
+		}
+
+		public int joinColumnsSize() {
+			return GenericOrmCollectionTable2_0.this.joinColumnsSize();
+		}
+
+		protected boolean isPersistentAttributeVirtual() {
+			return getPersistentAttribute().isVirtual();
+		}
+
+		protected String getPersistentAttributeName() {
+			return getPersistentAttribute().getName();
+		}
+
+		public IMessage buildTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualTableNotValidMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE}, 
+				column, 
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualTableNotValidMessage(BaseColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID,
+				new String[] {
+					this.getPersistentAttributeName(),
+					column.getTable(),
+					column.getName(),
+					JpaValidationDescriptionMessages.DOES_NOT_MATCH_COLLECTION_TABLE},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {column.getName(), column.getDbTable().getName()}, 
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedNameMessage(NamedColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME,
+				new String[] {this.getPersistentAttributeName(), column.getName(), column.getDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnresolvedReferencedColumnNameMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnresolvedReferencedColumnNameMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME,
+				new String[] {this.getPersistentAttributeName(), column.getReferencedColumnName(), column.getReferencedColumnDbTable().getName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column,
+				textRange
+			);
+		}
+
+		protected IMessage buildVirtualUnspecifiedNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {this.getPersistentAttributeName()},
+				column, 
+				textRange
+			);
+		}
+
+		public IMessage buildUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			if (this.isPersistentAttributeVirtual()) {
+				return this.buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(column, textRange);
+			}
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[0],
+				column,
+				textRange
+			);
+		}
+		protected IMessage buildVirtualUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(BaseJoinColumn column, TextRange textRange) {
+			return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY,
+				JpaValidationMessages.VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
+				new String[] {this.getPersistentAttributeName()},
+				column, 
+				textRange
+			);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java
new file mode 100644
index 0000000..61647b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmDerivedIdentity2_0.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmMapsIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmDerivedIdentity2_0
+	extends AbstractOrmXmlContextNode
+	implements OrmDerivedIdentity2_0
+{
+	protected XmlSingleRelationshipMapping_2_0 resource;
+	
+	// cache the strategy for property change notification
+	protected DerivedIdentityStrategy2_0 cachedPredominantDerivedIdentityStrategy;
+	
+	protected OrmIdDerivedIdentityStrategy2_0 idDerivedIdentityStrategy;
+	
+	protected OrmMapsIdDerivedIdentityStrategy2_0 mapsIdDerivedIdentityStrategy;
+	
+	
+	public GenericOrmDerivedIdentity2_0(
+			OrmSingleRelationshipMapping2_0 parent, XmlSingleRelationshipMapping_2_0 resource) {
+		super(parent);
+		this.resource = resource;
+		this.idDerivedIdentityStrategy = buildIdDerivedIdentityStrategy();
+		this.mapsIdDerivedIdentityStrategy = buildMapsIdDerivedIdentityStrategy();
+		this.cachedPredominantDerivedIdentityStrategy = calculatePredominantDerivedIdentityStrategy();
+	}
+	
+	
+	protected OrmIdDerivedIdentityStrategy2_0 buildIdDerivedIdentityStrategy() {
+		return new GenericOrmIdDerivedIdentityStrategy2_0(this, resource);
+	}
+	
+	protected OrmMapsIdDerivedIdentityStrategy2_0 buildMapsIdDerivedIdentityStrategy() {
+		return new GenericOrmMapsIdDerivedIdentityStrategy2_0(this, resource);
+	}
+	
+	public OrmSingleRelationshipMapping2_0 getMapping() {
+		return (OrmSingleRelationshipMapping2_0) getParent();
+	}
+	
+	
+	// **************** predominant joining strategy ***************************
+	
+	public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy;
+	}
+	
+	protected void setPredominantJoiningStrategy() {
+		setPredominantJoiningStrategy(calculatePredominantDerivedIdentityStrategy());
+	}
+	
+	protected void setPredominantJoiningStrategy(DerivedIdentityStrategy2_0 newStrategy) {
+		DerivedIdentityStrategy2_0 oldStrategy = this.cachedPredominantDerivedIdentityStrategy;
+		this.cachedPredominantDerivedIdentityStrategy = newStrategy;
+		firePropertyChanged(PREDOMINANT_DERIVED_IDENTITY_STRATEGY_PROPERTY, oldStrategy, newStrategy);
+	}
+	
+	
+	// **************** resource -> context ************************************
+	
+	public void update() {
+		this.idDerivedIdentityStrategy.update();
+		this.mapsIdDerivedIdentityStrategy.update();
+		setPredominantJoiningStrategy(calculatePredominantDerivedIdentityStrategy());
+	}
+	
+	protected DerivedIdentityStrategy2_0 calculatePredominantDerivedIdentityStrategy() {
+		if (this.mapsIdDerivedIdentityStrategy.isSpecified()) {
+			return this.mapsIdDerivedIdentityStrategy;
+		}
+		else if (this.idDerivedIdentityStrategy.isSpecified()) {
+			return this.idDerivedIdentityStrategy;
+		}
+		else {
+			return null;
+		}
+	}
+	
+	
+	// **************** no strategy *******************************************
+	
+	public void setNullDerivedIdentityStrategy() {
+		this.mapsIdDerivedIdentityStrategy.removeStrategy();
+		this.idDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesNullDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy == null;
+	}
+	
+	
+	// **************** maps id strategy **************************************
+	
+	public OrmMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
+		return this.mapsIdDerivedIdentityStrategy;
+	}
+	
+	public void setMapsIdDerivedIdentityStrategy() {
+		this.mapsIdDerivedIdentityStrategy.addStrategy();
+		this.idDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetMapsIdDerivedIdentityStrategy() {
+		this.mapsIdDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesMapsIdDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy == this.mapsIdDerivedIdentityStrategy;
+	}
+
+	
+	// **************** id strategy *******************************************
+	
+	public OrmIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
+		return this.idDerivedIdentityStrategy;
+	}
+	
+	public void setIdDerivedIdentityStrategy() {
+		this.idDerivedIdentityStrategy.addStrategy();
+		this.mapsIdDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public void unsetIdDerivedIdentityStrategy() {
+		this.idDerivedIdentityStrategy.removeStrategy();
+		setPredominantJoiningStrategy();
+	}
+	
+	public boolean usesIdDerivedIdentityStrategy() {
+		return this.cachedPredominantDerivedIdentityStrategy == this.idDerivedIdentityStrategy;
+	}
+	
+	
+	// **************** morphing **********************************************
+	
+	public void initializeFrom(OrmDerivedIdentity2_0 oldDerivedIdentity) {
+		this.mapsIdDerivedIdentityStrategy.initializeFrom(oldDerivedIdentity.getMapsIdDerivedIdentityStrategy());
+		this.idDerivedIdentityStrategy.initializeFrom(oldDerivedIdentity.getIdDerivedIdentityStrategy());
+		this.cachedPredominantDerivedIdentityStrategy = calculatePredominantDerivedIdentityStrategy();
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	public TextRange getValidationTextRange() {
+		return getMapping().getValidationTextRange();
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		this.idDerivedIdentityStrategy.validate(messages, reporter);
+		this.mapsIdDerivedIdentityStrategy.validate(messages, reporter);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java
new file mode 100644
index 0000000..bb61f67
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+
+
+public class GenericOrmElementCollectionMapping2_0
+	extends AbstractOrmElementCollectionMapping2_0<XmlElementCollection>
+{
+
+	public GenericOrmElementCollectionMapping2_0(OrmPersistentAttribute parent, XmlElementCollection resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java
new file mode 100644
index 0000000..0c73b10
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmEmbeddable2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmEmbeddable;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaEmbeddable2_0;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddable;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+
+public class GenericOrmEmbeddable2_0
+	extends AbstractOrmEmbeddable
+{
+	public GenericOrmEmbeddable2_0(OrmPersistentType parent, XmlEmbeddable resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	@Override
+	public boolean attributeMappingKeyAllowed(String attributeMappingKey) {
+		return ArrayTools.contains(GenericJavaEmbeddable2_0.ALLOWED_ATTRIBUTE_MAPPING_KEYS, attributeMappingKey);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..63943de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmIdDerivedIdentityStrategy2_0 
+	extends AbstractOrmXmlContextNode
+	implements OrmIdDerivedIdentityStrategy2_0
+{
+	protected XmlDerivedId_2_0 resource;
+	
+	protected boolean value;
+	
+	
+	public GenericOrmIdDerivedIdentityStrategy2_0(
+			OrmDerivedIdentity2_0 parent, XmlDerivedId_2_0 resource) {
+		super(parent);
+		this.resource = resource;
+		this.value = getResourceToContextValue();
+	}
+	
+	
+	public OrmDerivedIdentity2_0 getDerivedIdentity() {
+		return (OrmDerivedIdentity2_0) getParent();
+	}
+	
+	public OrmSingleRelationshipMapping2_0 getMapping() {
+		return getDerivedIdentity().getMapping();
+	}
+	
+	public boolean getValue() {
+		return this.value;
+	}
+	
+	public void setValue(boolean newValue) {
+		boolean oldValue = this.value;
+		this.value = newValue;
+		this.resource.setId(getContextToResourceValue());
+		firePropertyChanged(VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	protected void setValue_(boolean newValue) {
+		boolean oldValue = this.value;
+		this.value = newValue;
+		firePropertyChanged(VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	public void update() {
+		setValue_(getResourceToContextValue());
+	}
+	
+	protected boolean getResourceToContextValue() {
+		return (resource.getId() == null) ? false : resource.getId().booleanValue();
+	}
+	
+	protected Boolean getContextToResourceValue() {
+		return (this.value) ? Boolean.TRUE : null;
+	}
+	
+	public boolean isSpecified() {
+		return Boolean.TRUE.equals(this.resource.getId());
+	}
+	
+	public void addStrategy() {
+		this.resource.setId(true);
+	}
+	
+	public void removeStrategy() {
+		this.resource.setId(null);
+	}
+	
+	public void initializeFrom(OrmIdDerivedIdentityStrategy2_0 oldStrategy) {
+		setValue(oldStrategy.getValue());
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.resource.getIdTextRange();
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		// no validation rules
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmJoinTableInAssociationOverrideJoiningStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmJoinTableInAssociationOverrideJoiningStrategy2_0.java
new file mode 100644
index 0000000..b1971ce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmJoinTableInAssociationOverrideJoiningStrategy2_0.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmAssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmJoinTableInAssociationOverrideJoiningStrategy2_0;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class GenericOrmJoinTableInAssociationOverrideJoiningStrategy2_0 
+	extends AbstractOrmJoinTableJoiningStrategy
+	implements OrmJoinTableInAssociationOverrideJoiningStrategy2_0
+{
+	protected transient XmlAssociationOverride resourceAssociationOverride;
+	
+	public GenericOrmJoinTableInAssociationOverrideJoiningStrategy2_0(OrmAssociationOverrideRelationshipReference2_0 parent, XmlAssociationOverride xao) {
+		super(parent);
+		this.resourceAssociationOverride = xao;
+		this.initialize();
+	}
+	
+	public boolean isOverridableAssociation() {
+		return false;
+	}
+	
+	@Override
+	public OrmAssociationOverrideRelationshipReference2_0 getRelationshipReference() {
+		return (OrmAssociationOverrideRelationshipReference2_0) super.getRelationshipReference();
+	}
+
+	public boolean shouldValidateAgainstDatabase() {
+		return getRelationshipReference().getTypeMapping().shouldValidateAgainstDatabase();
+	}
+
+	// **************** join table *********************************************
+
+	@Override
+	protected void setResourceJoinTable(XmlJoinTable resourceJoinTable) {
+		this.resourceAssociationOverride.setJoinTable(resourceJoinTable);
+	}
+
+	public XmlJoinTable getResourceJoinTable() {
+		return this.resourceAssociationOverride.getJoinTable();
+	}
+
+	public void removeResourceJoinTable() {
+		this.resourceAssociationOverride.setJoinTable(null);
+	}
+
+	public void update(XmlAssociationOverride resourceAssociationOverride) {
+		this.resourceAssociationOverride = resourceAssociationOverride;
+		super.update();
+	}
+
+	public TextRange getValidationTextRange() {
+		return this.resourceAssociationOverride.getValidationTextRange();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmManyToOneMapping2_0.java
new file mode 100644
index 0000000..93265e5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmManyToOneMapping2_0.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmManyToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmManyToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+public class GenericOrmManyToOneMapping2_0 
+	extends AbstractOrmManyToOneMapping<XmlManyToOne>
+{
+	public GenericOrmManyToOneMapping2_0(OrmPersistentAttribute parent, XmlManyToOne resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	@Override
+	protected OrmManyToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericOrmManyToOneRelationshipReference2_0(this, this.resourceAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmManyToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmManyToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..72ee3ac
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmManyToOneRelationshipReference2_0.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmManyToOneRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.GenericOrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+
+public class GenericOrmManyToOneRelationshipReference2_0
+	extends AbstractOrmManyToOneRelationshipReference
+{
+
+	public GenericOrmManyToOneRelationshipReference2_0(
+			OrmManyToOneMapping parent, XmlManyToOne resource) {
+		super(parent, resource);
+	}
+
+	@Override
+	protected OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new GenericOrmJoinTableJoiningStrategy(this, getResourceMapping());
+	}
+
+	@Override
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		super.initializeOn(newRelationshipReference);
+		newRelationshipReference.initializeFromJoinTableEnabledRelationshipReference(this);
+	}
+
+	@Override
+	public void initializeFromJoinTableEnabledRelationshipReference(
+			OrmJoinTableEnabledRelationshipReference oldRelationshipReference) {
+		super.initializeFromJoinTableEnabledRelationshipReference(oldRelationshipReference);
+		OrmJoinTable oldTable = 
+			oldRelationshipReference.getJoinTableJoiningStrategy().getJoinTable();
+		if (oldTable != null) {
+			this.joinTableJoiningStrategy.addJoinTable().initializeFrom(oldTable);
+		}
+	}
+
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.joinTableJoiningStrategy.getJoinTable() != null){
+			return this.joinTableJoiningStrategy;
+		}
+		return this.joinColumnJoiningStrategy;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..fa2dd6e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmMapsIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.List;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.EmbeddedIdMapping;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationDescriptionMessages;
+import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmMapsIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.Tools;
+import org.eclipse.jpt.utility.internal.iterables.CompositeIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.SingleElementIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+public class GenericOrmMapsIdDerivedIdentityStrategy2_0
+	extends AbstractOrmXmlContextNode
+	implements OrmMapsIdDerivedIdentityStrategy2_0
+{
+	protected XmlMapsId_2_0 resource;
+	
+	protected String value;
+	
+	
+	public GenericOrmMapsIdDerivedIdentityStrategy2_0(
+			OrmDerivedIdentity2_0 parent, XmlMapsId_2_0 resource) {
+		super(parent);
+		this.resource = resource;
+		this.value = this.resource.getMapsId();
+	}
+	
+	
+	public OrmDerivedIdentity2_0 getDerivedIdentity() {
+		return (OrmDerivedIdentity2_0) getParent();
+	}
+	
+	public OrmSingleRelationshipMapping2_0 getMapping() {
+		return getDerivedIdentity().getMapping();
+	}
+	
+	public String getSpecifiedValue() {
+		return this.value;
+	}
+	
+	public void setSpecifiedValue(String newValue) {
+		String oldValue = this.value;
+		this.value = newValue;
+		this.resource.setMapsId(this.value);
+		firePropertyChanged(SPECIFIED_VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	protected void setSpecifiedValue_(String newValue) {
+		String oldValue = this.value;
+		this.value = newValue;
+		firePropertyChanged(SPECIFIED_VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	public boolean usesDefaultValue() {
+		return false;
+	}
+	
+	public String getDefaultValue() {
+		// there is no way to have default values in xml
+		return null;
+	}
+	
+	public String getValue() {
+		// there is never a default value
+		return this.value;
+	}
+	
+	public Iterable<String> getSortedValueChoices() {
+		return CollectionTools.sort(
+			new TransformationIterable<AttributeMapping, String>(getAllAttributeMappingChoices()) {
+				@Override
+				protected String transform(AttributeMapping o) {
+					return o.getName();
+				}
+			});
+	}
+	
+	public Iterable<AttributeMapping> getAllAttributeMappingChoices() {
+		return 	new CompositeIterable<AttributeMapping>(
+			getAttributeMappingChoiceIterables(
+				CollectionTools.collection(getMapping().getPersistentAttribute().getOwningTypeMapping().allAttributeMappings())));
+	}
+	
+	protected Iterable<Iterable<AttributeMapping>> getAttributeMappingChoiceIterables(Iterable<AttributeMapping> availableMappings) {
+		return new TransformationIterable<AttributeMapping, Iterable<AttributeMapping>>(availableMappings) {
+			@Override
+			protected Iterable<AttributeMapping> transform(AttributeMapping o) {
+				if (StringTools.stringsAreEqual(o.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY)) {
+					return getEmbeddedIdMappingChoiceIterable((EmbeddedIdMapping) o);
+				}
+				else {
+					return new SingleElementIterable(o);
+				}
+			}
+		};
+	}
+	
+	protected Iterable<AttributeMapping> getEmbeddedIdMappingChoiceIterable(EmbeddedIdMapping mapping) {
+		Embeddable embeddable = mapping.getTargetEmbeddable();
+		if (embeddable == null) {
+			return new SingleElementIterable(mapping);
+		}
+		else {
+			return new CompositeIterable<AttributeMapping>(
+					mapping,
+					CollectionTools.collection(embeddable.allAttributeMappings()));
+		}		
+	}
+	
+	public AttributeMapping getResolvedAttributeMappingValue() {
+		if (getValue() != null) {
+			for (AttributeMapping each : getAllAttributeMappingChoices()) {
+				if (Tools.valuesAreEqual(each.getName(), getValue())) {
+					return each;
+				}
+			}
+		}
+		return null;
+	}
+	
+	public boolean isSpecified() {
+		return this.resource.getMapsId() != null;
+	}
+	
+	public void addStrategy() {
+		this.resource.setMapsId("");	
+	}
+	
+	public void removeStrategy() {
+		this.resource.setMapsId(null);
+	}
+	
+	public void update() {
+		setSpecifiedValue_(this.resource.getMapsId());
+	}
+	
+	public void initializeFrom(OrmMapsIdDerivedIdentityStrategy2_0 oldStrategy) {
+		setSpecifiedValue(oldStrategy.getSpecifiedValue());
+	}
+	
+	public TextRange getValidationTextRange() {
+		TextRange textRange = this.resource.getMapsIdTextRange();
+		return (textRange == null) ? getDerivedIdentity().getValidationTextRange() : textRange;
+	}
+	
+	@Override
+	public void validate(List<IMessage> messages, IReporter reporter) {
+		super.validate(messages, reporter);
+		validateMapsId(messages, reporter);
+	}
+	
+	protected void validateMapsId(List<IMessage> messages, IReporter reporter) {
+		// shortcut out if maps id is not even used
+		if (! getDerivedIdentity().usesMapsIdDerivedIdentityStrategy()) {
+			return;
+		}
+		
+		// test whether value can be resolved
+		AttributeMapping attributeMappingValue = getResolvedAttributeMappingValue();
+		if (attributeMappingValue == null) {
+			// there is no defaulting, so only use the 'resolved' error, even if the value is empty string
+			messages.add(buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_RESOLVED, new String[] {getValue()}));
+		}
+		
+		// test whether attribute mapping is allowable
+		if (attributeMappingValue != null) {
+			if (! CollectionTools.contains(getValidAttributeMappingChoices(), attributeMappingValue)) {
+				messages.add(buildMessage(JpaValidationMessages.MAPS_ID_VALUE_INVALID, new String[] {getValue()}));
+			}
+		}
+	}
+	
+	protected Iterable<AttributeMapping> getValidAttributeMappingChoices() {
+		return 	new CompositeIterable<AttributeMapping>(
+			getAttributeMappingChoiceIterables(
+				new FilteringIterable<AttributeMapping>(
+						CollectionTools.collection(getMapping().getPersistentAttribute().getOwningTypeMapping().allAttributeMappings())) {
+					@Override
+					protected boolean accept(AttributeMapping o) {
+						return StringTools.stringsAreEqual(o.getKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY)
+							|| StringTools.stringsAreEqual(o.getKey(), MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY);
+					}
+				}));
+	}
+	
+	protected IMessage buildMessage(String msgID, String[] params) {
+		String attributeDescString;
+		PersistentAttribute attribute = getDerivedIdentity().getMapping().getPersistentAttribute();
+		if (attribute.isVirtual()) {
+			attributeDescString = NLS.bind(JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC, attribute.getName());
+		}
+		else {
+			attributeDescString = NLS.bind(JpaValidationDescriptionMessages.ATTRIBUTE_DESC, attribute.getName());
+		}
+		return DefaultJpaValidationMessages.buildMessage(
+				IMessage.HIGH_SEVERITY, msgID, ArrayTools.add(params, 0, attributeDescString), this, getValidationTextRange());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java
new file mode 100644
index 0000000..51f36ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmNamedQuery2_0.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmQuery;
+import org.eclipse.jpt.core.jpa2.context.LockModeType2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmNamedQuery2_0;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+
+/**
+ *  GenericOrmNamedQuery2_0
+ */
+public class GenericOrmNamedQuery2_0 extends AbstractOrmQuery<XmlNamedQuery>
+	implements OrmNamedQuery2_0
+{
+	protected LockModeType2_0 specifiedLockMode;
+	protected LockModeType2_0 defaultLockMode;
+
+	// ********** constructor **********
+	public GenericOrmNamedQuery2_0(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
+		super(parent, resourceNamedQuery);
+	}
+
+	// ********** NamedQuery2_0 implementation **********
+
+	public LockModeType2_0 getLockMode() {
+		return (this.specifiedLockMode != null) ? this.specifiedLockMode : this.defaultLockMode;
+	}
+
+	public LockModeType2_0 getSpecifiedLockMode() {
+		return this.specifiedLockMode;
+	}
+
+	public void setSpecifiedLockMode(LockModeType2_0 lockMode) {
+		LockModeType2_0 old = this.specifiedLockMode;
+		this.specifiedLockMode = lockMode;
+		this.getResourceQuery().setLockMode(LockModeType2_0.toOrmResourceModel(lockMode));
+		this.firePropertyChanged(SPECIFIED_LOCK_MODE_PROPERTY, old, lockMode);
+	}
+
+	public void setSpecifiedLockMode_(LockModeType2_0 lockMode) {
+		LockModeType2_0 old = this.specifiedLockMode;
+		this.specifiedLockMode = lockMode;
+		this.firePropertyChanged(SPECIFIED_LOCK_MODE_PROPERTY, old, lockMode);
+	}
+	
+	public LockModeType2_0 getDefaultLockMode() {
+		return this.defaultLockMode;
+	}
+
+	protected void setDefaultLockMode(LockModeType2_0 lockMode) {
+		LockModeType2_0 old = this.defaultLockMode;
+		this.defaultLockMode = lockMode;
+		this.firePropertyChanged(DEFAULT_LOCK_MODE_PROPERTY, old, lockMode);
+	}
+
+	protected LockModeType2_0 buildDefaultLockMode() {
+		return LockModeType2_0.NONE;
+	}
+
+	// ********** resource => context **********
+
+	@Override
+	protected void initialize(XmlNamedQuery xmlQuery) {
+		super.initialize(xmlQuery);
+		this.defaultLockMode = this.buildDefaultLockMode();
+		this.specifiedLockMode = this.getResourceLockModeOf(xmlQuery);
+	}
+
+	@Override
+	public void update(XmlNamedQuery xmlQuery) {
+		super.update(xmlQuery);
+		this.setSpecifiedLockMode_(this.getResourceLockModeOf(xmlQuery));
+	}
+
+	private LockModeType2_0 getResourceLockModeOf(XmlNamedQuery xmlQuery) {
+		return LockModeType2_0.fromOrmResourceModel(xmlQuery.getLockMode());
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0.java
new file mode 100644
index 0000000..22e11bc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0, which accompanies this distribution and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToManyMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+
+
+public class GenericOrmOneToManyMapping2_0 extends AbstractOrmOneToManyMapping<XmlOneToMany>
+{
+	
+	public GenericOrmOneToManyMapping2_0(OrmPersistentAttribute parent, XmlOneToMany resourceMapping) {
+		super(parent, resourceMapping);
+	}
+	
+	@Override
+	protected OrmRelationshipReference buildRelationshipReference() {
+		return new GenericOrmOneToManyRelationshipReference2_0(this, this.resourceAttributeMapping);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToManyRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToManyRelationshipReference2_0.java
new file mode 100644
index 0000000..1ca049a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToManyRelationshipReference2_0.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToManyRelationshipReference;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public class GenericOrmOneToManyRelationshipReference2_0
+	extends AbstractOrmOneToManyRelationshipReference
+{	
+	public GenericOrmOneToManyRelationshipReference2_0(
+			OrmOneToManyMapping parent, XmlOneToMany resource) {
+		
+		super(parent, resource);
+	}
+	
+	@Override
+	protected OrmJoinColumnJoiningStrategy buildJoinColumnJoiningStrategy() {
+		return new GenericOrmTargetForiegnKeyJoinColumnJoiningStrategy(this, getResourceMapping());
+	}
+
+	@Override
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		super.initializeOn(newRelationshipReference);
+		newRelationshipReference.initializeFromJoinColumnEnabledRelationshipReference(this);
+	}
+
+	@Override
+	public void initializeFromJoinColumnEnabledRelationshipReference(
+			OrmJoinColumnEnabledRelationshipReference oldRelationshipReference) {
+		super.initializeFromJoinColumnEnabledRelationshipReference(oldRelationshipReference);
+		int index = 0;
+		for (JoinColumn joinColumn : 
+				CollectionTools.iterable(
+					oldRelationshipReference.getJoinColumnJoiningStrategy().specifiedJoinColumns())) {
+			OrmJoinColumn newJoinColumn = this.joinColumnJoiningStrategy.addSpecifiedJoinColumn(index++);
+			newJoinColumn.initializeFrom(joinColumn);
+		}
+	}
+
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		else if (this.joinColumnJoiningStrategy.hasSpecifiedJoinColumns()) {
+			return this.joinColumnJoiningStrategy;
+		}
+		else {
+			return this.joinTableJoiningStrategy;
+		}
+	}
+	
+	
+	// **************** mapped by **********************************************
+	
+	@Override
+	public boolean mayBeMappedBy(AttributeMapping mappedByMapping) {
+		return super.mayBeMappedBy(mappedByMapping) ||
+			mappedByMapping.getKey() == MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToOneMapping2_0.java
new file mode 100644
index 0000000..ea22084
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToOneMapping2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOneToOneRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+
+public class GenericOrmOneToOneMapping2_0 
+	extends AbstractOrmOneToOneMapping<XmlOneToOne>
+{
+
+	// ********** constructor **********
+	public GenericOrmOneToOneMapping2_0(OrmPersistentAttribute parent, XmlOneToOne resourceMapping) {
+		super(parent, resourceMapping);
+	}
+
+	@Override
+	protected OrmOneToOneRelationshipReference2_0 buildRelationshipReference() {
+		return new GenericOrmOneToOneRelationshipReference2_0(this, this.resourceAttributeMapping);
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..2a894d5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOneToOneRelationshipReference2_0.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTable;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmJoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmOneToOneRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.GenericOrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+
+public class GenericOrmOneToOneRelationshipReference2_0
+	extends AbstractOrmOneToOneRelationshipReference
+{
+
+
+	public GenericOrmOneToOneRelationshipReference2_0(
+			OrmOneToOneMapping parent, XmlOneToOne resource) {
+		super(parent, resource);
+	}
+
+
+	@Override
+	protected OrmJoinTableJoiningStrategy buildJoinTableJoiningStrategy() {
+		return new GenericOrmJoinTableJoiningStrategy(this, getResourceMapping());
+	}
+
+	@Override
+	public void initializeOn(OrmRelationshipReference newRelationshipReference) {
+		super.initializeOn(newRelationshipReference);
+		newRelationshipReference.initializeFromJoinTableEnabledRelationshipReference(this);
+	// no other primary key reference as of yet, so no initialization based on pk join columns
+	}
+
+	@Override
+	public void initializeFromJoinTableEnabledRelationshipReference(
+			OrmJoinTableEnabledRelationshipReference oldRelationshipReference) {
+		super.initializeFromJoinTableEnabledRelationshipReference(oldRelationshipReference);
+		OrmJoinTable oldTable = 
+			oldRelationshipReference.getJoinTableJoiningStrategy().getJoinTable();
+		if (oldTable != null) {
+			this.joinTableJoiningStrategy.addJoinTable().initializeFrom(oldTable);
+		}
+	}
+
+	@Override
+	protected OrmJoiningStrategy calculatePredominantJoiningStrategy() {
+		if (this.mappedByJoiningStrategy.getMappedByAttribute() != null) {
+			return this.mappedByJoiningStrategy;
+		}
+		else if (this.primaryKeyJoinColumnJoiningStrategy.primaryKeyJoinColumnsSize() > 0) {
+			return this.primaryKeyJoinColumnJoiningStrategy;
+		}
+		else if (this.joinTableJoiningStrategy.getJoinTable() != null){
+			return this.joinTableJoiningStrategy;
+		}
+		return this.joinColumnJoiningStrategy;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java
new file mode 100644
index 0000000..d2aeb22
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOrderColumn2_0.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.BaseColumn;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmNamedColumn;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmNamedColumn;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrderable2_0;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0;
+
+
+public class GenericOrmOrderColumn2_0
+	extends AbstractOrmNamedColumn<XmlOrderColumn>
+	implements OrmOrderColumn2_0
+{
+	protected Boolean specifiedNullable;
+		
+	protected Boolean specifiedInsertable;
+		
+	protected Boolean specifiedUpdatable;
+
+	protected XmlOrderable_2_0 xmlOrderable;	
+	
+	public GenericOrmOrderColumn2_0(OrmOrderable2_0 parent, OrmNamedColumn.Owner owner) {
+		super(parent, owner);
+	}
+
+	@Override
+	public OrmOrderable2_0 getParent() {
+		return (OrmOrderable2_0) super.getParent();
+	}
+
+	protected PersistentAttribute getPersistentAttribute() {
+		return getParent().getParent().getPersistentAttribute();
+	}
+
+	@Override
+	public String getTable() {
+		return getParent().getDefaultTableName();
+	}
+	
+	@Override
+	public XmlOrderColumn getResourceColumn() {
+		return this.xmlOrderable.getOrderColumn();
+	}
+	
+	@Override
+	protected void addResourceColumn() {
+		this.xmlOrderable.setOrderColumn(OrmFactory.eINSTANCE.createXmlOrderColumn());		
+	}
+	
+	@Override
+	protected void removeResourceColumn() {
+		this.xmlOrderable.setOrderColumn(null);
+	}
+	
+	public boolean isResourceSpecified() {
+		return getResourceColumn() != null;
+	}
+	
+	@Override
+	protected void removeResourceColumnIfFeaturesUnset() {
+		//override to do nothing
+		//don't want to remove the order-column element if it's features are all set to null
+	}
+
+	public boolean isNullable() {
+		return (this.getSpecifiedNullable() == null) ? this.isDefaultNullable() : this.getSpecifiedNullable().booleanValue();
+	}
+	
+	public boolean isDefaultNullable() {
+		return BaseColumn.DEFAULT_NULLABLE;
+	}
+	
+	public Boolean getSpecifiedNullable() {
+		return this.specifiedNullable;
+	}
+	
+	public void setSpecifiedNullable(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		if (this.valuesAreDifferent(oldSpecifiedNullable, newSpecifiedNullable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setNullable(newSpecifiedNullable);						
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedNullable != null) {
+				addResourceColumn();
+				getResourceColumn().setNullable(newSpecifiedNullable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+
+	protected void setSpecifiedNullable_(Boolean newSpecifiedNullable) {
+		Boolean oldSpecifiedNullable = this.specifiedNullable;
+		this.specifiedNullable = newSpecifiedNullable;
+		firePropertyChanged(BaseColumn.SPECIFIED_NULLABLE_PROPERTY, oldSpecifiedNullable, newSpecifiedNullable);
+	}
+
+	public boolean isInsertable() {
+		return (this.getSpecifiedInsertable() == null) ? this.isDefaultInsertable() : this.getSpecifiedInsertable().booleanValue();
+	}
+	
+	public boolean isDefaultInsertable() {
+		return BaseColumn.DEFAULT_INSERTABLE;
+	}
+	
+	public Boolean getSpecifiedInsertable() {
+		return this.specifiedInsertable;
+	}
+	
+	public void setSpecifiedInsertable(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		if (this.valuesAreDifferent(oldSpecifiedInsertable, newSpecifiedInsertable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setInsertable(newSpecifiedInsertable);						
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedInsertable != null) {
+				addResourceColumn();
+				getResourceColumn().setInsertable(newSpecifiedInsertable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+	
+	protected void setSpecifiedInsertable_(Boolean newSpecifiedInsertable) {
+		Boolean oldSpecifiedInsertable = this.specifiedInsertable;
+		this.specifiedInsertable = newSpecifiedInsertable;
+		firePropertyChanged(BaseColumn.SPECIFIED_INSERTABLE_PROPERTY, oldSpecifiedInsertable, newSpecifiedInsertable);
+	}
+
+	public boolean isUpdatable() {
+		return (this.getSpecifiedUpdatable() == null) ? this.isDefaultUpdatable() : this.getSpecifiedUpdatable().booleanValue();
+	}
+	
+	public boolean isDefaultUpdatable() {
+		return BaseColumn.DEFAULT_UPDATABLE;
+	}
+	
+	public Boolean getSpecifiedUpdatable() {
+		return this.specifiedUpdatable;
+	}
+	
+	public void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		if (this.valuesAreDifferent(oldSpecifiedUpdatable, newSpecifiedUpdatable)) {
+			if (this.getResourceColumn() != null) {
+				this.getResourceColumn().setUpdatable(newSpecifiedUpdatable);						
+				this.removeResourceColumnIfFeaturesUnset();
+			}
+			else if (newSpecifiedUpdatable != null) {
+				addResourceColumn();
+				getResourceColumn().setUpdatable(newSpecifiedUpdatable);
+			}
+		}
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+	
+	protected void setSpecifiedUpdatable_(Boolean newSpecifiedUpdatable) {
+		Boolean oldSpecifiedUpdatable = this.specifiedUpdatable;
+		this.specifiedUpdatable = newSpecifiedUpdatable;
+		firePropertyChanged(BaseColumn.SPECIFIED_UPDATABLE_PROPERTY, oldSpecifiedUpdatable, newSpecifiedUpdatable);
+	}
+	
+	public void initialize(XmlOrderable_2_0 xmlOrderable) {
+		this.xmlOrderable = xmlOrderable;
+		this.initialize(this.getResourceColumn());
+	}
+	
+	public void update(XmlOrderable_2_0 xmlOrderable) {
+		this.xmlOrderable = xmlOrderable;
+		this.update(this.getResourceColumn());
+	}
+	
+	@Override
+	protected void initialize(XmlOrderColumn column) {
+		super.initialize(column);
+		this.specifiedNullable = this.getResourceNullable(column);
+		this.specifiedUpdatable = this.getResourceUpdatable(column);
+		this.specifiedInsertable = this.getResourceInsertable(column);
+	}
+	
+	@Override
+	protected void update(XmlOrderColumn column) {
+		super.update(column);
+		setSpecifiedNullable_(this.getResourceNullable(column));
+		setSpecifiedUpdatable_(this.getResourceUpdatable(column));
+		setSpecifiedInsertable_(this.getResourceInsertable(column));
+	}
+		
+	protected Boolean getResourceNullable(XmlOrderColumn column) {
+		return column == null ? null : column.getNullable();
+	}
+	
+	protected Boolean getResourceUpdatable(XmlOrderColumn column) {
+		return column == null ? null : column.getUpdatable();
+	}
+	
+	
+	protected Boolean getResourceInsertable(XmlOrderColumn column) {
+		return column == null ? null : column.getInsertable();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java
new file mode 100644
index 0000000..2402b93
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmOrphanRemoval2_0.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  GenericOrmOrphanRemoval2_0
+ */
+public class GenericOrmOrphanRemoval2_0 extends AbstractOrmXmlContextNode 
+	implements OrmOrphanRemovable2_0
+{
+	protected final XmlOrphanRemovable_2_0 resource;
+	protected boolean defaultOrphanRemoval;
+	protected Boolean specifiedOrphanRemoval;
+
+	// ********** constructor **********
+	public GenericOrmOrphanRemoval2_0(OrmOrphanRemovalHolder2_0 parent, XmlOrphanRemovable_2_0 resource) {
+		super(parent);
+		this.resource = resource;
+		this.specifiedOrphanRemoval = this.getResourceOrphanRemoval();
+	}
+
+	@Override
+	public OrmOrphanRemovalHolder2_0 getParent() {
+		return (OrmOrphanRemovalHolder2_0) super.getParent();
+	}
+
+	// ********** OrphanRemovable2_0 implementation **********
+
+	public boolean isOrphanRemoval() {
+		return (this.specifiedOrphanRemoval != null) ? this.specifiedOrphanRemoval.booleanValue() : this.defaultOrphanRemoval;
+	}
+
+	public Boolean getSpecifiedOrphanRemoval() {
+		return this.specifiedOrphanRemoval;
+	}
+
+	public boolean isDefaultOrphanRemoval() {
+		return this.defaultOrphanRemoval;
+	}
+
+	public void setSpecifiedOrphanRemoval(Boolean newSpecifiedOrphanRemoval) {
+		Boolean old = this.specifiedOrphanRemoval;
+		this.specifiedOrphanRemoval = newSpecifiedOrphanRemoval;
+		this.resource.setOrphanRemoval(newSpecifiedOrphanRemoval);
+		this.firePropertyChanged(SPECIFIED_ORPHAN_REMOVAL_PROPERTY, old, newSpecifiedOrphanRemoval);
+	}
+	
+	protected void setSpecifiedOrphanRemoval_(Boolean newSpecifiedOrphanRemoval) {
+		Boolean old = this.specifiedOrphanRemoval;
+		this.specifiedOrphanRemoval = newSpecifiedOrphanRemoval;
+		this.firePropertyChanged(SPECIFIED_ORPHAN_REMOVAL_PROPERTY, old, newSpecifiedOrphanRemoval);
+	}
+
+	// ********** initialize/update **********
+	public void update() {
+		this.setSpecifiedOrphanRemoval_(this.getResourceOrphanRemoval());
+	}
+
+	// ********** validation **********
+	public TextRange getValidationTextRange() {
+		// TODO
+		return null;
+	}
+	
+	protected Boolean getResourceOrphanRemoval() {
+		return this.resource.getOrphanRemoval();
+	}
+	
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0.java
new file mode 100644
index 0000000..c4bfc69
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.AccessType;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmPersistentAttribute;
+import org.eclipse.jpt.core.resource.orm.XmlAccessHolder;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+
+
+public class GenericOrmPersistentAttribute2_0 
+	extends AbstractOrmPersistentAttribute 
+{
+	
+	protected AccessType specifiedAccess;
+	
+	public GenericOrmPersistentAttribute2_0(OrmPersistentType parent, Owner owner, XmlAttributeMapping resourceMapping) {
+		super(parent, owner, resourceMapping);
+		this.specifiedAccess = getResourceAccess();
+	}
+	
+	public AccessType getSpecifiedAccess() {
+		return this.specifiedAccess;
+	}
+	
+	public void setSpecifiedAccess(AccessType newSpecifiedAccess) {
+		AccessType oldAccess = this.specifiedAccess;
+		this.specifiedAccess = newSpecifiedAccess;
+		((XmlAccessHolder) this.getResourceAttributeMapping()).setAccess(AccessType.toOrmResourceModel(newSpecifiedAccess));
+		firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, oldAccess, newSpecifiedAccess);
+	}
+	
+	protected void setSpecifiedAccess_(AccessType newSpecifiedAccess) {
+		AccessType oldAccess = this.specifiedAccess;
+		this.specifiedAccess = newSpecifiedAccess;
+		firePropertyChanged(SPECIFIED_ACCESS_PROPERTY, oldAccess, newSpecifiedAccess);
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		setSpecifiedAccess_(getResourceAccess());
+	}
+	
+	protected AccessType getResourceAccess() {
+		return AccessType.fromOrmResourceModel(((XmlAccessHolder) getResourceAttributeMapping()).getAccess());
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java
new file mode 100644
index 0000000..25a055b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmSequenceGenerator2_0.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmSequenceGenerator;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSequenceGenerator2_0;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+
+/**
+ *  Generic2_0OrmSequenceGenerator
+ */
+public class GenericOrmSequenceGenerator2_0 extends AbstractOrmSequenceGenerator
+	implements OrmSequenceGenerator2_0
+{
+	protected String specifiedCatalog;
+	protected String defaultCatalog;
+
+	protected String specifiedSchema;
+	protected String defaultSchema;
+
+	public GenericOrmSequenceGenerator2_0(XmlContextNode parent, XmlSequenceGenerator resourceSequenceGenerator) {
+		super(parent, resourceSequenceGenerator);
+	}
+
+	// ********** catalog **********
+
+	@Override
+	public String getCatalog() {
+		return (this.specifiedCatalog != null) ? this.specifiedCatalog : this.defaultCatalog;
+	}
+
+	public String getSpecifiedCatalog() {
+		return this.specifiedCatalog;
+	}
+
+	public void setSpecifiedCatalog(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.getResourceGenerator().setCatalog(catalog);
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	protected void setSpecifiedCatalog_(String catalog) {
+		String old = this.specifiedCatalog;
+		this.specifiedCatalog = catalog;
+		this.firePropertyChanged(SPECIFIED_CATALOG_PROPERTY, old, catalog);
+	}
+
+	public String getDefaultCatalog() {
+		return this.defaultCatalog;
+	}
+
+	protected void setDefaultCatalog(String catalog) {
+		String old = this.defaultCatalog;
+		this.defaultCatalog = catalog;
+		firePropertyChanged(DEFAULT_CATALOG_PROPERTY, old, catalog);
+	}
+
+	protected String buildDefaultCatalog() {
+		return this.getContextDefaultCatalog();
+	}
+
+	// ********** schema **********
+
+	@Override
+	public String getSchema() {
+		return (this.specifiedSchema != null) ? this.specifiedSchema : this.defaultSchema;
+	}
+
+	public String getSpecifiedSchema() {
+		return this.specifiedSchema;
+	}
+
+	public void setSpecifiedSchema(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.getResourceGenerator().setSchema(schema);
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	protected void setSpecifiedSchema_(String schema) {
+		String old = this.specifiedSchema;
+		this.specifiedSchema = schema;
+		this.firePropertyChanged(SPECIFIED_SCHEMA_PROPERTY, old, schema);
+	}
+
+	public String getDefaultSchema() {
+		return this.defaultSchema;
+	}
+
+	protected void setDefaultSchema(String schema) {
+		String old = this.defaultSchema;
+		this.defaultSchema = schema;
+		this.firePropertyChanged(DEFAULT_SCHEMA_PROPERTY, old, schema);
+	}
+
+	protected String buildDefaultSchema() {
+		return this.getContextDefaultSchema();
+	}
+
+	// ********** resource => context **********
+
+	@Override
+	protected void initialize(org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator xmlResource) {
+		super.initialize(xmlResource);
+		XmlSequenceGenerator xmlResource2_0 = (XmlSequenceGenerator) xmlResource;
+
+		this.defaultCatalog = this.buildDefaultCatalog();
+		this.specifiedCatalog = xmlResource2_0.getCatalog();
+		this.defaultSchema = this.buildDefaultSchema();
+		this.specifiedSchema = xmlResource2_0.getSchema();
+	}
+
+	@Override
+	public void update(org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator xmlResource) {
+		super.update(xmlResource);
+		XmlSequenceGenerator xmlResource2_0 = (XmlSequenceGenerator) xmlResource;
+
+		this.setDefaultCatalog(this.buildDefaultCatalog());
+		this.setSpecifiedCatalog_(xmlResource2_0.getCatalog());
+		this.setDefaultSchema(this.buildDefaultSchema());
+		this.setSpecifiedSchema_(xmlResource2_0.getSchema());
+	}
+
+	@Override
+	protected XmlSequenceGenerator getResourceGenerator() {
+		return (XmlSequenceGenerator) super.getResourceGenerator();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmTargetForiegnKeyJoinColumnJoiningStrategy.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmTargetForiegnKeyJoinColumnJoiningStrategy.java
new file mode 100644
index 0000000..9724c2b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmTargetForiegnKeyJoinColumnJoiningStrategy.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.context.Entity;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.TypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping;
+
+public class GenericOrmTargetForiegnKeyJoinColumnJoiningStrategy 
+	extends AbstractOrmJoinColumnInRelationshipMappingJoiningStrategy
+{
+
+	public GenericOrmTargetForiegnKeyJoinColumnJoiningStrategy(
+		OrmJoinColumnEnabledRelationshipReference parent,
+		XmlJoinColumnsMapping resource) {
+		super(parent, resource);
+	}
+
+	public TypeMapping getRelationshipSource() {
+		RelationshipMapping relationshipMapping = getRelationshipMapping();
+		return relationshipMapping == null ? null : relationshipMapping.getResolvedTargetEntity();
+	}
+
+	public TypeMapping getRelationshipTarget() {
+		return getRelationshipMapping().getTypeMapping();
+	}
+
+	@Override
+	protected Entity getRelationshipTargetEntity() {
+		TypeMapping relationshipTarget = getRelationshipTarget();
+		return relationshipTarget.getKey() == MappingKeys.ENTITY_TYPE_MAPPING_KEY ? (Entity) relationshipTarget : null;
+	}
+
+	public boolean isTargetForeignKeyRelationship() {
+		return true;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java
new file mode 100644
index 0000000..b8abde8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmXml2_0ContextNodeFactory.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddable;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmNamedQuery;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer.Owner;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.core.resource.orm.XmlNamedQuery;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
+
+public class GenericOrmXml2_0ContextNodeFactory extends AbstractOrmXmlContextNodeFactory
+{	
+	
+	@Override
+	public OrmEmbeddable buildOrmEmbeddable(OrmPersistentType parent, org.eclipse.jpt.core.resource.orm.XmlEmbeddable resourceMapping) {
+		return new GenericOrmEmbeddable2_0(parent, resourceMapping);
+	}
+	
+	@Override
+	public OrmPersistentAttribute buildOrmPersistentAttribute(OrmPersistentType parent, OrmPersistentAttribute.Owner owner, org.eclipse.jpt.core.resource.orm.XmlAttributeMapping resourceMapping) {
+		return new GenericOrmPersistentAttribute2_0(parent, owner, resourceMapping);
+	}
+	
+	@Override
+	public OrmAssociationOverrideRelationshipReference buildOrmAssociationOverrideRelationshipReference(OrmAssociationOverride parent, org.eclipse.jpt.core.resource.orm.XmlAssociationOverride associationOverride) {
+		return new GenericOrmAssociationOverrideRelationshipReference2_0(parent, associationOverride);
+	}
+	
+	@Override
+	public OrmSequenceGenerator buildOrmSequenceGenerator(XmlContextNode parent, org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator resourceSequenceGenerator) {
+		return new GenericOrmSequenceGenerator2_0(parent, resourceSequenceGenerator);
+	}
+	
+	@Override
+	public OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(
+			OrmEmbeddedMapping2_0 parent, 
+			Owner owner) {
+		
+		return new GenericOrmAssociationOverrideContainer(parent, owner);
+	}
+	
+	@Override
+	public OrmDerivedIdentity2_0 buildOrmDerivedIdentity(
+			OrmSingleRelationshipMapping2_0 parent, XmlSingleRelationshipMapping_2_0 resource) {
+		return new GenericOrmDerivedIdentity2_0(parent, resource);
+	}
+	
+	@Override
+	public OrmElementCollectionMapping2_0 buildOrmElementCollectionMapping2_0(
+			OrmPersistentAttribute parent, XmlElementCollection resourceMapping) {
+		
+		return new GenericOrmElementCollectionMapping2_0(parent, resourceMapping);
+	}
+	
+	@Override
+	public OrmCacheable2_0 buildOrmCacheable(OrmCacheableHolder2_0 parent, XmlCacheable_2_0 resource) {
+		return new GenericOrmCacheable2_0(parent, resource);
+	}
+	
+	@Override
+	public OrmOrphanRemovable2_0 buildOrmOrphanRemoval(OrmOrphanRemovalHolder2_0 parent, XmlOrphanRemovable_2_0 resource) {
+		return new GenericOrmOrphanRemoval2_0(parent, resource);
+	}
+
+	@Override
+	public OrmNamedQuery buildOrmNamedQuery(XmlContextNode parent, XmlNamedQuery resourceNamedQuery) {
+		return new GenericOrmNamedQuery2_0(parent, resourceNamedQuery);
+	}
+
+	@Override
+	public OrmCollectionTable2_0 buildOrmCollectionTable(OrmElementCollectionMapping2_0 parent, XmlCollectionTable resource) {
+		return new GenericOrmCollectionTable2_0(parent, resource);
+	}
+	
+	@Override
+	public OrmOneToManyMapping buildOrmOneToManyMapping(OrmPersistentAttribute parent, XmlOneToMany resourceMapping) {
+		return new GenericOrmOneToManyMapping2_0(parent, resourceMapping);
+	}
+
+	@Override
+	public OrmManyToOneMapping buildOrmManyToOneMapping(OrmPersistentAttribute parent, XmlManyToOne resourceMapping) {
+		return new GenericOrmManyToOneMapping2_0(parent, resourceMapping);
+	}
+
+	@Override
+	public OrmOneToOneMapping buildOrmOneToOneMapping(OrmPersistentAttribute parent, XmlOneToOne resourceMapping) {
+		return new GenericOrmOneToOneMapping2_0(parent, resourceMapping);
+	}
+	
+	// ********** ORM Virtual Resource Model **********
+
+	@Override
+	public XmlAssociationOverride buildVirtualXmlAssociationOverride(String name, OrmTypeMapping parent, JoiningStrategy joiningStrategy) {
+		return new VirtualXmlAssociationOverride2_0(name, parent, joiningStrategy);		
+	}
+
+	@Override
+	public XmlBasic buildVirtualXmlBasic(OrmTypeMapping ormTypeMapping, JavaBasicMapping javaBasicMapping) {
+		return new VirtualXmlBasic2_0(ormTypeMapping, javaBasicMapping);
+	}
+	
+	@Override
+	public XmlId buildVirtualXmlId(OrmTypeMapping ormTypeMapping, JavaIdMapping javaIdMapping) {
+		return new VirtualXmlId2_0(ormTypeMapping, javaIdMapping);
+	}
+	
+	@Override
+	public XmlEmbeddedId buildVirtualXmlEmbeddedId(OrmTypeMapping ormTypeMapping, JavaEmbeddedIdMapping javaEmbeddedIdMapping) {
+		return new VirtualXmlEmbeddedId2_0(ormTypeMapping, javaEmbeddedIdMapping);
+	}
+	
+	@Override
+	public XmlEmbedded buildVirtualXmlEmbedded(OrmTypeMapping ormTypeMapping, JavaEmbeddedMapping javaEmbeddedMapping) {
+		return new VirtualXmlEmbedded2_0(ormTypeMapping, (JavaEmbeddedMapping2_0) javaEmbeddedMapping);
+	}
+	
+	@Override
+	public XmlManyToMany buildVirtualXmlManyToMany(OrmTypeMapping ormTypeMapping, JavaManyToManyMapping javaManyToManyMapping) {
+		return new VirtualXmlManyToMany2_0(ormTypeMapping, (JavaManyToManyMapping2_0) javaManyToManyMapping);
+	}
+	
+	@Override
+	public XmlManyToOne buildVirtualXmlManyToOne(OrmTypeMapping ormTypeMapping, JavaManyToOneMapping javaManyToOneMapping) {
+		return new VirtualXmlManyToOne2_0(ormTypeMapping, (JavaManyToOneMapping2_0) javaManyToOneMapping);
+	}
+	
+	@Override
+	public XmlOneToMany buildVirtualXmlOneToMany(OrmTypeMapping ormTypeMapping, JavaOneToManyMapping javaOneToManyMapping) {
+		return new VirtualXmlOneToMany2_0(ormTypeMapping, (JavaOneToManyMapping2_0) javaOneToManyMapping);
+	}
+	
+	@Override
+	public XmlOneToOne buildVirtualXmlOneToOne(OrmTypeMapping ormTypeMapping, JavaOneToOneMapping javaOneToOneMapping) {
+		return new VirtualXmlOneToOne2_0(ormTypeMapping, (JavaOneToOneMapping2_0) javaOneToOneMapping);
+	}
+	
+	@Override
+	public XmlTransient buildVirtualXmlTransient(OrmTypeMapping ormTypeMapping, JavaTransientMapping javaTransientMapping) {
+		return new VirtualXmlTransient2_0(ormTypeMapping, javaTransientMapping);
+	}
+	
+	@Override
+	public XmlVersion buildVirtualXmlVersion(OrmTypeMapping ormTypeMapping, JavaVersionMapping javaVersionMapping) {
+		return new VirtualXmlVersion2_0(ormTypeMapping, javaVersionMapping);
+	}
+	
+	@Override
+	public XmlNullAttributeMapping buildVirtualXmlNullAttributeMapping(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping) {
+		return new VirtualXmlNullAttributeMapping2_0(ormTypeMapping, javaAttributeMapping);
+	}
+	
+	@Override
+	public XmlElementCollection buildVirtualXmlElementCollection2_0(OrmTypeMapping ormTypeMapping, JavaElementCollectionMapping2_0 javaMapping) {
+		return new VirtualXmlElementCollection2_0(ormTypeMapping, javaMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java
new file mode 100644
index 0000000..181bfa4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/GenericOrmXml2_0Definition.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.orm.NullOrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmTypeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.orm.OrmXmlDefinition;
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmBasicMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEmbeddableDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEmbeddedIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEmbeddedMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmEntityDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmIdMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmManyToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmManyToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmMappedSuperclassDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmOneToManyMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmOneToOneMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmTransientMappingDefinition;
+import org.eclipse.jpt.core.internal.context.orm.OrmVersionMappingDefinition;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+
+public class GenericOrmXml2_0Definition
+	extends AbstractOrmXmlDefinition
+{
+	// singleton
+	private static final OrmXmlDefinition INSTANCE = 
+			new GenericOrmXml2_0Definition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmXmlDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private GenericOrmXml2_0Definition() {
+		super();
+	}
+	
+	
+	public EFactory getResourceNodeFactory() {
+		return OrmFactory.eINSTANCE;
+	}
+	
+	@Override
+	protected OrmXmlContextNodeFactory buildContextNodeFactory() {
+		return new GenericOrmXml2_0ContextNodeFactory();
+	}
+	
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.ORM_XML_2_0_RESOURCE_TYPE;
+	}
+	
+	
+	// ********** ORM type mappings **********
+	
+	@Override
+	protected OrmTypeMappingDefinition[] buildOrmTypeMappingDefinitions() {
+		// order should not matter here, but we'll use the same order as for java 
+		// (@see {@link Generic2_0JpaPlatformProvider})
+		return new OrmTypeMappingDefinition[] {
+			OrmEntityDefinition.instance(),
+			OrmEmbeddableDefinition.instance(),
+			OrmMappedSuperclassDefinition.instance()};
+	}
+	
+	
+	// ********** ORM attribute mappings **********
+	
+	@Override
+	protected OrmAttributeMappingDefinition[] buildOrmAttributeMappingDefinitions() {
+		// order should not matter here, but we'll use the same order as for java
+		// (@see {@link Generic2_0JpaPlatformProvider})
+		return new OrmAttributeMappingDefinition[] {
+			OrmTransientMappingDefinition.instance(),
+			OrmElementCollectionMapping2_0Definition.instance(),
+			OrmIdMappingDefinition.instance(),
+			OrmVersionMappingDefinition.instance(),
+			OrmBasicMappingDefinition.instance(),
+			OrmEmbeddedMappingDefinition.instance(),
+			OrmEmbeddedIdMappingDefinition.instance(),
+			OrmManyToManyMappingDefinition.instance(),
+			OrmManyToOneMappingDefinition.instance(),
+			OrmOneToManyMappingDefinition.instance(),
+			OrmOneToOneMappingDefinition.instance(),
+			NullOrmAttributeMappingDefinition.instance()};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java
new file mode 100644
index 0000000..9bcf898
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmCacheable2_0.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmCacheableHolder2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class NullOrmCacheable2_0
+	extends AbstractOrmXmlContextNode
+	implements OrmCacheable2_0
+{
+	public NullOrmCacheable2_0(OrmCacheableHolder2_0 parent) {
+		super(parent);
+	}
+	
+	public boolean isCacheable() {
+		return false;
+	}
+	
+	public boolean isDefaultCacheable() {
+		return false;
+	}
+	
+	public Boolean getSpecifiedCacheable() {
+		return null;
+	}
+	
+	public void setSpecifiedCacheable(Boolean newSpecifiedCacheable) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void update() {
+		//no-op
+	}
+	
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java
new file mode 100644
index 0000000..ca5f71b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmDerivedIdentity2_0.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.AbstractXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmMapsIdDerivedIdentityStrategy2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmSingleRelationshipMapping2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class NullOrmDerivedIdentity2_0 extends AbstractXmlContextNode
+	implements OrmDerivedIdentity2_0
+{
+	public NullOrmDerivedIdentity2_0(OrmSingleRelationshipMapping2_0 parent) {
+		super(parent);
+	}
+	
+	
+	public OrmSingleRelationshipMapping2_0 getMapping() {
+		return (OrmSingleRelationshipMapping2_0) getParent();
+	}
+	
+	public void update() {
+		// no op
+	}
+	
+	public DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy() {
+		return null;
+	}
+	
+	public OrmMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy() {
+		return null;
+	}
+	
+	public boolean usesMapsIdDerivedIdentityStrategy() {
+		return false;
+	}
+	
+	public void setMapsIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public void unsetMapsIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public OrmIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy() {
+		return null;
+	}
+	
+	public boolean usesIdDerivedIdentityStrategy() {
+		return false;
+	}
+	
+	public void setIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public void unsetIdDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public boolean usesNullDerivedIdentityStrategy() {
+		return true;
+	}
+	
+	public void setNullDerivedIdentityStrategy() {
+		// no op
+	}
+	
+	public void initializeFrom(OrmDerivedIdentity2_0 oldDerivedIdentity) {
+		// no op
+	}
+	
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java
new file mode 100644
index 0000000..9c90fa5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/NullOrmOrphanRemoval2_0.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.orm.AbstractOrmXmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  NullOrmOrphanRemovable2_0
+ */
+public class NullOrmOrphanRemoval2_0
+			extends AbstractOrmXmlContextNode
+			implements OrmOrphanRemovable2_0
+{
+	public NullOrmOrphanRemoval2_0(OrmOrphanRemovalHolder2_0 parent) {
+		super(parent);
+	}
+
+	public boolean isDefaultOrphanRemoval() {
+		return false;
+	}
+
+	public boolean isOrphanRemoval() {
+		return false;
+	}
+
+	public Boolean getSpecifiedOrphanRemoval() {
+		return null;
+	}
+
+	public void setSpecifiedOrphanRemoval(Boolean newSpecifiedOrphanRemoval) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void update() {
+		// do nothing
+	}
+
+	public TextRange getValidationTextRange() {
+		return null;
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java
new file mode 100644
index 0000000..66c9a05
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/OrmElementCollectionMapping2_0Definition.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMappingDefinition;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.orm.OrmXml2_0ContextNodeFactory;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.resource.xml.EmfTools;
+
+public class OrmElementCollectionMapping2_0Definition
+	implements OrmAttributeMappingDefinition
+{
+	// singleton
+	private static final OrmAttributeMappingDefinition INSTANCE = 
+			new OrmElementCollectionMapping2_0Definition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static OrmAttributeMappingDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private OrmElementCollectionMapping2_0Definition() {
+		super();
+	}
+	
+	
+	public String getKey() {
+		return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	public XmlAttributeMapping buildResourceMapping(EFactory factory) {
+		return EmfTools.create(
+				factory, 
+				OrmPackage.eINSTANCE.getXmlElementCollection(), 
+				XmlElementCollection.class);
+	}
+	
+	public OrmAttributeMapping buildContextMapping(
+			OrmPersistentAttribute parent, 
+			XmlAttributeMapping resourceMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return ((OrmXml2_0ContextNodeFactory) factory).buildOrmElementCollectionMapping2_0(parent, (XmlElementCollection) resourceMapping);
+	}
+	
+	public XmlAttributeMapping buildVirtualResourceMapping(
+			OrmTypeMapping ormTypeMapping, 
+			JavaAttributeMapping javaAttributeMapping, 
+			OrmXmlContextNodeFactory factory) {
+		return ((OrmXml2_0ContextNodeFactory) factory).buildVirtualXmlElementCollection2_0(ormTypeMapping, (JavaElementCollectionMapping2_0) javaAttributeMapping);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualMapKeyClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualMapKeyClassReference.java
new file mode 100644
index 0000000..375ee49
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualMapKeyClassReference.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionMapping2_0;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+
+public class VirtualMapKeyClassReference extends XmlClassReference
+{
+	JavaCollectionMapping2_0 javaCollectionMapping;
+
+	public VirtualMapKeyClassReference(JavaCollectionMapping2_0 collectionMapping) {
+		super();
+		this.javaCollectionMapping = collectionMapping;
+	}
+
+	@Override
+	public String getClassName() {
+		return this.javaCollectionMapping.getFullyQualifiedMapKeyClass();
+	}
+
+	@Override
+	public void setClassName(String newClassName) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlAssociationOverride2_0.java
new file mode 100644
index 0000000..a4e66fe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlAssociationOverride2_0.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c)2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.JoinTable;
+import org.eclipse.jpt.core.context.JoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.JoiningStrategy;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAssociationOverride;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+
+public class VirtualXmlAssociationOverride2_0 extends XmlAssociationOverride
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JoiningStrategy joiningStrategy;
+	
+	protected final VirtualXmlAssociationOverride virtualXmlAssociationOverride;
+
+	public VirtualXmlAssociationOverride2_0(String name, OrmTypeMapping ormTypeMapping, JoiningStrategy joiningStrategy) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.joiningStrategy = joiningStrategy;
+		this.virtualXmlAssociationOverride = new VirtualXmlAssociationOverride(name, ormTypeMapping, joiningStrategy);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+
+	@Override
+	public String getName() {
+		return this.virtualXmlAssociationOverride.getName();
+	}
+	
+	@Override
+	public void setName(String value) {
+		this.virtualXmlAssociationOverride.setName(value);
+	}
+
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		return this.virtualXmlAssociationOverride.getJoinColumns();
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		if (this.joiningStrategy instanceof JoinTableJoiningStrategy) {
+			JoinTable joinTable = ((JoinTableJoiningStrategy) this.joiningStrategy).getJoinTable();
+			if (joinTable != null) {
+				return new VirtualXmlJoinTable(
+					this.ormTypeMapping, 
+					joinTable);
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public void setJoinTable(XmlJoinTable newJoinTable) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlBasic2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlBasic2_0.java
new file mode 100644
index 0000000..ed7ac05
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlBasic2_0.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlBasic;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlBasic;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlBasic2_0 extends XmlBasic
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaBasicMapping javaAttributeMapping;
+	
+	protected final VirtualXmlBasic virtualXmlBasic;
+		
+	public VirtualXmlBasic2_0(OrmTypeMapping ormTypeMapping, JavaBasicMapping javaBasicMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaBasicMapping;
+		this.virtualXmlBasic = new VirtualXmlBasic(ormTypeMapping, javaBasicMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlBasic.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlBasic.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlBasic.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlBasic.getNameTextRange();
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.virtualXmlBasic.getColumn();
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		this.virtualXmlBasic.setColumn(value);
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		return this.virtualXmlBasic.getFetch();
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		this.virtualXmlBasic.setFetch(newFetch);
+	}
+
+	@Override
+	public Boolean getOptional() {
+		return this.virtualXmlBasic.getOptional();
+	}
+
+	@Override
+	public void setOptional(Boolean newOptional) {
+		this.virtualXmlBasic.setOptional(newOptional);
+	}
+
+	@Override
+	public boolean isLob() {
+		return this.virtualXmlBasic.isLob();
+	}
+
+	@Override
+	public void setLob(boolean newLob) {
+		this.virtualXmlBasic.setLob(newLob);
+	}
+	
+	@Override
+	public TextRange getLobTextRange() {
+		return this.virtualXmlBasic.getLobTextRange();
+	}
+
+	@Override
+	public TemporalType getTemporal() {
+		return this.virtualXmlBasic.getTemporal();
+	}
+
+	@Override
+	public void setTemporal(TemporalType setTemporal){
+		this.virtualXmlBasic.setTemporal(setTemporal);
+	}
+	
+	@Override
+	public TextRange getTemporalTextRange() {
+		return this.virtualXmlBasic.getTemporalTextRange();
+	}
+
+	@Override
+	public EnumType getEnumerated() {
+		return this.virtualXmlBasic.getEnumerated();
+	}
+
+	@Override
+	public void setEnumerated(EnumType setEnumerated) {
+		this.virtualXmlBasic.setEnumerated(setEnumerated);
+	}
+	
+	@Override
+	public TextRange getEnumeratedTextRange() {
+		return null;
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlCascadeType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlCascadeType2_0.java
new file mode 100644
index 0000000..33caed6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlCascadeType2_0.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.internal.context.orm.VirtualCascadeType;
+import org.eclipse.jpt.core.jpa2.context.Cascade2_0;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+
+public class VirtualXmlCascadeType2_0
+	extends CascadeType
+{
+	protected Cascade2_0 javaCascade;
+	
+	protected final VirtualCascadeType virtualXmlCascadeType1_0;
+	
+	
+	public VirtualXmlCascadeType2_0(Cascade2_0 javaCascade) {
+		super();
+		this.javaCascade = javaCascade;
+		this.virtualXmlCascadeType1_0 = new VirtualCascadeType(javaCascade);
+	}
+	
+	
+	@Override
+	public boolean isCascadeDetach() {
+		return this.javaCascade.isDetach();
+	}
+	
+	@Override
+	public void setCascadeDetach(boolean newCascadeDetach) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	
+	// **************** JPA 1.0 functionality *********************************
+	
+	@Override
+	public boolean isCascadeAll() {
+		return this.virtualXmlCascadeType1_0.isCascadeAll();
+	}
+	
+	@Override
+	public void setCascadeAll(boolean value) {
+		this.virtualXmlCascadeType1_0.setCascadeAll(value);
+	}
+	
+	@Override
+	public boolean isCascadeMerge() {
+		return this.virtualXmlCascadeType1_0.isCascadeMerge();
+	}
+	
+	@Override
+	public void setCascadeMerge(boolean value) {
+		this.virtualXmlCascadeType1_0.setCascadeMerge(value);
+	}
+	
+	@Override
+	public boolean isCascadePersist() {
+		return this.virtualXmlCascadeType1_0.isCascadePersist();
+	}
+	
+	@Override
+	public void setCascadePersist(boolean value) {
+		this.virtualXmlCascadeType1_0.setCascadePersist(value);
+	}
+	
+	@Override
+	public boolean isCascadeRefresh() {
+		return this.virtualXmlCascadeType1_0.isCascadeRefresh();
+	}
+	
+	@Override
+	public void setCascadeRefresh(boolean value) {
+		this.setCascadeRefresh(value);
+	}
+	
+	@Override
+	public boolean isCascadeRemove() {
+		return this.virtualXmlCascadeType1_0.isCascadeRemove();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlCollectionTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlCollectionTable.java
new file mode 100644
index 0000000..18b1497
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlCollectionTable.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.UniqueConstraint;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlJoinColumn;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlUniqueConstraint;
+import org.eclipse.jpt.core.jpa2.context.CollectionTable2_0;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+public class VirtualXmlCollectionTable 
+	extends XmlCollectionTable
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected CollectionTable2_0 collectionTable;	
+	
+	
+	public VirtualXmlCollectionTable(OrmTypeMapping ormTypeMapping, CollectionTable2_0 collectionTable) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.collectionTable = collectionTable;
+	}
+	
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getName() {
+		if (this.isOrmMetadataComplete()) {
+			return this.collectionTable.getDefaultName();
+		}
+		return this.collectionTable.getName();		
+	}
+	
+	@Override
+	public void setName(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getCatalog() {
+		if (this.isOrmMetadataComplete()) {
+			return this.collectionTable.getDefaultCatalog();
+		}
+		return this.collectionTable.getCatalog();
+	}
+	
+	@Override
+	public void setCatalog(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getSchema() {
+		if (this.isOrmMetadataComplete()) {
+			return this.collectionTable.getDefaultSchema();
+		}
+		return this.collectionTable.getSchema();
+	}
+	
+	@Override
+	public void setSchema(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	//VirtualXmlJoinTable is rebuilt every time, so just rebuilding the joinColumns list as well
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		EList<XmlJoinColumn> joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_COLLECTION_TABLE__JOIN_COLUMNS);
+		if (this.collectionTable == null || isOrmMetadataComplete()) {
+			return joinColumns;
+		}
+		for (JoinColumn joinColumn : CollectionTools.iterable(this.collectionTable.specifiedJoinColumns())) {
+			XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, isOrmMetadataComplete());
+			joinColumns.add(xmlJoinColumn);
+		}
+		return joinColumns;
+	}
+	
+	@Override
+	public EList<XmlUniqueConstraint> getUniqueConstraints() {
+		EList<XmlUniqueConstraint> xmlUniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.XML_COLLECTION_TABLE__UNIQUE_CONSTRAINTS);
+		if (this.collectionTable == null || isOrmMetadataComplete()) {
+			return xmlUniqueConstraints;
+		}
+		for (UniqueConstraint uniqueConstraint : CollectionTools.iterable(this.collectionTable.uniqueConstraints())) {
+			XmlUniqueConstraint xmlUniqueConstraint = new VirtualXmlUniqueConstraint(uniqueConstraint, isOrmMetadataComplete());
+			xmlUniqueConstraints.add(xmlUniqueConstraint);
+		}
+		
+		return xmlUniqueConstraints;
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getCatalogTextRange() {
+		return null;
+	}
+	
+	@Override
+	public TextRange getSchemaTextRange() {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlElementCollection2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlElementCollection2_0.java
new file mode 100644
index 0000000..7c41ccf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlElementCollection2_0.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualMapKey;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAttributeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAttributeOverride;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlColumn;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlOrderColumn;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualXmlElementCollection2_0 is an implementation of XmlElementCollection used when there is 
+ * no tag in the orm.xml and an underlying java element collection exists.
+ */
+public class VirtualXmlElementCollection2_0 extends XmlElementCollection
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaElementCollectionMapping2_0 javaAttributeMapping;
+	
+	protected final VirtualXmlAttributeMapping virtualXmlAttributeMapping;
+	
+	protected final MapKey mapKey;
+	
+	protected final XmlClassReference mapKeyClass;
+
+	protected final VirtualXmlOrderColumn orderColumn;
+
+	protected final VirtualXmlCollectionTable collectionTable;
+
+	protected final VirtualXmlColumn valueColumn;
+
+	protected final VirtualXmlColumn mapKeyColumn;
+
+	public VirtualXmlElementCollection2_0(
+			OrmTypeMapping ormTypeMapping, JavaElementCollectionMapping2_0 javaMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaMapping;
+		this.virtualXmlAttributeMapping = new VirtualXmlAttributeMapping(ormTypeMapping, javaMapping);
+		this.mapKey = new VirtualMapKey(javaMapping);
+		this.mapKeyClass = new VirtualMapKeyClassReference(javaMapping);
+		this.orderColumn = new VirtualXmlOrderColumn(
+			((Orderable2_0) this.javaAttributeMapping.getOrderable()).getOrderColumn(),
+			this.ormTypeMapping);
+		this.collectionTable = new VirtualXmlCollectionTable(
+			this.ormTypeMapping, 
+			this.javaAttributeMapping.getCollectionTable());
+		this.valueColumn = new VirtualXmlColumn(ormTypeMapping, javaMapping.getValueColumn());
+		this.mapKeyColumn = new VirtualXmlColumn(ormTypeMapping, javaMapping.getMapKeyColumn());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlAttributeMapping.getNameTextRange();
+	}
+
+	@Override
+	public FetchType getFetch() {
+		if (this.isOrmMetadataComplete()) {
+			return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getDefaultFetch());
+		}
+		return org.eclipse.jpt.core.context.FetchType.toOrmResourceModel(this.javaAttributeMapping.getFetch());
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+
+	@Override
+	public String getTargetClass() {
+		if (this.isOrmMetadataComplete()) {
+			return this.javaAttributeMapping.getDefaultTargetClass();
+		}
+		return this.javaAttributeMapping.getFullyQualifiedTargetClass();
+	}
+
+	@Override
+	public void setTargetClass(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TextRange getTargetClassTextRange() {
+		return null;
+	}
+	
+	
+	@Override
+	public XmlCollectionTable getCollectionTable() {
+		return this.collectionTable;
+	}
+
+	@Override
+	public void setCollectionTable(XmlCollectionTable value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.valueColumn;
+	}
+
+	@Override
+	public void setColumn(XmlColumn newColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+
+	@Override
+	public void setMapKeyColumn(XmlColumn newMapKeyColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlAttributeOverride> getAttributeOverrides() {
+		EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES);
+		ListIterator<JavaAttributeOverride> javaAttributeOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAttributeOverrides = this.javaAttributeMapping.getValueAttributeOverrideContainer().attributeOverrides();
+		}
+		else {
+			javaAttributeOverrides = this.javaAttributeMapping.getValueAttributeOverrideContainer().virtualAttributeOverrides();
+		}
+		for (JavaAttributeOverride javaAttributeOverride : CollectionTools.iterable(javaAttributeOverrides)) {
+			XmlColumn xmlColumn = new VirtualXmlColumn(this.ormTypeMapping, javaAttributeOverride.getColumn());
+			XmlAttributeOverride xmlAttributeOverride = new VirtualXmlAttributeOverride(javaAttributeOverride.getName(), xmlColumn);
+			attributeOverrides.add(xmlAttributeOverride);
+		}
+		return attributeOverrides;
+	}
+
+	@Override
+	public EList<XmlAssociationOverride> getAssociationOverrides() {
+		EList<XmlAssociationOverride> associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES);
+		ListIterator<JavaAssociationOverride> javaAssociationOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAssociationOverrides = this.javaAttributeMapping.getValueAssociationOverrideContainer().associationOverrides();
+		}
+		else {
+			javaAssociationOverrides = this.javaAttributeMapping.getValueAssociationOverrideContainer().virtualAssociationOverrides();
+		}
+		for (JavaAssociationOverride javaAssociationOverride : CollectionTools.iterable(javaAssociationOverrides)) {
+			XmlAssociationOverride xmlAssociationOverride = new VirtualXmlAssociationOverride2_0(javaAssociationOverride.getName(), this.ormTypeMapping, javaAssociationOverride.getRelationshipReference().getPredominantJoiningStrategy());
+			associationOverrides.add(xmlAssociationOverride);
+		}
+		return associationOverrides;
+	}
+
+	@Override
+	public MapKey getMapKey() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.isNoMapKey()) {
+			return null;
+		}
+		return this.mapKey;
+	}
+
+	@Override
+	public void setMapKey(MapKey value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlClassReference getMapKeyClass() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.mapKeyClass;
+	}
+
+	@Override
+	public void setMapKeyClass(XmlClassReference newMapKeyClass) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}	
+	
+	@Override
+	public String getOrderBy() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.javaAttributeMapping.getOrderable().getSpecifiedOrderBy();
+	}
+
+	@Override
+	public void setOrderBy(String value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlOrderColumn getOrderColumn() {
+		if (((Orderable2_0) this.javaAttributeMapping.getOrderable()).isOrderColumnOrdering()) {
+			return this.orderColumn;
+		}
+		return null;
+	}
+
+	@Override
+	public void setOrderColumn(XmlOrderColumn newOrderColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlAttributeOverride> getMapKeyAttributeOverrides() {
+		EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES);
+		ListIterator<JavaAttributeOverride> javaAttributeOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAttributeOverrides = this.javaAttributeMapping.getMapKeyAttributeOverrideContainer().attributeOverrides();
+		}
+		else {
+			javaAttributeOverrides = this.javaAttributeMapping.getMapKeyAttributeOverrideContainer().virtualAttributeOverrides();
+		}
+		for (JavaAttributeOverride javaAttributeOverride : CollectionTools.iterable(javaAttributeOverrides)) {
+			XmlColumn xmlColumn = new VirtualXmlColumn(this.ormTypeMapping, javaAttributeOverride.getColumn());
+			XmlAttributeOverride xmlAttributeOverride = new VirtualXmlAttributeOverride(javaAttributeOverride.getName(), xmlColumn);
+			attributeOverrides.add(xmlAttributeOverride);
+		}
+		return attributeOverrides;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlEmbedded2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlEmbedded2_0.java
new file mode 100644
index 0000000..e4b8d33
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlEmbedded2_0.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlEmbedded;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlEmbedded;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlEmbedded2_0 extends XmlEmbedded
+{
+		
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaEmbeddedMapping2_0 javaAttributeMapping;
+
+	protected final VirtualXmlEmbedded virtualXmlEmbedded;
+		
+	public VirtualXmlEmbedded2_0(OrmTypeMapping ormTypeMapping, JavaEmbeddedMapping2_0 javaEmbeddedMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaEmbeddedMapping;
+		this.virtualXmlEmbedded = new VirtualXmlEmbedded(ormTypeMapping, javaEmbeddedMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlEmbedded.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlEmbedded.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlEmbedded.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlEmbedded.getNameTextRange();
+	}
+
+	@Override
+	public EList<XmlAttributeOverride> getAttributeOverrides() {
+		return this.virtualXmlEmbedded.getAttributeOverrides();
+	}
+
+	@Override
+	public EList<XmlAssociationOverride> getAssociationOverrides() {
+		EList<XmlAssociationOverride> associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES);
+		ListIterator<JavaAssociationOverride> javaAssociationOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAssociationOverrides = this.javaAttributeMapping.getAssociationOverrideContainer().associationOverrides();
+		}
+		else {
+			javaAssociationOverrides = this.javaAttributeMapping.getAssociationOverrideContainer().virtualAssociationOverrides();
+		}
+		for (JavaAssociationOverride javaAssociationOverride : CollectionTools.iterable(javaAssociationOverrides)) {
+			XmlAssociationOverride xmlAssociationOverride = new VirtualXmlAssociationOverride2_0(javaAssociationOverride.getName(), this.ormTypeMapping, javaAssociationOverride.getRelationshipReference().getPredominantJoiningStrategy());
+			associationOverrides.add(xmlAssociationOverride);
+		}
+		return associationOverrides;
+	}
+
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlEmbeddedId2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlEmbeddedId2_0.java
new file mode 100644
index 0000000..4fed966
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlEmbeddedId2_0.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlEmbeddedId;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlEmbeddedId2_0 extends XmlEmbeddedId
+{
+		
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaEmbeddedIdMapping javaAttributeMapping;
+
+	protected final VirtualXmlEmbeddedId virtualXmlEmbeddedId;
+		
+	public VirtualXmlEmbeddedId2_0(OrmTypeMapping ormTypeMapping, JavaEmbeddedIdMapping javaEmbeddedIdMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaEmbeddedIdMapping;
+		this.virtualXmlEmbeddedId = new VirtualXmlEmbeddedId(ormTypeMapping, javaEmbeddedIdMapping);
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlEmbeddedId.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlEmbeddedId.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlEmbeddedId.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlEmbeddedId.getNameTextRange();
+	}
+
+	@Override
+	public EList<XmlAttributeOverride> getAttributeOverrides() {
+		return this.virtualXmlEmbeddedId.getAttributeOverrides();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlId2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlId2_0.java
new file mode 100644
index 0000000..710664c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlId2_0.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaIdMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlId;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlGeneratedValue;
+import org.eclipse.jpt.core.resource.orm.XmlId;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.resource.orm.XmlTableGenerator;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlId2_0 extends XmlId
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaIdMapping javaAttributeMapping;
+
+	protected final VirtualXmlId virtualXmlId;
+
+	protected final VirtualXmlSequenceGenerator2_0 virtualSequenceGenerator;
+		
+	public VirtualXmlId2_0(OrmTypeMapping ormTypeMapping, JavaIdMapping javaIdMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaIdMapping;
+		this.virtualXmlId = new VirtualXmlId(ormTypeMapping, javaIdMapping);
+		this.virtualSequenceGenerator = new VirtualXmlSequenceGenerator2_0(javaIdMapping.getGeneratorContainer(), this.isOrmMetadataComplete());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlId.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlId.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlId.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlId.getNameTextRange();
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.virtualXmlId.getColumn();
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		this.virtualXmlId.setColumn(value);
+	}
+
+	@Override
+	public TemporalType getTemporal() {
+		return this.virtualXmlId.getTemporal();
+	}
+
+	@Override
+	public void setTemporal(TemporalType newTemporal){
+		this.virtualXmlId.setTemporal(newTemporal);
+	}
+	
+	@Override
+	public TextRange getTemporalTextRange() {
+		return this.virtualXmlId.getTemporalTextRange();
+	}
+
+	@Override
+	public XmlGeneratedValue getGeneratedValue() {
+		return this.virtualXmlId.getGeneratedValue();
+	}
+	
+	@Override
+	public void setGeneratedValue(XmlGeneratedValue value) {
+		this.virtualXmlId.setGeneratedValue(value);
+	}
+
+	@Override
+	public XmlSequenceGenerator getSequenceGenerator() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		if (this.javaAttributeMapping.getGeneratorContainer().getSequenceGenerator() != null) {
+			return this.virtualSequenceGenerator;
+		}
+		return null;
+	}
+
+	@Override
+	public void setSequenceGenerator(XmlSequenceGenerator value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlTableGenerator getTableGenerator() {
+		return this.virtualXmlId.getTableGenerator();
+	}
+
+	@Override
+	public void setTableGenerator(XmlTableGenerator value) {
+		this.virtualXmlId.setTableGenerator(value);
+	}
+	
+	@Override
+	public EnumType getEnumerated() {
+		return this.virtualXmlId.getEnumerated();
+	}
+	
+	@Override
+	public void setEnumerated(EnumType value) {
+		this.virtualXmlId.setEnumerated(value);
+	}
+	
+	@Override
+	public TextRange getEnumeratedTextRange() {
+		return this.virtualXmlId.getEnumeratedTextRange();
+	}
+	
+	@Override
+	public boolean isLob() {
+		return this.virtualXmlId.isLob();
+	}
+	
+	@Override
+	public void setLob(boolean value) {
+		this.virtualXmlId.setLob(value);
+	}
+	
+	@Override
+	public TextRange getLobTextRange() {
+		return this.virtualXmlId.getLobTextRange();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlManyToMany2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlManyToMany2_0.java
new file mode 100644
index 0000000..6a5ed68
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlManyToMany2_0.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAttributeOverride;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlColumn;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlManyToMany;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlOrderColumn;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToManyMapping2_0;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlManyToMany2_0
+	extends XmlManyToMany
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaManyToManyMapping2_0 javaAttributeMapping;
+	
+	protected final VirtualXmlManyToMany virtualXmlManyToMany;
+	
+	protected final VirtualXmlCascadeType2_0 virtualXmlCascadeType;
+	
+	protected final XmlClassReference mapKeyClass;
+	
+	protected VirtualXmlOrderColumn orderColumn;
+	
+	protected final VirtualXmlColumn mapKeyColumn;
+	
+	
+	public VirtualXmlManyToMany2_0(
+			OrmTypeMapping ormTypeMapping, JavaManyToManyMapping2_0 javaManyToManyMapping) {
+		
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaManyToManyMapping;
+		this.virtualXmlManyToMany = new VirtualXmlManyToMany(ormTypeMapping, javaManyToManyMapping);
+		this.virtualXmlCascadeType = new VirtualXmlCascadeType2_0(javaManyToManyMapping.getCascade());
+		this.mapKeyClass = new VirtualMapKeyClassReference(javaManyToManyMapping);
+		this.orderColumn = new VirtualXmlOrderColumn(
+			((Orderable2_0) this.javaAttributeMapping.getOrderable()).getOrderColumn(),
+			this.ormTypeMapping);
+		this.mapKeyColumn = new VirtualXmlColumn(ormTypeMapping, javaManyToManyMapping.getMapKeyColumn());
+	}
+	
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlManyToMany.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlManyToMany.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlManyToMany.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlManyToMany.getNameTextRange();
+	}	
+	
+	@Override
+	public FetchType getFetch() {
+		return this.virtualXmlManyToMany.getFetch();
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		this.virtualXmlManyToMany.setFetch(newFetch);
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualXmlCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		return this.virtualXmlManyToMany.getJoinTable();
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		this.virtualXmlManyToMany.setJoinTable(value);
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		return this.virtualXmlManyToMany.getTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		this.virtualXmlManyToMany.setTargetEntity(value);
+	}
+	
+	@Override
+	public String getMappedBy() {
+		return this.virtualXmlManyToMany.getMappedBy();
+	}
+	
+	@Override
+	public void setMappedBy(String value) {
+		this.virtualXmlManyToMany.setMappedBy(value);
+	}
+
+	
+	@Override
+	public MapKey getMapKey() {
+		return this.virtualXmlManyToMany.getMapKey();
+	}
+	
+	@Override
+	public void setMapKey(MapKey value) {
+		this.virtualXmlManyToMany.setMapKey(value);
+	}
+	
+	@Override
+	public XmlClassReference getMapKeyClass() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.mapKeyClass;
+	}
+
+	@Override
+	public void setMapKeyClass(XmlClassReference newMapKeyClass) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+
+	@Override
+	public void setMapKeyColumn(XmlColumn newMapKeyColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getOrderBy() {
+		return this.virtualXmlManyToMany.getOrderBy();
+	}
+	
+	@Override
+	public void setOrderBy(String value) {
+		this.virtualXmlManyToMany.setOrderBy(value);
+	}
+
+	@Override
+	public XmlOrderColumn getOrderColumn() {
+		if (((Orderable2_0) this.javaAttributeMapping.getOrderable()).isOrderColumnOrdering()) {
+			return this.orderColumn;
+		}
+		return null;
+	}
+
+	@Override
+	public void setOrderColumn(XmlOrderColumn newOrderColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TextRange getMappedByTextRange() {
+		return this.virtualXmlManyToMany.getMappedByTextRange();
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return this.virtualXmlManyToMany.getTargetEntityTextRange();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlAttributeOverride> getMapKeyAttributeOverrides() {
+		EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_MANY_TO_MANY__MAP_KEY_ATTRIBUTE_OVERRIDES);
+		ListIterator<JavaAttributeOverride> javaAttributeOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAttributeOverrides = this.javaAttributeMapping.getMapKeyAttributeOverrideContainer().attributeOverrides();
+		}
+		else {
+			javaAttributeOverrides = this.javaAttributeMapping.getMapKeyAttributeOverrideContainer().virtualAttributeOverrides();
+		}
+		for (JavaAttributeOverride javaAttributeOverride : CollectionTools.iterable(javaAttributeOverrides)) {
+			XmlColumn xmlColumn = new VirtualXmlColumn(this.ormTypeMapping, javaAttributeOverride.getColumn());
+			XmlAttributeOverride xmlAttributeOverride = new VirtualXmlAttributeOverride(javaAttributeOverride.getName(), xmlColumn);
+			attributeOverrides.add(xmlAttributeOverride);
+		}
+		return attributeOverrides;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlManyToOne2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlManyToOne2_0.java
new file mode 100644
index 0000000..c8ce2d0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlManyToOne2_0.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlJoinTable;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlManyToOne;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaManyToOneMapping2_0;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlManyToOne2_0 extends XmlManyToOne
+{		
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaManyToOneMapping2_0 javaAttributeMapping;
+	
+	protected final VirtualXmlManyToOne virtualXmlManyToOne;
+	
+	protected final VirtualXmlCascadeType2_0 virtualXmlCascadeType;
+	
+	
+	public VirtualXmlManyToOne2_0(
+			OrmTypeMapping ormTypeMapping, 
+			JavaManyToOneMapping2_0 javaManyToOneMapping) {
+		
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaManyToOneMapping;
+		this.virtualXmlManyToOne = new VirtualXmlManyToOne(ormTypeMapping, javaManyToOneMapping);
+		this.virtualXmlCascadeType = new VirtualXmlCascadeType2_0(javaManyToOneMapping.getCascade());
+	}
+	
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlManyToOne.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlManyToOne.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlManyToOne.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlManyToOne.getNameTextRange();
+	}
+
+	@Override
+	public FetchType getFetch() {
+		return this.virtualXmlManyToOne.getFetch();
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		this.virtualXmlManyToOne.setFetch(newFetch);
+	}
+
+	@Override
+	public Boolean getOptional() {
+		return this.virtualXmlManyToOne.getOptional();
+	}
+
+	@Override
+	public void setOptional(Boolean newOptional) {
+		this.virtualXmlManyToOne.setOptional(newOptional);
+	}
+	
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		return this.virtualXmlManyToOne.getJoinColumns();
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualXmlCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		if (this.javaAttributeMapping.getRelationshipReference().getJoinTableJoiningStrategy().getJoinTable() != null) {
+			return 	new VirtualXmlJoinTable(
+				this.ormTypeMapping, 
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinTableJoiningStrategy().getJoinTable());
+		}
+		return null;
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		this.virtualXmlManyToOne.setJoinTable(value);
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		return this.virtualXmlManyToOne.getTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		this.virtualXmlManyToOne.setTargetEntity(value);
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return this.virtualXmlManyToOne.getTargetEntityTextRange();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public Boolean getId() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		boolean javaIdValue = this.javaAttributeMapping.getDerivedIdentity().getIdDerivedIdentityStrategy().getValue();
+		return (javaIdValue) ? Boolean.TRUE : null;
+	}
+	
+	@Override
+	public void setId(Boolean newId) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getMapsId() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		DerivedIdentity2_0 derivedIdentity = this.javaAttributeMapping.getDerivedIdentity();
+		if (derivedIdentity.usesMapsIdDerivedIdentityStrategy()) {
+			return derivedIdentity.getMapsIdDerivedIdentityStrategy().getValue();
+		}
+		else {
+			return derivedIdentity.getMapsIdDerivedIdentityStrategy().getSpecifiedValue();
+		}
+	}
+	
+	@Override
+	public void setMapsId(String newMapsId) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlNullAttributeMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlNullAttributeMapping2_0.java
new file mode 100644
index 0000000..c95d82f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlNullAttributeMapping2_0.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlNullAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeMapping;
+import org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualVersion is an implementation of Version used when there is 
+ * no tag in the orm.xml and an underlying javaVersionMapping exists.
+ */
+public class VirtualXmlNullAttributeMapping2_0 extends XmlNullAttributeMapping implements XmlAttributeMapping
+{
+	
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaAttributeMapping javaAttributeMapping;
+	
+	protected final VirtualXmlNullAttributeMapping virtualXmlNullAttributeMapping;
+	
+	public VirtualXmlNullAttributeMapping2_0(OrmTypeMapping ormTypeMapping, JavaAttributeMapping javaAttributeMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaAttributeMapping;
+		this.virtualXmlNullAttributeMapping = new VirtualXmlNullAttributeMapping(ormTypeMapping, javaAttributeMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	public String getMappingKey() {
+		return this.virtualXmlNullAttributeMapping.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlNullAttributeMapping.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlNullAttributeMapping.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlNullAttributeMapping.getNameTextRange();
+	}	
+	
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlOneToMany2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlOneToMany2_0.java
new file mode 100644
index 0000000..5604457
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlOneToMany2_0.java
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.jpt.core.context.JoinColumn;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverride;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlAttributeOverride;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlColumn;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlJoinColumn;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlOneToMany;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlOrderColumn;
+import org.eclipse.jpt.core.jpa2.context.OneToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlOneToMany2_0 extends XmlOneToMany
+{
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaOneToManyMapping2_0 javaAttributeMapping;
+	
+	protected final VirtualXmlOneToMany virtualXmlOneToMany;
+	
+	protected final VirtualXmlCascadeType2_0 virtualXmlCascadeType;
+	
+	protected final XmlClassReference mapKeyClass;
+	
+	protected VirtualXmlOrderColumn orderColumn;
+	
+	protected final VirtualXmlColumn mapKeyColumn;
+	
+	
+	public VirtualXmlOneToMany2_0(
+			OrmTypeMapping ormTypeMapping, JavaOneToManyMapping2_0 javaOneToManyMapping) {
+	
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaOneToManyMapping;
+		this.virtualXmlOneToMany = new VirtualXmlOneToMany(ormTypeMapping, javaOneToManyMapping);
+		this.virtualXmlCascadeType = new VirtualXmlCascadeType2_0(javaOneToManyMapping.getCascade());
+		this.mapKeyClass = new VirtualMapKeyClassReference(javaOneToManyMapping);
+		this.orderColumn = new VirtualXmlOrderColumn(
+			((Orderable2_0) this.javaAttributeMapping.getOrderable()).getOrderColumn(),
+			this.ormTypeMapping);
+		this.mapKeyColumn = new VirtualXmlColumn(ormTypeMapping, javaOneToManyMapping.getMapKeyColumn());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+		
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlOneToMany.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlOneToMany.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlOneToMany.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlOneToMany.getNameTextRange();
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		return this.virtualXmlOneToMany.getFetch();
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		this.virtualXmlOneToMany.setFetch(newFetch);
+	}
+
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualXmlCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	private JavaOrphanRemovable2_0 getOrphanRemovalOf(OneToManyMapping2_0 oneToManyMapping) {
+		return ((JavaOrphanRemovalHolder2_0) oneToManyMapping).getOrphanRemoval();
+	}
+	
+	@Override
+	public Boolean getOrphanRemoval() {
+		JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(this.javaAttributeMapping);
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(mappingsOrphanRemoval.isDefaultOrphanRemoval());
+		}
+		return Boolean.valueOf(mappingsOrphanRemoval.isOrphanRemoval());
+	}
+
+	@Override
+	public void setOrphanRemoval(Boolean newOrphanRemoval) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		return this.virtualXmlOneToMany.getJoinTable();
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		this.virtualXmlOneToMany.setJoinTable(value);
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		return this.virtualXmlOneToMany.getTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		this.virtualXmlOneToMany.setTargetEntity(value);
+	}
+	
+	@Override
+	public String getMappedBy() {
+		return this.virtualXmlOneToMany.getMappedBy();
+	}
+	
+	@Override
+	public void setMappedBy(String value) {
+		this.virtualXmlOneToMany.setMappedBy(value);
+	}
+
+	
+	@Override
+	public MapKey getMapKey() {
+		return this.virtualXmlOneToMany.getMapKey();
+	}
+	
+	@Override
+	public void setMapKey(MapKey value) {
+		this.virtualXmlOneToMany.setMapKey(value);
+	}
+	
+	@Override
+	public XmlClassReference getMapKeyClass() {
+		if (this.isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.mapKeyClass;
+	}
+
+	@Override
+	public void setMapKeyClass(XmlClassReference newMapKeyClass) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public XmlColumn getMapKeyColumn() {
+		return this.mapKeyColumn;
+	}
+
+	@Override
+	public void setMapKeyColumn(XmlColumn newMapKeyColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public String getOrderBy() {
+		return this.virtualXmlOneToMany.getOrderBy();
+	}
+	
+	@Override
+	public void setOrderBy(String value) {
+		this.virtualXmlOneToMany.setOrderBy(value);
+	}
+
+	@Override
+	public XmlOrderColumn getOrderColumn() {
+		if (((Orderable2_0) this.javaAttributeMapping.getOrderable()).isOrderColumnOrdering()) {
+			return this.orderColumn;
+		}
+		return null;
+	}
+	
+	@Override
+	public void setOrderColumn(XmlOrderColumn newOrderColumn) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public TextRange getMappedByTextRange() {
+		return this.virtualXmlOneToMany.getMappedByTextRange();
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return this.virtualXmlOneToMany.getTargetEntityTextRange();
+	}	
+	
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		EList<XmlJoinColumn> joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS);
+		if (isOrmMetadataComplete()) {
+			return joinColumns;
+		}
+		for (JoinColumn joinColumn : 
+			CollectionTools.iterable(
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinColumnJoiningStrategy().specifiedJoinColumns())) {
+			XmlJoinColumn xmlJoinColumn = new VirtualXmlJoinColumn(joinColumn, isOrmMetadataComplete());
+			joinColumns.add(xmlJoinColumn);
+		}
+		return joinColumns;
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+
+	@Override
+	public EList<XmlAttributeOverride> getMapKeyAttributeOverrides() {
+		EList<XmlAttributeOverride> attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ONE_TO_MANY__MAP_KEY_ATTRIBUTE_OVERRIDES);
+		ListIterator<JavaAttributeOverride> javaAttributeOverrides;
+		if (!this.isOrmMetadataComplete()) {
+			javaAttributeOverrides = this.javaAttributeMapping.getMapKeyAttributeOverrideContainer().attributeOverrides();
+		}
+		else {
+			javaAttributeOverrides = this.javaAttributeMapping.getMapKeyAttributeOverrideContainer().virtualAttributeOverrides();
+		}
+		for (JavaAttributeOverride javaAttributeOverride : CollectionTools.iterable(javaAttributeOverrides)) {
+			XmlColumn xmlColumn = new VirtualXmlColumn(this.ormTypeMapping, javaAttributeOverride.getColumn());
+			XmlAttributeOverride xmlAttributeOverride = new VirtualXmlAttributeOverride(javaAttributeOverride.getName(), xmlColumn);
+			attributeOverrides.add(xmlAttributeOverride);
+		}
+		return attributeOverrides;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlOneToOne2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlOneToOne2_0.java
new file mode 100644
index 0000000..cf8ef49
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlOneToOne2_0.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlJoinTable;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlOneToOne;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.OneToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOneToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.CascadeType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn;
+import org.eclipse.jpt.core.utility.TextRange;
+
+public class VirtualXmlOneToOne2_0 extends XmlOneToOne
+{		
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaOneToOneMapping2_0 javaAttributeMapping;
+	
+	protected final VirtualXmlOneToOne virtualXmlOneToOne;
+	
+	protected final VirtualXmlCascadeType2_0 virtualXmlCascadeType;
+	
+	
+	public VirtualXmlOneToOne2_0(
+			OrmTypeMapping ormTypeMapping, 
+			JavaOneToOneMapping2_0 javaOneToOneMapping) {
+		
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaOneToOneMapping;
+		this.virtualXmlOneToOne = new VirtualXmlOneToOne(ormTypeMapping, javaOneToOneMapping);
+		this.virtualXmlCascadeType = new VirtualXmlCascadeType2_0(javaOneToOneMapping.getCascade());
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlOneToOne.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlOneToOne.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlOneToOne.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlOneToOne.getNameTextRange();
+	}
+	
+	@Override
+	public FetchType getFetch() {
+		return this.virtualXmlOneToOne.getFetch();
+	}
+
+	@Override
+	public void setFetch(FetchType newFetch) {
+		this.virtualXmlOneToOne.setFetch(newFetch);
+	}
+
+	@Override
+	public Boolean getOptional() {
+		return this.virtualXmlOneToOne.getOptional();
+	}
+
+	@Override
+	public void setOptional(Boolean newOptional) {
+		this.virtualXmlOneToOne.setOptional(newOptional);
+	}
+
+	@Override
+	public EList<XmlJoinColumn> getJoinColumns() {
+		return this.virtualXmlOneToOne.getJoinColumns();
+	}
+	
+	@Override
+	public CascadeType getCascade() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		return this.virtualXmlCascadeType;
+	}
+	
+	@Override
+	public void setCascade(CascadeType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	private JavaOrphanRemovable2_0 getOrphanRemovalOf(OneToOneMapping2_0 oneToOneMapping) {
+		return ((JavaOrphanRemovalHolder2_0) oneToOneMapping).getOrphanRemoval();
+	}
+	
+	@Override
+	public Boolean getOrphanRemoval() {
+		JavaOrphanRemovable2_0 mappingsOrphanRemoval = this.getOrphanRemovalOf(this.javaAttributeMapping);
+		if (this.isOrmMetadataComplete()) {
+			return Boolean.valueOf(mappingsOrphanRemoval.isDefaultOrphanRemoval());
+		}
+		return Boolean.valueOf(mappingsOrphanRemoval.isOrphanRemoval());
+	}
+
+	@Override
+	public void setOrphanRemoval(Boolean newOrphanRemoval) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public XmlJoinTable getJoinTable() {
+		if (this.javaAttributeMapping.getRelationshipReference().getJoinTableJoiningStrategy().getJoinTable() != null) {
+			return 	new VirtualXmlJoinTable(
+				this.ormTypeMapping, 
+				this.javaAttributeMapping.getRelationshipReference().
+					getJoinTableJoiningStrategy().getJoinTable());
+		}
+		return null;
+	}
+
+	@Override
+	public void setJoinTable(XmlJoinTable value) {
+		this.virtualXmlOneToOne.setJoinTable(value);
+	}
+	
+	@Override
+	public String getTargetEntity() {
+		return this.virtualXmlOneToOne.getTargetEntity();
+	}
+
+	@Override
+	public void setTargetEntity(String value) {
+		this.virtualXmlOneToOne.setTargetEntity(value);
+	}
+
+	@Override
+	public String getMappedBy() {
+		return this.virtualXmlOneToOne.getMappedBy();
+	}
+
+	@Override
+	public void setMappedBy(String value) {
+		this.virtualXmlOneToOne.setMappedBy(value);
+	}
+
+	@Override
+	public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns() {
+		return this.virtualXmlOneToOne.getPrimaryKeyJoinColumns();
+	}
+	
+	@Override
+	public TextRange getMappedByTextRange() {
+		return this.virtualXmlOneToOne.getMappedByTextRange();
+	}
+	
+	@Override
+	public TextRange getTargetEntityTextRange() {
+		return this.virtualXmlOneToOne.getTargetEntityTextRange();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public Boolean getId() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		boolean javaIdValue = this.javaAttributeMapping.getDerivedIdentity().getIdDerivedIdentityStrategy().getValue();
+		return (javaIdValue) ? Boolean.TRUE : null;
+	}
+	
+	@Override
+	public void setId(Boolean newId) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getMapsId() {
+		if (isOrmMetadataComplete()) {
+			return null;
+		}
+		DerivedIdentity2_0 derivedIdentity = this.javaAttributeMapping.getDerivedIdentity();
+		if (derivedIdentity.usesMapsIdDerivedIdentityStrategy()) {
+			return derivedIdentity.getMapsIdDerivedIdentityStrategy().getValue();
+		}
+		else {
+			return derivedIdentity.getMapsIdDerivedIdentityStrategy().getSpecifiedValue();
+		}
+	}
+	
+	@Override
+	public void setMapsId(String newMapsId) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlSequenceGenerator2_0.java
new file mode 100644
index 0000000..f2637ea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlSequenceGenerator2_0.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaGeneratorContainer;
+import org.eclipse.jpt.core.context.java.JavaSequenceGenerator;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlSequenceGenerator;
+import org.eclipse.jpt.core.internal.jpa2.context.java.GenericJavaSequenceGenerator2_0;
+import org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  Generic2_0VirtualXmlSequenceGenerator
+ */
+public class VirtualXmlSequenceGenerator2_0 extends XmlSequenceGenerator
+{
+	protected final JavaGeneratorContainer javaGeneratorHolder;
+
+	protected final boolean metadataComplete;
+	
+	protected final VirtualXmlSequenceGenerator virtualXmlSequenceGenerator;
+
+	public VirtualXmlSequenceGenerator2_0(JavaGeneratorContainer javaGeneratorHolder, boolean metadataComplete) {
+		super();
+		this.javaGeneratorHolder = javaGeneratorHolder;
+		this.metadataComplete = metadataComplete;
+		this.virtualXmlSequenceGenerator = new VirtualXmlSequenceGenerator(javaGeneratorHolder, metadataComplete);
+	}
+
+	protected JavaSequenceGenerator getJavaSequenceGenerator() {
+		return this.javaGeneratorHolder.getSequenceGenerator();
+	}
+	
+	@Override
+	public String getCatalog() {
+		return ((GenericJavaSequenceGenerator2_0)this.getJavaSequenceGenerator()).getCatalog();
+	}
+	
+	@Override
+	public void setCatalog(String newCatalog) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public String getSchema() {
+		return ((GenericJavaSequenceGenerator2_0)this.getJavaSequenceGenerator()).getSchema();
+	}
+	
+	@Override
+	public void setSchema(String newSchema) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public Integer getAllocationSize() {
+		return this.virtualXmlSequenceGenerator.getAllocationSize();
+	}
+	
+	@Override
+	public void setAllocationSize(Integer newAllocationSize) {
+		this.virtualXmlSequenceGenerator.setAllocationSize(newAllocationSize);
+	}
+	
+	@Override
+	public Integer getInitialValue() {
+		return this.virtualXmlSequenceGenerator.getInitialValue();
+	}
+	
+	@Override
+	public void setInitialValue(Integer newInitialValue) {
+		this.virtualXmlSequenceGenerator.setInitialValue(newInitialValue);
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlSequenceGenerator.getName();
+	}
+	
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlSequenceGenerator.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlSequenceGenerator.getNameTextRange();
+	}
+	
+	@Override
+	public String getSequenceName() {
+		return this.virtualXmlSequenceGenerator.getSequenceName();
+	}
+	
+	@Override
+	public void setSequenceName(String newSequenceName) {
+		this.virtualXmlSequenceGenerator.setSequenceName(newSequenceName);
+	}
+
+	@Override
+	public boolean isVirtual() {
+		return this.virtualXmlSequenceGenerator.isVirtual();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlTransient2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlTransient2_0.java
new file mode 100644
index 0000000..ade064e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlTransient2_0.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaTransientMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlTransient;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.XmlTransient;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlTransient2_0 extends XmlTransient
+{
+		
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaTransientMapping javaAttributeMapping;
+
+	protected final VirtualXmlTransient virtualXmlTransient;
+	
+	public VirtualXmlTransient2_0(OrmTypeMapping ormTypeMapping, JavaTransientMapping javaTransientMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaTransientMapping;
+		this.virtualXmlTransient = new VirtualXmlTransient(ormTypeMapping, javaTransientMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlTransient.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlTransient.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlTransient.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlTransient.getNameTextRange();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlVersion2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlVersion2_0.java
new file mode 100644
index 0000000..3cc3534
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/orm/VirtualXmlVersion2_0.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.java.JavaVersionMapping;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.internal.context.orm.VirtualXmlVersion;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * VirtualBasic is an implementation of Basic used when there is 
+ * no tag in the orm.xml and an underlying javaBasicMapping exists.
+ */
+public class VirtualXmlVersion2_0 extends XmlVersion
+{
+		
+	protected OrmTypeMapping ormTypeMapping;
+	
+	protected final JavaVersionMapping javaAttributeMapping;
+
+	protected final VirtualXmlVersion virtualXmlVersion;
+	
+	public VirtualXmlVersion2_0(OrmTypeMapping ormTypeMapping, JavaVersionMapping javaVersionMapping) {
+		super();
+		this.ormTypeMapping = ormTypeMapping;
+		this.javaAttributeMapping = javaVersionMapping;
+		this.virtualXmlVersion = new VirtualXmlVersion(ormTypeMapping, javaVersionMapping);
+	}
+	
+	protected boolean isOrmMetadataComplete() {
+		return this.ormTypeMapping.isMetadataComplete();
+	}
+	
+	@Override
+	public String getMappingKey() {
+		return this.virtualXmlVersion.getMappingKey();
+	}
+	
+	@Override
+	public String getName() {
+		return this.virtualXmlVersion.getName();
+	}
+
+	@Override
+	public void setName(String newName) {
+		this.virtualXmlVersion.setName(newName);
+	}
+	
+	@Override
+	public TextRange getNameTextRange() {
+		return this.virtualXmlVersion.getNameTextRange();
+	}
+
+	@Override
+	public XmlColumn getColumn() {
+		return this.virtualXmlVersion.getColumn();
+	}
+
+	@Override
+	public void setColumn(XmlColumn value) {
+		this.virtualXmlVersion.setColumn(value);
+	}
+
+	@Override
+	public TemporalType getTemporal() {
+		return this.virtualXmlVersion.getTemporal();
+	}
+
+	@Override
+	public void setTemporal(TemporalType newTemporal){
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public EnumType getEnumerated() {
+		return this.virtualXmlVersion.getEnumerated();
+	}
+	
+	@Override
+	public void setEnumerated(EnumType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+	
+	@Override
+	public boolean isLob() {
+		return this.virtualXmlVersion.isLob();
+	}
+	
+	@Override
+	public void setLob(boolean value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}	
+	
+	@Override
+	public TextRange getEnumeratedTextRange() {
+		return this.virtualXmlVersion.getEnumeratedTextRange();
+	}
+	
+	@Override
+	public TextRange getLobTextRange() {
+		return this.virtualXmlVersion.getLobTextRange();
+	}
+	
+	@Override
+	public TextRange getTemporalTextRange() {
+		return this.virtualXmlVersion.getTemporalTextRange();
+	}
+	
+	@Override
+	public AccessType getAccess() {
+		return org.eclipse.jpt.core.context.AccessType.toOrmResourceModel(this.javaAttributeMapping.getPersistentAttribute().getAccess());
+	}
+	
+	@Override
+	public void setAccess(AccessType value) {
+		throw new UnsupportedOperationException("cannot set values on a virtual mapping"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java
new file mode 100644
index 0000000..e810ba8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlContextNodeFactory.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.internal.jpa2.context.persistence.connection.GenericConnection2_0;
+import org.eclipse.jpt.core.internal.jpa2.context.persistence.options.GenericOptions2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.connection.JpaConnection2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.JpaOptions2_0;
+
+
+public class Generic2_0PersistenceXmlContextNodeFactory extends AbstractPersistenceXmlContextNodeFactory
+{
+		
+	public JpaConnection2_0 buildConnection(PersistenceUnit parent) {
+		return new GenericConnection2_0(parent);
+	}
+	
+	public JpaOptions2_0 buildOptions(PersistenceUnit parent) {
+		return new GenericOptions2_0(parent);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java
new file mode 100644
index 0000000..00658ee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/Generic2_0PersistenceXmlDefinition.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.persistence;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.core.context.persistence.PersistenceXmlDefinition;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceXmlDefinition;
+import org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Factory;
+
+public class Generic2_0PersistenceXmlDefinition
+	extends AbstractPersistenceXmlDefinition
+{
+	// singleton
+	private static final PersistenceXmlDefinition INSTANCE = 
+			new Generic2_0PersistenceXmlDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static PersistenceXmlDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private Generic2_0PersistenceXmlDefinition() {
+		super();
+	}
+	
+	
+	public EFactory getResourceNodeFactory() {
+		return PersistenceV2_0Factory.eINSTANCE;
+	}
+	
+	@Override
+	protected PersistenceXmlContextNodeFactory buildContextNodeFactory() {
+		return new Generic2_0PersistenceXmlContextNodeFactory();
+	}
+	
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.PERSISTENCE_XML_2_0_RESOURCE_TYPE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java
new file mode 100644
index 0000000..48f975c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/GenericConnection2_0.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.persistence.connection;
+
+import java.util.Map;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnitProperties;
+import org.eclipse.jpt.core.jpa2.context.persistence.connection.JpaConnection2_0;
+
+/**
+ *  GenericConnection2_0
+ */
+public class GenericConnection2_0 extends AbstractPersistenceUnitProperties
+	implements JpaConnection2_0
+{
+	// ********** GenericConnection properties **********
+	private String driver;
+	private String url;
+	private String user;
+	private String password;
+	
+
+	// ********** constructors **********
+	public GenericConnection2_0(PersistenceUnit parent) {
+		super(parent);
+	}
+
+	// ********** initialization **********
+	/**
+	 * Initializes properties with values from the persistence unit.
+	 */
+	@Override
+	protected void initializeProperties() {
+		this.driver = 
+			this.getStringValue(PERSISTENCE_JDBC_DRIVER);
+		this.url = 
+			this.getStringValue(PERSISTENCE_JDBC_URL);
+		this.user = 
+			this.getStringValue(PERSISTENCE_JDBC_USER);
+		this.password = 
+			this.getStringValue(PERSISTENCE_JDBC_PASSWORD);
+	}
+
+	// ********** behavior **********
+	
+	public void propertyValueChanged(String propertyName, String newValue) {
+		if (propertyName.equals(PERSISTENCE_JDBC_DRIVER)) {
+			this.driverChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_JDBC_URL)) {
+			this.urlChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_JDBC_USER)) {
+			this.userChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_JDBC_PASSWORD)) {
+			this.passwordChanged(newValue);
+		}
+	}
+
+	public void propertyRemoved(String propertyName) {
+		if (propertyName.equals(PERSISTENCE_JDBC_DRIVER)) {
+			this.driverChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_JDBC_URL)) {
+			this.urlChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_JDBC_USER)) {
+			this.userChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_JDBC_PASSWORD)) {
+			this.passwordChanged(null);
+		}
+	}
+
+	/**
+	 * Adds property names key/value pairs, where: 
+	 * 		key = PU property key
+	 * 		value = property id
+	 */
+	@Override
+	protected void addPropertyNames(Map<String, String> propertyNames) {
+		propertyNames.put(
+			PERSISTENCE_JDBC_DRIVER,
+			DRIVER_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_JDBC_URL,
+			URL_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_JDBC_USER,
+			USER_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_JDBC_PASSWORD,
+			PASSWORD_PROPERTY);
+	}
+
+	// ********** Driver **********
+	public String getDriver() {
+		return this.driver;
+	}
+
+	public void setDriver(String newDriver) {
+		String old = this.driver;
+		this.driver = newDriver;
+		this.putProperty(DRIVER_PROPERTY, newDriver);
+		this.firePropertyChanged(DRIVER_PROPERTY, old, newDriver);
+	}
+
+	private void driverChanged(String newValue) {
+		String old = this.driver;
+		this.driver = newValue;
+		this.firePropertyChanged(DRIVER_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultDriver() {
+		return DEFAULT_JDBC_DRIVER;
+	}
+
+	// ********** URL **********
+	public String getUrl() {
+		return this.url;
+	}
+
+	public void setUrl(String newUrl) {
+		String old = this.url;
+		this.url = newUrl;
+		this.putProperty(URL_PROPERTY, newUrl);
+		this.firePropertyChanged(URL_PROPERTY, old, newUrl);
+	}
+
+	private void urlChanged(String newValue) {
+		String old = this.url;
+		this.url = newValue;
+		this.firePropertyChanged(URL_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultUrl() {
+		return DEFAULT_JDBC_URL;
+	}
+
+	// ********** User **********
+	public String getUser() {
+		return this.user;
+	}
+
+	public void setUser(String newUser) {
+		String old = this.user;
+		this.user = newUser;
+		this.putProperty(USER_PROPERTY, newUser);
+		this.firePropertyChanged(USER_PROPERTY, old, newUser);
+	}
+
+	private void userChanged(String newValue) {
+		String old = this.user;
+		this.user = newValue;
+		this.firePropertyChanged(USER_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultUser() {
+		return DEFAULT_JDBC_USER;
+	}
+
+	// ********** Password **********
+	public String getPassword() {
+		return this.password;
+	}
+
+	public void setPassword(String newPassword) {
+		String old = this.password;
+		this.password = newPassword;
+		this.putProperty(PASSWORD_PROPERTY, newPassword);
+		this.firePropertyChanged(PASSWORD_PROPERTY, old, newPassword);
+	}
+
+	private void passwordChanged(String newValue) {
+		String old = this.password;
+		this.password = newValue;
+		this.firePropertyChanged(PASSWORD_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultPassword() {
+		return DEFAULT_JDBC_PASSWORD;
+	}
+
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java
new file mode 100644
index 0000000..2e7130f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/connection/NullConnection2_0.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.persistence.connection;
+
+import java.util.Map;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnitProperties;
+import org.eclipse.jpt.core.jpa2.context.persistence.connection.JpaConnection2_0;
+
+/**
+ *  GenericConnection2_0
+ */
+public class NullConnection2_0 extends AbstractPersistenceUnitProperties
+	implements JpaConnection2_0
+{
+	
+
+	// ********** constructors **********
+	public NullConnection2_0(PersistenceUnit parent) {
+		super(parent);
+	}
+
+	// ********** initialization **********
+	/**
+	 * Initializes properties with values from the persistence unit.
+	 */
+	@Override
+	protected void initializeProperties() {
+		//do nothing
+	}
+
+	// ********** behavior **********
+	
+	public void propertyValueChanged(String propertyName, String newValue) {
+		//do nothing
+	}
+
+	public void propertyRemoved(String propertyName) {
+		//do nothing
+	}
+
+	/**
+	 * Adds property names key/value pairs, where: 
+	 * 		key = PU property key
+	 * 		value = property id
+	 */
+	@Override
+	protected void addPropertyNames(Map<String, String> propertyNames) {
+		//do nothing
+	}
+
+	// ********** Driver **********
+	public String getDriver() {
+		return null;
+	}
+
+	public void setDriver(String newDriver) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultDriver() {
+		return DEFAULT_JDBC_DRIVER;
+	}
+
+	// ********** URL **********
+	public String getUrl() {
+		return null;
+	}
+
+	public void setUrl(String newUrl) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultUrl() {
+		return DEFAULT_JDBC_URL;
+	}
+
+	// ********** User **********
+	public String getUser() {
+		return null;
+	}
+
+	public void setUser(String newUser) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultUser() {
+		return DEFAULT_JDBC_USER;
+	}
+
+	// ********** Password **********
+	public String getPassword() {
+		return null;
+	}
+
+	public void setPassword(String newPassword) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultPassword() {
+		return DEFAULT_JDBC_PASSWORD;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java
new file mode 100644
index 0000000..d9f7049
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/options/GenericOptions2_0.java
@@ -0,0 +1,239 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.persistence.options;
+
+import java.util.Map;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnitProperties;
+import org.eclipse.jpt.core.jpa2.context.persistence.PersistenceUnit2_0;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.JpaOptions2_0;
+
+/**
+ * JPA 2.0 options
+ */
+public class GenericOptions2_0 extends AbstractPersistenceUnitProperties
+	implements JpaOptions2_0
+{
+	// ********** GenericConnection properties **********
+	private Integer lockTimeout;
+	private Integer queryTimeout;
+	private String validationGroupPrePersist;
+	private String validationGroupPreUpdate;
+	private String validationGroupPreRemove;
+	
+
+	// ********** constructors **********
+	public GenericOptions2_0(PersistenceUnit parent) {
+		super(parent);
+	}
+
+	// ********** initialization **********
+	/**
+	 * Initializes properties with values from the persistence unit.
+	 */
+	@Override
+	protected void initializeProperties() {
+		this.lockTimeout = 
+			this.getIntegerValue(PERSISTENCE_LOCK_TIMEOUT);
+		this.queryTimeout = 
+			this.getIntegerValue(PERSISTENCE_QUERY_TIMEOUT);
+
+		// ValidationMode is initialized with the persistence unit element
+		this.validationGroupPrePersist = 
+			this.getStringValue(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST);
+		this.validationGroupPreUpdate = 
+			this.getStringValue(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE);
+		this.validationGroupPreRemove = 
+			this.getStringValue(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE);
+	}
+
+	// ********** behavior **********
+	
+	public void propertyValueChanged(String propertyName, String newValue) {
+		if (propertyName.equals(PERSISTENCE_LOCK_TIMEOUT)) {
+			this.lockTimeoutChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_QUERY_TIMEOUT)) {
+			this.queryTimeoutChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST)) {
+			this.validationGroupPrePersistChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE)) {
+			this.validationGroupPreUpdateChanged(newValue);
+		}
+		else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE)) {
+			this.validationGroupPreRemoveChanged(newValue);
+		}
+	}
+
+	public void propertyRemoved(String propertyName) {
+		if (propertyName.equals(PERSISTENCE_LOCK_TIMEOUT)) {
+			this.lockTimeoutChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_QUERY_TIMEOUT)) {
+			this.queryTimeoutChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST)) {
+			this.validationGroupPrePersistChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE)) {
+			this.validationGroupPreUpdateChanged(null);
+		}
+		else if (propertyName.equals(PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE)) {
+			this.validationGroupPreRemoveChanged(null);
+		}
+	}
+
+	/**
+	 * Adds property names key/value pairs, where: 
+	 * 		key = PU property key
+	 * 		value = property id
+	 */
+	@Override
+	protected void addPropertyNames(Map<String, String> propertyNames) {
+		propertyNames.put(
+			PERSISTENCE_LOCK_TIMEOUT,
+			LOCK_TIMEOUT_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_QUERY_TIMEOUT,
+			QUERY_TIMEOUT_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST,
+			VALIDATION_GROUP_PRE_PERSIST_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE,
+			VALIDATION_GROUP_PRE_UPDATE_PROPERTY);
+		propertyNames.put(
+			PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE,
+			VALIDATION_GROUP_PRE_REMOVE_PROPERTY);
+	}
+
+	@Override
+	public PersistenceUnit2_0 getPersistenceUnit() {
+		return (PersistenceUnit2_0) super.getPersistenceUnit();
+	}
+
+	// ********** LockTimeout **********
+	public Integer getLockTimeout() {
+		return this.lockTimeout;
+	}
+
+	public void setLockTimeout(Integer newLockTimeout) {
+		Integer old = this.lockTimeout;
+		this.lockTimeout = newLockTimeout;
+		this.putProperty(LOCK_TIMEOUT_PROPERTY, newLockTimeout);
+		this.firePropertyChanged(LOCK_TIMEOUT_PROPERTY, old, newLockTimeout);
+	}
+
+	private void lockTimeoutChanged(String stringValue) {
+		Integer newValue = getIntegerValueOf(stringValue);
+		
+		Integer old = this.lockTimeout;
+		this.lockTimeout = newValue;
+		this.firePropertyChanged(LOCK_TIMEOUT_PROPERTY, old, newValue);
+	}
+
+	public Integer getDefaultLockTimeout() {
+		return DEFAULT_LOCK_TIMEOUT;
+	}
+
+	// ********** QueryTimeout **********
+	public Integer getQueryTimeout() {
+		return this.queryTimeout;
+	}
+
+	public void setQueryTimeout(Integer newQueryTimeout) {
+		Integer old = this.queryTimeout;
+		this.queryTimeout = newQueryTimeout;
+		this.putProperty(QUERY_TIMEOUT_PROPERTY, newQueryTimeout);
+		this.firePropertyChanged(QUERY_TIMEOUT_PROPERTY, old, newQueryTimeout);
+	}
+
+	private void queryTimeoutChanged(String stringValue) {
+		Integer newValue = getIntegerValueOf(stringValue);
+		
+		Integer old = this.queryTimeout;
+		this.queryTimeout = newValue;
+		this.firePropertyChanged(QUERY_TIMEOUT_PROPERTY, old, newValue);
+	}
+
+	public Integer getDefaultQueryTimeout() {
+		return DEFAULT_QUERY_TIMEOUT;
+	}
+
+
+	// ********** ValidationGroupPrePersist **********
+	public String getValidationGroupPrePersist() {
+		return this.validationGroupPrePersist;
+	}
+
+	public void setValidationGroupPrePersist(String newValidationGroupPrePersist) {
+		String old = this.validationGroupPrePersist;
+		this.validationGroupPrePersist = newValidationGroupPrePersist;
+		this.putProperty(VALIDATION_GROUP_PRE_PERSIST_PROPERTY, newValidationGroupPrePersist);
+		this.firePropertyChanged(VALIDATION_GROUP_PRE_PERSIST_PROPERTY, old, newValidationGroupPrePersist);
+	}
+
+	private void validationGroupPrePersistChanged(String newValue) {
+		String old = this.validationGroupPrePersist;
+		this.validationGroupPrePersist = newValue;
+		this.firePropertyChanged(VALIDATION_GROUP_PRE_PERSIST_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultValidationGroupPrePersist() {
+		return DEFAULT_VALIDATION_GROUP_PRE_PERSIST;
+	}
+
+	// ********** ValidationGroupPreUpdate **********
+	public String getValidationGroupPreUpdate() {
+		return this.validationGroupPreUpdate;
+	}
+
+	public void setValidationGroupPreUpdate(String newValidationGroupPreUpdate) {
+		String old = this.validationGroupPreUpdate;
+		this.validationGroupPreUpdate = newValidationGroupPreUpdate;
+		this.putProperty(VALIDATION_GROUP_PRE_UPDATE_PROPERTY, newValidationGroupPreUpdate);
+		this.firePropertyChanged(VALIDATION_GROUP_PRE_UPDATE_PROPERTY, old, newValidationGroupPreUpdate);
+	}
+
+	private void validationGroupPreUpdateChanged(String newValue) {
+		String old = this.validationGroupPreUpdate;
+		this.validationGroupPreUpdate = newValue;
+		this.firePropertyChanged(VALIDATION_GROUP_PRE_UPDATE_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultValidationGroupPreUpdate() {
+		return DEFAULT_VALIDATION_GROUP_PRE_UPDATE;
+	}
+
+	// ********** ValidationGroupPreRemove **********
+	public String getValidationGroupPreRemove() {
+		return this.validationGroupPreRemove;
+	}
+
+	public void setValidationGroupPreRemove(String newValidationGroupPreRemove) {
+		String old = this.validationGroupPreRemove;
+		this.validationGroupPreRemove = newValidationGroupPreRemove;
+		this.putProperty(VALIDATION_GROUP_PRE_REMOVE_PROPERTY, newValidationGroupPreRemove);
+		this.firePropertyChanged(VALIDATION_GROUP_PRE_REMOVE_PROPERTY, old, newValidationGroupPreRemove);
+	}
+
+	private void validationGroupPreRemoveChanged(String newValue) {
+		String old = this.validationGroupPreRemove;
+		this.validationGroupPreRemove = newValue;
+		this.firePropertyChanged(VALIDATION_GROUP_PRE_REMOVE_PROPERTY, old, newValue);
+	}
+
+	public String getDefaultValidationGroupPreRemove() {
+		return DEFAULT_VALIDATION_GROUP_PRE_REMOVE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/options/NullOptions2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/options/NullOptions2_0.java
new file mode 100644
index 0000000..a097683
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/persistence/options/NullOptions2_0.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.context.persistence.options;
+
+import java.util.Map;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.context.persistence.AbstractPersistenceUnitProperties;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.JpaOptions2_0;
+
+/**
+ * JPA 2.0 options
+ */
+public class NullOptions2_0 extends AbstractPersistenceUnitProperties
+	implements JpaOptions2_0
+{
+	
+
+	// ********** constructors **********
+	public NullOptions2_0(PersistenceUnit parent) {
+		super(parent);
+	}
+
+	// ********** initialization **********
+	/**
+	 * Initializes properties with values from the persistence unit.
+	 */
+	@Override
+	protected void initializeProperties() {
+		//do nothing
+	}
+
+	// ********** behavior **********
+	
+	public void propertyValueChanged(String propertyName, String newValue) {
+		//do nothing
+	}
+
+	public void propertyRemoved(String propertyName) {
+		//do nothing
+	}
+
+	/**
+	 * Adds property names key/value pairs, where: 
+	 * 		key = PU property key
+	 * 		value = property id
+	 */
+	@Override
+	protected void addPropertyNames(Map<String, String> propertyNames) {
+		//do nothing
+	}
+
+	// ********** LockTimeout **********
+	public Integer getLockTimeout() {
+		return null;
+	}
+
+	public void setLockTimeout(Integer newLockTimeout) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Integer getDefaultLockTimeout() {
+		return DEFAULT_LOCK_TIMEOUT;
+	}
+
+	// ********** QueryTimeout **********
+	public Integer getQueryTimeout() {
+		return null;
+	}
+
+	public void setQueryTimeout(Integer newQueryTimeout) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Integer getDefaultQueryTimeout() {
+		return DEFAULT_QUERY_TIMEOUT;
+	}
+
+
+	// ********** ValidationGroupPrePersist **********
+	public String getValidationGroupPrePersist() {
+		return null;
+	}
+
+	public void setValidationGroupPrePersist(String newValidationGroupPrePersist) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultValidationGroupPrePersist() {
+		return DEFAULT_VALIDATION_GROUP_PRE_PERSIST;
+	}
+
+	// ********** ValidationGroupPreUpdate **********
+	public String getValidationGroupPreUpdate() {
+		return null;
+	}
+
+	public void setValidationGroupPreUpdate(String newValidationGroupPreUpdate) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultValidationGroupPreUpdate() {
+		return DEFAULT_VALIDATION_GROUP_PRE_UPDATE;
+	}
+
+	// ********** ValidationGroupPreRemove **********
+	public String getValidationGroupPreRemove() {
+		return null;
+	}
+
+	public void setValidationGroupPreRemove(String newValidationGroupPreRemove) {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDefaultValidationGroupPreRemove() {
+		return DEFAULT_VALIDATION_GROUP_PRE_REMOVE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
new file mode 100644
index 0000000..ec2cd71
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryAccess2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceAccess2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Access
+ */
+public final class Access2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new Access2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private Access2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceAccess2_0Annotation(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullAccess2_0Annotation(parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAccess2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return Access2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
new file mode 100644
index 0000000..d885db7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryAssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceAssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public final class AssociationOverride2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new AssociationOverride2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private AssociationOverride2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceAssociationOverride2_0Annotation.buildAssociationOverride(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAssociationOverride2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return AssociationOverrideAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java
new file mode 100644
index 0000000..3d9b623
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryAssociationOverrides2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceAssociationOverrides2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public final class AssociationOverrides2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new AssociationOverrides2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private AssociationOverrides2_0AnnotationDefinition() {
+		super();
+	}
+
+	public AssociationOverridesAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceAssociationOverrides2_0Annotation(parent, member);
+	}
+
+	public AssociationOverridesAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAssociationOverrides2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return AssociationOverridesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
new file mode 100644
index 0000000..e5911e1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryCacheable2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceCacheable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.Cacheable2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Cacheable
+ */
+public final class Cacheable2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new Cacheable2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private Cacheable2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceCacheable2_0Annotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryCacheable2_0Annotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return Cacheable2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
new file mode 100644
index 0000000..83740db
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryCollectionTable2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceCollectionTable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.CollectionTable
+ */
+public final class CollectionTable2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new CollectionTable2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private CollectionTable2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceCollectionTable2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullCollectionTable2_0Annotation(parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryCollectionTable2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return CollectionTable2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
new file mode 100644
index 0000000..867ffbf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryElementCollection2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceElementCollection2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.ElementCollection
+ */
+public final class ElementCollection2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new ElementCollection2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private ElementCollection2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceElementCollection2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryElementCollection2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ElementCollection2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
new file mode 100644
index 0000000..42a60a1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryGeneratedAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceGeneratedAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.annotation.Generated
+ * <p>
+ * This annotation definition is not really required; it's just here for a bit
+ * of consistency....
+ */
+public final class GeneratedAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final GeneratedAnnotationDefinition INSTANCE = new GeneratedAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static GeneratedAnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private GeneratedAnnotationDefinition() {
+		super();
+	}
+
+	public GeneratedAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceGeneratedAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public GeneratedAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return null;
+	}
+
+	public GeneratedAnnotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryGeneratedAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return GeneratedAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
new file mode 100644
index 0000000..0d2aa5b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyClass
+ */
+public final class MapKeyClass2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyClass2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyClass2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapKeyClass2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyClass2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyClass2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
new file mode 100644
index 0000000..92e276e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyColumn
+ */
+public final class MapKeyColumn2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyColumn2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyColumn2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapKeyColumn2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullMapKeyColumnAnnotation(parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyColumn2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyColumn2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
new file mode 100644
index 0000000..db6c09c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyEnumerated2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyEnumerated2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyTemporal
+ */
+public final class MapKeyEnumerated2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyEnumerated2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyEnumerated2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
new file mode 100644
index 0000000..f4e77d2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyJoinColumn2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyJoinColumn
+ */
+public final class MapKeyJoinColumn2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyJoinColumn2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyJoinColumn2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceMapKeyJoinColumn2_0Annotation.createMapKeyJoinColumn(parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyJoinColumn2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
new file mode 100644
index 0000000..5054f23
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyJoinColumns2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumns2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyJoinColumns
+ */
+public final class MapKeyJoinColumns2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyJoinColumns2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyJoinColumns2_0AnnotationDefinition() {
+		super();
+	}
+
+	public MapKeyJoinColumns2_0Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapKeyJoinColumns2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public MapKeyJoinColumns2_0Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyJoinColumns2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyJoinColumns2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
new file mode 100644
index 0000000..86ada7c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyTemporal2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyTemporal2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyTemporal
+ */
+public final class MapKeyTemporal2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyTemporal2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyTemporal2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
new file mode 100644
index 0000000..b8fb43c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapsId2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapsId2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapsId
+ */
+public class MapsId2_0AnnotationDefinition implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapsId2_0AnnotationDefinition();
+	
+	
+	/**
+	 * Return the singleton
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+	
+	
+	/**
+	 * Enforce singleton usage
+	 */
+	private MapsId2_0AnnotationDefinition() {
+		super();
+	}
+	
+	
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapsId2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+	
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullMapsId2_0Annotation(parent);
+	}
+	
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapsId2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+	
+	public String getAnnotationName() {
+		return MapsId2_0Annotation.ANNOTATION_NAME;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java
new file mode 100644
index 0000000..2c17acc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryNamedQueries2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceNamedQueries2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ *  javax.persistence.NamedQueries
+ */
+public class NamedQueries2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new NamedQueries2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NamedQueries2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceNamedQueries2_0Annotation(parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryNamedQueries2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return NamedQueriesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
new file mode 100644
index 0000000..5c09d18
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryNamedQuery2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceNamedQuery2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public class NamedQuery2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new NamedQuery2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NamedQuery2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceNamedQuery2_0Annotation(parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryNamedQuery2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return NamedQueryAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java
new file mode 100644
index 0000000..d3990a5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullAccess2_0Annotation.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Access
+ */
+public class NullAccess2_0Annotation
+	extends NullAnnotation
+	implements Access2_0Annotation
+{
+
+	protected NullAccess2_0Annotation(JavaResourcePersistentMember parent) {
+		super(parent);
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected Access2_0Annotation addAnnotation() {
+		return (Access2_0Annotation) super.addAnnotation();
+	}
+	
+	// ***** value
+	public AccessType getValue() {
+		return null;
+	}
+	
+	public void setValue(AccessType value) {
+		if (value != null) {
+			this.addAnnotation().setValue(value);
+		}
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java
new file mode 100644
index 0000000..142f918
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullAssociationOverrideJoinTableAnnotation.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jpt.core.internal.resource.java.NullJoinTableAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+
+/**
+ * javax.persistence.JoinTable found in a javax.persistence.AssociationOverride annotation
+ */
+public class NullAssociationOverrideJoinTableAnnotation
+	extends NullJoinTableAnnotation
+{
+	public NullAssociationOverrideJoinTableAnnotation(AssociationOverride2_0Annotation parent) {
+		super(parent);
+	}
+
+	private AssociationOverride2_0Annotation getAssociationOverride2_0Annotation() {
+		return (AssociationOverride2_0Annotation) this.parent;
+	}
+
+	@Override
+	protected JoinTableAnnotation addAnnotation() {
+		return this.getAssociationOverride2_0Annotation().addJoinTable();
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java
new file mode 100644
index 0000000..6574d3f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullCollectionTable2_0Annotation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.internal.resource.java.NullBaseTableAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+
+/**
+ * javax.persistence.CollectionTable
+ */
+public class NullCollectionTable2_0Annotation
+	extends NullBaseTableAnnotation
+	implements CollectionTable2_0Annotation
+{
+	public NullCollectionTable2_0Annotation(JavaResourceNode parent) {
+		super(parent);
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected CollectionTable2_0Annotation addAnnotation() {
+		return (CollectionTable2_0Annotation) super.addAnnotation();
+	}
+	
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return EmptyListIterator.instance();
+	}
+	
+	public int joinColumnsSize() {
+		return 0;
+	}
+	
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return null;
+	}
+	
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public JoinColumnAnnotation addJoinColumn(int index) {
+		// the CollectionTable annotation is missing, add both it and a join column at the same time
+		return this.addAnnotation().addJoinColumn(index);
+	}
+	
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+	
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java
new file mode 100644
index 0000000..cae6ddb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyColumnAnnotation.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullBaseColumnAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapKeyColumn
+ */
+public class NullMapKeyColumnAnnotation
+	extends NullBaseColumnAnnotation
+	implements MapKeyColumn2_0Annotation
+{
+	public NullMapKeyColumnAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected MapKeyColumn2_0Annotation addAnnotation() {
+		return (MapKeyColumn2_0Annotation) super.addAnnotation();
+	}
+
+	// ***** length
+	public Integer getLength() {
+		return null;
+	}
+
+	public void setLength(Integer length) {
+		if (length != null) {
+			this.addAnnotation().setLength(length);
+		}
+	}
+
+	public TextRange getLengthTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** scale
+	public Integer getScale() {
+		return null;
+	}
+
+	public void setScale(Integer scale) {
+		if (scale != null) {
+			this.addAnnotation().setScale(scale);
+		}
+	}
+
+	public TextRange getScaleTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** precision
+	public Integer getPrecision() {
+		return null;
+	}
+
+	public void setPrecision(Integer precision) {
+		if (precision != null) {
+			this.addAnnotation().setPrecision(precision);
+		}
+	}
+
+	public TextRange getPrecisionTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java
new file mode 100644
index 0000000..922c7c9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyEnumerated2_0Annotation.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
+import org.eclipse.jpt.core.resource.java.EnumType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapKeyEnumerated
+ */
+public final class NullMapKeyEnumerated2_0Annotation
+	extends NullAnnotation
+	implements MapKeyEnumerated2_0Annotation
+{
+	protected NullMapKeyEnumerated2_0Annotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected MapKeyEnumerated2_0Annotation addAnnotation() {
+		return (MapKeyEnumerated2_0Annotation) super.addAnnotation();
+	}
+
+
+	// ********** MapKeyEnumerated2_0Annotation implementation **********
+
+	// ***** value
+	public EnumType getValue() {
+		return null;
+	}
+
+	public void setValue(EnumType value) {
+		if (value != null) {
+			this.addAnnotation().setValue(value);
+		}
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java
new file mode 100644
index 0000000..0d9142f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapKeyTemporal2_0Annotation.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TemporalType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapKeyTemporal
+ */
+public final class NullMapKeyTemporal2_0Annotation
+	extends NullAnnotation
+	implements MapKeyTemporal2_0Annotation
+{
+	protected NullMapKeyTemporal2_0Annotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected MapKeyTemporal2_0Annotation addAnnotation() {
+		return (MapKeyTemporal2_0Annotation) super.addAnnotation();
+	}
+
+
+	// ********** MapKeyTemporal2_0Annotation implementation **********
+
+	// ***** value
+	public TemporalType getValue() {
+		return null;
+	}
+
+	public void setValue(TemporalType value) {
+		if (value != null) {
+			this.addAnnotation().setValue(value);
+		}
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java
new file mode 100644
index 0000000..823e0a4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullMapsId2_0Annotation.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapsId
+ */
+public class NullMapsId2_0Annotation
+	extends NullAnnotation
+	implements MapsId2_0Annotation
+{
+	protected NullMapsId2_0Annotation(JavaResourcePersistentMember parent) {
+		super(parent);
+	}
+	
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected MapsId2_0Annotation addAnnotation() {
+		return (MapsId2_0Annotation) super.addAnnotation();
+	}
+	
+	public String getValue() {
+		return null;
+	}
+	
+	public void setValue(String newValue) {
+		if (newValue != null) {
+			this.addAnnotation().setValue(newValue);
+		}
+	}
+	
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	public boolean valueTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java
new file mode 100644
index 0000000..c97eaba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NullOrderColumn2_0Annotation.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullNamedColumnAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OrderColumn
+ */
+public final class NullOrderColumn2_0Annotation
+	extends NullNamedColumnAnnotation
+	implements OrderColumn2_0Annotation
+{	
+	public NullOrderColumn2_0Annotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected OrderColumn2_0Annotation addAnnotation() {
+		return (OrderColumn2_0Annotation) super.addAnnotation();
+	}
+
+	// ***** updatable
+	public Boolean getUpdatable() {
+		return null;
+	}
+
+	public void setUpdatable(Boolean updatable) {
+		if (updatable != null) {
+			this.addAnnotation().setUpdatable(updatable);
+		}
+	}
+
+	public TextRange getUpdatableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** insertable
+	public Boolean getInsertable() {
+		return null;
+	}
+
+	public void setInsertable(Boolean insertable) {
+		if (insertable != null) {
+			this.addAnnotation().setInsertable(insertable);
+		}
+	}
+
+	public TextRange getInsertableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** nullable
+	public Boolean getNullable() {
+		return null;
+	}
+
+	public void setNullable(Boolean nullable) {
+		if (nullable != null) {
+			this.addAnnotation().setNullable(nullable);
+		}
+	}
+
+	public TextRange getNullableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
new file mode 100644
index 0000000..114a3a7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryOrderColumn2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceOrderColumn2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.OrderColumn
+ */
+public final class OrderColumn2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new OrderColumn2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private OrderColumn2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return OrderColumn2_0Annotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
new file mode 100644
index 0000000..f3d9aed
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinarySequenceGenerator2_0Annotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceSequenceGenerator2_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SequenceGenerator
+ */
+public final class SequenceGenerator2_0AnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new SequenceGenerator2_0AnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private SequenceGenerator2_0AnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceSequenceGenerator2_0Annotation(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinarySequenceGenerator2_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return SequenceGeneratorAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java
new file mode 100644
index 0000000..7d5aa06
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceBaseJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.NestableMapKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.MapKeyJoinColumn
+ */
+public final class SourceMapKeyJoinColumn2_0Annotation
+	extends SourceBaseJoinColumnAnnotation
+	implements NestableMapKeyJoinColumnAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, attribute, daa, annotationAdapter);
+	}
+
+	public SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
+		this(parent, attribute, daa, new MemberAnnotationAdapter(attribute, daa));
+	}
+
+	public SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, Attribute attribute, IndexedDeclarationAnnotationAdapter idaa) {
+		this(parent, attribute, idaa, new MemberIndexedAnnotationAdapter(attribute, idaa));
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	// ********** SourceNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** SourceBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__UPDATABLE;
+	}
+
+
+	// ********** SourceBaseJoinColumnAnnotation implementation **********
+
+	@Override
+	protected String getReferencedColumnNameElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
+	}
+
+
+	// ********** static methods **********
+
+	public static SourceMapKeyJoinColumn2_0Annotation createMapKeyJoinColumn(JavaResourceNode parent, Attribute attribute) {
+		return new SourceMapKeyJoinColumn2_0Annotation(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	static SourceMapKeyJoinColumn2_0Annotation createNestedMapKeyJoinColumn(JavaResourceNode parent, Attribute attribute, int index, DeclarationAnnotationAdapter joinColumnsAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, joinColumnsAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(attribute, idaa);
+		return new SourceMapKeyJoinColumn2_0Annotation(parent, attribute, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter joinColumnsAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(joinColumnsAdapter, index, JPA2_0.MAP_KEY_JOIN_COLUMN);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java
new file mode 100644
index 0000000..68ca7da
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumns2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.NestableMapKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.MapKeyJoinColumns
+ */
+public final class SourceMapKeyJoinColumns2_0Annotation
+	extends SourceAnnotation<Attribute>
+	implements MapKeyJoinColumns2_0Annotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableMapKeyJoinColumnAnnotation> mapKeyJoinColumns = new Vector<NestableMapKeyJoinColumnAnnotation>();
+
+
+	public SourceMapKeyJoinColumns2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.mapKeyJoinColumns);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMNS__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return MapKeyJoinColumn2_0Annotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableMapKeyJoinColumnAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableMapKeyJoinColumnAnnotation>(this.mapKeyJoinColumns);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.mapKeyJoinColumns.size();
+	}
+
+	public NestableMapKeyJoinColumnAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.mapKeyJoinColumns.size());
+	}
+
+	private NestableMapKeyJoinColumnAnnotation addNestedAnnotation(int index) {
+		NestableMapKeyJoinColumnAnnotation joinColumn = this.buildMapKeyJoinColumn(index);
+		this.mapKeyJoinColumns.add(joinColumn);
+		return joinColumn;
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.mapKeyJoinColumns.size();
+		NestableMapKeyJoinColumnAnnotation joinColumn = this.addNestedAnnotation(index);
+		joinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(MAP_KEY_JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	private NestableMapKeyJoinColumnAnnotation buildMapKeyJoinColumn(int index) {
+		return SourceMapKeyJoinColumn2_0Annotation.createNestedMapKeyJoinColumn(this, this.member, index, this.daa);
+	}
+
+	public NestableMapKeyJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.mapKeyJoinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableMapKeyJoinColumnAnnotation removeNestedAnnotation(int index) {
+		return this.mapKeyJoinColumns.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.mapKeyJoinColumns, MAP_KEY_JOIN_COLUMNS_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
new file mode 100644
index 0000000..76686e5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryStaticMetamodelAnnotation;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceStaticMetamodelAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.StaticMetamodelAnnotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.metamodel.StaticMetamodel
+ * <p>
+ * This annotation definition is not really required; it's just here for a bit
+ * of consistency....
+ */
+public final class StaticMetamodelAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final StaticMetamodelAnnotationDefinition INSTANCE = new StaticMetamodelAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static StaticMetamodelAnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private StaticMetamodelAnnotationDefinition() {
+		super();
+	}
+
+	public StaticMetamodelAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceStaticMetamodelAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public StaticMetamodelAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return null;
+	}
+
+	public StaticMetamodelAnnotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryStaticMetamodelAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return StaticMetamodelAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java
new file mode 100644
index 0000000..c4fc19b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAccess2_0Annotation.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Access
+ */
+public final class BinaryAccess2_0Annotation
+	extends BinaryAnnotation
+	implements Access2_0Annotation
+{
+	private AccessType value;
+
+
+	public BinaryAccess2_0Annotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** AccessAnnotation implementation **********
+
+	// ***** value
+	public AccessType getValue() {
+		return this.value;
+	}
+
+	public void setValue(AccessType value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(AccessType value) {
+		AccessType old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+
+	private AccessType buildValue() {
+		return AccessType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA2_0.ACCESS));
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java
new file mode 100644
index 0000000..27c9fba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAssociationOverride2_0Annotation.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.NullJoinTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinTableAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+
+/**
+ *  BinarySequenceGenerator2_0Annotation
+ */
+public final class BinaryAssociationOverride2_0Annotation
+	extends BinaryAssociationOverrideAnnotation
+	implements AssociationOverride2_0Annotation
+{
+	private JoinTableAnnotation joinTable;
+
+	public BinaryAssociationOverride2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.joinTable = this.buildJoinTable();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateJoinTable();
+	}
+
+
+	// ********** AssociationOverride2_0Annotation implementation **********
+
+	// ***** joinTable
+	public JoinTableAnnotation getJoinTable() {
+		return this.joinTable;
+	}
+
+	public JoinTableAnnotation getNonNullJoinTable() {
+		return (this.joinTable != null) ? this.joinTable : new NullJoinTableAnnotation(this);
+	}
+
+	public JoinTableAnnotation addJoinTable() {
+		throw new UnsupportedOperationException();
+	}
+	
+	public void removeJoinTable() {
+		throw new UnsupportedOperationException();
+	}
+
+	private JoinTableAnnotation buildJoinTable() {
+		IAnnotation jdtJoinTable = this.getJdtJoinTable();
+		return (jdtJoinTable == null) ? null : this.buildJoinTable(jdtJoinTable);
+	}
+
+	private JoinTableAnnotation buildJoinTable(IAnnotation jdtJoinTable) {
+		return new BinaryJoinTableAnnotation(this, jdtJoinTable);
+	}
+
+	private IAnnotation getJdtJoinTable() {
+		return (IAnnotation) this.getJdtMemberValue(JPA2_0.ASSOCIATION_OVERRIDE__JOIN_TABLE);
+	}
+
+	// TODO
+	private void updateJoinTable() {
+		throw new UnsupportedOperationException();
+//		IAnnotation jdtJoinTable = this.getJdtJoinTable();
+//		if (jdtJoinTable == null) {
+//			this.setJoinTable(null);
+//		} else {
+//			if (this.column == null) {
+//				this.setJoinTable(this.buildJoinTable(jdtJoinTable));
+//			} else {
+//				this.column.update(jdtJoinTable);
+//			}
+//		}
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAssociationOverrides2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAssociationOverrides2_0Annotation.java
new file mode 100644
index 0000000..d47f13b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryAssociationOverrides2_0Annotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public class BinaryAssociationOverrides2_0Annotation
+	extends BinaryAssociationOverridesAnnotation
+{
+
+	public BinaryAssociationOverrides2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	@Override
+	protected NestableAssociationOverrideAnnotation buildAssociationOverride(Object jdtAssociationOverride) {
+		return new BinaryAssociationOverride2_0Annotation(this, (IAnnotation) jdtAssociationOverride);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java
new file mode 100644
index 0000000..1a73731
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryCacheable2_0Annotation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.Cacheable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Cacheable
+ */
+public final class BinaryCacheable2_0Annotation
+	extends BinaryAnnotation
+	implements Cacheable2_0Annotation
+{
+	private Boolean value;
+
+
+	public BinaryCacheable2_0Annotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** Cacheable2_0Annotation implementation **********
+
+	// ***** value
+	public Boolean getValue() {
+		return this.value;
+	}
+
+	public void setValue(Boolean value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(Boolean value) {
+		Boolean old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+
+	private Boolean buildValue() {
+		return (Boolean) this.getJdtMemberValue(JPA2_0.CACHEABLE__VALUE);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java
new file mode 100644
index 0000000..1465dec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryCollectionTable2_0Annotation.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryBaseTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinColumnAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.CollectionTable
+ */
+public final class BinaryCollectionTable2_0Annotation
+	extends BinaryBaseTableAnnotation
+	implements CollectionTable2_0Annotation
+{
+	private final Vector<JoinColumnAnnotation> joinColumns;
+
+
+	public BinaryCollectionTable2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.joinColumns = this.buildJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateJoinColumns();
+	}
+
+
+	// ********** BinaryBaseTableAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA2_0.COLLECTION_TABLE__NAME;
+	}
+
+	@Override
+	protected String getSchemaElementName() {
+		return JPA2_0.COLLECTION_TABLE__SCHEMA;
+	}
+
+	@Override
+	protected String getCatalogElementName() {
+		return JPA2_0.COLLECTION_TABLE__CATALOG;
+	}
+
+	@Override
+	protected String getUniqueConstraintElementName() {
+		return JPA2_0.COLLECTION_TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+
+	// ********** CollectionTable2_0Annotation implementation **********
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.get(index);
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+
+	public JoinColumnAnnotation addJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<JoinColumnAnnotation> buildJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA2_0.COLLECTION_TABLE__JOIN_COLUMNS);
+		Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	// TODO
+	private void updateJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java
new file mode 100644
index 0000000..12d2654
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryElementCollection2_0Annotation.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * org.eclipse.persistence.annotations.Transformation
+ */
+public class BinaryElementCollection2_0Annotation
+	extends BinaryAnnotation
+	implements ElementCollection2_0Annotation
+{
+	private String targetClass;
+	private FetchType fetch;
+
+
+	public BinaryElementCollection2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.targetClass = this.buildTargetClass();
+		this.fetch = this.buildFetch();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setTargetClass_(this.buildTargetClass());
+		this.setFetch_(this.buildFetch());
+	}
+
+
+	// ********** ElementCollection2_0Annotation implementation **********
+
+	// ***** target entity
+	public String getTargetClass() {
+		return this.targetClass;
+	}
+
+	public void setTargetClass(String targetClass) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setTargetClass_(String targetClass) {
+		String old = this.targetClass;
+		this.targetClass = targetClass;
+		this.firePropertyChanged(TARGET_CLASS_PROPERTY, old, targetClass);
+		this.firePropertyChanged(FULLY_QUALIFIED_TARGET_CLASS_NAME_PROPERTY, old, targetClass);
+	}
+
+	private String buildTargetClass() {
+		return (String) this.getJdtMemberValue(JPA2_0.ELEMENT_COLLECTION__TARGET_CLASS);
+	}
+
+	public TextRange getTargetClassTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** fully-qualified target entity class name
+	public String getFullyQualifiedTargetClassName() {
+		return this.targetClass;
+	}
+
+	// ***** fetch
+	public FetchType getFetch() {
+		return this.fetch;
+	}
+
+	public void setFetch(FetchType fetch) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setFetch_(FetchType fetch) {
+		FetchType old = this.fetch;
+		this.fetch = fetch;
+		this.firePropertyChanged(FETCH_PROPERTY, old, fetch);
+	}
+
+	private FetchType buildFetch() {
+		return FetchType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA2_0.ELEMENT_COLLECTION__FETCH));
+	}
+
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java
new file mode 100644
index 0000000..e9f51b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryGeneratedAnnotation.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.annotation.Generated
+ */
+public final class BinaryGeneratedAnnotation
+	extends BinaryAnnotation
+	implements GeneratedAnnotation
+{
+	private final Vector<String> values;
+	private String date;
+	private String comments;
+
+
+	public BinaryGeneratedAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.values = this.buildValues();
+		this.date = this.buildDate();
+		this.comments = this.buildComments();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateValues();
+		this.setDate_(this.buildDate());
+		this.setComments_(this.buildComments());
+	}
+
+	// TODO
+	private void updateValues() {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** GeneratedAnnotation implementation **********
+
+	// ***** values
+	public ListIterator<String> values() {
+		return new CloneListIterator<String>(this.values);
+	}
+
+	public int valuesSize() {
+		return this.values.size();
+	}
+
+	public String getValue(int index) {
+		return this.values.get(index);
+	}
+
+	private Vector<String> buildValues() {
+		Object[] jdtValues = this.getJdtMemberValues(VALUE_ELEMENT_NAME);
+		Vector<String> result = new Vector<String>(jdtValues.length);
+		for (Object value : jdtValues) {
+			result.add((String) value);
+		}
+		return result;
+	}
+
+	public void addValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void addValue(int index, String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveValue(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeValue(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** date
+	public String getDate() {
+		return this.date;
+	}
+
+	public void setDate(String date) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setDate_(String date) {
+		String old = this.date;
+		this.date = date;
+		this.firePropertyChanged(DATE_PROPERTY, old, date);
+	}
+
+	private String buildDate() {
+		return (String) this.getJdtMemberValue(DATE_ELEMENT_NAME);
+	}
+
+	// ***** comments
+	public String getComments() {
+		return this.comments;
+	}
+
+	public void setComments(String comments) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setComments_(String comments) {
+		String old = this.comments;
+		this.comments = comments;
+		this.firePropertyChanged(COMMENTS_PROPERTY, old, comments);
+	}
+
+	private String buildComments() {
+		return (String) this.getJdtMemberValue(COMMENTS_ELEMENT_NAME);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java
new file mode 100644
index 0000000..b1072c0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyClass2_0Annotation.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapKeyClass
+ */
+public final class BinaryMapKeyClass2_0Annotation
+	extends BinaryAnnotation
+	implements MapKeyClass2_0Annotation 
+{
+	private String value;
+
+
+	public BinaryMapKeyClass2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** MapKeyClass2_0Annotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(String value) {
+		String old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+		this.firePropertyChanged(FULLY_QUALIFIED_CLASS_NAME_PROPERTY, old, value);
+	}
+
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA2_0.MAP_KEY_CLASS__VALUE);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** fully-qualified class name
+	/**
+	 * binary is already fully-qualified
+	 */
+	public String getFullyQualifiedClassName() {
+		return this.value;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java
new file mode 100644
index 0000000..37f9db5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyColumn2_0Annotation.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryCompleteColumnAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.MapKeyColumn
+ */
+public final class BinaryMapKeyColumn2_0Annotation
+	extends BinaryCompleteColumnAnnotation
+	implements MapKeyColumn2_0Annotation
+{
+
+	public BinaryMapKeyColumn2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	@Override
+	public String getAnnotationName() {
+		return MapKeyColumn2_0Annotation.ANNOTATION_NAME;
+	}
+
+
+	// ********** BinaryNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** BinaryBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__UPDATABLE;
+	}
+
+	
+	// ********** BinaryCompleteColumnAnnotation implementation **********
+
+	@Override
+	protected String getLengthElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__LENGTH;
+	}
+	
+	@Override
+	protected String getPrecisionElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__PRECISION;
+	}
+	
+	@Override
+	protected String getScaleElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__SCALE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java
new file mode 100644
index 0000000..34b8d1d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyEnumerated2_0Annotation.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryBaseEnumeratedAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.MapKeyEnumerated
+ */
+public final class BinaryMapKeyEnumerated2_0Annotation
+	extends BinaryBaseEnumeratedAnnotation
+	implements MapKeyEnumerated2_0Annotation
+{
+
+	public BinaryMapKeyEnumerated2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected String getValueElementName() {
+		return JPA2_0.MAP_KEY_ENUMERATED__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java
new file mode 100644
index 0000000..a08c62a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumn2_0Annotation.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryBaseJoinColumnAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.NestableMapKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+
+/**
+ * javax.persistence.MapKeyJoinColumn
+ */
+public final class BinaryMapKeyJoinColumn2_0Annotation
+	extends BinaryBaseJoinColumnAnnotation
+	implements NestableMapKeyJoinColumnAnnotation
+{
+
+	public BinaryMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** BinaryNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** BinaryBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__UPDATABLE;
+	}
+	
+	
+	// ********** BinaryBaseJoinColumnAnnotation implementation **********
+
+	@Override
+	protected String getReferencedColumnNameElementName() {
+		return JPA2_0.MAP_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumns2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumns2_0Annotation.java
new file mode 100644
index 0000000..0f9bf96
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyJoinColumns2_0Annotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryContainerAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumns2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.NestableMapKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.MapKeyJoinColumns
+ */
+public final class BinaryMapKeyJoinColumns2_0Annotation
+	extends BinaryContainerAnnotation<NestableMapKeyJoinColumnAnnotation>
+	implements MapKeyJoinColumns2_0Annotation
+{
+	private final Vector<NestableMapKeyJoinColumnAnnotation> mapKeyJoinColumns;
+
+
+	public BinaryMapKeyJoinColumns2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.mapKeyJoinColumns = this.buildMapKeyJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableMapKeyJoinColumnAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableMapKeyJoinColumnAnnotation>(this.mapKeyJoinColumns);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.mapKeyJoinColumns.size();
+	}
+
+	private Vector<NestableMapKeyJoinColumnAnnotation> buildMapKeyJoinColumns() {
+		Object[] jdtMapKeyJoinColumns = this.getJdtMemberValues(JPA2_0.MAP_KEY_JOIN_COLUMNS__VALUE);
+		Vector<NestableMapKeyJoinColumnAnnotation> result = new Vector<NestableMapKeyJoinColumnAnnotation>(jdtMapKeyJoinColumns.length);
+		for (Object jdtMapKeyJoinColumn : jdtMapKeyJoinColumns) {
+			result.add(new BinaryMapKeyJoinColumn2_0Annotation(this, (IAnnotation) jdtMapKeyJoinColumn));
+		}
+		return result;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateMapKeyJoinColumns();
+	}
+
+	// TODO
+	private void updateMapKeyJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java
new file mode 100644
index 0000000..051d689
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapKeyTemporal2_0Annotation.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryBaseTemporalAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.MapKeyTemporal
+ */
+public final class BinaryMapKeyTemporal2_0Annotation
+	extends BinaryBaseTemporalAnnotation
+	implements MapKeyTemporal2_0Annotation
+{
+	
+	public BinaryMapKeyTemporal2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected String getValueElementName() {
+		return JPA2_0.MAP_KEY_TEMPORAL__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java
new file mode 100644
index 0000000..c6176cb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryMapsId2_0Annotation.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapsId
+ */
+public class BinaryMapsId2_0Annotation
+	extends BinaryAnnotation
+	implements MapsId2_0Annotation
+{
+	private String value;
+	
+	
+	public BinaryMapsId2_0Annotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+	
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+	
+	
+	// ********** MapsId2_0Annotation implementation **********
+	
+	public String getValue() {
+		return this.value;
+	}
+	
+	public void setValue(String newValue) {
+		throw new UnsupportedOperationException();
+	}
+	
+	private void setValue_(String newValue) {
+		String oldValue = this.value;
+		this.value = newValue;
+		this.firePropertyChanged(VALUE_PROPERTY, oldValue, newValue);
+	}
+	
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA2_0.MAPS_ID__VALUE);
+	}
+	
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public boolean valueTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryNamedQueries2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryNamedQueries2_0Annotation.java
new file mode 100644
index 0000000..23c5499
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryNamedQueries2_0Annotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public final class BinaryNamedQueries2_0Annotation
+	extends BinaryNamedQueriesAnnotation
+{
+	public BinaryNamedQueries2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	@Override
+	protected NamedQueryAnnotation buildNamedQuery(Object jdtQuery) {
+		return new BinaryNamedQuery2_0Annotation(this, (IAnnotation) jdtQuery);
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java
new file mode 100644
index 0000000..c42b128
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryNamedQuery2_0Annotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedQueryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.NamedQuery2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  BinaryNamedQuery2_0Annotation
+ */
+public final class BinaryNamedQuery2_0Annotation
+	extends BinaryNamedQueryAnnotation
+	implements NamedQuery2_0Annotation
+{
+	private LockModeType_2_0 lockMode;
+
+	public BinaryNamedQuery2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.lockMode = this.buildLockMode();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setLockMode_(this.buildLockMode());
+	}
+	
+	// ********** NamedQuery2_0Annotation implementation **********
+
+	public LockModeType_2_0 getLockMode() {
+		return this.lockMode;
+	}
+
+	public void setLockMode(LockModeType_2_0 lockMode) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setLockMode_(LockModeType_2_0 lockMode) {
+		LockModeType_2_0 old = this.lockMode;
+		this.lockMode = lockMode;
+		this.firePropertyChanged(LOCK_MODE_PROPERTY, old, lockMode);
+	}
+
+	public TextRange getLockModeTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean lockModeTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	private LockModeType_2_0 buildLockMode() {
+		return LockModeType_2_0.fromJavaAnnotationValue(this.getJdtMemberValue(JPA2_0.NAMED_QUERY__LOCK_MODE));
+	}
+	
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java
new file mode 100644
index 0000000..cc58103
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryOrderColumn2_0Annotation.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedColumnAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OrderColumn
+ */
+public class BinaryOrderColumn2_0Annotation
+	extends BinaryNamedColumnAnnotation
+	implements OrderColumn2_0Annotation
+{
+	private Boolean nullable;
+	private Boolean insertable;
+	private Boolean updatable;
+	
+
+	public BinaryOrderColumn2_0Annotation(JavaResourcePersistentAttribute  parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.nullable = this.buildNullable();
+		this.insertable = this.buildInsertable();
+		this.updatable = this.buildUpdatable();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setNullable_(this.buildNullable());
+		this.setInsertable_(this.buildInsertable());
+		this.setUpdatable_(this.buildUpdatable());
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	
+	//************* BinaryNamedColumnAnnotation implementation *************
+	
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.COLUMN__COLUMN_DEFINITION;
+	}
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.COLUMN__NAME;
+	}
+	
+	//************* OrderColumn2_0Annotation implementation *************
+	
+	// ***** nullable
+	public Boolean getNullable() {
+		return this.nullable;
+	}
+
+	public void setNullable(Boolean nullable) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setNullable_(Boolean nullable) {
+		Boolean old = this.nullable;
+		this.nullable = nullable;
+		this.firePropertyChanged(NULLABLE_PROPERTY, old, nullable);
+	}
+
+	private Boolean buildNullable() {
+		return (Boolean) this.getJdtMemberValue(getNullableElementName());
+	}
+	
+	String getNullableElementName() {
+		return JPA.COLUMN__NULLABLE;
+	}
+
+	public TextRange getNullableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** insertable
+	public Boolean getInsertable() {
+		return this.insertable;
+	}
+
+	public void setInsertable(Boolean insertable) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setInsertable_(Boolean insertable) {
+		Boolean old = this.insertable;
+		this.insertable = insertable;
+		this.firePropertyChanged(INSERTABLE_PROPERTY, old, insertable);
+	}
+
+	private Boolean buildInsertable() {
+		return (Boolean) this.getJdtMemberValue(this.getInsertableElementName());
+	}
+	
+	String getInsertableElementName() {
+		return JPA.COLUMN__INSERTABLE;
+	}
+
+	public TextRange getInsertableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** updatable
+	public Boolean getUpdatable() {
+		return this.updatable;
+	}
+
+	public void setUpdatable(Boolean updatable) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setUpdatable_(Boolean updatable) {
+		Boolean old = this.updatable;
+		this.updatable = updatable;
+		this.firePropertyChanged(UPDATABLE_PROPERTY, old, updatable);
+	}
+
+	private Boolean buildUpdatable() {
+		return (Boolean) this.getJdtMemberValue(this.getUpdatableElementName());
+	}
+
+	String getUpdatableElementName() {
+		return JPA.COLUMN__UPDATABLE;
+	}
+
+	public TextRange getUpdatableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java
new file mode 100644
index 0000000..6919129
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinarySequenceGenerator2_0Annotation.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+* Copyright (c) 2009 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinarySequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ *  BinarySequenceGenerator2_0Annotation
+ */
+public final class BinarySequenceGenerator2_0Annotation
+	extends BinarySequenceGeneratorAnnotation
+	implements SequenceGenerator2_0Annotation
+{
+	private String catalog;
+	private String schema;
+
+
+	public BinarySequenceGenerator2_0Annotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.catalog = this.buildCatalog();
+		this.schema = this.buildSchema();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setCatalog_(this.buildCatalog());
+		this.setSchema_(this.buildSchema());
+	}
+
+	// ********** SequenceGenerator2_0Annotation implementation **********
+
+	// ********** catalog **********
+
+	public String getCatalog() {
+		return this.catalog;
+	}
+
+	public void setCatalog(String catalog) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCatalog_(String catalog) {
+		String old = this.catalog;
+		this.catalog = catalog;
+		this.firePropertyChanged(CATALOG_PROPERTY, old, catalog);
+	}
+
+	private String buildCatalog() {
+		return (String) this.getJdtMemberValue(JPA2_0.SEQUENCE_GENERATOR__CATALOG);
+	}
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ********** schema **********
+
+	public String getSchema() {
+		return this.schema;
+	}
+
+	public void setSchema(String schema) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setSchema_(String schema) {
+		String old = this.schema;
+		this.schema = schema;
+		this.firePropertyChanged(SCHEMA_PROPERTY, old, schema);
+	}
+
+	private String buildSchema() {
+		return (String) this.getJdtMemberValue(JPA2_0.SEQUENCE_GENERATOR__SCHEMA);
+	}
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java
new file mode 100644
index 0000000..caa427c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/binary/BinaryStaticMetamodelAnnotation.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.StaticMetamodelAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * javax.persistence.metamodel.StaticMetamodel
+ */
+public final class BinaryStaticMetamodelAnnotation
+	extends BinaryAnnotation
+	implements StaticMetamodelAnnotation
+{
+	private String value;
+
+
+	public BinaryStaticMetamodelAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** StaticMetamodelAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(String value) {
+		String old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+		this.firePropertyChanged(FULLY_QUALIFIED_CLASS_NAME_PROPERTY, old, value);
+	}
+
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA2_0.STATIC_METAMODEL__VALUE);
+	}
+
+	// ***** fully-qualified class name
+	/**
+	 * binary is already fully-qualified
+	 */
+	public String getFullyQualifiedClassName() {
+		return this.value;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
new file mode 100644
index 0000000..0fa8955
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Access
+ */
+public final class SourceAccess2_0Annotation
+	extends SourceAnnotation<Member>
+	implements Access2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private AccessType value;
+
+
+	public SourceAccess2_0Annotation(JavaResourcePersistentMember parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(member, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** AccessAnnotation implementation **********
+
+	// ***** value
+	public AccessType getValue() {
+		return this.value;
+	}
+
+	public void setValue(AccessType value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(AccessType.toJavaAnnotationValue(value));
+		}
+	}
+
+	private void syncValue(AccessType astValue) {
+		AccessType old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private AccessType buildValue(CompilationUnit astRoot) {
+		return AccessType.fromJavaAnnotationValue(this.valueAdapter.getValue(astRoot));
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ACCESS__VALUE);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
new file mode 100644
index 0000000..e006d46
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.NullAssociationOverrideJoinTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinTableAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ *  SourceSequenceGenerator2_0Annotation
+ */
+public final class SourceAssociationOverride2_0Annotation
+	extends SourceAssociationOverrideAnnotation
+	implements AssociationOverride2_0Annotation
+{
+	private final MemberAnnotationAdapter joinTableAdapter;
+	private NestableJoinTableAnnotation joinTable;
+
+
+	// ********** constructor **********
+	public SourceAssociationOverride2_0Annotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.joinTableAdapter = new MemberAnnotationAdapter(this.member, buildJoinTableAnnotationAdapter(this.daa));
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		if (this.joinTableAdapter.getAnnotation(astRoot) != null) {
+			this.joinTable = buildJoinTableAnnotation(this, this.member, this.daa);
+			this.joinTable.initialize(astRoot);
+		}
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncJoinTable(astRoot);
+	}
+
+	//************ AssociationOverride2_0Annotation implementation ****************
+
+	// ***** joinTable
+	public JoinTableAnnotation getJoinTable() {
+		return this.joinTable;
+	}
+
+	public JoinTableAnnotation getNonNullJoinTable() {
+		return (this.joinTable != null) ? this.joinTable : new NullAssociationOverrideJoinTableAnnotation(this);
+	}
+	
+	public NestableJoinTableAnnotation addJoinTable() {
+		if (this.joinTable != null) {
+			throw new IllegalStateException("'joinTable' element already exists: " + this.joinTable); //$NON-NLS-1$
+		}
+		this.joinTable = buildJoinTableAnnotation(this, this.member, this.daa);
+		this.joinTable.newAnnotation();
+		return this.joinTable;
+	}
+
+	public void removeJoinTable() {
+		if (this.joinTable == null) {
+			throw new IllegalStateException("'joinTable' element does not exist"); //$NON-NLS-1$
+		}
+		this.joinTable.removeAnnotation();
+		this.joinTable = null;
+	}
+
+	private void syncJoinTable(CompilationUnit astRoot) {
+		if (this.joinTableAdapter.getAnnotation(astRoot) == null) {
+			this.syncJoinTable_(null);
+		} else {
+			if (this.joinTable == null) {
+				NestableJoinTableAnnotation table = buildJoinTableAnnotation(this, this.member, this.daa);
+				table.initialize(astRoot);
+				this.syncJoinTable_(table);
+			} else {
+				this.joinTable.synchronizeWith(astRoot);
+			}
+		}
+	}
+	
+	private void syncJoinTable_(NestableJoinTableAnnotation astJoinTable) {
+		JoinTableAnnotation old = this.joinTable;
+		this.joinTable = astJoinTable;
+		this.firePropertyChanged(JOIN_TABLE_PROPERTY, old, astJoinTable);
+	}
+
+	
+	// ********** static methods **********
+
+	public static SourceAssociationOverride2_0Annotation buildAssociationOverride(JavaResourceNode parent, Member member) {
+		return new SourceAssociationOverride2_0Annotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+	}
+
+	static NestableJoinTableAnnotation buildJoinTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter associationOverrideAnnotationAdapter) {
+		return new SourceJoinTableAnnotation(parent, member, buildJoinTableAnnotationAdapter(associationOverrideAnnotationAdapter));
+	}
+
+	static DeclarationAnnotationAdapter buildJoinTableAnnotationAdapter(DeclarationAnnotationAdapter associationOverrideAnnotationAdapter) {
+		return new NestedDeclarationAnnotationAdapter(associationOverrideAnnotationAdapter, JPA2_0.ASSOCIATION_OVERRIDE__JOIN_TABLE, org.eclipse.jpt.core.resource.java.JPA.JOIN_TABLE);
+	}
+
+	
+	static SourceAssociationOverrideAnnotation buildNestedAssociationOverride(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+		return new SourceAssociationOverride2_0Annotation(parent, member, idaa, annotationAdapter);
+	}
+
+	protected static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(attributeOverridesAdapter, index, org.eclipse.jpt.core.resource.java.JPA.ASSOCIATION_OVERRIDE);
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java
new file mode 100644
index 0000000..9a72dd2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public final class SourceAssociationOverrides2_0Annotation
+	extends SourceAssociationOverridesAnnotation
+{
+
+	public SourceAssociationOverrides2_0Annotation(JavaResourceNode parent, Member member) {
+		super(parent, member);
+	}
+
+	@Override
+	protected NestableAssociationOverrideAnnotation buildAssociationOverride(int index) {
+		return SourceAssociationOverride2_0Annotation.buildNestedAssociationOverride(this, this.member, index, this.daa);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
new file mode 100644
index 0000000..85fd521
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.Cacheable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Cacheable
+ */
+public final class SourceCacheable2_0Annotation
+	extends SourceAnnotation<Member>
+	implements Cacheable2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<Boolean> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<Boolean> valueAdapter;
+	private Boolean value;
+
+
+	public SourceCacheable2_0Annotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<Boolean>(type, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** Cacheable2_0Annotation implementation **********
+
+	// ***** value
+	public Boolean getValue() {
+		return this.value;
+	}
+
+	public void setValue(Boolean value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(Boolean astValue) {
+		Boolean old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private Boolean buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildValueAdapter() {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.CACHEABLE__VALUE, false, BooleanExpressionConverter.instance());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
new file mode 100644
index 0000000..8591d53
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceBaseTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.CollectionTable
+ */
+public final class SourceCollectionTable2_0Annotation
+	extends SourceBaseTableAnnotation
+	implements CollectionTable2_0Annotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(CollectionTable2_0Annotation.ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.COLLECTION_TABLE__NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.COLLECTION_TABLE__SCHEMA);
+
+	private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.COLLECTION_TABLE__CATALOG);
+
+
+	private final Vector<NestableJoinColumnAnnotation> joinColumns = new Vector<NestableJoinColumnAnnotation>();
+	private final JoinColumnsAnnotationContainer joinColumnsContainer = new JoinColumnsAnnotationContainer();
+
+
+	public SourceCollectionTable2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		AnnotationContainerTools.initialize(this.joinColumnsContainer, astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		AnnotationContainerTools.synchronize(this.joinColumnsContainer, astRoot);
+	}
+
+
+	// ********** SourceBaseTableAnnotation implementation **********
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getNameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		// ignore the daa passed in, @CollectionTable is never nested
+		return NAME_ADAPTER;
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getSchemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		// ignore the daa passed in, @CollectionTable is never nested
+		return SCHEMA_ADAPTER;
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getCatalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		// ignore the daa passed in, @CollectionTable is never nested
+		return CATALOG_ADAPTER;
+	}
+
+	@Override
+	protected String getUniqueConstraintsElementName() {
+		return JPA2_0.COLLECTION_TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+	// ********** CollectionTable2_0Annotation implementation **********
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.joinColumns);
+	}
+
+	Iterable<NestableJoinColumnAnnotation> getNestableJoinColumns() {
+		return new LiveCloneIterable<NestableJoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+
+	public NestableJoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.get(index);
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+
+	public NestableJoinColumnAnnotation addJoinColumn(int index) {
+		return (NestableJoinColumnAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation addJoinColumn_() {
+		return this.addJoinColumn_(this.joinColumns.size());
+	}
+
+	private NestableJoinColumnAnnotation addJoinColumn_(int index) {
+		NestableJoinColumnAnnotation joinColumn = this.buildJoinColumn(index);
+		this.joinColumns.add(joinColumn);
+		return joinColumn;
+	}
+
+	void syncAddJoinColumn(Annotation astAnnotation) {
+		int index = this.joinColumns.size();
+		NestableJoinColumnAnnotation joinColumn = this.addJoinColumn_(index);
+		joinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	private NestableJoinColumnAnnotation buildJoinColumn(int index) {
+		return new SourceJoinColumnAnnotation(this, this.member, buildJoinColumnAnnotationAdapter(index));
+	}
+
+	private IndexedDeclarationAnnotationAdapter buildJoinColumnAnnotationAdapter(int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(this.daa, JPA.JOIN_TABLE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
+	}
+
+	void joinColumnAdded(int index, NestableJoinColumnAnnotation joinColumn) {
+		this.fireItemAdded(JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation moveJoinColumn_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.joinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removeJoinColumn(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation removeJoinColumn_(int index) {
+		return this.joinColumns.remove(index);
+	}
+
+	void syncRemoveJoinColumns(int index) {
+		this.removeItemsFromList(index, this.joinColumns, JOIN_COLUMNS_LIST);
+	}
+
+
+	// ********** annotation containers **********
+
+	/**
+	 * adapt the AnnotationContainer interface to the collection table's join columns
+	 */
+	class JoinColumnsAnnotationContainer
+	implements AnnotationContainer<NestableJoinColumnAnnotation>
+	{
+		public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceCollectionTable2_0Annotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getElementName() {
+			return JPA2_0.COLLECTION_TABLE__JOIN_COLUMNS;
+		}
+
+		public String getNestedAnnotationName() {
+			return JoinColumnAnnotation.ANNOTATION_NAME;
+		}
+
+		public Iterable<NestableJoinColumnAnnotation> getNestedAnnotations() {
+			return SourceCollectionTable2_0Annotation.this.getNestableJoinColumns();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceCollectionTable2_0Annotation.this.joinColumnsSize();
+		}
+
+		public NestableJoinColumnAnnotation addNestedAnnotation() {
+			return SourceCollectionTable2_0Annotation.this.addJoinColumn_();
+		}
+
+		public void syncAddNestedAnnotation(Annotation astAnnotation) {
+			SourceCollectionTable2_0Annotation.this.syncAddJoinColumn(astAnnotation);
+		}
+
+		public NestableJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceCollectionTable2_0Annotation.this.moveJoinColumn_(targetIndex, sourceIndex);
+		}
+
+		public NestableJoinColumnAnnotation removeNestedAnnotation(int index) {
+			return SourceCollectionTable2_0Annotation.this.removeJoinColumn_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceCollectionTable2_0Annotation.this.syncRemoveJoinColumns(index);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
new file mode 100644
index 0000000..9c2cbbc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
+import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * org.eclipse.persistence.annotations.Transformation
+ */
+public final class SourceElementCollection2_0Annotation
+	extends SourceAnnotation<Attribute>
+	implements ElementCollection2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> TARGET_CLASS_ADAPTER = buildTargetClassAdapter();
+	private final AnnotationElementAdapter<String> targetClassAdapter;
+	private String targetClass;
+
+	String fullyQualifiedTargetClassName;
+
+	private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
+	private final AnnotationElementAdapter<String> fetchAdapter;
+	private FetchType fetch;
+
+
+	public SourceElementCollection2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.targetClassAdapter = new MemberAnnotationElementAdapter<String>(attribute, TARGET_CLASS_ADAPTER);
+		this.fetchAdapter = new MemberAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
+	}
+
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.targetClass = this.buildTargetClass(astRoot);
+		this.fullyQualifiedTargetClassName = this.buildFullyQualifiedTargetClassName(astRoot);
+		this.fetch = this.buildFetch(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncTargetClass(this.buildTargetClass(astRoot));
+		this.syncFullyQualifiedTargetClassName(this.buildFullyQualifiedTargetClassName(astRoot));
+		this.syncFetch(this.buildFetch(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.targetClass);
+	}
+
+
+	// ********** ElementCollection2_0Annotation implementation **********
+	
+	// ***** target class
+	public String getTargetClass() {
+		return this.targetClass;
+	}
+
+	public void setTargetClass(String targetClass) {
+		if (this.attributeValueHasChanged(this.targetClass, targetClass)) {
+			this.targetClass = targetClass;
+			this.targetClassAdapter.setValue(targetClass);
+		}
+	}
+
+	private void syncTargetClass(String astTargetClass) {
+		String old = this.targetClass;
+		this.targetClass = astTargetClass;
+		this.firePropertyChanged(TARGET_CLASS_PROPERTY, old, astTargetClass);
+	}
+
+	private String buildTargetClass(CompilationUnit astRoot) {
+		return this.targetClassAdapter.getValue(astRoot);
+	}
+
+	public TextRange getTargetClassTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(TARGET_CLASS_ADAPTER, astRoot);
+	}
+
+	// ***** fully-qualified target entity class name
+	public String getFullyQualifiedTargetClassName() {
+		return this.fullyQualifiedTargetClassName;
+	}
+
+	private void syncFullyQualifiedTargetClassName(String name) {
+		String old = this.fullyQualifiedTargetClassName;
+		this.fullyQualifiedTargetClassName = name;
+		this.firePropertyChanged(FULLY_QUALIFIED_TARGET_CLASS_NAME_PROPERTY, old, name);
+	}
+
+	private String buildFullyQualifiedTargetClassName(CompilationUnit astRoot) {
+		return (this.targetClass == null) ? null : ASTTools.resolveFullyQualifiedName(this.targetClassAdapter.getExpression(astRoot));
+	}
+
+	// ***** fetch
+	public FetchType getFetch() {
+		return this.fetch;
+	}
+
+	public void setFetch(FetchType fetch) {
+		if (this.attributeValueHasChanged(this.fetch, fetch)) {
+			this.fetch = fetch;
+			this.fetchAdapter.setValue(FetchType.toJavaAnnotationValue(fetch));
+		}
+	}
+
+	private void syncFetch(FetchType astFetch) {
+		FetchType old = this.fetch;
+		this.fetch = astFetch;
+		this.firePropertyChanged(FETCH_PROPERTY, old, astFetch);
+	}
+
+	private FetchType buildFetch(CompilationUnit astRoot) {
+		return FetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot));
+	}
+
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(FETCH_ADAPTER, astRoot);
+	}
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
+		return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ELEMENT_COLLECTION__FETCH, false);
+	}
+	
+	private static DeclarationAnnotationElementAdapter<String> buildTargetClassAdapter() {
+		return buildTargetClassAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ELEMENT_COLLECTION__TARGET_CLASS);
+	}
+	
+	private static DeclarationAnnotationElementAdapter<String> buildTargetClassAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		// TODO what about QualifiedType?
+		return buildAnnotationElementAdapter(annotationAdapter, elementName, SimpleTypeStringExpressionConverter.instance());
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String> converter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, false, converter);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
new file mode 100644
index 0000000..fa8da6e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import java.util.Arrays;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotationStringArrayExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.annotation.Generated
+ */
+public final class SourceGeneratedAnnotation
+	extends SourceAnnotation<Type>
+	implements GeneratedAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String[]> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String[]> valueAdapter;
+	private final Vector<String> values = new Vector<String>();
+
+	private static final DeclarationAnnotationElementAdapter<String> DATE_ADAPTER = buildAdapter(DATE_ELEMENT_NAME);
+	private final AnnotationElementAdapter<String> dateAdapter;
+	private String date;
+
+	private static final DeclarationAnnotationElementAdapter<String> COMMENTS_ADAPTER = buildAdapter(COMMENTS_ELEMENT_NAME);
+	private final AnnotationElementAdapter<String> commentsAdapter;
+	private String comments;
+
+
+	public SourceGeneratedAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = this.buildAnnotationElementAdapter(VALUE_ADAPTER);
+		this.dateAdapter = this.buildAdapter(DATE_ADAPTER);
+		this.commentsAdapter = this.buildAdapter(COMMENTS_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	private AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
+		return new MemberAnnotationElementAdapter<String[]>(this.member, daea);
+	}
+
+	private AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.initializeValues(astRoot);
+		this.date = this.buildDate(astRoot);
+		this.comments = this.buildComments(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValues(astRoot);
+		this.syncDate(this.buildDate(astRoot));
+		this.syncComments(this.buildComments(astRoot));
+	}
+
+	public IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.values);
+	}
+
+
+	// ********** GeneratedAnnotation implementation **********
+
+	// ***** values
+	public ListIterator<String> values() {
+		return new CloneListIterator<String>(this.values);
+	}
+
+	public int valuesSize() {
+		return this.values.size();
+	}
+
+	public String getValue(int index) {
+		return this.values.get(index);
+	}
+
+	public void addValue(String value) {
+		this.addValue(this.values.size(), value);
+	}
+
+	public void addValue(int index, String value) {
+		this.values.add(index, value);
+		this.writeValues();
+	}
+
+	public void moveValue(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.values, targetIndex, sourceIndex);
+		this.writeValues();
+	}
+
+	public void removeValue(String value) {
+		this.values.remove(value);
+		this.writeValues();
+	}
+
+	public void removeValue(int index) {
+		this.values.remove(index);
+		this.writeValues();
+	}
+
+	private void writeValues() {
+		this.valueAdapter.setValue(this.values.toArray(new String[this.values.size()]));
+	}
+
+	private void initializeValues(CompilationUnit astRoot) {
+		String[] astValues = this.valueAdapter.getValue(astRoot);
+		for (int i = 0; i < astValues.length; i++) {
+			this.values.add(astValues[i]);
+		}
+	}
+
+	private void syncValues(CompilationUnit astRoot) {
+		String[] astValues = this.valueAdapter.getValue(astRoot);
+		this.synchronizeList(Arrays.asList(astValues), this.values, VALUES_LIST);
+	}
+
+	// ***** date
+	public String getDate() {
+		return this.date;
+	}
+
+	public void setDate(String date) {
+		if (this.attributeValueHasChanged(this.date, date)) {
+			this.date = date;
+			this.dateAdapter.setValue(date);
+		}
+	}
+	
+	protected void syncDate(String astDate) {
+		String old = this.date;
+		this.date = astDate;
+		this.firePropertyChanged(DATE_PROPERTY, old, astDate);
+	}
+
+	private String buildDate(CompilationUnit astRoot) {
+		return this.dateAdapter.getValue(astRoot);
+	}
+
+	// ***** comments
+	public String getComments() {
+		return this.comments;
+	}
+
+	public void setComments(String comments) {
+		if (this.attributeValueHasChanged(this.comments, comments)) {
+			this.comments = comments;
+			this.commentsAdapter.setValue(comments);
+		}
+	}
+
+	protected void syncComments(String astComments) {
+		String old = this.comments;
+		this.comments = astComments;
+		this.firePropertyChanged(COMMENTS_PROPERTY, old, astComments);
+	}
+
+	private String buildComments(CompilationUnit astRoot) {
+		return this.commentsAdapter.getValue(astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	protected static DeclarationAnnotationElementAdapter<String[]> buildValueAdapter() {
+		return buildArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, VALUE_ELEMENT_NAME);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return buildArrayAnnotationElementAdapter(annotationAdapter, elementName, AnnotationStringArrayExpressionConverter.forStrings());
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String[]> converter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String[]>(annotationAdapter, elementName, false, converter);
+	}
+
+	protected static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
+		return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
+	}
+
+	static DeclarationAnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(annotationAdapter, elementName);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
new file mode 100644
index 0000000..27177fd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyClass2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.MapKeyClass
+ */
+public final class SourceMapKeyClass2_0Annotation
+	extends SourceAnnotation<Attribute>
+	implements MapKeyClass2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private String value;
+
+	private String fullyQualifiedClassName;
+
+
+	public SourceMapKeyClass2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+		this.fullyQualifiedClassName = this.buildFullyQualifiedClassName(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+		this.syncFullyQualifiedClassName(this.buildFullyQualifiedClassName(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** MapKeyClass2_0Annotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+
+	// ***** fully-qualified class name
+	public String getFullyQualifiedClassName() {
+		return this.fullyQualifiedClassName;
+	}
+
+	private void syncFullyQualifiedClassName(String astfullyQualifiedClassName) {
+		String old = this.fullyQualifiedClassName;
+		this.fullyQualifiedClassName = astfullyQualifiedClassName;
+		this.firePropertyChanged(FULLY_QUALIFIED_CLASS_NAME_PROPERTY, old, astfullyQualifiedClassName);
+	}
+
+	private String buildFullyQualifiedClassName(CompilationUnit astRoot) {
+		return (this.value == null) ? null : ASTTools.resolveFullyQualifiedName(this.valueAdapter.getExpression(astRoot));
+	}
+
+
+	// ********** static methods **********
+
+	protected static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.MAP_KEY_CLASS__VALUE, SimpleTypeStringExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java
new file mode 100644
index 0000000..100c78f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyColumn2_0Annotation.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceCompleteColumnAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKeyColumn
+ */
+public final class SourceMapKeyColumn2_0Annotation
+	extends SourceCompleteColumnAnnotation
+	implements MapKeyColumn2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(MapKeyColumn2_0Annotation.ANNOTATION_NAME);
+
+
+	public SourceMapKeyColumn2_0Annotation(JavaResourcePersistentAttribute parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyColumn2_0Annotation.ANNOTATION_NAME;
+	}
+
+
+	// ********** SourceNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** SourceBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__UPDATABLE;
+	}
+	
+	// ********** SourceCompleteColumnAnnotation implementation **********
+
+	@Override
+	protected String getLengthElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__LENGTH;
+	}
+	
+	@Override
+	protected String getPrecisionElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__PRECISION;
+	}
+	
+	@Override
+	protected String getScaleElementName() {
+		return JPA2_0.MAP_KEY_COLUMN__SCALE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java
new file mode 100644
index 0000000..42bc8e3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyEnumerated2_0Annotation.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceBaseEnumeratedAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.MapKeyEnumerated
+ */
+public final class SourceMapKeyEnumerated2_0Annotation
+	extends SourceBaseEnumeratedAnnotation
+	implements MapKeyEnumerated2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(MapKeyEnumerated2_0Annotation.ANNOTATION_NAME);	
+
+	public SourceMapKeyEnumerated2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+	
+	public String getAnnotationName() {
+		return MapKeyEnumerated2_0Annotation.ANNOTATION_NAME;
+	}
+
+	@Override
+	protected String getValueElementName() {
+		return JPA2_0.MAP_KEY_ENUMERATED__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java
new file mode 100644
index 0000000..92e1ce1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyTemporal2_0Annotation.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceBaseTemporalAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.MapKeyTemporal
+ */
+public final class SourceMapKeyTemporal2_0Annotation
+	extends SourceBaseTemporalAnnotation
+	implements MapKeyTemporal2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(MapKeyTemporal2_0Annotation.ANNOTATION_NAME);
+
+
+	public SourceMapKeyTemporal2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyTemporal2_0Annotation.ANNOTATION_NAME;
+	}
+
+	@Override
+	protected String getValueElementName() {
+		return JPA2_0.MAP_KEY_TEMPORAL__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
new file mode 100644
index 0000000..4331c36
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.MapsId
+ */
+public final class SourceMapsId2_0Annotation
+	extends SourceAnnotation<Attribute>
+	implements MapsId2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+	
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	
+	
+	private final AnnotationElementAdapter<String> valueAdapter;
+	
+	private String value;
+	
+	
+	public SourceMapsId2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+	}
+	
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+	
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+	
+	
+	// ********** MapsId2_0Annotation implementation **********
+	
+	public String getValue() {
+		return this.value;
+	}
+	
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+	
+	public boolean valueTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(VALUE_ADAPTER, pos, astRoot);
+	}
+	
+	
+	// ********** static methods **********
+	
+	private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(
+				DECLARATION_ANNOTATION_ADAPTER, JPA2_0.MAPS_ID__VALUE, false);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java
new file mode 100644
index 0000000..1e86f39
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableNamedQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public final class SourceNamedQueries2_0Annotation
+	extends SourceNamedQueriesAnnotation
+{
+	public SourceNamedQueries2_0Annotation(JavaResourceNode parent, Type type) {
+		super(parent, type);
+	}
+
+	@Override
+	protected NestableNamedQueryAnnotation buildNamedQuery(int index) {
+		return SourceNamedQuery2_0Annotation.createNestedNamedQuery(this, member, index, this.daa);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
new file mode 100644
index 0000000..abc4264
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueryAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.NamedQuery2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public final class SourceNamedQuery2_0Annotation
+	extends SourceNamedQueryAnnotation
+	implements NamedQuery2_0Annotation
+{
+	private final DeclarationAnnotationElementAdapter<String> lockModeDeclarationAdapter;
+	private final AnnotationElementAdapter<String> lockModeAdapter;
+	private LockModeType_2_0 lockMode;
+
+	// ********** constructors **********
+	public SourceNamedQuery2_0Annotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, type, daa, annotationAdapter);
+		this.lockModeDeclarationAdapter = this.buildLockModeTypeAdapter(daa);
+		this.lockModeAdapter = new MemberAnnotationElementAdapter<String>(type, this.lockModeDeclarationAdapter);
+	}
+	
+	public SourceNamedQuery2_0Annotation(JavaResourceNode parent, Type type) {
+		this(parent, type, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
+	}
+	
+	private DeclarationAnnotationElementAdapter<String> buildLockModeTypeAdapter(DeclarationAnnotationAdapter daAdapter) {
+		return new EnumDeclarationAnnotationElementAdapter(daAdapter, this.getLockModeElementName());
+	}
+
+	private String getLockModeElementName() {
+		return JPA2_0.NAMED_QUERY__LOCK_MODE;
+	}
+
+	// ********** initialize/update **********
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.lockMode = this.buildLockMode(astRoot);
+	}
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		
+		NamedQuery2_0Annotation old = (NamedQuery2_0Annotation) oldAnnotation;
+		this.setLockMode(old.getLockMode());
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncLockMode(this.buildLockMode(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.lockMode);
+	}
+
+	// ********** NamedQuery2_0Annotation implementation **********
+
+	public LockModeType_2_0 getLockMode() {
+		return this.lockMode;
+	}
+
+	public void setLockMode(LockModeType_2_0 lockMode) {
+		if (this.attributeValueHasChanged(this.lockMode, lockMode)) {
+			this.lockMode = lockMode;
+			this.lockModeAdapter.setValue(LockModeType_2_0.toJavaAnnotationValue(lockMode));
+		}
+	}
+
+	private void syncLockMode(LockModeType_2_0 astLockMode) {
+		LockModeType_2_0 old = this.lockMode;
+		this.lockMode = astLockMode;
+		this.firePropertyChanged(LOCK_MODE_PROPERTY, old, astLockMode);
+	}
+
+	private LockModeType_2_0 buildLockMode(CompilationUnit astRoot) {
+		return LockModeType_2_0.fromJavaAnnotationValue(this.lockModeAdapter.getValue(astRoot));
+	}
+
+	public TextRange getLockModeTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.lockModeDeclarationAdapter, astRoot);
+	}
+
+	public boolean lockModeTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.lockModeDeclarationAdapter, pos, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	static SourceNamedQuery2_0Annotation createNestedNamedQuery(JavaResourceNode parent, Type type, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(type, idaa);
+
+		return new SourceNamedQuery2_0Annotation(parent, type, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter namedQueriesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(namedQueriesAdapter, index, JPA.NAMED_QUERY);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java
new file mode 100644
index 0000000..177665c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceOrderColumn2_0Annotation.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedColumnAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.OrderColumn
+ */
+public final class SourceOrderColumn2_0Annotation
+	extends SourceNamedColumnAnnotation
+	implements OrderColumn2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final DeclarationAnnotationElementAdapter<Boolean> nullableDeclarationAdapter;
+	private final AnnotationElementAdapter<Boolean> nullableAdapter;
+	private Boolean nullable;
+
+	private final DeclarationAnnotationElementAdapter<Boolean> insertableDeclarationAdapter;
+	private final AnnotationElementAdapter<Boolean> insertableAdapter;
+	private Boolean insertable;
+
+	private final DeclarationAnnotationElementAdapter<Boolean> updatableDeclarationAdapter;
+	private final AnnotationElementAdapter<Boolean> updatableAdapter;
+	private Boolean updatable;
+
+	public SourceOrderColumn2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.nullableDeclarationAdapter = this.buildBooleanElementAdapter(this.getNullableElementName());
+		this.nullableAdapter = this.buildShortCircuitBooleanElementAdapter(this.nullableDeclarationAdapter);
+		this.insertableDeclarationAdapter = this.buildBooleanElementAdapter(this.getInsertableElementName());
+		this.insertableAdapter = this.buildShortCircuitBooleanElementAdapter(this.insertableDeclarationAdapter);
+		this.updatableDeclarationAdapter = this.buildBooleanElementAdapter(this.getUpdatableElementName());
+		this.updatableAdapter = this.buildShortCircuitBooleanElementAdapter(this.updatableDeclarationAdapter);
+	}
+	
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.nullable = this.buildNullable(astRoot);
+		this.insertable = this.buildInsertable(astRoot);
+		this.updatable = this.buildUpdatable(astRoot);
+	}
+	
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncNullable(this.buildNullable(astRoot));
+		this.syncInsertable(this.buildInsertable(astRoot));
+		this.syncUpdatable(this.buildUpdatable(astRoot));
+	}
+	
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> buildStringElementAdapter(String elementName) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, elementName, false);
+	}
+	
+	@Override
+	protected DeclarationAnnotationElementAdapter<Boolean> buildBooleanElementAdapter(String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(this.daa, elementName, false, BooleanExpressionConverter.instance());
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected String getNameElementName() {
+		return JPA2_0.ORDER_COLUMN__NAME;
+	}
+	
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA2_0.ORDER_COLUMN__COLUMN_DEFINITION;
+	}
+	//************* OrderColumn2_0Annotation implementation *************
+
+	// ***** nullable
+	public Boolean getNullable() {
+		return this.nullable;
+	}
+
+	public void setNullable(Boolean nullable) {
+		if (this.attributeValueHasChanged(this.nullable, nullable)) {
+			this.nullable = nullable;
+			this.nullableAdapter.setValue(nullable);
+		}
+	}
+
+	private void syncNullable(Boolean astNullable) {
+		Boolean old = this.nullable;
+		this.nullable = astNullable;
+		this.firePropertyChanged(NULLABLE_PROPERTY, old, astNullable);
+	}
+
+	private Boolean buildNullable(CompilationUnit astRoot) {
+		return this.nullableAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getNullableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nullableDeclarationAdapter, astRoot);
+	}
+	
+	String getNullableElementName() {
+		return JPA2_0.ORDER_COLUMN__NULLABLE;
+	}
+
+	// ***** insertable
+	public Boolean getInsertable() {
+		return this.insertable;
+	}
+
+	public void setInsertable(Boolean insertable) {
+		if (this.attributeValueHasChanged(this.insertable, insertable)) {
+			this.insertable = insertable;
+			this.insertableAdapter.setValue(insertable);
+		}
+	}
+
+	private void syncInsertable(Boolean astInsertable) {
+		Boolean old = this.insertable;
+		this.insertable = astInsertable;
+		this.firePropertyChanged(INSERTABLE_PROPERTY, old, astInsertable);
+	}
+
+	private Boolean buildInsertable(CompilationUnit astRoot) {
+		return this.insertableAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getInsertableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.insertableDeclarationAdapter, astRoot);
+	}
+	
+	String getInsertableElementName() {
+		return JPA2_0.ORDER_COLUMN__INSERTABLE;
+	}
+
+	// ***** updatable
+	public Boolean getUpdatable() {
+		return this.updatable;
+	}
+
+	public void setUpdatable(Boolean updatable) {
+		if (this.attributeValueHasChanged(this.updatable, updatable)) {
+			this.updatable = updatable;
+			this.updatableAdapter.setValue(updatable);
+		}
+	}
+
+	private void syncUpdatable(Boolean astUpdatable) {
+		Boolean old = this.updatable;
+		this.updatable = astUpdatable;
+		this.firePropertyChanged(UPDATABLE_PROPERTY, old, astUpdatable);
+	}
+
+	private Boolean buildUpdatable(CompilationUnit astRoot) {
+		return this.updatableAdapter.getValue(astRoot);
+	}
+
+	public TextRange getUpdatableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.updatableDeclarationAdapter, astRoot);
+	}
+	
+	String getUpdatableElementName() {
+		return JPA2_0.ORDER_COLUMN__UPDATABLE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java
new file mode 100644
index 0000000..1fa27a7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceSequenceGenerator2_0Annotation.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceSequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.SequenceGenerator2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ *  SourceSequenceGenerator2_0Annotation
+ */
+public final class SourceSequenceGenerator2_0Annotation
+	extends SourceSequenceGeneratorAnnotation
+	implements SequenceGenerator2_0Annotation
+{
+	private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = buildAdapter(JPA2_0.SEQUENCE_GENERATOR__CATALOG);
+	private final AnnotationElementAdapter<String> catalogAdapter;
+	private String catalog;
+	
+	private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = buildAdapter(JPA2_0.SEQUENCE_GENERATOR__SCHEMA);
+	private final AnnotationElementAdapter<String> schemaAdapter;
+	private String schema;
+
+
+	// ********** constructor **********
+	public SourceSequenceGenerator2_0Annotation(JavaResourceNode parent, Member member) {
+		super(parent, member);
+		this.catalogAdapter = this.buildAdapter(CATALOG_ADAPTER);
+		this.schemaAdapter = this.buildAdapter(SCHEMA_ADAPTER);
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.catalog = this.buildCatalog(astRoot);
+		this.schema = this.buildSchema(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncCatalog(this.buildCatalog(astRoot));
+		this.syncSchema(this.buildSchema(astRoot));
+	}
+
+	// ********** catalog **********
+	public String getCatalog() {
+		return this.catalog;
+	}
+
+	public void setCatalog(String catalog) {
+		if (this.attributeValueHasChanged(this.catalog, catalog)) {
+			this.catalog = catalog;
+			this.catalogAdapter.setValue(catalog);
+		}
+	}
+
+	private void syncCatalog(String astCatalog) {
+		String old = this.catalog;
+		this.catalog = astCatalog;
+		this.firePropertyChanged(CATALOG_PROPERTY, old, astCatalog);
+	}
+
+	private String buildCatalog(CompilationUnit astRoot) {
+		return this.catalogAdapter.getValue(astRoot);
+	}
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(CATALOG_ADAPTER, astRoot);
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(CATALOG_ADAPTER, pos, astRoot);
+	}
+
+	// ********** schema **********
+	public String getSchema() {
+		return this.schema;
+	}
+
+	public void setSchema(String schema) {
+		if (this.attributeValueHasChanged(this.schema, schema)) {
+			this.schema = schema;
+			this.schemaAdapter.setValue(schema);
+		}
+	}
+
+	private void syncSchema(String astSchema) {
+		String old = this.schema;
+		this.schema = astSchema;
+		this.firePropertyChanged(SCHEMA_PROPERTY, old, astSchema);
+	}
+
+	private String buildSchema(CompilationUnit astRoot) {
+		return this.schemaAdapter.getValue(astRoot);
+	}
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(SCHEMA_ADAPTER, astRoot);
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(SCHEMA_ADAPTER, pos, astRoot);
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
new file mode 100644
index 0000000..4a2ceea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.StaticMetamodelAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.metamodel.StaticMetamodel
+ */
+public final class SourceStaticMetamodelAnnotation
+	extends SourceAnnotation<Type>
+	implements StaticMetamodelAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private String value;
+
+	private String fullyQualifiedClassName;
+
+
+	public SourceStaticMetamodelAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+		this.fullyQualifiedClassName = this.buildFullyQualifiedClassName(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+		this.syncFullyQualifiedClassName(this.buildFullyQualifiedClassName(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** StaticMetamodelAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+	// ***** fully-qualified class name
+	public String getFullyQualifiedClassName() {
+		return this.fullyQualifiedClassName;
+	}
+
+	private void syncFullyQualifiedClassName(String astfullyQualifiedClassName) {
+		String old = this.fullyQualifiedClassName;
+		this.fullyQualifiedClassName = astfullyQualifiedClassName;
+		this.firePropertyChanged(FULLY_QUALIFIED_CLASS_NAME_PROPERTY, old, astfullyQualifiedClassName);
+	}
+
+	private String buildFullyQualifiedClassName(CompilationUnit astRoot) {
+		return (this.value == null) ? null : ASTTools.resolveFullyQualifiedName(this.valueAdapter.getExpression(astRoot));
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.STATIC_METAMODEL__VALUE, SimpleTypeStringExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java
new file mode 100644
index 0000000..294f28f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/AbstractJpaFileCreationDataModelProvider.java
@@ -0,0 +1,357 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+import java.util.Iterator;
+import java.util.Set;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.AbstractJpaProject;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+
+public abstract class AbstractJpaFileCreationDataModelProvider
+	extends AbstractDataModelProvider
+	implements JpaFileCreationDataModelProperties
+{
+	protected AbstractJpaFileCreationDataModelProvider() {
+		super();
+	}
+	
+	
+	@Override
+	public Set<String> getPropertyNames() {
+		@SuppressWarnings("unchecked")
+		Set<String> propertyNames = super.getPropertyNames();
+		propertyNames.add(PROJECT_NAME);
+		propertyNames.add(SOURCE_FOLDER);
+		propertyNames.add(FILE_PATH);
+		propertyNames.add(VERSION);
+		return propertyNames;
+	}
+	
+	@Override
+	public Object getDefaultProperty(String propertyName) {
+		if (propertyName.equals(SOURCE_FOLDER)) {
+			IContainer sourceFolder = getDefaultSourceFolder();
+			if (sourceFolder != null && sourceFolder.exists()) {
+				return sourceFolder.getFullPath().toPortableString();
+			}
+		}
+		else if (propertyName.equals(FILE_PATH)) {
+			return getDefaultFilePath();
+		}
+		else if (propertyName.equals(VERSION)) {
+			return getDefaultVersion();
+		}
+		return super.getDefaultProperty(propertyName);
+	}
+	
+	protected abstract String getDefaultFilePath();
+	
+	protected abstract String getDefaultVersion();
+	
+	@Override
+	public boolean propertySet(String propertyName, Object propertyValue) {
+		boolean ok = super.propertySet(propertyName, propertyValue);
+		if (propertyName.equals(PROJECT_NAME)) {
+			this.model.notifyPropertyChange(SOURCE_FOLDER, IDataModel.DEFAULT_CHG);
+		}
+		return ok;
+	}
+	
+	@Override
+	public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
+		if (propertyName.equals(PROJECT_NAME)) {
+			return ArrayTools.array(
+				new TransformationIterator<IProject, DataModelPropertyDescriptor>(jpaIProjects()) {
+					@Override
+					protected DataModelPropertyDescriptor transform(IProject next) {
+						return new DataModelPropertyDescriptor(next.getName());
+					}
+				},
+				new DataModelPropertyDescriptor[0]);
+		}
+		return super.getValidPropertyDescriptors(propertyName);
+	}
+	
+	@Override
+	public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
+		if (propertyName.equals(PROJECT_NAME)) {
+			return new DataModelPropertyDescriptor(getStringProperty(PROJECT_NAME));
+		}
+		return super.getPropertyDescriptor(propertyName);
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public IStatus validate(String propertyName) {
+		IStatus status = Status.OK_STATUS;
+		if (propertyName.equals(PROJECT_NAME)
+				|| propertyName.equals(SOURCE_FOLDER)
+				|| propertyName.equals(FILE_PATH)) {
+			status = validateProjectSourceFolderAndFilePath();
+		}
+		if (! status.isOK()) {
+			return status;
+		}
+		
+		if (propertyName.equals(PROJECT_NAME)
+				|| propertyName.equals(VERSION)) {
+			status = validateVersion();
+		}
+		if (! status.isOK()) {
+			return status;
+		}
+		
+		return status;
+	}
+	
+	protected IStatus validateProjectSourceFolderAndFilePath() {
+		String projectName = (String) getProperty(PROJECT_NAME);
+		if (StringTools.stringIsEmpty(projectName)) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID, 
+				JptCoreMessages.VALIDATE_PROJECT_NOT_SPECIFIED);
+		}
+		String sourceFolderPath = getStringProperty(SOURCE_FOLDER);
+		if (StringTools.stringIsEmpty(sourceFolderPath)) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+				JptCoreMessages.VALIDATE_SOURCE_FOLDER_NOT_SPECIFIED);
+		}
+		if (sourceFolderIsIllegal(sourceFolderPath)) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+				JptCoreMessages.VALIDATE_SOURCE_FOLDER_ILLEGAL);
+		}
+		if (sourceFolderNotInProject(sourceFolderPath)) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+				NLS.bind(
+					JptCoreMessages.VALIDATE_SOURCE_FOLDER_NOT_IN_PROJECT, 
+					sourceFolderPath, projectName));
+		}
+		if (getVerifiedSourceFolder() == null) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+				NLS.bind(JptCoreMessages.VALIDATE_SOURCE_FOLDER_DOES_NOT_EXIST, sourceFolderPath));
+		}
+		String filePath = getStringProperty(FILE_PATH);
+		if (StringTools.stringIsEmpty(filePath)) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+				JptCoreMessages.VALIDATE_FILE_PATH_NOT_SPECIFIED);
+		}
+		if (getExistingFile() != null) {
+			return new Status(
+				IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+				JptCoreMessages.VALIDATE_FILE_ALREADY_EXISTS);
+		}
+		return Status.OK_STATUS;
+	}
+	
+	protected IStatus validateVersion() {
+		if (getProject() == null) {
+			return Status.OK_STATUS;
+		}
+		String fileVersion = getStringProperty(VERSION);
+		if (! fileVersionSupported(fileVersion)) {
+			return new Status(
+					IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+					JptCoreMessages.VALIDATE_FILE_VERSION_NOT_SUPPORTED);
+		}
+		try {
+			String jpaFacetVersion = getJpaFacetVersion(getProject());
+			if (! fileVersionSupportedForFacetVersion(fileVersion, jpaFacetVersion)) {
+				return new Status(
+						IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+						JptCoreMessages.VALIDATE_FILE_VERSION_NOT_SUPPORTED_FOR_FACET_VERSION);
+			}
+		}
+		catch (CoreException ce) {
+			// project should have been validated already, so assume that this will never get hit
+			// fall through to final return
+		}
+		return Status.OK_STATUS;
+	}
+	
+	protected abstract boolean fileVersionSupported(String fileVersion);
+	
+	protected abstract boolean fileVersionSupportedForFacetVersion(String fileVersion, String jpaFacetVersion);
+	
+	
+	// **************** helper methods *****************************************
+	
+	// Copied from ArtifactEditOperationDataModelProvider
+	protected IProject getProject() {
+		String projectName = (String) model.getProperty(PROJECT_NAME);
+		if (StringTools.stringIsEmpty(projectName)) {
+			return null;
+		}
+		return ProjectUtilities.getProject(projectName);
+	}
+	
+	protected JpaProject getJpaProject() {
+		IProject project = getProject();
+		return (project == null) ? null : JptCorePlugin.getJpaProject(project);
+	}
+	
+	/**
+	 * Return a best guess source folder for the specified project
+	 */
+	protected IContainer getDefaultSourceFolder() {
+		IProject project = getProject();
+		if (project == null) {
+			return null;
+		}
+		IContainer folder = AbstractJpaProject.getBundleRoot(project);
+		if (folder != null) {
+			return folder;
+		}
+		IPackageFragmentRoot[] sources = J2EEProjectUtilities.getSourceContainers(project);
+		// Try and return the first source folder
+		if (sources.length > 0) {
+			try {
+				return (IFolder) sources[0].getCorrespondingResource();
+			} catch (Exception e) {
+				return null;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * Return whether the path provided can not be a valid IContainer path
+	 */
+	protected boolean sourceFolderIsIllegal(String containerPath) {
+		IProject project = getProject();
+		if (project == null) {
+			return false;
+		}
+		IContainer container = PlatformTools.getContainer(new Path(containerPath));
+		if (container == null) {
+			return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * Return whether the path provided is in the current project
+	 */
+	protected boolean sourceFolderNotInProject(String folderPath) {
+		IProject project = getProject();
+		if (project == null) {
+			return false;
+		}
+		IContainer container = PlatformTools.getContainer(new Path(folderPath));
+		return ! project.equals(container.getProject());
+	}
+	
+	/**
+	 * Return an IContainer represented by the SOURCE_FOLDER property, verified
+	 * to exist
+	 */
+	protected IContainer getVerifiedSourceFolder() {
+		String folderPath = getStringProperty(SOURCE_FOLDER);
+		IProject project = getProject();
+		if (project == null) {
+			return null;
+		}
+		IContainer container = PlatformTools.getContainer(new Path(folderPath));
+		if (container == null || ! container.exists()) {
+			return null;
+		}
+		return container;
+	}
+	
+	protected IFile getExistingFile() {
+		IContainer container = getVerifiedSourceFolder();
+		if (container == null) {
+			return null;
+		}
+		String filePath = getStringProperty(FILE_PATH);
+		IFile existingFile = container.getFile(new Path(filePath));
+		if (! existingFile.exists()) {
+			return null;
+		}
+		return existingFile;
+	}
+	
+	protected Iterator<IProject> jpaIProjects() {
+		return new FilteringIterator<IProject>(this.allIProjects(), this.buildJpaIProjectsFilter());
+	}
+
+	protected Iterator<IProject> allIProjects() {
+		return CollectionTools.iterator(ProjectUtilities.getAllProjects());
+	}
+
+	protected Filter<IProject> buildJpaIProjectsFilter() {
+		return new JpaIProjectsFilter();
+	}
+
+	protected class JpaIProjectsFilter implements Filter<IProject> {
+		public boolean accept(IProject project) {
+			try {
+				return this.accept_(project);
+			} catch (CoreException ex) {
+				return false;
+			}
+		}
+		protected boolean accept_(IProject project) throws CoreException {
+			return hasJpaFacet(project) && hasSupportedPlatformId(project);
+		}
+	}
+	
+	protected boolean hasJpaFacet(IProject project) throws CoreException {
+		return FacetedProjectFramework.hasProjectFacet(project, JptCorePlugin.FACET_ID);
+	}
+	
+	protected String getJpaFacetVersion(IProject project) throws CoreException {
+		IFacetedProject fproj = ProjectFacetsManager.create(project);
+		return fproj.getProjectFacetVersion(
+				ProjectFacetsManager.getProjectFacet(JptCorePlugin.FACET_ID)).getVersionString();
+	}
+	
+	protected boolean hasSupportedPlatformId(IProject project) {
+		JpaProject jpaProject = JptCorePlugin.getJpaProject(project);
+		return (jpaProject != null) && isSupportedPlatformId(jpaProject.getJpaPlatform().getId());
+	}
+	
+	protected boolean isSupportedPlatformId(String id) {
+		return true;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/AbstractJpaFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/AbstractJpaFileCreationOperation.java
new file mode 100644
index 0000000..1a20efd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/AbstractJpaFileCreationOperation.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.core.resource.AbstractXmlResourceProvider;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+public abstract class AbstractJpaFileCreationOperation
+	extends AbstractDataModelOperation
+	implements JpaFileCreationDataModelProperties
+{
+	/**
+	 * Will be null until folder is created
+	 */
+	protected IContainer createdSourceFolder;
+	
+	/**
+	 * Will be null until file is created
+	 */
+	protected IFile createdFile;
+	
+	
+	protected AbstractJpaFileCreationOperation(IDataModel dataModel) {
+		super(dataModel);
+	}
+	
+	
+	@Override
+	public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+		// Create source folder if it does not exist
+		createSourceFolder();
+		// Create file
+		createFile();
+		return OK_STATUS;
+	}
+	
+	protected IProject getProject() throws ExecutionException {
+		String projectName = (String) getDataModel().getProperty(PROJECT_NAME);
+		IProject project = ProjectUtilities.getProject(projectName);
+		if (project == null) {
+			throw new ExecutionException("No project name specified"); //$NON-NLS-1$
+		}
+		return project;
+	}
+	
+	protected JpaProject getJpaProject() throws ExecutionException {
+		IProject project = getProject();
+		JpaProject jpaProject = JptCorePlugin.getJpaProject(project);
+		if (jpaProject == null) {
+			throw new ExecutionException("Project does not have JPA content"); //$NON-NLS-1$
+		}
+		return jpaProject;
+	}
+	
+	/**
+	 * This method will return the source folder as specified in the data model. 
+	 * It will create the source folder if it does not exist. It will not add
+	 * it as a source folder to the project build path if it is not already.
+	 * This method may return null.
+	 */
+	// copied from NewJavaClassOperation
+	protected void createSourceFolder() throws ExecutionException {
+		// Get the source folder name from the data model
+		String folderPath = model.getStringProperty(SOURCE_FOLDER);
+		IProject project = getProject();
+		IContainer container = PlatformTools.getContainer(new Path(folderPath));
+		boolean createVirtualReference = ComponentCore.createFolder(project, new Path("")).exists();
+		if (container instanceof IFolder) {
+			IFolder folder = (IFolder) container;
+			// If folder does not exist, create the folder with the specified path
+			if (! folder.exists()) {
+				try {
+					folder.create(true, true, null);
+				} catch (CoreException e) {
+					throw new ExecutionException("Could not create folder", e); //$NON-NLS-1$
+				}
+			}
+			if (createVirtualReference) {
+				IVirtualFolder rootFolder = ComponentCore.createComponent(project).getRootFolder();
+				try {
+					rootFolder.getFolder(new Path("/")).createLink(container.getProjectRelativePath(), 0, null);
+				}
+				catch (CoreException ce) {
+					JptCorePlugin.log(ce);
+				}
+			}
+		}
+		else if (container instanceof IProject) {
+			if (createVirtualReference) {
+				IVirtualFolder rootFolder = ComponentCore.createComponent(project).getRootFolder();
+				try {
+					rootFolder.getFolder(new Path("/META-INF")).createLink(container.getProjectRelativePath().append("META-INF"), 0, null);
+				}
+				catch (CoreException ce) {
+					JptCorePlugin.log(ce);
+				}
+			}
+		}
+		// Return the source folder
+		this.createdSourceFolder = container;
+	}
+	
+	protected void createFile() {
+		String filePath = getDataModel().getStringProperty(FILE_PATH);
+		IFile newFile = this.createdSourceFolder.getFile(new Path(filePath));
+		AbstractXmlResourceProvider resourceProvider = getXmlResourceProvider(newFile);
+		try {
+			resourceProvider.createFileAndResource(getDataModel());
+		}
+		catch (CoreException e) {
+			JptCorePlugin.log(e);
+			newFile = null;
+		}
+		this.createdFile = newFile;
+	}
+	
+	@Override
+	public ISchedulingRule getSchedulingRule() {
+		try {
+			return this.getProject();
+		} catch (ExecutionException ex) {
+			throw new RuntimeException(ex);
+		}
+	}
+	
+	protected abstract AbstractXmlResourceProvider getXmlResourceProvider(IFile file);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/JpaFileCreationDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/JpaFileCreationDataModelProperties.java
new file mode 100644
index 0000000..62b1e36
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/JpaFileCreationDataModelProperties.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+public interface JpaFileCreationDataModelProperties
+{
+	/**
+	 * Required, type String, identifies the name of the project in which to create the file
+	 */
+	public static final String PROJECT_NAME = "JpaFileCreationDataModelProperties.PROJECT_NAME";
+	
+	/**
+	 * Required, type String, identifies the fully pathed source folder in which to create the file
+	 */
+	public static final String SOURCE_FOLDER = "JpaFileCreationDataModelProperties.SOURCE_FOLDER";
+	
+	/**
+	 * Required, type String, identifies the file path relative to the source folder
+	 */
+	public static final String FILE_PATH = "JpaFileCreationDataModelProperties.FILE_PATH";
+	
+	/**
+	 * Required, type String, identifies the version of the file to create
+	 */
+	public static final String VERSION = "JpaFileCreationDataModelProperties.VERSION";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationDataModelProperties.java
new file mode 100644
index 0000000..75e2083
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationDataModelProperties.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+public interface OrmFileCreationDataModelProperties
+	extends JpaFileCreationDataModelProperties
+{
+	/**
+	 * Optional, type AccessType, specifies the default access type (or null)
+	 */
+	public static final String DEFAULT_ACCESS = "OrmFileCreationDataModelProperties.DEFAULT_ACCESS";
+	
+	/**
+	 * Required, type Boolean, specifies whether to add a reference to the file
+	 * in the persistence unit
+	 */
+	public static final String ADD_TO_PERSISTENCE_UNIT = "OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT";
+	
+	/**
+	 * Optional (unless ADD_TO_PERSISTENCE_UNIT property is true), type String, 
+	 * identifies the persistence unit to which to add a reference to the file
+	 */
+	public static final String PERSISTENCE_UNIT = "OrmFileCreationDataModelProperties.PERSISTENCE_UNIT";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationDataModelProvider.java
new file mode 100644
index 0000000..a8c27f1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationDataModelProvider.java
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+import java.util.Iterator;
+import java.util.Set;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.JPA;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+public class OrmFileCreationDataModelProvider
+	extends AbstractJpaFileCreationDataModelProvider
+	implements OrmFileCreationDataModelProperties
+{
+	/**
+	 * required default constructor
+	 */
+	public OrmFileCreationDataModelProvider() {
+		super();
+	}
+	
+	
+	@Override
+	public IDataModelOperation getDefaultOperation() {
+		return new OrmFileCreationOperation(getDataModel());
+	}
+	
+	@Override
+	public Set<String> getPropertyNames() {
+		@SuppressWarnings("unchecked")
+		Set<String> propertyNames = super.getPropertyNames();
+		propertyNames.add(DEFAULT_ACCESS);
+		propertyNames.add(ADD_TO_PERSISTENCE_UNIT);
+		propertyNames.add(PERSISTENCE_UNIT);
+		return propertyNames;
+	}
+	
+	@Override
+	public boolean isPropertyEnabled(String propertyName) {
+		if (propertyName.equals(PERSISTENCE_UNIT)) {
+			return getBooleanProperty(ADD_TO_PERSISTENCE_UNIT);
+		}
+		return super.isPropertyEnabled(propertyName);
+	}
+	
+	@Override
+	public Object getDefaultProperty(String propertyName) {
+		if (propertyName.equals(DEFAULT_ACCESS)) {
+			return null;
+		}
+		else if (propertyName.equals(ADD_TO_PERSISTENCE_UNIT)) {
+			return Boolean.FALSE;
+		}
+		else if (propertyName.equals(PERSISTENCE_UNIT)) {
+			PersistenceUnit pUnit = getDefaultPersistenceUnit();
+			if (pUnit != null) {
+				return pUnit.getName();
+			}
+		}
+		return super.getDefaultProperty(propertyName);
+	}
+	
+	@Override
+	protected String getDefaultFilePath() {
+		return new Path(JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH).toPortableString();
+	}
+	
+	@Override
+	protected String getDefaultVersion() {
+		if (getProject() == null) {
+			return null;
+		}
+		return JptCorePlugin.getJpaPlatform(getProject()).getMostRecentSupportedResourceType(
+				JptCorePlugin.ORM_XML_CONTENT_TYPE).getVersion();
+	}
+	
+	protected PersistenceUnit getDefaultPersistenceUnit() {
+		JpaProject jpaProject = getJpaProject();
+		if (jpaProject == null) {
+			return null;
+		}
+		PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
+		if (persistenceXml == null) {
+			return null;
+		}
+		Persistence persistence = persistenceXml.getPersistence();
+		if (persistence == null) {
+			return null;
+		}
+		if (persistence.persistenceUnitsSize() == 0) {
+			return null;
+		}
+		return persistence.persistenceUnits().next();
+	}
+	
+	@Override
+	public boolean propertySet(String propertyName, Object propertyValue) {
+		boolean ok = super.propertySet(propertyName, propertyValue);
+		if (propertyName.equals(PROJECT_NAME)) {
+			this.model.notifyPropertyChange(PERSISTENCE_UNIT, IDataModel.DEFAULT_CHG);
+			this.model.notifyPropertyChange(PERSISTENCE_UNIT, IDataModel.VALID_VALUES_CHG);
+		}
+		else if (propertyName.equals(ADD_TO_PERSISTENCE_UNIT)) {
+			this.model.notifyPropertyChange(PERSISTENCE_UNIT, IDataModel.ENABLE_CHG);
+		}
+		return ok;
+	}
+	
+	@Override
+	public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
+		if (propertyName.equals(DEFAULT_ACCESS)) {
+			DataModelPropertyDescriptor[] accessTypes = new DataModelPropertyDescriptor[3];
+			accessTypes[0] = accessPropertyDescriptor(null);
+			accessTypes[1] = accessPropertyDescriptor(AccessType.FIELD);
+			accessTypes[2] = accessPropertyDescriptor(AccessType.PROPERTY);
+			return accessTypes;
+		}
+		else if (propertyName.equals(PERSISTENCE_UNIT)) {
+			return ArrayTools.array(
+				new TransformationIterator<String, DataModelPropertyDescriptor>(new CompositeIterator<String>(null, persistenceUnitNames())) {
+					@Override
+					protected DataModelPropertyDescriptor transform(String next) {
+						return persistenceUnitPropertyDescriptor(next);
+					}
+				},
+				new DataModelPropertyDescriptor[0]);
+		}
+		return super.getValidPropertyDescriptors(propertyName);
+	}
+	
+	@Override
+	public DataModelPropertyDescriptor getPropertyDescriptor(String propertyName) {
+		if (propertyName.equals(DEFAULT_ACCESS)) {
+			return accessPropertyDescriptor((AccessType) getProperty(DEFAULT_ACCESS));
+		}
+		if (propertyName.equals(PERSISTENCE_UNIT)) {
+			return persistenceUnitPropertyDescriptor(getStringProperty(PERSISTENCE_UNIT));
+		}
+		return super.getPropertyDescriptor(propertyName);
+	}
+	
+	protected DataModelPropertyDescriptor accessPropertyDescriptor(AccessType accessType) {
+		if (accessType == null) {
+			return new DataModelPropertyDescriptor(null, JptCoreMessages.NONE);
+		}
+		return new DataModelPropertyDescriptor(accessType, accessType.getName());
+	}
+	
+	DataModelPropertyDescriptor persistenceUnitPropertyDescriptor(String persistenceUnitName) {
+		if (StringTools.stringIsEmpty(persistenceUnitName)) {
+			return new DataModelPropertyDescriptor(null, JptCoreMessages.NONE);
+		}
+		return new DataModelPropertyDescriptor(persistenceUnitName);
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	public IStatus validate(String propertyName) {
+		IStatus status = super.validate(propertyName);
+		if (! status.isOK()) {
+			return status;
+		}
+		
+		if (propertyName.equals(ADD_TO_PERSISTENCE_UNIT)
+				|| propertyName.equals(PERSISTENCE_UNIT)) {
+			status = validatePersistenceUnit();
+		}
+		if (! status.isOK()) {
+			return status;
+		}
+		
+		return Status.OK_STATUS;
+	}
+	
+	@Override
+	protected boolean fileVersionSupported(String fileVersion) {
+		return (fileVersion.equals(JPA.SCHEMA_VERSION)
+				|| fileVersion.equals(JPA2_0.SCHEMA_VERSION));
+	}
+	
+	@Override
+	protected boolean fileVersionSupportedForFacetVersion(String fileVersion, String jpaFacetVersion) {
+		if (jpaFacetVersion.equals(JptCorePlugin.JPA_FACET_VERSION_1_0)
+				&& fileVersion.equals(JPA2_0.SCHEMA_VERSION)) {
+			return false;
+		}
+		return true;
+	}
+	
+	protected IStatus validatePersistenceUnit() {
+		boolean addToPUnit = getBooleanProperty(ADD_TO_PERSISTENCE_UNIT);
+		String projectName = getStringProperty(PROJECT_NAME);
+		String pUnitName = getStringProperty(PERSISTENCE_UNIT);
+		if (addToPUnit) {
+			if (StringTools.stringIsEmpty(pUnitName)) {
+				return new Status(
+					IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+					NLS.bind(JptCoreMessages.VALIDATE_PERSISTENCE_UNIT_DOES_NOT_SPECIFIED, pUnitName));
+			}
+			if (getPersistenceUnit() == null) {
+				return new Status(
+					IStatus.ERROR, JptCorePlugin.PLUGIN_ID,
+					NLS.bind(JptCoreMessages.VALIDATE_PERSISTENCE_UNIT_NOT_IN_PROJECT, pUnitName, projectName));
+			}
+		}
+		return Status.OK_STATUS;
+	}
+	
+	
+	// **************** helper methods *****************************************
+	
+	protected PersistenceUnit getPersistenceUnit() {
+		String pUnitName = getStringProperty(PERSISTENCE_UNIT);
+		JpaProject jpaProject = 
+			(StringTools.stringIsEmpty(pUnitName)) ? null : getJpaProject();
+		PersistenceXml persistenceXml = 
+			(jpaProject == null) ? null : jpaProject.getRootContextNode().getPersistenceXml();
+		Persistence persistence = 
+			(persistenceXml == null) ? null : persistenceXml.getPersistence();
+		if (persistence != null) {
+			for (Iterator<PersistenceUnit> stream = persistence.persistenceUnits(); stream.hasNext(); ) {
+				PersistenceUnit next = stream.next();
+				if (pUnitName.equals(next.getName())) {
+					return next;
+				}
+			}
+		}
+		return null;
+	}
+	
+	protected Iterator<PersistenceUnit> persistenceUnits() {
+		//only get the persistence units for the selected JpaProject, 
+		//if no jpa project is selected, then no persistence units will be listed in the combo
+		JpaProject jpaProject = getJpaProject();
+		PersistenceXml persistenceXml = (jpaProject == null) ? null : jpaProject.getRootContextNode().getPersistenceXml();
+		Persistence persistence = (persistenceXml == null) ? null : persistenceXml.getPersistence();
+		return (persistence == null) ? EmptyIterator.<PersistenceUnit>instance() : persistence.persistenceUnits();
+	}
+	
+	protected Iterator<String> persistenceUnitNames() {
+		return new TransformationIterator<PersistenceUnit, String>(persistenceUnits()) {
+			@Override
+			protected String transform(PersistenceUnit next) {
+				return next.getName();
+			}
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationOperation.java
new file mode 100644
index 0000000..17a63ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/OrmFileCreationOperation.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+import java.util.Iterator;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.internal.resource.orm.OrmXmlResourceProvider;
+import org.eclipse.jpt.core.resource.AbstractXmlResourceProvider;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+public class OrmFileCreationOperation
+	extends AbstractJpaFileCreationOperation
+	implements OrmFileCreationDataModelProperties
+{
+	public OrmFileCreationOperation(IDataModel dataModel) {
+		super(dataModel);
+	}
+	
+	
+	@Override
+	public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+		IStatus status = super.execute(monitor, info);
+		
+		if (status.isOK()) {
+			addMappingFileToPersistenceXml();
+		}
+		
+		return OK_STATUS;
+	}
+	
+	protected PersistenceUnit getPersistenceUnit() throws ExecutionException {
+		String pUnitName = getDataModel().getStringProperty(PERSISTENCE_UNIT);
+		JpaProject jpaProject = getJpaProject();
+		PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
+		if (persistenceXml == null) {
+			throw new ExecutionException("Project does not have a persistence.xml file"); //$NON-NLS-1$
+		}
+		Persistence persistence = persistenceXml.getPersistence();
+		if (persistence == null) {
+			throw new ExecutionException("persistence.xml does not have a persistence node."); //$NON-NLS-1$
+		}
+		for (Iterator<PersistenceUnit> stream = persistence.persistenceUnits(); stream.hasNext(); ) {
+			PersistenceUnit pUnit = stream.next();
+			if (pUnitName.equals(pUnit.getName())) {
+				return pUnit;
+			}
+		}
+		throw new ExecutionException("persistence.xml does not have persistence unit named \'" + pUnitName + "\'"); //$NON-NLS-1$
+	}
+	
+	protected void addMappingFileToPersistenceXml() throws ExecutionException {
+		if (! getDataModel().getBooleanProperty(ADD_TO_PERSISTENCE_UNIT)) {
+			return;
+		}
+		JpaProject jpaProject = JptCorePlugin.getJpaProject(this.createdFile.getProject());
+		JpaXmlResource resource = jpaProject.getPersistenceXmlResource();
+	
+		final PersistenceUnit pUnit = getPersistenceUnit();
+		
+		resource.modify(new Runnable() {
+			public void run() {
+				String filePath = getDataModel().getStringProperty(FILE_PATH);
+				for (Iterator<MappingFileRef> stream = pUnit.specifiedMappingFileRefs(); stream.hasNext(); ) {
+					if (filePath.equals(stream.next().getFileName())) {
+						return;
+					}
+				}
+				MappingFileRef mfRef = pUnit.addSpecifiedMappingFileRef();
+				mfRef.setFileName(new Path(filePath).toPortableString());
+			}
+		});
+	}
+	
+	@Override
+	protected AbstractXmlResourceProvider getXmlResourceProvider(IFile file) {
+		return OrmXmlResourceProvider.getXmlResourceProvider(file);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationDataModelProperties.java
new file mode 100644
index 0000000..6d9c257
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationDataModelProperties.java
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+public interface PersistenceFileCreationDataModelProperties
+	extends JpaFileCreationDataModelProperties
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationDataModelProvider.java
new file mode 100644
index 0000000..9ff6f9c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationDataModelProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.persistence.JPA;
+import org.eclipse.jpt.core.resource.persistence.v2_0.JPA2_0;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+
+public class PersistenceFileCreationDataModelProvider
+	extends AbstractJpaFileCreationDataModelProvider
+	implements PersistenceFileCreationDataModelProperties
+{
+	/**
+	 * required default constructor
+	 */
+	public PersistenceFileCreationDataModelProvider() {
+		super();
+	}
+	
+	
+	@Override
+	public IDataModelOperation getDefaultOperation() {
+		return new PersistenceFileCreationOperation(getDataModel());
+	}
+	
+	@Override
+	protected String getDefaultFilePath() {
+		return new Path(JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATH).toPortableString();
+	}
+	
+	@Override
+	protected String getDefaultVersion() {
+		if (getProject() == null) {
+			return null;
+		}
+		return JptCorePlugin.getJpaPlatform(getProject()).getMostRecentSupportedResourceType(
+				JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE).getVersion();
+	}
+	
+	
+	// **************** validation *********************************************
+	
+	@Override
+	protected boolean fileVersionSupported(String fileVersion) {
+		return (fileVersion.equals(JPA.SCHEMA_VERSION)
+				|| fileVersion.equals(JPA2_0.SCHEMA_VERSION));
+	}
+	
+	@Override
+	protected boolean fileVersionSupportedForFacetVersion(String fileVersion, String jpaFacetVersion) {
+		if (jpaFacetVersion.equals(JptCorePlugin.JPA_FACET_VERSION_1_0)
+				&& fileVersion.equals(JPA2_0.SCHEMA_VERSION)) {
+			return false;
+		}
+		return true;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationOperation.java
new file mode 100644
index 0000000..e98e331
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/operations/PersistenceFileCreationOperation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.operations;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jpt.core.internal.resource.persistence.PersistenceXmlResourceProvider;
+import org.eclipse.jpt.core.resource.AbstractXmlResourceProvider;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+public class PersistenceFileCreationOperation
+	extends AbstractJpaFileCreationOperation
+	implements PersistenceFileCreationDataModelProperties
+{
+	public PersistenceFileCreationOperation(IDataModel dataModel) {
+		super(dataModel);
+	}
+	
+	
+	@Override
+	protected AbstractXmlResourceProvider getXmlResourceProvider(IFile file) {
+		return PersistenceXmlResourceProvider.getXmlResourceProvider(file);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/prefs/JpaPreferenceInitializer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/prefs/JpaPreferenceInitializer.java
new file mode 100644
index 0000000..fda01b3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/prefs/JpaPreferenceInitializer.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.prefs;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jpt.core.JptCorePlugin;
+
+/**
+ * Class used to initialize default preference values.
+ * See <code>org.eclipse.core.runtime.preferences</code> extension point.
+ */
+public class JpaPreferenceInitializer
+	extends AbstractPreferenceInitializer 
+{
+	@Override
+	public void initializeDefaultPreferences() {
+		JptCorePlugin.initializeDefaultPreferences();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/contenttypes/IndeterminateContentDescriber.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/contenttypes/IndeterminateContentDescriber.java
new file mode 100644
index 0000000..79cd893
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/contenttypes/IndeterminateContentDescriber.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.contenttypes;
+
+import java.io.InputStream;
+import java.io.Reader;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.ITextContentDescriber;
+
+/**
+ * This class simply returns INDETERMINATE for any contents it receives.
+ * 
+ * It is used currently for org.eclipse.jpt.core.content.baseJpaContent in order
+ * to make that content type act as an "abstract" content type.
+ * 
+ * This is in its own package so that it can be excluded from bundle activation in the plugin.xml.
+ * Content describers must be self-contained and not trigger auto-activation.
+ */
+public class IndeterminateContentDescriber implements ITextContentDescriber
+{
+	public int describe(InputStream contents, IContentDescription description) {
+		return INDETERMINATE;
+	}
+	
+	public int describe(Reader contents, IContentDescription description) {
+		return INDETERMINATE;
+	}
+	
+	public QualifiedName[] getSupportedOptions() {
+		return new QualifiedName[0];
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AbstractJavaResourceNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AbstractJavaResourceNode.java
new file mode 100644
index 0000000..f047f4d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AbstractJavaResourceNode.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.utility.internal.model.AbstractModel;
+import org.eclipse.jpt.utility.internal.model.CallbackChangeSupport;
+import org.eclipse.jpt.utility.internal.model.ChangeSupport;
+
+/**
+ * Java resource containment hierarchy
+ */
+public abstract class AbstractJavaResourceNode
+	extends AbstractModel
+	implements JavaResourceNode
+{
+	protected final JavaResourceNode parent;
+
+
+	// ********** constructor **********
+	
+	protected AbstractJavaResourceNode(JavaResourceNode parent) {
+		super();
+		this.checkParent(parent);
+		this.parent = parent;
+	}
+
+
+	// ********** parent **********
+
+	protected void checkParent(JavaResourceNode p) {
+		if (p == null) {
+			if (this.requiresParent()) {
+				throw new IllegalArgumentException("'parent' cannot be null"); //$NON-NLS-1$
+			}
+		} else {
+			if (this.forbidsParent()) {
+				throw new IllegalArgumentException("'parent' must be null"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	protected boolean requiresParent() {
+		return true;
+	}
+
+	protected boolean forbidsParent() {
+		return ! this.requiresParent();  // assume 'parent' is not optional
+	}
+
+
+	// ********** change support callback hook **********
+
+	@Override
+	protected final ChangeSupport buildChangeSupport() {
+		return new CallbackChangeSupport(this, this.buildChangeSupportListener());
+	}
+
+	private CallbackChangeSupport.Listener buildChangeSupportListener() {
+		return new CallbackChangeSupport.Listener() {
+			public void aspectChanged(String aspectName) {
+				AbstractJavaResourceNode.this.aspectChanged(aspectName);
+			}
+		};
+	}
+
+	/**
+	 * ignore the aspect name, we notify listeners of *every* change
+	 */
+	protected void aspectChanged(@SuppressWarnings("unused") String aspectName) {
+		this.getRoot().resourceModelChanged();
+	}
+
+
+	// ********** JavaResourceNode implementation **********
+
+	/**
+	 * @see org.eclipse.jpt.core.internal.resource.java.source.SourceCompilationUnit#getRoot()
+	 * @see org.eclipse.jpt.core.internal.resource.java.binary.BinaryPackageFragmentRoot#getRoot()
+	 * @see org.eclipse.jpt.core.internal.resource.java.binary.BinaryPersistentTypeCache#getRoot()
+	 */
+	public Root getRoot() {
+		return this.parent.getRoot();
+	}
+
+	public IFile getFile() {
+		return this.getRoot().getFile();
+	}
+
+
+	// ********** convenience methods **********
+
+	protected JpaAnnotationProvider getAnnotationProvider() {
+		return this.getRoot().getAnnotationProvider();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
new file mode 100644
index 0000000..9fc26e3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinaryAssociationOverride1_0Annotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceAssociationOverride1_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public final class AssociationOverrideAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new AssociationOverrideAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private AssociationOverrideAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceAssociationOverride1_0Annotation.buildAssociationOverride(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAssociationOverride1_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return AssociationOverrideAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
new file mode 100644
index 0000000..2fd18af
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinaryAssociationOverrides1_0Annotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceAssociationOverrides1_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public final class AssociationOverridesAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new AssociationOverridesAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private AssociationOverridesAnnotationDefinition() {
+		super();
+	}
+
+	public AssociationOverridesAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceAssociationOverrides1_0Annotation(parent, member);
+	}
+
+	public AssociationOverridesAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAssociationOverrides1_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return AssociationOverridesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
new file mode 100644
index 0000000..03b83f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAttributeOverrideAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AttributeOverride
+ */
+public final class AttributeOverrideAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new AttributeOverrideAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private AttributeOverrideAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceAttributeOverrideAnnotation.buildAttributeOverride(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAttributeOverrideAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return AttributeOverrideAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
new file mode 100644
index 0000000..27c8986
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryAttributeOverridesAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAttributeOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.AttributeOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AttributeOverrides
+ */
+public final class AttributeOverridesAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new AttributeOverridesAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private AttributeOverridesAnnotationDefinition() {
+		super();
+	}
+
+	public AttributeOverridesAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceAttributeOverridesAnnotation(parent, member);
+	}
+
+	public AttributeOverridesAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryAttributeOverridesAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return AttributeOverridesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java
new file mode 100644
index 0000000..989aa71
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryBasicAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceBasicAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Basic
+ */
+public final class BasicAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new BasicAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private BasicAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceBasicAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullBasicAnnotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryBasicAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return BasicAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java
new file mode 100644
index 0000000..219c987
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryColumnAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Column
+ */
+public final class ColumnAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new ColumnAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private ColumnAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceColumnAnnotation(parent, member, SourceColumnAnnotation.MAPPING_DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullColumnAnnotation(parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryColumnAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ColumnAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
new file mode 100644
index 0000000..503bc03
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryDiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceDiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.DiscriminatorColumn
+ */
+public final class DiscriminatorColumnAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new DiscriminatorColumnAnnotationDefinition();
+
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private DiscriminatorColumnAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return DiscriminatorColumnAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
new file mode 100644
index 0000000..449ccda
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryDiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceDiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.DiscriminatorValue
+ */
+public final class DiscriminatorValueAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new DiscriminatorValueAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private DiscriminatorValueAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceDiscriminatorValueAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullDiscriminatorValueAnnotation((JavaResourcePersistentType) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryDiscriminatorValueAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return DiscriminatorValueAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java
new file mode 100644
index 0000000..fd7dbfa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryEmbeddableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceEmbeddableAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.EmbeddableAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Embeddable
+ */
+public final class EmbeddableAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new EmbeddableAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private EmbeddableAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceEmbeddableAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryEmbeddableAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return EmbeddableAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java
new file mode 100644
index 0000000..1a3889f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryEmbeddedAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceEmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Embedded
+ */
+public final class EmbeddedAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new EmbeddedAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private EmbeddedAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceEmbeddedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullEmbeddedAnnotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryEmbeddedAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return EmbeddedAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
new file mode 100644
index 0000000..7413752
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryEmbeddedIdAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceEmbeddedIdAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.EmbeddedIdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.EmbeddedId
+ */
+public final class EmbeddedIdAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new EmbeddedIdAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private EmbeddedIdAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceEmbeddedIdAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryEmbeddedIdAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return EmbeddedIdAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java
new file mode 100644
index 0000000..7c4f432
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryEntityAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceEntityAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.EntityAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Entity
+ */
+public final class EntityAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new EntityAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private EntityAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceEntityAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryEntityAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return EntityAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java
new file mode 100644
index 0000000..f5e9c49
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryEnumeratedAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceEnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Enumerated
+ */
+public final class EnumeratedAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new EnumeratedAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private EnumeratedAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceEnumeratedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+	
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullEnumeratedAnnotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryEnumeratedAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+	
+	public String getAnnotationName() {
+		return EnumeratedAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
new file mode 100644
index 0000000..0b537e4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryGeneratedValueAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceGeneratedValueAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.GeneratedValue
+ */
+public final class GeneratedValueAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new GeneratedValueAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private GeneratedValueAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceGeneratedValueAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+	
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryGeneratedValueAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+	
+	public String getAnnotationName() {
+		return GeneratedValueAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java
new file mode 100644
index 0000000..12ebf03
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryIdAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceIdAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.IdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Id
+ */
+public final class IdAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new IdAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private IdAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceIdAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryIdAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return IdAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java
new file mode 100644
index 0000000..1f7bec2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryIdClassAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceIdClassAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.IdClassAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.IdClass
+ */
+public final class IdClassAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new IdClassAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private IdClassAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceIdClassAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryIdClassAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return IdClassAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java
new file mode 100644
index 0000000..297ae12
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryInheritanceAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceInheritanceAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Inheritance
+ */
+public final class InheritanceAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new InheritanceAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private InheritanceAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceInheritanceAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullInheritanceAnnotation((JavaResourcePersistentType) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryInheritanceAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return InheritanceAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java
new file mode 100644
index 0000000..c2c248a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.JoinColumn
+ */
+public final class JoinColumnAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new JoinColumnAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private JoinColumnAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceJoinColumnAnnotation.createJoinColumn(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryJoinColumnAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return JoinColumnAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
new file mode 100644
index 0000000..1c00f40
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinColumnsAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinColumnsAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JoinColumnsAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.JoinColumns
+ */
+public final class JoinColumnsAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new JoinColumnsAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private JoinColumnsAnnotationDefinition() {
+		super();
+	}
+
+	public JoinColumnsAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceJoinColumnsAnnotation(parent, member);
+	}
+
+	public JoinColumnsAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryJoinColumnsAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return JoinColumnsAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java
new file mode 100644
index 0000000..a58445e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinTableAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.JoinTable
+ */
+public final class JoinTableAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new JoinTableAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private JoinTableAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceJoinTableAnnotation(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullJoinTableAnnotation(parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryJoinTableAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return JoinTableAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java
new file mode 100644
index 0000000..fc4536f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryLobAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceLobAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.LobAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Lob
+ */
+public final class LobAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new LobAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private LobAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceLobAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryLobAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return LobAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java
new file mode 100644
index 0000000..a10d93f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryManyToManyAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceManyToManyAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.ManyToManyAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.ManyToMany
+ */
+public final class ManyToManyAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new ManyToManyAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private ManyToManyAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceManyToManyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryManyToManyAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ManyToManyAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java
new file mode 100644
index 0000000..140d797
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryManyToOneAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceManyToOneAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.ManyToOne
+ */
+public final class ManyToOneAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new ManyToOneAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private ManyToOneAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceManyToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryManyToOneAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ManyToOneAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java
new file mode 100644
index 0000000..a104c70
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryMapKeyAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceMapKeyAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.MapKey
+ */
+public final class MapKeyAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MapKeyAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MapKeyAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMapKeyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMapKeyAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MapKeyAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
new file mode 100644
index 0000000..c6452c9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryMappedSuperclassAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceMappedSuperclassAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.MappedSuperclassAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.MappedSuperclass
+ */
+public final class MappedSuperclassAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new MappedSuperclassAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private MappedSuperclassAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceMappedSuperclassAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryMappedSuperclassAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return MappedSuperclassAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
new file mode 100644
index 0000000..21d55cb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedNativeQueriesAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedNativeQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueriesAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedNativeQueries
+ */
+public final class NamedNativeQueriesAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new NamedNativeQueriesAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NamedNativeQueriesAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceNamedNativeQueriesAnnotation(parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryNamedNativeQueriesAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return NamedNativeQueriesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
new file mode 100644
index 0000000..db6d640
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedNativeQuery
+ */
+public final class NamedNativeQueryAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new NamedNativeQueryAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NamedNativeQueryAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceNamedNativeQueryAnnotation.createNamedNativeQuery(parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryNamedNativeQueryAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return NamedNativeQueryAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
new file mode 100644
index 0000000..ef71eec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinaryNamedQueries1_0Annotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueries1_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public final class NamedQueriesAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new NamedQueriesAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NamedQueriesAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceNamedQueries1_0Annotation(parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryNamedQueries1_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return NamedQueriesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java
new file mode 100644
index 0000000..9685560
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinaryNamedQuery1_0Annotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceNamedQuery1_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public final class NamedQueryAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new NamedQueryAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NamedQueryAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceNamedQuery1_0Annotation(parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryNamedQuery1_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return NamedQueryAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullAnnotation.java
new file mode 100644
index 0000000..f2036b0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullAnnotation.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Simplify null annotation classes
+ */
+public abstract class NullAnnotation
+	extends AbstractJavaResourceNode
+	implements Annotation
+{
+
+	protected NullAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+	
+	public void initialize(CompilationUnit astRoot) {
+		// do nothing
+	}
+
+	public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public JavaResourceCompilationUnit getJavaResourceCompilationUnit() {
+		throw new UnsupportedOperationException();
+	}
+
+	public void newAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	/**
+	 * Convenience method: Cast the annotation's parent to a
+	 * persistent member.
+	 */
+	protected JavaResourcePersistentMember getMember() {
+		return (JavaResourcePersistentMember) this.parent;
+	}
+	
+	/**
+	 * Convenience method: Add the type or attribute's annotation
+	 * and return it.
+	 * Pre-condition: The annotation's parent must be a persistent member
+	 * (type or attribute).
+	 */
+	protected Annotation addAnnotation() {
+		return this.getMember().addAnnotation(this.getAnnotationName());
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java
new file mode 100644
index 0000000..85f0c6f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullAttributeOverrideColumnAnnotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+
+/**
+ * javax.persistence.Column
+ */
+public class NullAttributeOverrideColumnAnnotation
+	extends NullColumnAnnotation
+{
+	public NullAttributeOverrideColumnAnnotation(AttributeOverrideAnnotation parent) {
+		super(parent);
+	}
+
+	private AttributeOverrideAnnotation getAttributeOverrideAnnotation() {
+		return (AttributeOverrideAnnotation) this.parent;
+	}
+
+	@Override
+	protected ColumnAnnotation addAnnotation() {
+		return this.getAttributeOverrideAnnotation().addColumn();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBaseColumnAnnotation.java
new file mode 100644
index 0000000..477b7f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBaseColumnAnnotation.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BaseColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Column
+ * javax.persistence.JoinColumn
+ */
+public abstract class NullBaseColumnAnnotation
+	extends NullNamedColumnAnnotation
+	implements BaseColumnAnnotation
+{
+	protected NullBaseColumnAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	@Override
+	protected BaseColumnAnnotation addAnnotation() {
+		return (BaseColumnAnnotation) super.addAnnotation();
+	}
+
+	// ***** table
+	public String getTable() {
+		return null;
+	}
+
+	public void setTable(String table) {
+		if (table != null) {
+			this.addAnnotation().setTable(table);
+		}
+	}
+
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean tableTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+	// ***** unique
+	public Boolean getUnique() {
+		return null;
+	}
+
+	public void setUnique(Boolean unique) {
+		if (unique != null) {
+			this.addAnnotation().setUnique(unique);
+		}
+	}
+
+	public TextRange getUniqueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** updatable
+	public Boolean getUpdatable() {
+		return null;
+	}
+
+	public void setUpdatable(Boolean updatable) {
+		if (updatable != null) {
+			this.addAnnotation().setUpdatable(updatable);
+		}
+	}
+
+	public TextRange getUpdatableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** insertable
+	public Boolean getInsertable() {
+		return null;
+	}
+
+	public void setInsertable(Boolean insertable) {
+		if (insertable != null) {
+			this.addAnnotation().setInsertable(insertable);
+		}
+	}
+
+	public TextRange getInsertableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** nullable
+	public Boolean getNullable() {
+		return null;
+	}
+
+	public void setNullable(Boolean nullable) {
+		if (nullable != null) {
+			this.addAnnotation().setNullable(nullable);
+		}
+	}
+
+	public TextRange getNullableTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBaseTableAnnotation.java
new file mode 100644
index 0000000..93160b0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBaseTableAnnotation.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BaseTableAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+
+/**
+ * javax.persistence.Table
+ * javax.persistence.JoinTable
+ */
+public abstract class NullBaseTableAnnotation
+	extends NullAnnotation
+	implements BaseTableAnnotation
+{
+	protected NullBaseTableAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+	
+	@Override
+	protected BaseTableAnnotation addAnnotation() {
+		return (BaseTableAnnotation) super.addAnnotation();
+	}
+	
+	public boolean isSpecified() {
+		return false;
+	}
+	
+	// ***** name
+	public String getName() {
+		return null;
+	}
+
+	public void setName(String name) {
+		if (name != null) {
+			this.addAnnotation().setName(name);
+		}
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+	// ***** schema
+	public String getSchema() {
+		return null;
+	}
+
+	public void setSchema(String schema) {
+		if (schema != null) {
+			this.addAnnotation().setSchema(schema);
+		}
+	}
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+	// ***** catalog
+	public String getCatalog() {
+		return null;
+	}
+
+	public void setCatalog(String catalog) {
+		if (catalog != null) {
+			this.addAnnotation().setCatalog(catalog);
+		}
+	}
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+	// ***** unique constraints
+	public ListIterator<UniqueConstraintAnnotation> uniqueConstraints() {
+		return EmptyListIterator.instance();
+	}
+
+	public int uniqueConstraintsSize() {
+		return 0;
+	}
+
+	public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint) {
+		throw new UnsupportedOperationException();
+	}
+
+	public UniqueConstraintAnnotation addUniqueConstraint(int index) {
+		return this.addAnnotation().addUniqueConstraint(index);
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeUniqueConstraint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBasicAnnotation.java
new file mode 100644
index 0000000..0e16de1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullBasicAnnotation.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * null javax.persistence.Basic
+ */
+public final class NullBasicAnnotation
+	extends NullAnnotation
+	implements BasicAnnotation
+{
+	protected NullBasicAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+	
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected BasicAnnotation addAnnotation() {
+		return (BasicAnnotation) super.addAnnotation();
+	}
+	
+	
+	// ***** fetch
+	
+	public FetchType getFetch() {
+		return null;
+	}
+	
+	public void setFetch(FetchType fetch) {
+		if (fetch != null) {
+			this.addAnnotation().setFetch(fetch);
+		}
+	}
+	
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	
+	// ***** optional
+	
+	public Boolean getOptional() {
+		return null;
+	}
+	
+	public void setOptional(Boolean optional) {
+		if (optional != null) {
+			this.addAnnotation().setOptional(optional);
+		}
+	}
+	
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullColumnAnnotation.java
new file mode 100644
index 0000000..3bf5452
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullColumnAnnotation.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Column
+ */
+public class NullColumnAnnotation
+	extends NullBaseColumnAnnotation
+	implements ColumnAnnotation
+{
+	public NullColumnAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected ColumnAnnotation addAnnotation() {
+		return (ColumnAnnotation) super.addAnnotation();
+	}
+
+	// ***** length
+	public Integer getLength() {
+		return null;
+	}
+
+	public void setLength(Integer length) {
+		if (length != null) {
+			this.addAnnotation().setLength(length);
+		}
+	}
+
+	public TextRange getLengthTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** scale
+	public Integer getScale() {
+		return null;
+	}
+
+	public void setScale(Integer scale) {
+		if (scale != null) {
+			this.addAnnotation().setScale(scale);
+		}
+	}
+
+	public TextRange getScaleTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** precision
+	public Integer getPrecision() {
+		return null;
+	}
+
+	public void setPrecision(Integer precision) {
+		if (precision != null) {
+			this.addAnnotation().setPrecision(precision);
+		}
+	}
+
+	public TextRange getPrecisionTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java
new file mode 100644
index 0000000..126ad60
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullDiscriminatorColumnAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.DiscriminatorType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * javax.persistence.DiscriminatorColumn
+ */
+public final class NullDiscriminatorColumnAnnotation
+	extends NullNamedColumnAnnotation
+	implements DiscriminatorColumnAnnotation
+{	
+	public NullDiscriminatorColumnAnnotation(JavaResourcePersistentType parent) {
+		super(parent);
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected DiscriminatorColumnAnnotation addAnnotation() {
+		return (DiscriminatorColumnAnnotation) super.addAnnotation();
+	}
+
+	// ***** discriminator type
+	public DiscriminatorType getDiscriminatorType() {
+		return null;
+	}
+
+	public void setDiscriminatorType(DiscriminatorType discriminatorType) {
+		if (discriminatorType != null) {
+			this.addAnnotation().setDiscriminatorType(discriminatorType);
+		}
+	}
+
+	// ***** length
+	public Integer getLength() {
+		return null;
+	}
+
+	public void setLength(Integer length) {
+		if (length != null) {
+			this.addAnnotation().setLength(length);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullDiscriminatorValueAnnotation.java
new file mode 100644
index 0000000..7a68d3d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullDiscriminatorValueAnnotation.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.DiscriminatorValue
+ */
+public final class NullDiscriminatorValueAnnotation
+	extends NullAnnotation
+	implements DiscriminatorValueAnnotation
+{
+
+	protected NullDiscriminatorValueAnnotation(JavaResourcePersistentType parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected DiscriminatorValueAnnotation addAnnotation() {
+		return (DiscriminatorValueAnnotation) super.addAnnotation();
+	}
+	
+	// ***** value
+	public String getValue() {
+		return null;
+	}
+
+	public void setValue(String value) {
+		if (value != null) {
+			this.addAnnotation().setValue(value);
+		}
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullEmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullEmbeddedAnnotation.java
new file mode 100644
index 0000000..029d2a6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullEmbeddedAnnotation.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.Embedded
+ */
+public final class NullEmbeddedAnnotation
+	extends NullAnnotation
+	implements EmbeddedAnnotation
+{	
+	protected NullEmbeddedAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullEnumeratedAnnotation.java
new file mode 100644
index 0000000..1e45dd5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullEnumeratedAnnotation.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.EnumType;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Enumerated
+ */
+public final class NullEnumeratedAnnotation
+	extends NullAnnotation
+	implements EnumeratedAnnotation
+{
+	protected NullEnumeratedAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected EnumeratedAnnotation addAnnotation() {
+		return (EnumeratedAnnotation) super.addAnnotation();
+	}
+
+	// ***** value
+	public EnumType getValue() {
+		return null;
+	}
+
+	public void setValue(EnumType value) {
+		if (value != null) {
+			this.addAnnotation().setValue(value);
+		}		
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullInheritanceAnnotation.java
new file mode 100644
index 0000000..a4130b1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullInheritanceAnnotation.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
+import org.eclipse.jpt.core.resource.java.InheritanceType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Inheritance
+ */
+public final class NullInheritanceAnnotation
+	extends NullAnnotation
+	implements InheritanceAnnotation
+{
+	protected NullInheritanceAnnotation(JavaResourcePersistentType parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected InheritanceAnnotation addAnnotation() {
+		return (InheritanceAnnotation) super.addAnnotation();
+	}
+
+	// ***** strategy
+	public InheritanceType getStrategy() {
+		return null;
+	}
+
+	public void setStrategy(InheritanceType strategy) {
+		if (strategy != null) {
+			this.addAnnotation().setStrategy(strategy);
+		}
+	}
+
+	public TextRange getStrategyTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullJoinColumnAnnotation.java
new file mode 100644
index 0000000..32c74fa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullJoinColumnAnnotation.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.JoinColumn
+ */
+public final class NullJoinColumnAnnotation
+	extends NullBaseColumnAnnotation
+	implements JoinColumnAnnotation
+{	
+	public NullJoinColumnAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected JoinColumnAnnotation addAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** referenced column name
+	public String getReferencedColumnName() {
+		return null;
+	}
+
+	public void setReferencedColumnName(String referencedColumnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullJoinTableAnnotation.java
new file mode 100644
index 0000000..2f678c8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullJoinTableAnnotation.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+
+/**
+ * javax.persistence.JoinTable
+ */
+public class NullJoinTableAnnotation
+	extends NullBaseTableAnnotation
+	implements JoinTableAnnotation
+{	
+	public NullJoinTableAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected JoinTableAnnotation addAnnotation() {
+		return (JoinTableAnnotation) super.addAnnotation();
+	}
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return EmptyListIterator.instance();
+	}
+
+	public int joinColumnsSize() {
+		return 0;
+	}
+
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return null;
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		throw new UnsupportedOperationException();
+	}
+
+	public JoinColumnAnnotation addJoinColumn(int index) {
+		// the JoinTable annotation is missing, add both it and a join column at the same time
+		return this.addAnnotation().addJoinColumn(index);
+	}
+	
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** inverse join columns
+	public ListIterator<JoinColumnAnnotation> inverseJoinColumns() {
+		return EmptyListIterator.instance();
+	}
+
+	public int inverseJoinColumnsSize() {
+		return 0;
+	}
+
+	public JoinColumnAnnotation inverseJoinColumnAt(int index) {
+		return null;
+	}
+
+	public int indexOfInverseJoinColumn(JoinColumnAnnotation joinColumn) {
+		throw new UnsupportedOperationException();
+	}
+
+	public JoinColumnAnnotation addInverseJoinColumn(int index) {
+		// the JoinTable annotation is missing, add both it and a join column at the same time
+		return this.addAnnotation().addInverseJoinColumn(index);
+	}
+	
+	public void moveInverseJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeInverseJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullNamedColumnAnnotation.java
new file mode 100644
index 0000000..0ae2b8c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullNamedColumnAnnotation.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Column
+ * javax.persistence.JoinColumn
+ * javax.persistence.DiscriminatorColumn
+ * javax.persistence.PrimaryKeyJoinColumn.
+ */
+public abstract class NullNamedColumnAnnotation
+	extends NullAnnotation
+	implements NamedColumnAnnotation
+{
+	protected NullNamedColumnAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public boolean isSpecified() {
+		return false;
+	}
+	
+	@Override
+	protected NamedColumnAnnotation addAnnotation() {
+		return (NamedColumnAnnotation) super.addAnnotation();
+	}
+	
+	// ***** name
+	public String getName() {
+		return null;
+	}
+
+	public void setName(String name) {
+		if (name != null) {
+			this.addAnnotation().setName(name);
+		}	
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+	// ***** column definition
+	public String getColumnDefinition() {
+		return null;
+	}
+
+	public void setColumnDefinition(String columnDefinition) {
+		if (columnDefinition != null) {
+			this.addAnnotation().setColumnDefinition(columnDefinition);
+		}	
+	}
+
+	public TextRange getColumnDefinitionTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOneToManyAnnotation.java
new file mode 100644
index 0000000..e8970e7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOneToManyAnnotation.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OneToMany
+ */
+public final class NullOneToManyAnnotation
+	extends NullOwnableRelationshipMappingAnnotation
+	implements OneToMany2_0Annotation
+{
+	public NullOneToManyAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** JPA 2.0 - OrphanRemovable2_0 implementation **********
+	public Boolean getOrphanRemoval() {
+		return null;
+	}
+
+	public void setOrphanRemoval(Boolean orphanRemoval) {
+		if (orphanRemoval != null) {
+			this.addAnnotation().setOrphanRemoval(orphanRemoval);
+		}
+	}
+
+	public TextRange getOrphanRemovalTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	@Override
+	protected OneToMany2_0Annotation addAnnotation() {
+		return (OneToMany2_0Annotation) super.addAnnotation();
+	}
+	
+	// ***** cascade detach - JPA 2.0
+	
+	public boolean isCascadeDetach() {
+		return false;
+	}
+	
+	public void setCascadeDetach(boolean detach) {
+		this.addAnnotation().setCascadeDetach(detach);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOneToOneAnnotation.java
new file mode 100644
index 0000000..2cd39e4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOneToOneAnnotation.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OneToOne
+ */
+public final class NullOneToOneAnnotation
+	extends NullOwnableRelationshipMappingAnnotation
+	implements OneToOne2_0Annotation
+{
+	public NullOneToOneAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected OneToOne2_0Annotation addAnnotation() {
+		return (OneToOne2_0Annotation) super.addAnnotation();
+	}
+
+	// ***** optional
+	public Boolean getOptional() {
+		return null;
+	}
+
+	public void setOptional(Boolean optional) {
+		if (optional != null) {
+			this.addAnnotation().setOptional(optional);
+		}
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ********** JPA 2.0 - OrphanRemovable2_0 implementation **********
+	public Boolean getOrphanRemoval() {
+		return null;
+	}
+
+	public void setOrphanRemoval(Boolean orphanRemoval) {
+		if (orphanRemoval != null) {
+			this.addAnnotation().setOrphanRemoval(orphanRemoval);
+		}
+	}
+
+	public TextRange getOrphanRemovalTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+	// ***** cascade detach - JPA 2.0
+	
+	public boolean isCascadeDetach() {
+		return false;
+	}
+	
+	public void setCascadeDetach(boolean detach) {
+		this.addAnnotation().setCascadeDetach(detach);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOwnableRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOwnableRelationshipMappingAnnotation.java
new file mode 100644
index 0000000..dd29a04
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullOwnableRelationshipMappingAnnotation.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.OwnableRelationshipMappingAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OneToMany
+ * javax.persistence.OneToOne
+ */
+public abstract class NullOwnableRelationshipMappingAnnotation
+	extends NullAnnotation
+	implements OwnableRelationshipMappingAnnotation
+{
+	protected NullOwnableRelationshipMappingAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+	
+	
+	@Override
+	protected OwnableRelationshipMappingAnnotation addAnnotation() {
+		return (OwnableRelationshipMappingAnnotation) super.addAnnotation();
+	}
+	
+	
+	// ***** target entity
+	
+	public String getTargetEntity() {
+		return null;
+	}
+	
+	public void setTargetEntity(String targetEntity) {
+		if (targetEntity != null) {
+			this.addAnnotation().setTargetEntity(targetEntity);
+		}
+	}
+	
+	public TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	
+	// ***** fully-qualified target entity class name
+	
+	public String getFullyQualifiedTargetEntityClassName() {
+		return null;
+	}
+	
+	
+	// ***** mapped by
+	
+	public String getMappedBy() {
+		return null;
+	}
+	
+	public void setMappedBy(String mappedBy) {
+		if (mappedBy != null) {
+			this.addAnnotation().setMappedBy(mappedBy);
+		}
+	}
+	
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+	
+	
+	// ***** fetch
+	
+	public FetchType getFetch() {
+		return null;
+	}
+	
+	public void setFetch(FetchType fetch) {
+		if (fetch != null) {
+			this.addAnnotation().setFetch(fetch);
+		}
+	}
+	
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	
+	// ***** cascade all
+	
+	public boolean isCascadeAll() {
+		return false;
+	}
+	
+	public void setCascadeAll(boolean all) {
+		this.addAnnotation().setCascadeAll(all);
+	}
+	
+	
+	// ***** cascade merge
+	
+	public boolean isCascadeMerge() {
+		return false;
+	}
+	
+	public void setCascadeMerge(boolean merge) {
+		this.addAnnotation().setCascadeMerge(merge);
+	}
+	
+	
+	// ***** cascade persist
+	
+	public boolean isCascadePersist() {
+		return false;
+	}
+	
+	public void setCascadePersist(boolean persist) {
+		this.addAnnotation().setCascadePersist(persist);
+	}
+	
+	
+	// ***** cascade refresh
+	
+	public boolean isCascadeRefresh() {
+		return false;
+	}
+	
+	public void setCascadeRefresh(boolean refresh) {
+		this.addAnnotation().setCascadeRefresh(refresh);
+	}
+	
+	
+	// ***** cascade remove
+	
+	public boolean isCascadeRemove() {
+		return false;
+	}
+	
+	public void setCascadeRemove(boolean remove) {
+		this.addAnnotation().setCascadeRemove(remove);
+	}
+	
+	public TextRange getCascadeTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java
new file mode 100644
index 0000000..a2ff594
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullPrimaryKeyJoinColumnAnnotation.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumn
+ */
+public final class NullPrimaryKeyJoinColumnAnnotation
+	extends NullNamedColumnAnnotation
+	implements PrimaryKeyJoinColumnAnnotation
+{	
+	public NullPrimaryKeyJoinColumnAnnotation(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected NamedColumnAnnotation addAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** referenced column name
+	public String getReferencedColumnName() {
+		return null;
+	}
+
+	public void setReferencedColumnName(String referencedColumnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+	
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return false;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullTableAnnotation.java
new file mode 100644
index 0000000..7e829e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullTableAnnotation.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.TableAnnotation;
+
+/**
+ * javax.persistence.Table
+ */
+public final class NullTableAnnotation
+	extends NullBaseTableAnnotation
+	implements TableAnnotation
+{
+	protected NullTableAnnotation(JavaResourcePersistentType parent) {
+		super(parent);
+	}
+
+	@Override
+	protected TableAnnotation addAnnotation() {
+		return (TableAnnotation) super.addAnnotation();
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullTemporalAnnotation.java
new file mode 100644
index 0000000..ec38b00
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NullTemporalAnnotation.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Temporal
+ */
+public final class NullTemporalAnnotation
+	extends NullAnnotation
+	implements TemporalAnnotation
+{
+	protected NullTemporalAnnotation(JavaResourcePersistentAttribute parent) {
+		super(parent);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected TemporalAnnotation addAnnotation() {
+		return (TemporalAnnotation) super.addAnnotation();
+	}
+
+
+	// ********** TemporalAnnotation implementation **********
+
+	// ***** value
+	public TemporalType getValue() {
+		return null;
+	}
+
+	public void setValue(TemporalType value) {
+		if (value != null) {
+			this.addAnnotation().setValue(value);
+		}
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java
new file mode 100644
index 0000000..0c9833e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryOneToManyAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceOneToManyAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.OneToMany
+ */
+public final class OneToManyAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new OneToManyAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private OneToManyAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceOneToManyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullOneToManyAnnotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryOneToManyAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return OneToManyAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java
new file mode 100644
index 0000000..6b600ca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryOneToOneAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceOneToOneAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.OneToOne
+ */
+public final class OneToOneAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new OneToOneAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private OneToOneAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceOneToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullOneToOneAnnotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryOneToOneAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return OneToOneAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java
new file mode 100644
index 0000000..5999751
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryOrderByAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceOrderByAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.OrderByAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.OrderBy
+ */
+public final class OrderByAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new OrderByAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private OrderByAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceOrderByAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryOrderByAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return OrderByAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
new file mode 100644
index 0000000..7749938
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryPrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourcePrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumn
+ */
+public final class PrimaryKeyJoinColumnAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new PrimaryKeyJoinColumnAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private PrimaryKeyJoinColumnAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourcePrimaryKeyJoinColumnAnnotation.createPrimaryKeyJoinColumn(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryPrimaryKeyJoinColumnAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
new file mode 100644
index 0000000..0c67aba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryPrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourcePrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumns
+ */
+public final class PrimaryKeyJoinColumnsAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new PrimaryKeyJoinColumnsAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private PrimaryKeyJoinColumnsAnnotationDefinition() {
+		super();
+	}
+
+	public PrimaryKeyJoinColumnsAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourcePrimaryKeyJoinColumnsAnnotation(parent, member);
+	}
+
+	public PrimaryKeyJoinColumnsAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryPrimaryKeyJoinColumnsAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return PrimaryKeyJoinColumnsAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
new file mode 100644
index 0000000..cca983f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinarySecondaryTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceSecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SecondaryTable
+ */
+public final class SecondaryTableAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new SecondaryTableAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private SecondaryTableAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return SourceSecondaryTableAnnotation.createSecondaryTable(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinarySecondaryTableAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return SecondaryTableAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
new file mode 100644
index 0000000..037c968
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinarySecondaryTablesAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceSecondaryTablesAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.SecondaryTablesAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SecondaryTables
+ */
+public final class SecondaryTablesAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new SecondaryTablesAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private SecondaryTablesAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceSecondaryTablesAnnotation((JavaResourcePersistentType) parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinarySecondaryTablesAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return SecondaryTablesAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
new file mode 100644
index 0000000..884b36b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinarySequenceGenerator1_0Annotation;
+import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceSequenceGenerator1_0Annotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SequenceGenerator
+ */
+public final class SequenceGeneratorAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new SequenceGeneratorAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	protected SequenceGeneratorAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceSequenceGenerator1_0Annotation(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinarySequenceGenerator1_0Annotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return SequenceGeneratorAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java
new file mode 100644
index 0000000..eb4880a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTableAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceTableAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.TableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Table
+ */
+public final class TableAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new TableAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private TableAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceTableAnnotation((JavaResourcePersistentType) parent, (Type) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullTableAnnotation((JavaResourcePersistentType) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryTableAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return TableAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
new file mode 100644
index 0000000..428e818
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTableGeneratorAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceTableGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.TableGenerator
+ */
+public final class TableGeneratorAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new TableGeneratorAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private TableGeneratorAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceTableGeneratorAnnotation(parent, member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryTableGeneratorAnnotation(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return TableGeneratorAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java
new file mode 100644
index 0000000..a166126
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTemporalAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceTemporalAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Temporal
+ */
+public final class TemporalAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new TemporalAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private TemporalAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceTemporalAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		return new NullTemporalAnnotation((JavaResourcePersistentAttribute) parent);
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryTemporalAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return TemporalAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java
new file mode 100644
index 0000000..4d84704
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTransientAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceTransientAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.TransientAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Transient
+ */
+public final class TransientAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new TransientAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private TransientAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceTransientAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+	
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryTransientAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+	
+	public String getAnnotationName() {
+		return TransientAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java
new file mode 100644
index 0000000..3b11cce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.binary.BinaryVersionAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceVersionAnnotation;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.VersionAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Version
+ */
+public final class VersionAnnotationDefinition
+	implements AnnotationDefinition
+{
+	// singleton
+	private static final AnnotationDefinition INSTANCE = new VersionAnnotationDefinition();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationDefinition instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private VersionAnnotationDefinition() {
+		super();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
+		return new SourceVersionAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+	}
+
+	public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+		return new BinaryVersionAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return VersionAnnotation.ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotation.java
new file mode 100644
index 0000000..db134fd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotation.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+
+/**
+ * JAR annotation
+ */
+public abstract class BinaryAnnotation
+	extends BinaryNode
+	implements Annotation
+{
+	final IAnnotation jdtAnnotation;
+
+	protected BinaryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent);
+		this.jdtAnnotation = jdtAnnotation;
+	}
+
+
+	// ********** convenience methods **********
+
+	/**
+	 * Return the values of the JDT annotation's member with the specified name.
+	 */
+	protected Object[] getJdtMemberValues(String memberName) {
+		Object[] values = (Object[]) this.getJdtMemberValue(memberName);
+		return (values != null) ? values : EMPTY_OBJECT_ARRAY;
+	}
+	private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
+
+	/**
+	 * Return the value of the JDT annotation's member with the specified name.
+	 */
+	protected Object getJdtMemberValue(String memberName) {
+		IMemberValuePair pair = this.getJdtMemberValuePair(memberName);
+		return (pair == null) ? null : pair.getValue();
+	}
+
+	/**
+	 * Return the JDT annotation's member-value pair with the specified name.
+	 */
+	private IMemberValuePair getJdtMemberValuePair(String memberName) {
+		for (IMemberValuePair pair : this.getJdtMemberValuePairs()) {
+			if (pair.getMemberName().equals(memberName)) {
+				return pair;
+			}
+		}
+		return null;
+	}
+
+	private IMemberValuePair[] getJdtMemberValuePairs() {
+		try {
+			return this.jdtAnnotation.getMemberValuePairs();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EMPTY_MEMBER_VALUE_PAIR_ARRAY;
+		}
+	}
+	private static final IMemberValuePair[] EMPTY_MEMBER_VALUE_PAIR_ARRAY = new IMemberValuePair[0];
+
+
+	// ********** Annotation implementation **********
+	public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	public void newAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+	public void removeAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	// ********** NestableAnnotation implementation **********
+	public void moveAnnotation(@SuppressWarnings("unused") int index) {
+		throw new UnsupportedOperationException();
+	}
+	public void initializeFrom(@SuppressWarnings("unused") NestableAnnotation oldAnnotation) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java
new file mode 100644
index 0000000..439b044
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAssociationOverrideAnnotation.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public abstract class BinaryAssociationOverrideAnnotation
+	extends BinaryOverrideAnnotation
+	implements NestableAssociationOverrideAnnotation
+{
+	private final Vector<JoinColumnAnnotation> joinColumns;
+
+
+	protected BinaryAssociationOverrideAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.joinColumns = this.buildJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateJoinColumns();
+	}
+
+
+	// ********** BinaryOverrideAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.ASSOCIATION_OVERRIDE__NAME;
+	}
+
+	
+	// ********** AssociationOverrideAnnotation implementation **********
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.get(index);
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+
+	public JoinColumnAnnotation addJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<JoinColumnAnnotation> buildJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS);
+		Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	// TODO
+	private void updateJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAssociationOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAssociationOverridesAnnotation.java
new file mode 100644
index 0000000..f4894e1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAssociationOverridesAnnotation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public abstract class BinaryAssociationOverridesAnnotation
+	extends BinaryContainerAnnotation<NestableAssociationOverrideAnnotation>
+	implements AssociationOverridesAnnotation
+{
+	private final Vector<NestableAssociationOverrideAnnotation> associationOverrides;
+
+
+	protected BinaryAssociationOverridesAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.associationOverrides = this.buildAssociationOverrides();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableAssociationOverrideAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableAssociationOverrideAnnotation>(this.associationOverrides);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.associationOverrides.size();
+	}
+
+	private Vector<NestableAssociationOverrideAnnotation> buildAssociationOverrides() {
+		Object[] jdtAssociationOverrides = this.getJdtMemberValues(JPA.ASSOCIATION_OVERRIDES__VALUE);
+		Vector<NestableAssociationOverrideAnnotation> result = new Vector<NestableAssociationOverrideAnnotation>(jdtAssociationOverrides.length);
+		for (Object jdtAssociationOverride : jdtAssociationOverrides) {
+			result.add(buildAssociationOverride(jdtAssociationOverride));
+		}
+		return result;
+	}
+
+	protected abstract NestableAssociationOverrideAnnotation buildAssociationOverride(Object jdtAssociationOverride);
+	
+	@Override
+	public void update() {
+		super.update();
+		this.updateAssociationOverrides();
+	}
+
+	// TODO
+	private void updateAssociationOverrides() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java
new file mode 100644
index 0000000..37add8b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAttributeOverrideAnnotation.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.internal.resource.java.NullAttributeOverrideColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAttributeOverrideAnnotation;
+
+/**
+ * javax.persistence.AttributeOverride
+ */
+public final class BinaryAttributeOverrideAnnotation
+	extends BinaryOverrideAnnotation
+	implements NestableAttributeOverrideAnnotation
+{
+	private ColumnAnnotation column;
+
+
+	public BinaryAttributeOverrideAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.column = this.buildColumn();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateColumn();
+	}
+
+
+	//************ BinaryOverrideAnnotation implementation ****************
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.ATTRIBUTE_OVERRIDE__NAME;
+	}
+	
+
+	//************ AttributeOverride implementation ****************
+
+	// ***** column
+	public ColumnAnnotation getColumn() {
+		return this.column;
+	}
+
+	public ColumnAnnotation getNonNullColumn() {
+		return (this.column != null) ? this.column : new NullAttributeOverrideColumnAnnotation(this);
+	}
+
+	public ColumnAnnotation addColumn() {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeColumn() {
+		throw new UnsupportedOperationException();
+	}
+
+	private ColumnAnnotation buildColumn() {
+		IAnnotation jdtColumn = this.getJdtColumn();
+		return (jdtColumn == null) ? null : this.buildColumn(jdtColumn);
+	}
+
+	private ColumnAnnotation buildColumn(IAnnotation jdtColumn) {
+		return new BinaryColumnAnnotation(this, jdtColumn);
+	}
+
+	private IAnnotation getJdtColumn() {
+		return (IAnnotation) this.getJdtMemberValue(JPA.ATTRIBUTE_OVERRIDE__COLUMN);
+	}
+
+	private void setColumn(ColumnAnnotation column) {
+		ColumnAnnotation old = this.column;
+		this.column = column;
+		this.firePropertyChanged(COLUMN_PROPERTY, old, column);
+	}
+
+	// TODO
+	private void updateColumn() {
+		throw new UnsupportedOperationException();
+//		IAnnotation jdtColumn = this.getJdtColumn();
+//		if (jdtColumn == null) {
+//			this.setColumn(null);
+//		} else {
+//			if (this.column == null) {
+//				this.setColumn(this.buildColumn(jdtColumn));
+//			} else {
+//				this.column.update(jdtColumn);
+//			}
+//		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAttributeOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAttributeOverridesAnnotation.java
new file mode 100644
index 0000000..1cecad3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAttributeOverridesAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.AttributeOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAttributeOverrideAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.AttributeOverrides
+ */
+public final class BinaryAttributeOverridesAnnotation
+	extends BinaryContainerAnnotation<NestableAttributeOverrideAnnotation>
+	implements AttributeOverridesAnnotation
+{
+	private final Vector<NestableAttributeOverrideAnnotation> attributeOverrides;
+
+
+	public BinaryAttributeOverridesAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.attributeOverrides = this.buildAttributeOverrides();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableAttributeOverrideAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableAttributeOverrideAnnotation>(this.attributeOverrides);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.attributeOverrides.size();
+	}
+
+	private Vector<NestableAttributeOverrideAnnotation> buildAttributeOverrides() {
+		Object[] jdtAttributeOverrides = this.getJdtMemberValues(JPA.ATTRIBUTE_OVERRIDES__VALUE);
+		Vector<NestableAttributeOverrideAnnotation> result = new Vector<NestableAttributeOverrideAnnotation>(jdtAttributeOverrides.length);
+		for (Object jdtAttributeOverride : jdtAttributeOverrides) {
+			result.add(new BinaryAttributeOverrideAnnotation(this, (IAnnotation) jdtAttributeOverride));
+		}
+		return result;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateAttributeOverrides();
+	}
+
+	// TODO
+	private void updateAttributeOverrides() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java
new file mode 100644
index 0000000..2eb6eff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseColumnAnnotation.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BaseColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Column
+ * javax.persistence.JoinColumn
+ */
+public abstract class BinaryBaseColumnAnnotation
+	extends BinaryNamedColumnAnnotation
+	implements BaseColumnAnnotation
+{
+	private String table;
+	private Boolean unique;
+	private Boolean nullable;
+	private Boolean insertable;
+	private Boolean updatable;
+	
+
+	protected BinaryBaseColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.table = this.buildTable();
+		this.unique = this.buildUnique();
+		this.nullable = this.buildNullable();
+		this.insertable = this.buildInsertable();
+		this.updatable = this.buildUpdatable();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setTable_(this.buildTable());
+		this.setUnique_(this.buildUnique());
+		this.setNullable_(this.buildNullable());
+		this.setInsertable_(this.buildInsertable());
+		this.setUpdatable_(this.buildUpdatable());
+	}
+
+
+	//************* BaseColumnAnnotation implementation *************
+
+	// ***** table
+	public String getTable() {
+		return this.table;
+	}
+
+	public void setTable(String table) {
+		throw new UnsupportedOperationException();
+	}
+	
+	private void setTable_(String table) {
+		String old = this.table;
+		this.table = table;
+		this.firePropertyChanged(TABLE_PROPERTY, old, table);
+	}
+	
+	private String buildTable() {
+		return (String) this.getJdtMemberValue(this.getTableElementName());
+	}
+	
+	protected abstract String getTableElementName();
+
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	public boolean tableTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** unique
+	public Boolean getUnique() {
+		return this.unique;
+	}
+
+	public void setUnique(Boolean unique) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setUnique_(Boolean unique) {
+		Boolean old = this.unique;
+		this.unique = unique;
+		this.firePropertyChanged(UNIQUE_PROPERTY, old, unique);
+	}
+
+	private Boolean buildUnique() {
+		return (Boolean) this.getJdtMemberValue(this.getUniqueElementName());
+	}
+	
+	protected abstract String getUniqueElementName();
+
+	public TextRange getUniqueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** nullable
+	public Boolean getNullable() {
+		return this.nullable;
+	}
+
+	public void setNullable(Boolean nullable) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setNullable_(Boolean nullable) {
+		Boolean old = this.nullable;
+		this.nullable = nullable;
+		this.firePropertyChanged(NULLABLE_PROPERTY, old, nullable);
+	}
+
+	private Boolean buildNullable() {
+		return (Boolean) this.getJdtMemberValue(this.getNullableElementName());
+	}
+	
+	protected abstract String getNullableElementName();
+
+	public TextRange getNullableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** insertable
+	public Boolean getInsertable() {
+		return this.insertable;
+	}
+
+	public void setInsertable(Boolean insertable) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setInsertable_(Boolean insertable) {
+		Boolean old = this.insertable;
+		this.insertable = insertable;
+		this.firePropertyChanged(INSERTABLE_PROPERTY, old, insertable);
+	}
+
+	private Boolean buildInsertable() {
+		return (Boolean) this.getJdtMemberValue(this.getInsertableElementName());
+	}
+	
+	protected abstract String getInsertableElementName();
+
+	public TextRange getInsertableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** updatable
+	public Boolean getUpdatable() {
+		return this.updatable;
+	}
+
+	public void setUpdatable(Boolean updatable) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setUpdatable_(Boolean updatable) {
+		Boolean old = this.updatable;
+		this.updatable = updatable;
+		this.firePropertyChanged(UPDATABLE_PROPERTY, old, updatable);
+	}
+
+	private Boolean buildUpdatable() {
+		return (Boolean) this.getJdtMemberValue(this.getUpdatableElementName());
+	}
+
+	protected abstract String getUpdatableElementName();
+
+	public TextRange getUpdatableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java
new file mode 100644
index 0000000..caa19cc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseEnumeratedAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.EnumType;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Enumerated
+ */
+public abstract class BinaryBaseEnumeratedAnnotation
+	extends BinaryAnnotation
+	implements EnumeratedAnnotation
+{
+	private EnumType value;
+	
+
+	protected BinaryBaseEnumeratedAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** EnumeratedAnnotation implementation **********
+
+	// ***** value
+	public EnumType getValue() {
+		return this.value;
+	}
+	
+	public void setValue(EnumType value) {
+		throw new UnsupportedOperationException();
+	}
+	
+	private void setValue_(EnumType value) {
+		EnumType old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+	
+	private EnumType buildValue() {
+		return EnumType.fromJavaAnnotationValue(this.getJdtMemberValue(this.getValueElementName()));
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	protected abstract String getValueElementName();
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java
new file mode 100644
index 0000000..281ae2e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseJoinColumnAnnotation.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BaseJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.JoinColumn
+ * javax.persistence.MapKeyJoinColumn
+ */
+public abstract class BinaryBaseJoinColumnAnnotation
+	extends BinaryBaseColumnAnnotation
+	implements BaseJoinColumnAnnotation
+{
+	private String referencedColumnName;
+
+
+	public BinaryBaseJoinColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.referencedColumnName = this.buildReferencedColumnName();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setReferencedColumnName_(this.buildReferencedColumnName());
+	}
+
+	protected abstract String getReferencedColumnNameElementName();
+
+
+	//************ BaseJoinColumnAnnotation implementation ***************
+
+	// referenced column name
+	public String getReferencedColumnName() {
+		return this.referencedColumnName;
+	}
+
+	public void setReferencedColumnName(String referencedColumnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setReferencedColumnName_(String referencedColumnName) {
+		String old = this.referencedColumnName;
+		this.referencedColumnName = referencedColumnName;
+		this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, referencedColumnName);
+	}
+
+	private String buildReferencedColumnName() {
+		return (String) this.getJdtMemberValue(JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME);
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseNamedQueryAnnotation.java
new file mode 100644
index 0000000..cb7745e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseNamedQueryAnnotation.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BaseNamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.NamedQuery
+ * javax.persistence.NamedNativeQuery
+ */
+abstract class BinaryBaseNamedQueryAnnotation
+	extends BinaryAnnotation
+	implements BaseNamedQueryAnnotation
+{
+	String name;
+	String query;
+	final Vector<QueryHintAnnotation> hints;
+
+
+	BinaryBaseNamedQueryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+		this.query = this.buildQuery();
+		this.hints = this.buildHints();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+		this.setQuery_(this.buildQuery());
+		this.updateHints();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** BaseNamedQueryAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(this.getNameElementName());
+	}
+
+	abstract String getNameElementName();
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** query
+	public String getQuery() {
+		return this.query;
+	}
+
+	public void setQuery(String query) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setQuery_(String query) {
+		String old = this.query;
+		this.query = query;
+		this.firePropertyChanged(QUERY_PROPERTY, old, query);
+	}
+
+	private String buildQuery() {
+		return (String) this.getJdtMemberValue(this.getQueryElementName());
+	}
+
+	abstract String getQueryElementName();
+
+	public TextRange getQueryTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** hints
+	public ListIterator<QueryHintAnnotation> hints() {
+		return new CloneListIterator<QueryHintAnnotation>(this.hints);
+	}
+
+	public int hintsSize() {
+		return this.hints.size();
+	}
+
+	public QueryHintAnnotation hintAt(int index) {
+		return this.hints.get(index);
+	}
+
+	public int indexOfHint(QueryHintAnnotation queryHint) {
+		return this.hints.indexOf(queryHint);
+	}
+
+	public QueryHintAnnotation addHint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveHint(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeHint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<QueryHintAnnotation> buildHints() {
+		Object[] jdtHints = this.getJdtMemberValues(this.getHintsElementName());
+		Vector<QueryHintAnnotation> result = new Vector<QueryHintAnnotation>(jdtHints.length);
+		for (Object jdtHint : jdtHints) {
+			result.add(new BinaryQueryHintAnnotation(this, (IAnnotation) jdtHint));
+		}
+		return result;
+	}
+
+	abstract String getHintsElementName();
+
+	// TODO
+	private void updateHints() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java
new file mode 100644
index 0000000..490d800
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseTableAnnotation.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BaseTableAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.Table
+ * javax.persistence.JoinTable
+ * javax.persistence.SecondaryTable
+ */
+public abstract class BinaryBaseTableAnnotation
+	extends BinaryAnnotation
+	implements BaseTableAnnotation
+{
+	String name;
+	String schema;
+	String catalog;
+	final Vector<UniqueConstraintAnnotation> uniqueConstraints;
+
+
+	protected BinaryBaseTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+		this.schema = this.buildSchema();
+		this.catalog = this.buildCatalog();
+		this.uniqueConstraints = this.buildUniqueConstraints();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+		this.setSchema_(this.buildSchema());
+		this.setCatalog_(this.buildCatalog());
+		this.updateUniqueConstraints();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** BaseTableAnnotation implementation **********
+
+	public boolean isSpecified() {
+		return true;
+	}
+	
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(this.getNameElementName());
+	}
+
+	protected abstract String getNameElementName();
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** schema
+	public String getSchema() {
+		return this.schema;
+	}
+
+	public void setSchema(String schema) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setSchema_(String schema) {
+		String old = this.schema;
+		this.schema = schema;
+		this.firePropertyChanged(SCHEMA_PROPERTY, old, schema);
+	}
+
+	private String buildSchema() {
+		return (String) this.getJdtMemberValue(this.getSchemaElementName());
+	}
+
+	protected abstract String getSchemaElementName();
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** catalog
+	public String getCatalog() {
+		return this.catalog;
+	}
+
+	public void setCatalog(String catalog) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCatalog_(String catalog) {
+		String old = this.catalog;
+		this.catalog = catalog;
+		this.firePropertyChanged(CATALOG_PROPERTY, old, catalog);
+	}
+
+	private String buildCatalog() {
+		return (String) this.getJdtMemberValue(this.getCatalogElementName());
+	}
+
+	protected abstract String getCatalogElementName();
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** unique constraints
+	public ListIterator<UniqueConstraintAnnotation> uniqueConstraints() {
+		return new CloneListIterator<UniqueConstraintAnnotation>(this.uniqueConstraints);
+	}
+
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+
+	public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
+		return this.uniqueConstraints.get(index);
+	}
+
+	public int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint) {
+		return this.uniqueConstraints.indexOf(uniqueConstraint);
+	}
+
+	public UniqueConstraintAnnotation addUniqueConstraint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeUniqueConstraint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<UniqueConstraintAnnotation> buildUniqueConstraints() {
+		Object[] jdtUniqueConstraints = this.getJdtMemberValues(this.getUniqueConstraintElementName());
+		Vector<UniqueConstraintAnnotation> result = new Vector<UniqueConstraintAnnotation>(jdtUniqueConstraints.length);
+		for (Object jdtUniqueConstraint : jdtUniqueConstraints) {
+			result.add(new BinaryUniqueConstraintAnnotation(this, (IAnnotation) jdtUniqueConstraint));
+		}
+		return result;
+	}
+
+	protected abstract String getUniqueConstraintElementName();
+
+	// TODO
+	private void updateUniqueConstraints() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java
new file mode 100644
index 0000000..cc57a8c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBaseTemporalAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Temporal
+ * javax.persistence.MapKeyTemporal
+ */
+public abstract class BinaryBaseTemporalAnnotation
+	extends BinaryAnnotation
+	implements TemporalAnnotation
+{
+	private TemporalType value;
+
+
+	protected BinaryBaseTemporalAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** TemporalAnnotation implementation **********
+
+	// ***** value
+	public TemporalType getValue() {
+		return this.value;
+	}
+
+	public void setValue(TemporalType value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(TemporalType value) {
+		TemporalType old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+
+	private TemporalType buildValue() {
+		return TemporalType.fromJavaAnnotationValue(this.getJdtMemberValue(getValueElementName()));
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	protected abstract String getValueElementName();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBasicAnnotation.java
new file mode 100644
index 0000000..9db2533
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryBasicAnnotation.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Basic
+ */
+public final class BinaryBasicAnnotation
+	extends BinaryAnnotation
+	implements BasicAnnotation
+{
+	private Boolean optional;
+	private FetchType fetch;
+
+
+	public BinaryBasicAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.optional = this.buildOptional();
+		this.fetch = this.buildFetch();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setOptional_(this.buildOptional());
+		this.setFetch_(this.buildFetch());
+	}
+
+
+	//*************** Basic implementation ****************
+
+	// ***** optional
+	public Boolean getOptional() {
+		return this.optional;
+	}
+
+	public void setOptional(Boolean optional) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setOptional_(Boolean optional) {
+		Boolean old = this.optional;
+		this.optional = optional;
+		this.firePropertyChanged(OPTIONAL_PROPERTY, old, optional);
+	}
+
+	private Boolean buildOptional() {
+		return (Boolean) this.getJdtMemberValue(JPA.BASIC__OPTIONAL);
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** fetch
+	public FetchType getFetch() {
+		return this.fetch;
+	}
+
+	public void setFetch(FetchType fetch) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setFetch_(FetchType fetch) {
+		FetchType old = this.fetch;
+		this.fetch = fetch;
+		this.firePropertyChanged(FETCH_PROPERTY, old, fetch);
+	}
+
+	private FetchType buildFetch() {
+		return FetchType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.BASIC__FETCH));
+	}
+
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryClassFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryClassFile.java
new file mode 100644
index 0000000..037eda1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryClassFile.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jpt.core.resource.java.JavaResourceClassFile;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragment;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * binary class file
+ */
+final class BinaryClassFile
+	extends BinaryNode
+	implements JavaResourceClassFile
+{
+	/** JDT class file */
+	private final IClassFile classFile;
+
+	/** class file's persistent type */
+	private final JavaResourcePersistentType persistentType;
+
+
+	// ********** construction/initialization **********
+
+	/**
+	 * The JDT type gets passed in because the package fragment inspects it
+	 * beforehand to determine whether it is "persistable". (We only build
+	 * class files for "persistable" types.)
+	 */
+	BinaryClassFile(JavaResourcePackageFragment parent, IClassFile classFile, IType jdtType) {
+		super(parent);
+		this.classFile = classFile;
+		this.persistentType = this.buildPersistentType(jdtType);
+	}
+
+	private JavaResourcePersistentType buildPersistentType(IType jdtType) {
+		return new BinaryPersistentType(this, jdtType);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.classFile.getElementName());
+	}
+
+
+	// ********** JavaResourceClassFile implementation **********
+
+	public JavaResourcePersistentType getPersistentType() {
+		return this.persistentType;
+	}
+
+	// TODO
+	@Override
+	public void update() {
+		super.update();
+//		this.persistentType.update(this.classFile.getType());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryColumnAnnotation.java
new file mode 100644
index 0000000..89b17e7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryColumnAnnotation.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+
+/**
+ * javax.persistence.Column
+ */
+public final class BinaryColumnAnnotation
+	extends BinaryCompleteColumnAnnotation
+{
+
+	public BinaryColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	@Override
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** BinaryNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** BinaryBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA.COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA.COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA.COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA.COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA.COLUMN__UPDATABLE;
+	}
+	
+	
+	// ********** BinaryCompleteColumnAnnotation implementation **********
+	
+	@Override
+	protected String getLengthElementName() {
+		return JPA.COLUMN__LENGTH;
+	}
+	
+	@Override
+	protected String getPrecisionElementName() {
+		return JPA.COLUMN__PRECISION;
+	}
+	
+	@Override
+	protected String getScaleElementName() {
+		return JPA.COLUMN__SCALE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java
new file mode 100644
index 0000000..bda54d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryCompleteColumnAnnotation.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Abstract implementation of ColumnAnnotation to be used for JPA annotations:
+ * javax.persistence.Column
+ * javax.persistence.MapKeyColumn
+ */
+public abstract class BinaryCompleteColumnAnnotation
+	extends BinaryBaseColumnAnnotation
+	implements ColumnAnnotation
+{
+	protected Integer length;
+	protected Integer precision;
+	protected Integer scale;
+
+
+	protected BinaryCompleteColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.length = this.buildLength();
+		this.precision = this.buildPrecision();
+		this.scale = this.buildScale();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setLength_(this.buildLength());
+		this.setPrecision_(this.buildPrecision());
+		this.setScale_(this.buildScale());
+	}
+
+
+	 // ********** ColumnAnnotation implementation **********
+
+	// ***** length
+	public Integer getLength() {
+		return this.length;
+	}
+
+	public void setLength(Integer length) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setLength_(Integer length) {
+		Integer old = this.length;
+		this.length = length;
+		this.firePropertyChanged(LENGTH_PROPERTY, old, length);
+	}
+
+	private Integer buildLength() {
+		return (Integer) this.getJdtMemberValue(this.getLengthElementName());
+	}
+
+	public TextRange getLengthTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	protected abstract String getLengthElementName();
+
+	// ***** precision
+	public Integer getPrecision() {
+		return this.precision;
+	}
+
+	public void setPrecision(Integer precision) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setPrecision_(Integer precision) {
+		Integer old = this.precision;
+		this.precision = precision;
+		this.firePropertyChanged(PRECISION_PROPERTY, old, precision);
+	}
+
+	private Integer buildPrecision() {
+		return (Integer) this.getJdtMemberValue(this.getPrecisionElementName());
+	}
+
+	public TextRange getPrecisionTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	protected abstract String getPrecisionElementName();
+
+	// ***** scale
+	public Integer getScale() {
+		return this.scale;
+	}
+
+	public void setScale(Integer scale) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setScale_(Integer scale) {
+		Integer old = this.scale;
+		this.scale = scale;
+		this.firePropertyChanged(SCALE_PROPERTY, old, scale);
+	}
+
+	private Integer buildScale() {
+		return (Integer) this.getJdtMemberValue(this.getScaleElementName());
+	}
+
+	public TextRange getScaleTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	protected abstract String getScaleElementName();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryContainerAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryContainerAnnotation.java
new file mode 100644
index 0000000..b667810
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryContainerAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+
+/**
+ * JAR annotations do not support most of the container annotation protocol.
+ */
+public abstract class BinaryContainerAnnotation<T extends NestableAnnotation>
+	extends BinaryAnnotation
+	implements ContainerAnnotation<T>
+{
+
+	protected BinaryContainerAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getElementName() {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getNestedAnnotationName() {
+		throw new UnsupportedOperationException();
+	}
+
+	public T addNestedAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		throw new UnsupportedOperationException();
+	}
+
+	public T moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public T removeNestedAnnotation(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java
new file mode 100644
index 0000000..ea3b6ce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryDiscriminatorColumnAnnotation.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.DiscriminatorType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * javax.persistence.DiscriminatorColumn
+ */
+public final class BinaryDiscriminatorColumnAnnotation
+	extends BinaryNamedColumnAnnotation
+	implements DiscriminatorColumnAnnotation
+{
+	private DiscriminatorType discriminatorType;
+	private Integer length;
+
+
+	public BinaryDiscriminatorColumnAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.discriminatorType = this.buildDiscriminatorType();
+		this.length = this.buildLength();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setDiscriminatorType_(this.buildDiscriminatorType());
+		this.setLength_(this.buildLength());
+	}
+
+
+	// ********** BinaryNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.DISCRIMINATOR_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** DiscriminatorColumnAnnotation implementation **********
+
+	// ***** discriminator type
+	public DiscriminatorType getDiscriminatorType() {
+		return null;
+	}
+
+	public void setDiscriminatorType(DiscriminatorType discriminatorType) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setDiscriminatorType_(DiscriminatorType discriminatorType) {
+		DiscriminatorType old = this.discriminatorType;
+		this.discriminatorType = discriminatorType;
+		this.firePropertyChanged(DISCRIMINATOR_TYPE_PROPERTY, old, discriminatorType);
+	}
+
+	private DiscriminatorType buildDiscriminatorType() {
+		return DiscriminatorType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE));
+	}
+
+	// ***** length
+	public Integer getLength() {
+		return null;
+	}
+
+	public void setLength(Integer length) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setLength_(Integer length) {
+		Integer old = this.length;
+		this.length = length;
+		this.firePropertyChanged(LENGTH_PROPERTY, old, length);
+	}
+
+	private Integer buildLength() {
+		return (Integer) this.getJdtMemberValue(JPA.DISCRIMINATOR_COLUMN__LENGTH);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java
new file mode 100644
index 0000000..287574f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryDiscriminatorValueAnnotation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.DiscriminatorValue
+ */
+public final class BinaryDiscriminatorValueAnnotation
+	extends BinaryAnnotation
+	implements DiscriminatorValueAnnotation
+{
+	private String value;
+
+
+	public BinaryDiscriminatorValueAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** DiscriminatorValueAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(String value) {
+		String old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA.DISCRIMINATOR_VALUE__VALUE);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java
new file mode 100644
index 0000000..91db09f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddableAnnotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.EmbeddableAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * javax.persistence.Embeddable
+ */
+public final class BinaryEmbeddableAnnotation
+	extends BinaryAnnotation
+	implements EmbeddableAnnotation
+{
+
+	public BinaryEmbeddableAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java
new file mode 100644
index 0000000..2fd1434
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddedAnnotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.Embedded
+ */
+public final class BinaryEmbeddedAnnotation
+	extends BinaryAnnotation
+	implements EmbeddedAnnotation
+{
+
+	public BinaryEmbeddedAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java
new file mode 100644
index 0000000..604f5be
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEmbeddedIdAnnotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.EmbeddedIdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.EmbeddedId
+ */
+public final class BinaryEmbeddedIdAnnotation
+	extends BinaryAnnotation
+	implements EmbeddedIdAnnotation
+{
+
+	public BinaryEmbeddedIdAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEntityAnnotation.java
new file mode 100644
index 0000000..bd4acb4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEntityAnnotation.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.EntityAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Entity
+ */
+public final class BinaryEntityAnnotation
+	extends BinaryAnnotation
+	implements EntityAnnotation
+{
+	private String name;
+
+
+	public BinaryEntityAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** EntityAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(JPA.ENTITY__NAME);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java
new file mode 100644
index 0000000..08ffef0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryEnumeratedAnnotation.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.Enumerated
+ */
+public final class BinaryEnumeratedAnnotation
+	extends BinaryBaseEnumeratedAnnotation
+	implements EnumeratedAnnotation
+{
+
+	public BinaryEnumeratedAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected String getValueElementName() {
+		return JPA.ENUMERATED__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java
new file mode 100644
index 0000000..7ee085f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryGeneratedValueAnnotation.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.resource.java.GenerationType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.GeneratedValue
+ */
+public final class BinaryGeneratedValueAnnotation
+	extends BinaryAnnotation
+	implements GeneratedValueAnnotation
+{
+	private GenerationType strategy;
+	private String generator;
+
+
+	public BinaryGeneratedValueAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.strategy = this.buildStrategy();
+		this.generator = this.buildGenerator();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setStrategy_(this.buildStrategy());
+		this.setGenerator_(this.buildGenerator());
+	}
+
+
+	// ********** GeneratedValueAnnotation implementation **********
+
+	// ***** strategy
+	public GenerationType getStrategy() {
+		return this.strategy;
+	}
+	
+	public void setStrategy(GenerationType strategy) {
+		throw new UnsupportedOperationException();
+	}
+	
+	private void setStrategy_(GenerationType strategy) {
+		GenerationType old = this.strategy;
+		this.strategy = strategy;
+		this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
+	}
+	
+	private GenerationType buildStrategy() {
+		return GenerationType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.GENERATED_VALUE__STRATEGY));
+	}
+	
+	public TextRange getStrategyTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+	
+	// ***** generator
+	public String getGenerator() {
+		return this.generator;
+	}
+	
+	public void setGenerator(String generator) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setGenerator_(String generator) {
+		String old = this.generator;
+		this.generator = generator;
+		this.firePropertyChanged(GENERATOR_PROPERTY, old, generator);
+	}
+
+	private String buildGenerator() {
+		return (String) this.getJdtMemberValue(JPA.GENERATED_VALUE__GENERATOR);
+	}
+	
+	public TextRange getGeneratorTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean generatorTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java
new file mode 100644
index 0000000..d89cff9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryGeneratorAnnotation.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.GeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.SequenceGenerator
+ * javax.persistence.TableGenerator
+ */
+abstract class BinaryGeneratorAnnotation
+	extends BinaryAnnotation
+	implements GeneratorAnnotation
+{
+	String name;
+	Integer initialValue;
+	Integer allocationSize;
+
+
+	BinaryGeneratorAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+		this.initialValue = this.buildInitialValue();
+		this.allocationSize = this.buildAllocationSize();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+		this.setInitialValue_(this.buildInitialValue());
+		this.setAllocationSize_(this.buildAllocationSize());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** GeneratorAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(this.getNameElementName());
+	}
+
+	abstract String getNameElementName();
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** initial value
+	public Integer getInitialValue() {
+		return this.initialValue;
+	}
+
+	public void setInitialValue(Integer initialValue) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setInitialValue_(Integer initialValue) {
+		Integer old = this.initialValue;
+		this.initialValue = initialValue;
+		this.firePropertyChanged(INITIAL_VALUE_PROPERTY, old, initialValue);
+	}
+
+	private Integer buildInitialValue() {
+		return (Integer) this.getJdtMemberValue(this.getInitialValueElementName());
+	}
+
+	abstract String getInitialValueElementName();
+
+	public TextRange getInitialValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** name
+	public Integer getAllocationSize() {
+		return this.allocationSize;
+	}
+
+	public void setAllocationSize(Integer allocationSize) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setAllocationSize_(Integer allocationSize) {
+		Integer old = this.allocationSize;
+		this.allocationSize = allocationSize;
+		this.firePropertyChanged(NAME_PROPERTY, old, allocationSize);
+	}
+
+	private Integer buildAllocationSize() {
+		return (Integer) this.getJdtMemberValue(this.getAllocationSizeElementName());
+	}
+
+	abstract String getAllocationSizeElementName();
+
+	public TextRange getAllocationSizeTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryIdAnnotation.java
new file mode 100644
index 0000000..95946b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryIdAnnotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.IdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * javax.persistence.Id
+ */
+public final class BinaryIdAnnotation
+	extends BinaryAnnotation
+	implements IdAnnotation
+{
+
+	public BinaryIdAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryIdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryIdClassAnnotation.java
new file mode 100644
index 0000000..95b56de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryIdClassAnnotation.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.IdClassAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.IdClass
+ */
+public final class BinaryIdClassAnnotation
+	extends BinaryAnnotation
+	implements IdClassAnnotation 
+{
+	private String value;
+
+
+	public BinaryIdClassAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+
+	// ********** IdClassAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(String value) {
+		String old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+		this.firePropertyChanged(FULLY_QUALIFIED_CLASS_NAME_PROPERTY, old, value);
+	}
+
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA.ID_CLASS__VALUE);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** fully-qualified class name
+	/**
+	 * binary is already fully-qualified
+	 */
+	public String getFullyQualifiedClassName() {
+		return this.value;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java
new file mode 100644
index 0000000..8171164
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryInheritanceAnnotation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
+import org.eclipse.jpt.core.resource.java.InheritanceType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Inheritance
+ */
+public final class BinaryInheritanceAnnotation
+	extends BinaryAnnotation
+	implements InheritanceAnnotation
+{
+	private InheritanceType strategy;
+
+
+	public BinaryInheritanceAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.strategy = this.buildStrategy();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setStrategy_(this.buildStrategy());
+	}
+
+
+	// ********** InheritanceAnnotation implementation **********
+
+	// ***** strategy
+	public InheritanceType getStrategy() {
+		return this.strategy;
+	}
+
+	public void setStrategy(InheritanceType strategy) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setStrategy_(InheritanceType strategy) {
+		InheritanceType old = this.strategy;
+		this.strategy = strategy;
+		this.firePropertyChanged(STRATEGY_PROPERTY, old, strategy);
+	}
+
+	private InheritanceType buildStrategy() {
+		return InheritanceType.fromJavaAnnotationValue(this.getJdtMemberValue(JPA.INHERITANCE__STRATEGY));
+	}
+
+	public TextRange getStrategyTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java
new file mode 100644
index 0000000..f78bbe4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinColumnAnnotation.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+
+/**
+ * javax.persistence.JoinColumn
+ */
+public final class BinaryJoinColumnAnnotation
+	extends BinaryBaseJoinColumnAnnotation
+	implements NestableJoinColumnAnnotation
+{
+
+	public BinaryJoinColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** BinaryNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.JOIN_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.JOIN_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** BinaryBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA.JOIN_COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA.JOIN_COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA.JOIN_COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA.JOIN_COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA.JOIN_COLUMN__UPDATABLE;
+	}
+	
+	
+	// ********** BinaryBaseJoinColumnAnnotation implementation **********
+
+	@Override
+	protected String getReferencedColumnNameElementName() {
+		return JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinColumnsAnnotation.java
new file mode 100644
index 0000000..28a12e5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinColumnsAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnsAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.JoinColumns
+ */
+public final class BinaryJoinColumnsAnnotation
+	extends BinaryContainerAnnotation<NestableJoinColumnAnnotation>
+	implements JoinColumnsAnnotation
+{
+	private final Vector<NestableJoinColumnAnnotation> joinColumns;
+
+
+	public BinaryJoinColumnsAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.joinColumns = this.buildJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableJoinColumnAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableJoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.joinColumns.size();
+	}
+
+	private Vector<NestableJoinColumnAnnotation> buildJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.JOIN_COLUMNS__VALUE);
+		Vector<NestableJoinColumnAnnotation> result = new Vector<NestableJoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateJoinColumns();
+	}
+
+	// TODO
+	private void updateJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java
new file mode 100644
index 0000000..1295772
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryJoinTableAnnotation.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.JoinTable
+ */
+public final class BinaryJoinTableAnnotation
+	extends BinaryBaseTableAnnotation
+	implements JoinTableAnnotation
+{
+	private final Vector<JoinColumnAnnotation> joinColumns;
+	private final Vector<JoinColumnAnnotation> inverseJoinColumns;
+
+
+	public BinaryJoinTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.joinColumns = this.buildJoinColumns();
+		this.inverseJoinColumns = this.buildInverseJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateJoinColumns();
+		this.updateInverseJoinColumns();
+	}
+
+
+	// ********** BinaryBaseTableAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.JOIN_TABLE__NAME;
+	}
+
+	@Override
+	protected String getSchemaElementName() {
+		return JPA.JOIN_TABLE__SCHEMA;
+	}
+
+	@Override
+	protected String getCatalogElementName() {
+		return JPA.JOIN_TABLE__CATALOG;
+	}
+
+	@Override
+	protected String getUniqueConstraintElementName() {
+		return JPA.JOIN_TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+
+	// ********** JoinTableAnnotation implementation **********
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+
+	public JoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.get(index);
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+
+	public JoinColumnAnnotation addJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<JoinColumnAnnotation> buildJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.JOIN_TABLE__JOIN_COLUMNS);
+		Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	// TODO
+	private void updateJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ***** inverse join columns
+	public ListIterator<JoinColumnAnnotation> inverseJoinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.inverseJoinColumns);
+	}
+
+	public int inverseJoinColumnsSize() {
+		return this.inverseJoinColumns.size();
+	}
+
+	public JoinColumnAnnotation inverseJoinColumnAt(int index) {
+		return this.inverseJoinColumns.get(index);
+	}
+
+	public int indexOfInverseJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.inverseJoinColumns.indexOf(joinColumn);
+	}
+
+	public JoinColumnAnnotation addInverseJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveInverseJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeInverseJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<JoinColumnAnnotation> buildInverseJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS);
+		Vector<JoinColumnAnnotation> result = new Vector<JoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	// TODO
+	private void updateInverseJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryLobAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryLobAnnotation.java
new file mode 100644
index 0000000..0936195
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryLobAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.LobAnnotation;
+
+/**
+ * javax.persistence.Lob
+ */
+public final class BinaryLobAnnotation
+	extends BinaryAnnotation
+	implements LobAnnotation
+{
+	public BinaryLobAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java
new file mode 100644
index 0000000..42593c2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryManyToManyAnnotation.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.ManyToMany
+ */
+public final class BinaryManyToManyAnnotation
+	extends BinaryRelationshipMappingAnnotation
+	implements ManyToMany2_0Annotation
+{
+	private String mappedBy;
+
+
+	public BinaryManyToManyAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.mappedBy = this.buildMappedBy();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setMappedBy_(this.buildMappedBy());
+	}
+
+
+	// ********** BinaryRelationshipMappingAnnotation implementation **********
+
+	@Override
+	String getTargetEntityElementName() {
+		return JPA.MANY_TO_MANY__TARGET_ENTITY;
+	}
+
+	@Override
+	String getFetchElementName() {
+		return JPA.MANY_TO_MANY__FETCH;
+	}
+
+	@Override
+	String getCascadeElementName() {
+		return JPA.MANY_TO_MANY__CASCADE;
+	}
+
+
+	//**************** OwnableRelationshipMappingAnnotation implementation **************
+
+	// ***** mapped by
+	public String getMappedBy() {
+		return this.mappedBy;
+	}
+
+	public void setMappedBy(String mappedBy) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setMappedBy_(String mappedBy) {
+		String old = this.mappedBy;
+		this.mappedBy = mappedBy;
+		this.firePropertyChanged(MAPPED_BY_PROPERTY, old, mappedBy);
+	}
+
+	private String buildMappedBy() {
+		return (String) this.getJdtMemberValue(JPA.MANY_TO_MANY__MAPPED_BY);
+	}
+
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java
new file mode 100644
index 0000000..191b182
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryManyToOneAnnotation.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.ManyToOne
+ */
+public final class BinaryManyToOneAnnotation
+	extends BinaryRelationshipMappingAnnotation
+	implements ManyToOne2_0Annotation
+{
+	private Boolean optional;
+
+
+	public BinaryManyToOneAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.optional = this.buildOptional();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setOptional_(this.buildOptional());
+	}
+
+
+	// ********** BinaryRelationshipMappingAnnotation implementation **********
+
+	@Override
+	String getTargetEntityElementName() {
+		return JPA.MANY_TO_ONE__TARGET_ENTITY;
+	}
+
+	@Override
+	String getFetchElementName() {
+		return JPA.MANY_TO_ONE__FETCH;
+	}
+
+	@Override
+	String getCascadeElementName() {
+		return JPA.MANY_TO_ONE__CASCADE;
+	}
+
+
+	// ********** ManyToOneMappingAnnotation implementation **********
+
+	// ***** optional
+	public Boolean getOptional() {
+		return this.optional;
+	}
+
+	public void setOptional(Boolean optional) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setOptional_(Boolean optional) {
+		Boolean old = this.optional;
+		this.optional = optional;
+		this.firePropertyChanged(OPTIONAL_PROPERTY, old, optional);
+	}
+
+	private Boolean buildOptional() {
+		return (Boolean) this.getJdtMemberValue(JPA.MANY_TO_ONE__OPTIONAL);
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java
new file mode 100644
index 0000000..7699bec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryMapKeyAnnotation.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.MapKey
+ */
+public final class BinaryMapKeyAnnotation
+	extends BinaryAnnotation
+	implements MapKeyAnnotation
+{
+	private String name;
+
+
+	public BinaryMapKeyAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** MapKeyAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(JPA.MAP_KEY__NAME);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java
new file mode 100644
index 0000000..419bfaa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryMappedSuperclassAnnotation.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.MappedSuperclassAnnotation;
+
+public final class BinaryMappedSuperclassAnnotation
+	extends BinaryAnnotation
+	implements MappedSuperclassAnnotation
+{
+	public BinaryMappedSuperclassAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java
new file mode 100644
index 0000000..2230a57
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedColumnAnnotation.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.Column
+ * javax.persistence.JoinColumn
+ * javax.persistence.DiscriminatorColumn
+ * javax.persistence.PrimaryKeyJoinColumn.
+ */
+public abstract class BinaryNamedColumnAnnotation
+	extends BinaryAnnotation
+	implements NamedColumnAnnotation
+{
+	private String name;
+	private String columnDefinition;
+
+
+	protected BinaryNamedColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+		this.columnDefinition = this.buildColumnDefinition();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+		this.setColumnDefinition_(this.buildColumnDefinition());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** NamedColumn implementation **********
+
+	public boolean isSpecified() {
+		return true;
+	}
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(this.getNameElementName());
+	}
+
+	protected abstract String getNameElementName();
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** column definition
+	public String getColumnDefinition() {
+		return null;
+	}
+
+	public void setColumnDefinition(String columnDefinition) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setColumnDefinition_(String columnDefinition) {
+		String old = this.columnDefinition;
+		this.columnDefinition = columnDefinition;
+		this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, columnDefinition);
+	}
+
+	private String buildColumnDefinition() {
+		return (String) this.getJdtMemberValue(this.getColumnDefinitionElementName());
+	}
+
+	protected abstract String getColumnDefinitionElementName();
+
+	public TextRange getColumnDefinitionTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedNativeQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedNativeQueriesAnnotation.java
new file mode 100644
index 0000000..8f8a12d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedNativeQueriesAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableNamedNativeQueryAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.NamedNativeQueries
+ */
+public final class BinaryNamedNativeQueriesAnnotation
+	extends BinaryContainerAnnotation<NestableNamedNativeQueryAnnotation>
+	implements NamedNativeQueriesAnnotation
+{
+	private final Vector<NestableNamedNativeQueryAnnotation> namedNativeQueries;
+
+
+	public BinaryNamedNativeQueriesAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.namedNativeQueries = this.buildNamedNativeQueries();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableNamedNativeQueryAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableNamedNativeQueryAnnotation>(this.namedNativeQueries);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.namedNativeQueries.size();
+	}
+
+	private Vector<NestableNamedNativeQueryAnnotation> buildNamedNativeQueries() {
+		Object[] jdtQueries = this.getJdtMemberValues(JPA.NAMED_NATIVE_QUERIES__VALUE);
+		Vector<NestableNamedNativeQueryAnnotation> result = new Vector<NestableNamedNativeQueryAnnotation>(jdtQueries.length);
+		for (Object jdtQuery : jdtQueries) {
+			result.add(new BinaryNamedNativeQueryAnnotation(this, (IAnnotation) jdtQuery));
+		}
+		return result;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateNamedNativeQueries();
+	}
+
+	// TODO
+	private void updateNamedNativeQueries() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java
new file mode 100644
index 0000000..7b96cfc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedNativeQueryAnnotation.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableNamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.NamedNativeQuery
+ */
+public final class BinaryNamedNativeQueryAnnotation
+	extends BinaryBaseNamedQueryAnnotation
+	implements NestableNamedNativeQueryAnnotation
+{
+	private String resultClass;
+	private String resultSetMapping;
+
+
+	public BinaryNamedNativeQueryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.resultClass = this.buildResultClass();
+		this.resultSetMapping = this.buildResultSetMapping();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setResultClass_(this.buildResultClass());
+		this.setResultSetMapping_(this.buildResultSetMapping());
+	}
+
+
+	// ********** BinaryBaseNamedQueryAnnotation implementation **********
+
+	@Override
+	String getNameElementName() {
+		return JPA.NAMED_NATIVE_QUERY__NAME;
+	}
+
+	@Override
+	String getQueryElementName() {
+		return JPA.NAMED_NATIVE_QUERY__QUERY;
+	}
+
+	@Override
+	String getHintsElementName() {
+		return JPA.NAMED_NATIVE_QUERY__HINTS;
+	}
+
+
+	// ********** NamedNativeQueryAnnotation implementation **********
+
+	// ***** result class
+	public String getResultClass() {
+		return this.resultClass;
+	}
+
+	public void setResultClass(String resultClass) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setResultClass_(String resultClass) {
+		String old = this.resultClass;
+		this.resultClass = resultClass;
+		this.firePropertyChanged(RESULT_CLASS_PROPERTY, old, resultClass);
+	}
+
+	private String buildResultClass() {
+		return (String) this.getJdtMemberValue(JPA.NAMED_NATIVE_QUERY__RESULT_CLASS);
+	}
+
+	public TextRange getResultClassTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** fully-qualified result class name
+	public String getFullyQualifiedResultClassName()  {
+		return this.resultClass;
+	}
+
+	// ***** result set mapping
+	public String getResultSetMapping() {
+		return this.resultSetMapping;
+	}
+
+	public void setResultSetMapping(String resultSetMapping) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setResultSetMapping_(String resultSetMapping) {
+		String old = this.resultSetMapping;
+		this.resultSetMapping = resultSetMapping;
+		this.firePropertyChanged(RESULT_SET_MAPPING_PROPERTY, old, resultSetMapping);
+	}
+
+	private String buildResultSetMapping() {
+		return (String) this.getJdtMemberValue(JPA.NAMED_NATIVE_QUERY__RESULT_CLASS);
+	}
+
+	public TextRange getResultSetMappingTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedQueriesAnnotation.java
new file mode 100644
index 0000000..d5fee45
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedQueriesAnnotation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableNamedQueryAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public abstract class BinaryNamedQueriesAnnotation
+	extends BinaryContainerAnnotation<NestableNamedQueryAnnotation>
+	implements NamedQueriesAnnotation
+{
+	private final Vector<NestableNamedQueryAnnotation> namedQueries;
+
+
+	public BinaryNamedQueriesAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.namedQueries = this.buildNamedQueries();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableNamedQueryAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableNamedQueryAnnotation>(this.namedQueries);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.namedQueries.size();
+	}
+
+	private Vector<NestableNamedQueryAnnotation> buildNamedQueries() {
+		Object[] jdtQueries = this.getJdtMemberValues(JPA.NAMED_QUERIES__VALUE);
+		Vector<NestableNamedQueryAnnotation> result = new Vector<NestableNamedQueryAnnotation>(jdtQueries.length);
+		for (Object jdtQuery : jdtQueries) {
+			result.add(this.buildNamedQuery(jdtQuery));
+		}
+		return result;
+	}
+
+	protected abstract NamedQueryAnnotation buildNamedQuery(Object jdtQuery);
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateNamedQueries();
+	}
+
+	// TODO
+	private void updateNamedQueries() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java
new file mode 100644
index 0000000..158384d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNamedQueryAnnotation.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableNamedQueryAnnotation;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public abstract class BinaryNamedQueryAnnotation
+	extends BinaryBaseNamedQueryAnnotation
+	implements NestableNamedQueryAnnotation, NamedQueryAnnotation
+{
+	public BinaryNamedQueryAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** BinaryBaseNamedQueryAnnotation implementation **********
+
+	@Override
+	String getNameElementName() {
+		return JPA.NAMED_QUERY__NAME;
+	}
+
+	@Override
+	String getQueryElementName() {
+		return JPA.NAMED_QUERY__QUERY;
+	}
+
+	@Override
+	String getHintsElementName() {
+		return JPA.NAMED_QUERY__HINTS;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNode.java
new file mode 100644
index 0000000..8f01e8d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryNode.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.AbstractJavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Binary convenience methods
+ */
+// TODO hopefully this class can go away with some sort of refactoring of the
+// source and binary hierarchies...
+public abstract class BinaryNode
+	extends AbstractJavaResourceNode
+{
+
+	// ********** construction **********
+	
+	protected BinaryNode(JavaResourceNode parent) {
+		super(parent);
+	}
+
+
+	// ********** JavaResourceNode implementation **********
+
+	@Override
+	public IFile getFile() {
+		return null;  // only BinaryPackageFragmentRoot has a file...
+	}
+
+	public void update() {
+		// nothing by default
+	}
+
+	public JavaResourceCompilationUnit getJavaResourceCompilationUnit() {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java
new file mode 100644
index 0000000..b0872a9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOneToManyAnnotation.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OneToMany
+ */
+public final class BinaryOneToManyAnnotation
+	extends BinaryRelationshipMappingAnnotation
+	implements OneToMany2_0Annotation
+{
+	private String mappedBy;
+
+	private Boolean orphanRemoval; //added in JPA 2.0
+
+	public BinaryOneToManyAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.mappedBy = this.buildMappedBy();
+		this.orphanRemoval = this.buildOrphanRemoval();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setMappedBy_(this.buildMappedBy());
+		this.setOrphanRemoval_(this.buildOrphanRemoval());
+	}
+
+
+	// ********** BinaryRelationshipMappingAnnotation implementation **********
+
+	@Override
+	String getTargetEntityElementName() {
+		return JPA.ONE_TO_MANY__TARGET_ENTITY;
+	}
+
+	@Override
+	String getFetchElementName() {
+		return JPA.ONE_TO_MANY__FETCH;
+	}
+
+	@Override
+	String getCascadeElementName() {
+		return JPA.ONE_TO_MANY__CASCADE;
+	}
+
+
+	//**************** OwnableRelationshipMappingAnnotation implementation **************
+
+	// ***** mapped by
+	public String getMappedBy() {
+		return this.mappedBy;
+	}
+
+	public void setMappedBy(String mappedBy) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setMappedBy_(String mappedBy) {
+		String old = this.mappedBy;
+		this.mappedBy = mappedBy;
+		this.firePropertyChanged(MAPPED_BY_PROPERTY, old, mappedBy);
+	}
+
+	private String buildMappedBy() {
+		return (String) this.getJdtMemberValue(JPA.ONE_TO_MANY__MAPPED_BY);
+	}
+
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** OneToMany2_0Annotation implementation **********
+
+	public Boolean getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+
+	public void setOrphanRemoval(Boolean orphanRemoval) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getOrphanRemovalTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Boolean buildOrphanRemoval() {
+		return (Boolean) this.getJdtMemberValue(JPA2_0.ONE_TO_MANY__ORPHAN_REMOVAL);
+	}
+
+	private void setOrphanRemoval_(Boolean orphanRemoval) {
+		Boolean old = this.orphanRemoval;
+		this.orphanRemoval = orphanRemoval;
+		this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java
new file mode 100644
index 0000000..9a5be7b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOneToOneAnnotation.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OneToOne
+ */
+public class BinaryOneToOneAnnotation
+	extends BinaryRelationshipMappingAnnotation
+	implements OneToOne2_0Annotation
+{
+	private Boolean optional;
+	private String mappedBy;
+	private Boolean orphanRemoval; //added in JPA 2.0
+
+	public BinaryOneToOneAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.optional = this.buildOptional();
+		this.mappedBy = this.buildMappedBy();
+		this.orphanRemoval = this.buildOrphanRemoval();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setOptional_(this.buildOptional());
+		this.setMappedBy_(this.buildMappedBy());
+		this.setOrphanRemoval_(this.buildOrphanRemoval());
+	}
+
+
+	// ********** BinaryRelationshipMappingAnnotation implementation **********
+
+	@Override
+	String getTargetEntityElementName() {
+		return JPA.ONE_TO_ONE__TARGET_ENTITY;
+	}
+
+	@Override
+	String getFetchElementName() {
+		return JPA.ONE_TO_ONE__FETCH;
+	}
+
+	@Override
+	String getCascadeElementName() {
+		return JPA.ONE_TO_ONE__CASCADE;
+	}
+
+
+	//**************** OwnableRelationshipMappingAnnotation implementation **************
+
+	// ***** mapped by
+	public String getMappedBy() {
+		return this.mappedBy;
+	}
+
+	public void setMappedBy(String mappedBy) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setMappedBy_(String mappedBy) {
+		String old = this.mappedBy;
+		this.mappedBy = mappedBy;
+		this.firePropertyChanged(MAPPED_BY_PROPERTY, old, mappedBy);
+	}
+
+	private String buildMappedBy() {
+		return (String) this.getJdtMemberValue(JPA.ONE_TO_ONE__MAPPED_BY);
+	}
+
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+
+	//**************** OneToOneAnnotation implementation **************
+
+	// ***** optional
+	public Boolean getOptional() {
+		return this.optional;
+	}
+
+	public void setOptional(Boolean optional) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setOptional_(Boolean optional) {
+		Boolean old = this.optional;
+		this.optional = optional;
+		this.firePropertyChanged(OPTIONAL_PROPERTY, old, optional);
+	}
+
+	private Boolean buildOptional() {
+		return (Boolean) this.getJdtMemberValue(JPA.ONE_TO_ONE__OPTIONAL);
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** OneToOne2_0Annotation implementation **********
+
+	public Boolean getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+
+	public void setOrphanRemoval(Boolean orphanRemoval) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getOrphanRemovalTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Boolean buildOrphanRemoval() {
+		return (Boolean) this.getJdtMemberValue(JPA2_0.ONE_TO_ONE__ORPHAN_REMOVAL);
+	}
+
+	private void setOrphanRemoval_(Boolean orphanRemoval) {
+		Boolean old = this.orphanRemoval;
+		this.orphanRemoval = orphanRemoval;
+		this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, orphanRemoval);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOrderByAnnotation.java
new file mode 100644
index 0000000..e8f87d7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOrderByAnnotation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.OrderByAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.OrderBy
+ */
+public final class BinaryOrderByAnnotation
+	extends BinaryAnnotation
+	implements OrderByAnnotation
+{
+	private String value;
+
+
+	public BinaryOrderByAnnotation(JavaResourcePersistentAttribute parent, IAnnotation annotation) {
+		super(parent, annotation);
+		this.value = this.buildValue();
+	}
+	
+	@Override
+	public void update() {
+		super.update();
+		this.setValue_(this.buildValue());
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** OrderByAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(String value) {
+		String old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA.ORDER_BY__VALUE);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOverrideAnnotation.java
new file mode 100644
index 0000000..4e129f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryOverrideAnnotation.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common behavior for
+ *     javax.persistence.AttributeOverride
+ *     javax.persistence.AssociationOverride
+ */
+public abstract class BinaryOverrideAnnotation
+	extends BinaryAnnotation
+	implements OverrideAnnotation
+{
+	private String name;
+
+
+	public BinaryOverrideAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+	
+
+	// ********** OverrideAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(OverrideAnnotation.NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(this.getNameElementName());
+	}
+
+	protected abstract String getNameElementName();
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPackageFragment.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPackageFragment.java
new file mode 100644
index 0000000..734439b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPackageFragment.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.ListIterator;
+import java.util.Vector;
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.java.JavaResourceClassFile;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragment;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+
+/**
+ * binary package fragment
+ */
+final class BinaryPackageFragment
+	extends BinaryNode
+	implements JavaResourcePackageFragment
+{
+	/** JDT package fragment */
+	private final IPackageFragment packageFragment;
+
+	/**
+	 * class files in the package fragment;
+	 * we only hold class files/types that are actually annotated;
+	 * if the unannotated types are needed (e.g. for orm.xml or an
+	 * inheritance tree) they can be discovered on the classpath as needed
+	 */
+	private final Vector<JavaResourceClassFile> classFiles = new Vector<JavaResourceClassFile>();
+
+
+	// ********** construction/initialization **********
+
+	BinaryPackageFragment(JavaResourcePackageFragmentRoot parent, IPackageFragment packageFragment) {
+		super(parent);
+		this.packageFragment = packageFragment;
+		this.classFiles.addAll(this.buildClassFiles());
+	}
+
+	private Collection<JavaResourceClassFile> buildClassFiles() {
+		IJavaElement[] children = this.getJDTChildren();
+		ArrayList<JavaResourceClassFile> result = new ArrayList<JavaResourceClassFile>(children.length);
+		for (IJavaElement child : children) {
+			IClassFile jdtClassFile = (IClassFile) child;
+			IType jdtType = jdtClassFile.getType();
+			if (BinaryPersistentType.typeIsPersistable(jdtType)) {
+				JavaResourceClassFile classFile = new BinaryClassFile(this, jdtClassFile, jdtType);
+				if (classFile.getPersistentType().isAnnotated()) {  // we only hold annotated types
+					result.add(classFile);
+				}
+			}
+		}
+		return result;
+	}
+
+
+	// ********** JarResourceNode implementation **********
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateClassFiles();
+	}
+
+	// TODO
+	private void updateClassFiles() {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** JavaResourcePackageFragment implementation **********
+
+	public ListIterator<JavaResourceClassFile> classFiles() {
+		return new CloneListIterator<JavaResourceClassFile>(this.classFiles);
+	}
+
+	public int classFilesSize() {
+		return this.classFiles.size();
+	}
+
+	public Iterator<JavaResourcePersistentType> persistedTypes() {
+		return new TransformationIterator<JavaResourceClassFile, JavaResourcePersistentType>(this.classFiles()) {
+			@Override
+			protected JavaResourcePersistentType transform(JavaResourceClassFile classFile) {
+				return classFile.getPersistentType();  // we only hold annotated types
+			}
+		};
+	}
+
+
+	// ********** misc **********
+
+	private IJavaElement[] getJDTChildren() {
+		try {
+			return this.packageFragment.getChildren();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EMPTY_JAVA_ELEMENT_ARRAY;
+		}
+	}
+	protected static final IJavaElement[] EMPTY_JAVA_ELEMENT_ARRAY = new IJavaElement[0];
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.packageFragment.getElementName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPackageFragmentRoot.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPackageFragmentRoot.java
new file mode 100644
index 0000000..52276c4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPackageFragmentRoot.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragment;
+import org.eclipse.jpt.core.resource.java.JavaResourcePackageFragmentRoot;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+
+/**
+ * binary package fragment root
+ */
+public final class BinaryPackageFragmentRoot
+	extends RootBinaryNode
+	implements JavaResourcePackageFragmentRoot
+{
+	/** JDT package fragment root */
+	private final IPackageFragmentRoot packageFragmentRoot;
+
+	/** package fragments in the JAR */
+	private final Vector<JavaResourcePackageFragment> packageFragments = new Vector<JavaResourcePackageFragment>();
+
+
+	// ********** construction/initialization **********
+
+	public BinaryPackageFragmentRoot(IPackageFragmentRoot packageFragmentRoot, JpaAnnotationProvider annotationProvider) {
+		super(null, annotationProvider);  // the package fragment root is the root of its sub-tree
+		this.packageFragmentRoot = packageFragmentRoot;
+		this.packageFragments.addAll(this.buildPackageFragments());
+	}
+
+	private Collection<JavaResourcePackageFragment> buildPackageFragments() {
+		IJavaElement[] jdtChildren = this.getJDTChildren();
+		ArrayList<JavaResourcePackageFragment> result = new ArrayList<JavaResourcePackageFragment>(jdtChildren.length);
+		for (IJavaElement child : jdtChildren) {
+			result.add(new BinaryPackageFragment(this, (IPackageFragment) child));
+		}
+		return result;
+	}
+
+
+	// ********** overrides **********
+
+	@Override
+	public IFile getFile() {
+		return (IFile) this.packageFragmentRoot.getResource();
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updatePackageFragments();
+	}
+
+	// TODO
+	private void updatePackageFragments() {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** JavaResourceNode.Root implementation **********
+
+	/**
+	 * NB: we hold only annotated types
+	 */
+	public Iterator<JavaResourcePersistentType> persistentTypes() {
+		return new CompositeIterator<JavaResourcePersistentType>(this.persistedTypeIterators());
+	}
+
+	private Iterator<Iterator<JavaResourcePersistentType>> persistedTypeIterators() {
+		return new TransformationIterator<JavaResourcePackageFragment, Iterator<JavaResourcePersistentType>>(this.packageFragments()) {
+			@Override
+			protected Iterator<JavaResourcePersistentType> transform(JavaResourcePackageFragment fragment) {
+				return fragment.persistedTypes();
+			}
+		};
+	}
+
+
+	// ********** JavaResourcePackageFragmentRoot implementation **********
+
+	public Iterator<JavaResourcePackageFragment> packageFragments() {
+		return new CloneIterator<JavaResourcePackageFragment>(this.packageFragments);
+	}
+
+	public int packageFragmentsSize() {
+		return this.packageFragments.size();
+	}
+
+
+	// ********** misc **********
+
+	private IJavaElement[] getJDTChildren() {
+		try {
+			return this.packageFragmentRoot.getChildren();
+		} catch (JavaModelException ex) {
+			// ignore FNFE - which can happen when the workspace is out of synch with O/S file system
+			if ( ! (ex.getCause() instanceof FileNotFoundException)) {
+				JptCorePlugin.log(ex);
+			}
+			return EMPTY_JAVA_ELEMENT_ARRAY;
+		}
+	}
+	private static final IJavaElement[] EMPTY_JAVA_ELEMENT_ARRAY = new IJavaElement[0];
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getFile().getName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java
new file mode 100644
index 0000000..1b3f027
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java
@@ -0,0 +1,649 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.utility.jdt.JPTTools;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.utility.MethodSignature;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.NameTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * binary persistent attribute (field or property)
+ */
+final class BinaryPersistentAttribute
+	extends BinaryPersistentMember
+	implements JavaResourcePersistentAttribute
+{
+	private int modifiers;
+
+	private String typeName;
+
+	private boolean typeIsInterface;
+
+	private boolean typeIsEnum;
+
+	private final Vector<String> typeSuperclassNames = new Vector<String>();
+
+	private final Vector<String> typeInterfaceNames = new Vector<String>();
+
+	private final Vector<String> typeTypeArgumentNames = new Vector<String>();
+
+
+	BinaryPersistentAttribute(JavaResourcePersistentType parent, IField field) {
+		this(parent, new FieldAdapter(field));
+	}
+
+	BinaryPersistentAttribute(JavaResourcePersistentType parent, IMethod method) {
+		this(parent, new MethodAdapter(method));
+	}
+
+	private BinaryPersistentAttribute(JavaResourcePersistentType parent, Adapter adapter) {
+		super(parent, adapter);
+		this.modifiers = this.buildModifiers();
+		this.typeName = this.buildTypeName();
+
+		IType type = this.getType();  // shouldn't be an array...
+		this.typeIsInterface = this.buildTypeIsInterface(type);
+		this.typeIsEnum = this.buildTypeIsEnum(type);
+		this.typeSuperclassNames.addAll(this.buildTypeSuperclassNames(type));
+		this.typeInterfaceNames.addAll(this.buildTypeInterfaceNames(type));
+
+		this.typeTypeArgumentNames.addAll(this.buildTypeTypeArgumentNames());
+	}
+
+
+	// ******** overrides ********
+
+	@Override
+	public void update() {
+		super.update();
+		this.setModifiers(this.buildModifiers());
+		this.setTypeName(this.buildTypeName());
+
+		IType type = this.getType();  // shouldn't be an array...
+		this.setTypeIsInterface(this.buildTypeIsInterface(type));
+		this.setTypeIsEnum(this.buildTypeIsEnum(type));
+		this.setTypeSuperclassNames(this.buildTypeSuperclassNames(type));
+		this.setTypeInterfaceNames(this.buildTypeInterfaceNames(type));
+
+		this.setTypeTypeArgumentNames(this.buildTypeTypeArgumentNames());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ********** BinaryPersistentMember implementation **********
+	
+	private Adapter getAdapter() {
+		return (Adapter) this.adapter;
+	}
+	
+	@Override
+	Iterator<String> validAnnotationNames() {
+		return this.getAnnotationProvider().attributeAnnotationNames();
+	}
+	
+	@Override
+	Annotation buildAnnotation(IAnnotation jdtAnnotation) {
+		return this.getAnnotationProvider().buildAttributeAnnotation(this, jdtAnnotation);
+	}
+	
+	Annotation buildNullAnnotation_(String annotationName) {
+		return this.getAnnotationProvider().buildNullAttributeAnnotation(this, annotationName);
+	}
+	
+	
+	// ********** JavaResourcePersistentAttribute implementation **********
+	
+	public String getName() {
+		return this.getAdapter().getAttributeName();
+	}
+	
+	@Override
+	public Annotation buildNullAnnotation(String annotationName) {
+		return (annotationName == null) ? null : this.buildNullAnnotation_(annotationName);
+	}
+	
+	public boolean isField() {
+		return this.getAdapter().isField();
+	}
+
+	public boolean isProperty() {
+		return ! this.isField();
+	}
+
+	public boolean isFor(MethodSignature methodSignature, int occurrence) {
+		throw new UnsupportedOperationException();
+	}
+
+	public AccessType getSpecifiedAccess() {
+		Access2_0Annotation accessAnnotation = (Access2_0Annotation) this.getAnnotation(Access2_0Annotation.ANNOTATION_NAME);
+		return accessAnnotation == null ? null : accessAnnotation.getValue();
+	}
+
+	public boolean typeIsSubTypeOf(String tn) {
+		return ((this.typeName != null) && this.typeName.equals(tn))
+				|| this.typeInterfaceNames.contains(tn)
+				|| this.typeSuperclassNames.contains(tn);
+	}
+
+	public boolean typeIsVariablePrimitive() {
+		return (this.typeName != null) && ClassName.isVariablePrimitive(this.typeName);
+	}
+
+	// ***** modifiers
+	public int getModifiers() {
+		return this.modifiers;
+	}
+
+	private void setModifiers(int modifiers) {
+		int old = this.modifiers;
+		this.modifiers = modifiers;
+		this.firePropertyChanged(MODIFIERS_PROPERTY, old, modifiers);
+	}
+
+	/**
+	 * zero seems like a reasonable default...
+	 */
+	private int buildModifiers() {
+		try {
+			return this.getMember().getFlags();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return 0;
+		}
+	}
+
+	// ***** type name
+	public String getTypeName() {
+		return this.typeName;
+	}
+
+	private void setTypeName(String typeName) {
+		String old = this.typeName;
+		this.typeName = typeName;
+		this.firePropertyChanged(TYPE_NAME_PROPERTY, old, typeName);
+	}
+
+	/**
+	 * JARs don't have array types;
+	 * also, no generic type parameters
+	 */
+	private String buildTypeName() {
+		return convertTypeSignatureToTypeName(this.getTypeSignature());
+	}
+
+	// ***** type is interface
+	public boolean typeIsInterface() {
+		return this.typeIsInterface;
+	}
+
+	private void setTypeIsInterface(boolean typeIsInterface) {
+		boolean old = this.typeIsInterface;
+		this.typeIsInterface = typeIsInterface;
+		this.firePropertyChanged(TYPE_IS_INTERFACE_PROPERTY, old, typeIsInterface);
+	}
+
+	private boolean buildTypeIsInterface(IType type) {
+		try {
+			return (type != null) && type.isInterface();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return false;
+		}
+	}
+
+	// ***** type is enum
+	public boolean typeIsEnum() {
+		return this.typeIsEnum;
+	}
+
+	private void setTypeIsEnum(boolean typeIsEnum) {
+		boolean old = this.typeIsEnum;
+		this.typeIsEnum = typeIsEnum;
+		this.firePropertyChanged(TYPE_IS_ENUM_PROPERTY, old, typeIsEnum);
+	}
+
+	private boolean buildTypeIsEnum(IType type) {
+		try {
+			return (type != null) && type.isEnum();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return false;
+		}
+	}
+
+	// ***** type superclass hierarchy
+	public ListIterator<String> typeSuperclassNames() {
+		return new CloneListIterator<String>(this.typeSuperclassNames);
+	}
+
+	public boolean typeSuperclassNamesContains(String superclassName) {
+		return this.typeSuperclassNames.contains(superclassName);
+	}
+
+	private void setTypeSuperclassNames(List<String> typeSuperclassNames) {
+		this.synchronizeList(typeSuperclassNames, this.typeSuperclassNames, TYPE_SUPERCLASS_NAMES_LIST);
+	}
+
+	private List<String> buildTypeSuperclassNames(IType type) {
+		if (type == null) {
+			return Collections.emptyList();
+		}
+
+		ArrayList<String> names = new ArrayList<String>();
+		type = this.findSuperclass(type);
+		while (type != null) {
+			names.add(type.getFullyQualifiedName('.'));  // no parameters are included here
+			type = this.findSuperclass(type);
+		}
+		return names;
+	}
+
+	// ***** type interface hierarchy
+	public Iterator<String> typeInterfaceNames() {
+		return new CloneIterator<String>(this.typeInterfaceNames);
+	}
+
+	public boolean typeInterfaceNamesContains(String interfaceName) {
+		return this.typeInterfaceNames.contains(interfaceName);
+	}
+
+	private void setTypeInterfaceNames(Collection<String> typeInterfaceNames) {
+		this.synchronizeCollection(typeInterfaceNames, this.typeInterfaceNames, TYPE_INTERFACE_NAMES_COLLECTION);
+	}
+
+	private Collection<String> buildTypeInterfaceNames(IType type) {
+		if (type == null) {
+			return Collections.emptySet();
+		}
+
+		HashSet<String> names = new HashSet<String>();
+		while (type != null) {
+			this.addInterfaceNamesTo(type, names);
+			type = this.findSuperclass(type);
+		}
+		return names;
+	}
+
+	private void addInterfaceNamesTo(IType type, HashSet<String> names) {
+		for (String interfaceSignature : this.getSuperInterfaceTypeSignatures(type)) {
+			String interfaceName = convertTypeSignatureToTypeName(interfaceSignature);
+			names.add(interfaceName);
+			IType interfaceType = this.findType(interfaceName);
+			if (interfaceType != null) {
+				this.addInterfaceNamesTo(interfaceType, names);  // recurse
+			}
+		}
+	}
+
+	// ***** type type argument names
+	public ListIterator<String> typeTypeArgumentNames() {
+		return new CloneListIterator<String>(this.typeTypeArgumentNames);
+	}
+
+	public int typeTypeArgumentNamesSize() {
+		return this.typeTypeArgumentNames.size();
+	}
+
+	public String getTypeTypeArgumentName(int index) {
+		return this.typeTypeArgumentNames.get(index);
+	}
+
+	private void setTypeTypeArgumentNames(List<String> typeTypeArgumentNames) {
+		this.synchronizeList(typeTypeArgumentNames, this.typeTypeArgumentNames, TYPE_TYPE_ARGUMENT_NAMES_LIST);
+	}
+
+	/**
+	 * these types can be arrays (e.g. "java.lang.String[]");
+	 * but they won't have any further nested generic type arguments
+	 * (e.g. "java.util.Collection<java.lang.String>")
+	 */
+	private List<String> buildTypeTypeArgumentNames() {
+		String typeSignature = this.getTypeSignature();
+		if (typeSignature == null) {
+			return Collections.emptyList();
+		}
+
+		String[] typeArgumentSignatures = Signature.getTypeArguments(typeSignature);
+		if (typeArgumentSignatures.length == 0) {
+			return Collections.emptyList();
+		}
+
+		ArrayList<String> names = new ArrayList<String>(typeArgumentSignatures.length);
+		for (String typeArgumentSignature : typeArgumentSignatures) {
+			names.add(convertTypeSignatureToTypeName(typeArgumentSignature));
+		}
+		return names;
+	}
+
+
+	// ********** convenience methods **********
+
+	private String getTypeSignature() {
+		try {
+			return this.getAdapter().getTypeSignature();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return null;
+		}
+	}
+
+	private IType findSuperclass(IType type) {
+		return this.findTypeBySignature(this.getSuperclassSignature(type));
+	}
+
+	private String getSuperclassSignature(IType type) {
+		try {
+			return type.getSuperclassTypeSignature();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return null;
+		}
+	}
+
+	private String[] getSuperInterfaceTypeSignatures(IType type) {
+		try {
+			return type.getSuperInterfaceTypeSignatures();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EMPTY_STRING_ARRAY;
+		}
+	}
+	private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+	private IType findTypeBySignature(String typeSignature) {
+		return (typeSignature == null) ? null : this.findType(convertTypeSignatureToTypeName_(typeSignature));
+	}
+
+	private IType getType() {
+		return (this.typeName == null) ? null : this.findType(this.typeName);
+	}
+
+	private IType findType(String fullyQualifiedName) {
+		try {
+			return this.getJavaProject().findType(fullyQualifiedName);
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return null;
+		}
+	}
+
+	private IJavaProject getJavaProject() {
+		return this.getMember().getJavaProject();
+	}
+
+
+
+	// ********** adapters **********
+
+	/**
+	 * Adapt an IField or IMethod.
+	 */
+	interface Adapter
+		extends BinaryPersistentMember.Adapter
+	{
+		/**
+		 * Return the field or getter method's "attribute" name
+		 * (e.g. field "foo" -> "foo"; method "getFoo" -> "foo").
+		 */
+		String getAttributeName();
+
+		/**
+		 * Return whether the attribute is a Java field (as opposed to a method).
+		 */
+		boolean isField();
+
+		/**
+		 * Return the attribute's type signature.
+		 */
+		String getTypeSignature() throws JavaModelException;
+	}
+
+	/**
+	 * IField adapter
+	 */
+	static class FieldAdapter
+		implements Adapter
+	{
+		final IField field;
+
+		FieldAdapter(IField field) {
+			super();
+			this.field = field;
+		}
+
+		public IField getMember() {
+			return this.field;
+		}
+
+		public boolean isPersistable() {
+			return this.field.exists() && JPTTools.fieldIsPersistable(new JPTToolsAdapter());
+		}
+
+		public IAnnotation[] getAnnotations() throws JavaModelException {
+			return this.field.getAnnotations();
+		}
+
+		public String getAttributeName() {
+			return this.field.getElementName();
+		}
+
+		public boolean isField() {
+			return true;
+		}
+
+		public String getTypeSignature() throws JavaModelException {
+			return this.field.getTypeSignature();
+		}
+
+		/**
+		 * JPTTools needs an adapter so it can work with either an IField
+		 * or an IVariableBinding etc.
+		 */
+		class JPTToolsAdapter implements JPTTools.FieldAdapter {
+			public int getModifiers() {
+				try {
+					return FieldAdapter.this.field.getFlags();
+				} catch (JavaModelException ex) {
+					JptCorePlugin.log(ex);
+					return 0;
+				}
+			}
+
+		}
+
+	}
+
+	/**
+	 * IMethod adapter
+	 */
+	static class MethodAdapter
+		implements Adapter
+	{
+		final IMethod method;
+		static final IMethod[] EMPTY_METHOD_ARRAY = new IMethod[0];
+
+		MethodAdapter(IMethod method) {
+			super();
+			this.method = method;
+		}
+
+		public IMethod getMember() {
+			return this.method;
+		}
+
+		public boolean isPersistable() {
+			return JPTTools.methodIsPersistablePropertyGetter(new JPTToolsAdapter());
+		}
+
+		public IAnnotation[] getAnnotations() throws JavaModelException {
+			return this.method.getAnnotations();
+		}
+
+		public String getAttributeName() {
+			return NameTools.convertGetterMethodNameToPropertyName(this.method.getElementName());
+		}
+
+		public boolean isField() {
+			return false;
+		}
+
+		public String getTypeSignature() throws JavaModelException {
+			return this.method.getReturnType();
+		}
+
+		/**
+		 * JPTTools needs an adapter so it can work with either an IMethod
+		 * or an IMethodBinding etc.
+		 */
+		abstract static class AbstractJPTToolsAdapter
+			implements JPTTools.SimpleMethodAdapter
+		{
+			AbstractJPTToolsAdapter() {
+				super();
+			}
+
+			abstract IMethod getMethod();
+
+			public int getModifiers() {
+				try {
+					return this.getMethod().getFlags();
+				} catch (JavaModelException ex) {
+					JptCorePlugin.log(ex);
+					return 0;
+				}
+			}
+
+			public String getReturnTypeErasureName() {
+				return convertTypeSignatureToTypeName(this.getReturnTypeSignature());
+			}
+
+			private String getReturnTypeSignature() {
+				try {
+					return this.getMethod().getReturnType();
+				} catch (JavaModelException ex) {
+					JptCorePlugin.log(ex);
+					return null;
+				}
+			}
+
+			public boolean isConstructor() {
+				try {
+					return this.getMethod().isConstructor();
+				} catch (JavaModelException ex) {
+					JptCorePlugin.log(ex);
+					return false;
+				}
+			}
+
+		}
+
+		static class SimpleJPTToolsAdapter
+			extends AbstractJPTToolsAdapter
+		{
+			private final IMethod method;
+
+			SimpleJPTToolsAdapter(IMethod method) {
+				super();
+				this.method = method;
+			}
+
+			@Override
+			IMethod getMethod() {
+				return this.method;
+			}
+
+		}
+
+		class JPTToolsAdapter
+			extends AbstractJPTToolsAdapter
+			implements JPTTools.MethodAdapter
+		{
+			JPTToolsAdapter() {
+				super();
+			}
+
+			@Override
+			IMethod getMethod() {
+				return MethodAdapter.this.method;
+			}
+
+			public String getName() {
+				return this.getMethod().getElementName();
+			}
+
+			public int getParametersLength() {
+				return this.getMethod().getParameterTypes().length;
+			}
+
+			public JPTTools.SimpleMethodAdapter getSibling(String name) {
+				for (IMethod sibling : this.getSiblings()) {
+					if ((sibling.getParameterTypes().length == 0)
+							&& sibling.getElementName().equals(name)) {
+						return new SimpleJPTToolsAdapter(sibling);
+					}
+				}
+				return null;
+			}
+
+			public JPTTools.SimpleMethodAdapter getSibling(String name, String parameterTypeErasureName) {
+				for (IMethod sibling : this.getSiblings()) {
+					String[] parmTypes = sibling.getParameterTypes();
+					if ((parmTypes.length == 1)
+							&& sibling.getElementName().equals(name)
+							&& convertTypeSignatureToTypeName(parmTypes[0]).equals(parameterTypeErasureName)) {
+						return new SimpleJPTToolsAdapter(sibling);
+					}
+				}
+				return null;
+			}
+
+			private IMethod[] getSiblings() {
+				try {
+					return this.getMethod().getDeclaringType().getMethods();
+				} catch (JavaModelException ex) {
+					JptCorePlugin.log(ex);
+					return EMPTY_METHOD_ARRAY;
+				}
+			}
+
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java
new file mode 100644
index 0000000..ddf8901
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+
+/**
+ * binary persistent member
+ */
+abstract class BinaryPersistentMember
+	extends BinaryNode
+	implements JavaResourcePersistentMember
+{
+	/** JDT member adapter */
+	final Adapter adapter;
+
+	/** annotations */
+	final Vector<Annotation> annotations = new Vector<Annotation>();
+
+	boolean persistable;
+
+
+	// ********** construction/initialization **********
+
+	public BinaryPersistentMember(JavaResourceNode parent, Adapter adapter) {
+		super(parent);
+		this.adapter = adapter;
+		this.initializeAnnotations();
+		this.persistable = this.buildPersistable();
+	}
+
+	private void initializeAnnotations() {
+		for (IAnnotation annotation : this.getJdtAnnotations()) {
+			this.addAnnotation(annotation);
+		}
+	}
+
+	private void addAnnotation(IAnnotation jdtAnnotation) {
+		if (this.annotationIsValid(jdtAnnotation)) {
+			this.annotations.add(this.buildAnnotation(jdtAnnotation));
+		}
+	}
+
+
+	// ********** updating **********
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateAnnotations();
+		this.setPersistable(this.buildPersistable());
+	}
+
+	// TODO
+	private void updateAnnotations() {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** annotations **********
+
+	public Iterator<Annotation> annotations() {
+		return this.getAnnotations().iterator();
+	}
+
+	private Iterable<Annotation> getAnnotations() {
+		return new LiveCloneIterable<Annotation>(this.annotations);
+	}
+
+	public int annotationsSize() {
+		return this.annotations.size();
+	}
+
+	public Annotation getAnnotation(String annotationName) {
+		return this.selectAnnotationNamed(this.getAnnotations(), annotationName);
+	}
+
+	public Annotation getNonNullAnnotation(String annotationName) {
+		Annotation annotation = this.getAnnotation(annotationName);
+		return (annotation != null) ? annotation : this.buildNullAnnotation(annotationName);
+	}
+
+	public Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName) {
+		ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+		if (containerAnnotation != null) {
+			return containerAnnotation.getNestedAnnotations().iterator();
+		}
+		NestableAnnotation nestableAnnotation = this.getNestableAnnotation(nestableAnnotationName);
+		return (nestableAnnotation == null) ?
+				EmptyListIterator.<NestableAnnotation>instance() :
+				new SingleElementIterator<NestableAnnotation>(nestableAnnotation);
+	}
+
+	private NestableAnnotation getNestableAnnotation(String annotationName) {
+		return (NestableAnnotation) this.getAnnotation(annotationName);
+	}
+
+	@SuppressWarnings("unchecked")
+	private ContainerAnnotation<NestableAnnotation> getContainerAnnotation(String annotationName) {
+		return (ContainerAnnotation<NestableAnnotation>) this.getAnnotation(annotationName);
+	}
+
+	private boolean annotationIsValid(IAnnotation jdtAnnotation) {
+		return CollectionTools.contains(this.validAnnotationNames(), jdtAnnotation.getElementName());
+	}
+
+	abstract Iterator<String> validAnnotationNames();
+
+	abstract Annotation buildAnnotation(IAnnotation jdtAnnotation);
+
+	abstract Annotation buildNullAnnotation(String annotationName);
+
+
+	// ********** simple state **********
+
+	public boolean isPersistable() {
+		return this.persistable;
+	}
+
+	private void setPersistable(boolean persistable) {
+		boolean old = this.persistable;
+		this.persistable = persistable;
+		this.firePropertyChanged(PERSISTABLE_PROPERTY, old, persistable);
+	}
+
+	private boolean buildPersistable() {
+		return this.adapter.isPersistable();
+	}
+
+	public boolean isAnnotated() {
+		return ! this.annotations.isEmpty();
+	}
+
+
+	// ********** miscellaneous **********
+
+	IMember getMember() {
+		return this.adapter.getMember();
+	}
+
+	private Annotation selectAnnotationNamed(Iterable<Annotation> annotationList, String annotationName) {
+		for (Annotation annotation : annotationList) {
+			if (annotation.getAnnotationName().equals(annotationName)) {
+				return annotation;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * convenience method
+	 */
+	<T extends JavaResourcePersistentMember> Iterator<T> persistableMembers(Iterator<T> members) {
+		return new FilteringIterator<T>(members) {
+			@Override
+			protected boolean accept(T m) {
+				return m.isPersistable();
+			}
+		};
+	}
+
+	/**
+	 * Strip off the type signature's parameters if present.
+	 * Convert to a readable string.
+	 */
+	static String convertTypeSignatureToTypeName(String typeSignature) {
+		return (typeSignature == null) ? null : convertTypeSignatureToTypeName_(typeSignature);
+	}
+
+	/**
+	 * no null check
+	 */
+	static String convertTypeSignatureToTypeName_(String typeSignature) {
+		return Signature.toString(Signature.getTypeErasure(typeSignature));
+	}
+
+	private IAnnotation[] getJdtAnnotations() {
+		try {
+			return this.adapter.getAnnotations();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EMPTY_JDT_ANNOTATION_ARRAY;
+		}
+	}
+	private static final IAnnotation[] EMPTY_JDT_ANNOTATION_ARRAY = new IAnnotation[0];
+
+
+	// ********** IMember adapter **********
+
+	interface Adapter {
+		/**
+		 * Return the adapter's JDT member (IType, IField, IMethod).
+		 */
+		IMember getMember();
+
+		/**
+		 * Return whether the adapter's member is "persistable"
+		 * (i.e. according to the JPA spec the member can be mapped)
+		 */
+		boolean isPersistable();
+
+		/**
+		 * Return the adapter's member's JDT annotations.
+		 */
+		IAnnotation[] getAnnotations() throws JavaModelException;
+	}
+
+
+	// ********** unsupported JavaResourcePersistentMember implementation **********
+
+	public Annotation addAnnotation(String annotationName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeAnnotation(String annotationName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames) {
+		throw new UnsupportedOperationException();
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void resolveTypes(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isFor(String memberName, int occurrence) {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java
new file mode 100644
index 0000000..887d519
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java
@@ -0,0 +1,583 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.utility.jdt.JPTTools;
+import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JavaResourcePersistentType2_0;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.utility.MethodSignature;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+
+/**
+ * binary persistent type
+ */
+final class BinaryPersistentType
+	extends BinaryPersistentMember
+	implements JavaResourcePersistentType2_0
+{
+	private String name;
+
+	private String qualifiedName;
+
+	private String superclassQualifiedName;
+
+	private String declaringTypeName;
+
+	private boolean abstract_;  // 'abstract' is a reserved word
+
+	private final Vector<JavaResourcePersistentAttribute> fields;
+
+	private final Vector<JavaResourcePersistentAttribute> methods;
+
+	private AccessType access;
+
+
+	// ********** construction/initialization **********
+
+	BinaryPersistentType(JavaResourceNode parent, IType type) {
+		super(parent, new TypeAdapter(type));
+		this.name = this.buildName();
+		this.qualifiedName = this.buildQualifiedName();
+		this.superclassQualifiedName = this.buildSuperclassQualifiedName();
+		this.declaringTypeName = this.buildDeclaringTypeName();
+		this.abstract_ = this.buildAbstract();
+		this.fields = this.buildFields();
+		this.methods = this.buildMethods();
+		// need to wait until everything is built to calculate 'access'
+		this.access = this.buildAccess();
+	}
+
+
+	// ********** overrides **********
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName(this.buildName());
+		this.setQualifiedName(this.buildQualifiedName());
+		this.setSuperclassQualifiedName(this.buildSuperclassQualifiedName());
+		this.setDeclaringTypeName(this.buildDeclaringTypeName());
+		this.setAbstract(this.buildAbstract());
+		this.updateFields();
+		this.updateMethods();
+		// need to wait until everything is updated to calculate 'access'
+		this.setAccess(this.buildAccess());
+	}
+
+	// TODO
+	private void updateFields() {
+		throw new UnsupportedOperationException();
+	}
+
+	// TODO
+	private void updateMethods() {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** BinaryPersistentMember implementation **********
+
+	@Override
+	Annotation buildAnnotation(IAnnotation jdtAnnotation) {
+		return this.getAnnotationProvider().buildTypeAnnotation(this, jdtAnnotation);
+	}
+	
+	@Override
+	Annotation buildNullAnnotation(String annotationName) {
+		return this.getAnnotationProvider().buildNullTypeAnnotation(this, annotationName);
+	}
+	
+	@Override
+	Iterator<String> validAnnotationNames() {
+		return this.getAnnotationProvider().typeAnnotationNames();
+	}
+	
+	
+	// ********** JavaResourcePersistentType implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	private void setName(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return this.getMember().getElementName();
+	}
+
+	// ***** qualified name
+	public String getQualifiedName() {
+		return this.qualifiedName;
+	}
+
+	private void setQualifiedName(String qualifiedName) {
+		String old = this.qualifiedName;
+		this.qualifiedName = qualifiedName;
+		this.firePropertyChanged(QUALIFIED_NAME_PROPERTY, old, qualifiedName);
+	}
+
+	private String buildQualifiedName() {
+		return this.getMember().getFullyQualifiedName('.');  // no parameters are included here
+	}
+
+	// ***** superclass qualified name
+	public String getSuperclassQualifiedName() {
+		return this.superclassQualifiedName;
+	}
+
+	private void setSuperclassQualifiedName(String superclassQualifiedName) {
+		String old = this.superclassQualifiedName;
+		this.superclassQualifiedName = superclassQualifiedName;
+		this.firePropertyChanged(SUPERCLASS_QUALIFIED_NAME_PROPERTY, old, superclassQualifiedName);
+	}
+
+	private String buildSuperclassQualifiedName() {
+		return convertTypeSignatureToTypeName(this.getSuperclassTypeSignature());
+	}
+
+	private String getSuperclassTypeSignature() {
+		try {
+			return this.getMember().getSuperclassTypeSignature();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return null;
+		}
+	}
+
+	// ***** declaring type name
+	public String getDeclaringTypeName() {
+		return this.declaringTypeName;
+	}
+
+	private void setDeclaringTypeName(String declaringTypeName) {
+		String old = this.declaringTypeName;
+		this.declaringTypeName = declaringTypeName;
+		this.firePropertyChanged(DECLARING_TYPE_NAME_PROPERTY, old, declaringTypeName);
+	}
+
+	private String buildDeclaringTypeName() {
+		IType declaringType = this.getMember().getDeclaringType();
+		return (declaringType == null) ? null : declaringType.getFullyQualifiedName('.');  // no parameters are included here
+	}
+
+	// ***** abstract
+	public boolean isAbstract() {
+		return this.abstract_;
+	}
+
+	private void setAbstract(boolean abstract_) {
+		boolean old = this.abstract_;
+		this.abstract_ = abstract_;
+		this.firePropertyChanged(ABSTRACT_PROPERTY, old, abstract_);
+	}
+
+	private boolean buildAbstract() {
+		try {
+			return Flags.isAbstract(this.getMember().getFlags());
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return false;
+		}
+	}
+
+	// ***** access
+	public AccessType getAccess() {
+		return this.access;
+	}
+
+	private void setAccess(AccessType access) {
+		AccessType old = this.access;
+		this.access = access;
+		this.firePropertyChanged(ACCESS_PROPERTY, old, access);
+	}
+
+	private AccessType buildAccess() {
+		return JPTTools.buildAccess(this);
+	}
+	
+	public boolean isMapped() {
+		for (Annotation each : CollectionTools.iterable(annotations())) {
+			if (CollectionTools.contains(
+					getAnnotationProvider().typeMappingAnnotationNames(), 
+					each.getAnnotationName())) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * check only persistable attributes
+	 */
+	public boolean hasAnyAnnotatedAttributes() {
+		for (Iterator<JavaResourcePersistentAttribute> stream = this.persistableAttributes(); stream.hasNext(); ) {
+			if (stream.next().isAnnotated()) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	@Override
+	public IType getMember() {
+		return (IType) super.getMember();
+	}
+
+
+	// ********** fields **********
+
+	public Iterator<JavaResourcePersistentAttribute> fields() {
+		return this.getFields().iterator();
+	}
+
+	private Iterable<JavaResourcePersistentAttribute> getFields() {
+		return new LiveCloneIterable<JavaResourcePersistentAttribute>(this.fields);
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistableFields() {
+		return this.persistableMembers(this.fields());
+	}
+	
+	public Iterator<JavaResourcePersistentAttribute> persistableFieldsWithSpecifiedFieldAccess() {
+		return new FilteringIterator<JavaResourcePersistentAttribute>(this.persistableFields()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentAttribute resourceAttribute) {
+				return resourceAttribute.getSpecifiedAccess() == AccessType.FIELD;
+			}
+		};
+	}
+	
+	private void addField(JavaResourcePersistentAttribute field) {
+		this.addItemToCollection(field, this.fields, FIELDS_COLLECTION);
+	}
+
+	private JavaResourcePersistentAttribute getField(String fieldName, int occurrence) {
+		for (JavaResourcePersistentAttribute field : this.getFields()) {
+			if (field.isFor(fieldName, occurrence)) {
+				return field;
+			}
+		}
+		return null;
+	}
+
+	private void removeFields(Collection<JavaResourcePersistentAttribute> remove) {
+		this.removeItemsFromCollection(remove, this.fields, FIELDS_COLLECTION);
+	}
+
+	private Vector<JavaResourcePersistentAttribute> buildFields() {
+		IField[] jdtFields = this.getFields(this.getMember());
+		Vector<JavaResourcePersistentAttribute> result = new Vector<JavaResourcePersistentAttribute>(jdtFields.length);
+		for (IField jdtField : jdtFields) {
+			result.add(this.buildField(jdtField));
+		}
+		return result;
+	}
+
+	private IField[] getFields(IType type) {
+		try {
+			return type.getFields();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EMPTY_FIELD_ARRAY;
+		}
+	}
+	private static final IField[] EMPTY_FIELD_ARRAY = new IField[0];
+
+	private JavaResourcePersistentAttribute buildField(IField jdtField) {
+		return new BinaryPersistentAttribute(this, jdtField);
+	}
+
+
+	// ********** methods **********
+
+	public Iterator<JavaResourcePersistentAttribute> methods() {
+		return this.getMethods().iterator();
+	}
+
+	private Iterable<JavaResourcePersistentAttribute> getMethods() {
+		return new LiveCloneIterable<JavaResourcePersistentAttribute>(this.methods);
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistableProperties() {
+		return persistableMembers(this.methods());
+	}
+	
+	public Iterator<JavaResourcePersistentAttribute> persistablePropertiesWithSpecifiedPropertyAccess() {
+		return new FilteringIterator<JavaResourcePersistentAttribute>(this.persistableProperties()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentAttribute resourceAttribute) {
+				return resourceAttribute.getSpecifiedAccess() == AccessType.PROPERTY;
+			}
+		};
+	}
+
+	private JavaResourcePersistentAttribute getMethod(MethodSignature signature, int occurrence) {
+		for (JavaResourcePersistentAttribute method : this.getMethods()) {
+			if (method.isFor(signature, occurrence)) {
+				return method;
+			}
+		}
+		return null;
+	}
+
+	private void addMethod(JavaResourcePersistentAttribute method) {
+		this.addItemToCollection(method, this.methods, METHODS_COLLECTION);
+	}
+
+	private void removeMethods(Collection<JavaResourcePersistentAttribute> remove) {
+		this.removeItemsFromCollection(remove, this.methods, METHODS_COLLECTION);
+	}
+
+	private Vector<JavaResourcePersistentAttribute> buildMethods() {
+		IMethod[] jdtMethods = this.getMethods(this.getMember());
+		Vector<JavaResourcePersistentAttribute> result = new Vector<JavaResourcePersistentAttribute>(jdtMethods.length);
+		for (IMethod jdtMethod : jdtMethods) {
+			result.add(this.buildMethod(jdtMethod));
+		}
+		return result;
+	}
+
+	private IMethod[] getMethods(IType type) {
+		try {
+			return type.getMethods();
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EMPTY_METHOD_ARRAY;
+		}
+	}
+	private static final IMethod[] EMPTY_METHOD_ARRAY = new IMethod[0];
+
+	private JavaResourcePersistentAttribute buildMethod(IMethod jdtMethod) {
+		return new BinaryPersistentAttribute(this, jdtMethod);
+	}
+
+
+	// ********** attributes **********
+
+	@SuppressWarnings("unchecked")
+	public Iterator<JavaResourcePersistentAttribute> persistableAttributes() {
+		return new CompositeIterator<JavaResourcePersistentAttribute>(
+				this.persistableFields(),
+				this.persistableProperties()
+			);
+	}
+	
+	public Iterator<JavaResourcePersistentAttribute> persistableAttributes(AccessType specifiedAccess) {
+		if (specifiedAccess == null) {
+			throw new IllegalArgumentException("specified access is null"); //$NON-NLS-1$
+		}
+		return (specifiedAccess == AccessType.FIELD) ?
+					this.persistableAttributesForFieldAccessType() :
+					this.persistableAttributesForPropertyAccessType();
+	}
+	
+	@SuppressWarnings("unchecked")
+	private Iterator<JavaResourcePersistentAttribute> persistableAttributesForFieldAccessType() {
+		return new CompositeIterator<JavaResourcePersistentAttribute>(
+				this.persistableFields(),
+				this.persistablePropertiesWithSpecifiedPropertyAccess()
+			);
+	}
+	
+	@SuppressWarnings("unchecked")
+	private Iterator<JavaResourcePersistentAttribute> persistableAttributesForPropertyAccessType() {
+		return new CompositeIterator<JavaResourcePersistentAttribute>(
+				this.persistableProperties(),
+				this.persistableFieldsWithSpecifiedFieldAccess()
+			);
+	}
+	
+
+	// ********** IType adapter **********
+
+	static class TypeAdapter implements Adapter {
+		private final IType type;
+
+		TypeAdapter(IType type) {
+			super();
+			this.type = type;
+		}
+
+		public IType getMember() {
+			return this.type;
+		}
+
+		public boolean isPersistable() {
+			return true;  // we only build a JAR type if it is "persistable"
+		}
+
+		public IAnnotation[] getAnnotations() throws JavaModelException {
+			return this.type.getAnnotations();
+		}
+
+	}
+
+
+	// ********** "persistable" check **********
+
+	static boolean typeIsPersistable(IType type) {
+		return (type != null)
+				&& type.exists()
+				&& JPTTools.typeIsPersistable(new JPTToolsAdapter(type));
+	}
+
+
+	// ********** JPT tools adapter **********
+
+	/**
+	 * JPTTools needs an adapter so it can work with either an IType
+	 * or an ITypeBinding etc.
+	 */
+	static class JPTToolsAdapter implements JPTTools.TypeAdapter {
+		private final IType type;
+
+		protected JPTToolsAdapter(IType type) {
+			super();
+			if (type == null) {
+				throw new NullPointerException();
+			}
+			this.type = type;
+		}
+
+		public int getModifiers() {
+			try {
+				return this.type.getFlags();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return 0;
+			}
+		}
+
+		public boolean isAnnotation() {
+			try {
+				return this.type.isAnnotation();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return false;
+			}
+		}
+
+		public boolean isAnonymous() {
+			try {
+				return this.type.isAnonymous();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return false;
+			}
+		}
+
+		public boolean isArray() {
+			return false;  // ???
+		}
+
+		public boolean isEnum() {
+			try {
+				return this.type.isEnum();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return false;
+			}
+		}
+
+		public boolean isInterface() {
+			try {
+				return this.type.isInterface();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return false;
+			}
+		}
+
+		public boolean isLocal() {
+			try {
+				return this.type.isLocal();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return false;
+			}
+		}
+
+		public boolean isMember() {
+			try {
+				return this.type.isMember();
+			} catch (JavaModelException ex) {
+				JptCorePlugin.log(ex);
+				return false;
+			}
+		}
+
+		public boolean isPrimitive() {
+			return false;  // ???
+		}
+	
+	}
+
+
+	// ********** unsupported JavaResourcePersistentType implementation **********
+
+	public Iterator<JavaResourcePersistentType> types() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Iterator<JavaResourcePersistentType> allTypes() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Iterator<JavaResourcePersistentType> persistableTypes() {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isGeneratedMetamodelTopLevelType(IPackageFragmentRoot sourceFolder) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isGeneratedMetamodelTopLevelType() {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean isMetamodel() {
+		throw new UnsupportedOperationException();
+	}
+
+	public GeneratedAnnotation getGeneratedAnnotation() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentTypeCache.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentTypeCache.java
new file mode 100644
index 0000000..bc1b8a1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentTypeCache.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentTypeCache;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * cache used to hold binary "external" Java resource persistent types
+ * (typically derived from JARs on the project's build path)
+ */
+public final class BinaryPersistentTypeCache
+	extends RootBinaryNode
+	implements JavaResourcePersistentTypeCache
+{
+	/** populated on-demand */
+	private final Vector<Entry> entries = new Vector<Entry>();
+
+
+	// ********** construction **********
+
+	public BinaryPersistentTypeCache(JpaAnnotationProvider annotationProvider) {
+		super(null, annotationProvider);
+	}
+
+
+	// ********** JavaResourceNode.Root implementation **********
+
+	public Iterator<JavaResourcePersistentType> persistentTypes() {
+		return this.getPersistentTypes().iterator();
+	}
+
+	private Iterable<JavaResourcePersistentType> getPersistentTypes() {
+		return new TransformationIterable<Entry, JavaResourcePersistentType>(this.getEntries()) {
+			@Override
+			protected JavaResourcePersistentType transform(Entry entry) {
+				return entry.persistentType;
+			}
+		};
+	}
+
+	private Iterable<Entry> getEntries() {
+		return new LiveCloneIterable<Entry>(this.entries);
+	}
+
+
+	// ********** JavaResourcePersistentTypeCache implementation **********
+
+	public int persistentTypesSize() {
+		return this.entries.size();
+	}
+
+	public JavaResourcePersistentType addPersistentType(IType jdtType) {
+		Entry entry = this.buildEntry(jdtType);
+		this.entries.add(entry);
+		this.fireItemAdded(PERSISTENT_TYPES_COLLECTION, entry.persistentType);
+		return entry.persistentType;
+	}
+
+	private Entry buildEntry(IType jdtType) {
+		return new Entry(this.buildPersistentType(jdtType), jdtType.getResource());
+	}
+
+	private JavaResourcePersistentType buildPersistentType(IType jdtType) {
+		return new BinaryPersistentType(this, jdtType);
+	}
+
+	public boolean removePersistentTypes(IFile jarFile) {
+		boolean modified = false;
+		for (Entry entry : this.getEntries()) {
+			IResource resource = entry.resource;
+			if ((resource != null) && resource.equals(jarFile)) {
+				this.removeEntry(entry);
+				modified = true;
+			}
+		}
+		return modified;
+	}
+
+	private void removeEntry(Entry entry) {
+		this.entries.remove(entry);
+		this.fireItemRemoved(PERSISTENT_TYPES_COLLECTION, entry.persistentType);
+	}
+
+
+	// ********** overrides **********
+
+	/**
+	 * Ignore changes to this collection. Adds can be ignored since they are triggered
+	 * by requests that will, themselves, trigger updates (typically during the
+	 * update of an object that calls a setter with the newly-created resource
+	 * type). Deletes will be accompanied by manual updates.
+	 */
+	@Override
+	protected void aspectChanged(String aspectName) {
+		if ((aspectName != null) && ! aspectName.equals(PERSISTENT_TYPES_COLLECTION)) {
+			super.aspectChanged(aspectName);
+		}
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.entries);
+	}
+
+
+	// ********** cache entry **********
+
+	/**
+	 * Associate a persistent type with its resource.
+	 * This will be a JAR in the case of a type loaded from a JAR that is in
+	 * the Eclipse workspace. The resource will be null for a type loaded
+	 * from a JAR or class directory outside of the workspace.
+	 */
+	static class Entry {
+		final JavaResourcePersistentType persistentType;
+		final IResource resource;
+
+		Entry(JavaResourcePersistentType persistentType, IResource resource) {
+			super();
+			this.persistentType = persistentType;
+			this.resource = resource;
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this, this.persistentType);
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java
new file mode 100644
index 0000000..e4c9a1c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnAnnotation.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestablePrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumn
+ */
+public final class BinaryPrimaryKeyJoinColumnAnnotation
+	extends BinaryNamedColumnAnnotation
+	implements NestablePrimaryKeyJoinColumnAnnotation
+{
+	private String referencedColumnName;
+
+
+	public BinaryPrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.referencedColumnName = this.buildReferencedColumnName();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setReferencedColumnName_(this.buildReferencedColumnName());
+	}
+
+
+	// ********** BinaryNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.PRIMARY_KEY_JOIN_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** PrimaryKeyJoinColumnAnnotation implementation **********
+
+	// ***** referenced column name
+	public String getReferencedColumnName() {
+		return this.referencedColumnName;
+	}
+
+	public void setReferencedColumnName(String referencedColumnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setReferencedColumnName_(String referencedColumnName) {
+		String old = this.referencedColumnName;
+		this.referencedColumnName = referencedColumnName;
+		this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, referencedColumnName);
+	}
+
+	private String buildReferencedColumnName() {
+		return (String) this.getJdtMemberValue(JPA.PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnsAnnotation.java
new file mode 100644
index 0000000..53fb9f0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPrimaryKeyJoinColumnsAnnotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestablePrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumns
+ */
+public final class BinaryPrimaryKeyJoinColumnsAnnotation
+	extends BinaryContainerAnnotation<NestablePrimaryKeyJoinColumnAnnotation>
+	implements PrimaryKeyJoinColumnsAnnotation
+{
+	private final Vector<NestablePrimaryKeyJoinColumnAnnotation> pkJoinColumns;
+
+
+	public BinaryPrimaryKeyJoinColumnsAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.pkJoinColumns = this.buildPkJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestablePrimaryKeyJoinColumnAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestablePrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.pkJoinColumns.size();
+	}
+
+	private Vector<NestablePrimaryKeyJoinColumnAnnotation> buildPkJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.PRIMARY_KEY_JOIN_COLUMNS__VALUE);
+		Vector<NestablePrimaryKeyJoinColumnAnnotation> result = new Vector<NestablePrimaryKeyJoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryPrimaryKeyJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updatePkJoinColumns();
+	}
+
+	// TODO
+	private void updatePkJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
+
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java
new file mode 100644
index 0000000..c3f7658
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryQueryHintAnnotation.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.QueryHint
+ */
+class BinaryQueryHintAnnotation
+	extends BinaryAnnotation
+	implements QueryHintAnnotation
+{
+	private String name;
+	private String value;
+
+
+	BinaryQueryHintAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.name = this.buildName();
+		this.value = this.buildValue();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setName_(this.buildName());
+		this.setValue_(this.buildValue());
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** QueryHintAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setName_(String name) {
+		String old = this.name;
+		this.name = name;
+		this.firePropertyChanged(NAME_PROPERTY, old, name);
+	}
+
+	private String buildName() {
+		return (String) this.getJdtMemberValue(JPA.QUERY_HINT__NAME);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValue_(String value) {
+		String old = this.value;
+		this.value = value;
+		this.firePropertyChanged(VALUE_PROPERTY, old, value);
+	}
+
+	private String buildValue() {
+		return (String) this.getJdtMemberValue(JPA.QUERY_HINT__VALUE);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java
new file mode 100644
index 0000000..6da0b80
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryRelationshipMappingAnnotation.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+import org.eclipse.jpt.core.resource.java.CascadeType;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+/**
+ * javax.persistence.ManyToMany
+ * javax.persistence.ManyToOne
+ * javax.persistence.OneToMany
+ * javax.persistence.OneToOne
+ */
+abstract class BinaryRelationshipMappingAnnotation
+	extends BinaryAnnotation
+	implements RelationshipMapping2_0Annotation
+{
+	String targetEntity;
+	FetchType fetch;
+	boolean cascadeAll;
+	boolean cascadeMerge;
+	boolean cascadePersist;
+	boolean cascadeRefresh;
+	boolean cascadeRemove;
+	boolean cascadeDetach; //added in JPA 2.0
+
+
+	BinaryRelationshipMappingAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.targetEntity = this.buildTargetEntity();
+		this.fetch = this.buildFetch();
+		this.initializeCascadeTypes(this.buildCascadeTypes());
+	}
+	
+	protected void initializeCascadeTypes(CascadeType[] cascadeTypes) {
+		this.cascadeAll = ArrayTools.contains(cascadeTypes, CascadeType.ALL);
+		this.cascadeMerge = ArrayTools.contains(cascadeTypes, CascadeType.MERGE);
+		this.cascadePersist = ArrayTools.contains(cascadeTypes, CascadeType.PERSIST);
+		this.cascadeRefresh = ArrayTools.contains(cascadeTypes, CascadeType.REFRESH);
+		this.cascadeRemove = ArrayTools.contains(cascadeTypes, CascadeType.REMOVE);
+		this.cascadeDetach = ArrayTools.contains(cascadeTypes, CascadeType.DETACH);
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setTargetEntity_(this.buildTargetEntity());
+		this.setFetch_(this.buildFetch());
+		this.updateCascadeTypes(this.buildCascadeTypes());
+	}
+
+	protected void updateCascadeTypes(CascadeType[] cascadeTypes) {
+		this.setCascadeAll_(ArrayTools.contains(cascadeTypes, CascadeType.ALL));
+		this.setCascadeMerge_(ArrayTools.contains(cascadeTypes, CascadeType.MERGE));
+		this.setCascadePersist_(ArrayTools.contains(cascadeTypes, CascadeType.PERSIST));
+		this.setCascadeRefresh_(ArrayTools.contains(cascadeTypes, CascadeType.REFRESH));
+		this.setCascadeRemove_(ArrayTools.contains(cascadeTypes, CascadeType.REMOVE));
+		this.setCascadeDetach_(ArrayTools.contains(cascadeTypes, CascadeType.DETACH));
+	}
+
+	// ********** RelationshipMappingAnnotation implementation **********
+
+	// ***** target entity
+	public String getTargetEntity() {
+		return this.targetEntity;
+	}
+
+	public void setTargetEntity(String targetEntity) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setTargetEntity_(String targetEntity) {
+		String old = this.targetEntity;
+		this.targetEntity = targetEntity;
+		this.firePropertyChanged(TARGET_ENTITY_PROPERTY, old, targetEntity);
+		this.firePropertyChanged(FULLY_QUALIFIED_TARGET_ENTITY_CLASS_NAME_PROPERTY, old, targetEntity);
+	}
+
+	private String buildTargetEntity() {
+		return (String) this.getJdtMemberValue(this.getTargetEntityElementName());
+	}
+
+	abstract String getTargetEntityElementName();
+
+	public TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** fully-qualified target entity class name
+	public String getFullyQualifiedTargetEntityClassName() {
+		return this.targetEntity;
+	}
+
+	// ***** fetch
+	public FetchType getFetch() {
+		return this.fetch;
+	}
+
+	public void setFetch(FetchType fetch) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setFetch_(FetchType fetch) {
+		FetchType old = this.fetch;
+		this.fetch = fetch;
+		this.firePropertyChanged(FETCH_PROPERTY, old, fetch);
+	}
+
+	private FetchType buildFetch() {
+		return FetchType.fromJavaAnnotationValue(this.getJdtMemberValue(this.getFetchElementName()));
+	}
+
+	abstract String getFetchElementName();
+
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** cascade
+	private CascadeType[] buildCascadeTypes() {
+		return CascadeType.fromJavaAnnotationValues(this.getJdtMemberValues(this.getCascadeElementName()));
+	}
+
+	abstract String getCascadeElementName();
+
+	public TextRange getCascadeTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** cascade all
+	public boolean isCascadeAll() {
+		return this.cascadeAll;
+	}
+
+	public void setCascadeAll(boolean cascadeAll) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCascadeAll_(boolean cascadeAll) {
+		boolean old = this.cascadeAll;
+		this.cascadeAll = cascadeAll;
+		this.firePropertyChanged(CASCADE_ALL_PROPERTY, old, cascadeAll);
+	}
+
+	// ***** cascade merge
+	public boolean isCascadeMerge() {
+		return this.cascadeMerge;
+	}
+
+	public void setCascadeMerge(boolean cascadeMerge) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCascadeMerge_(boolean cascadeMerge) {
+		boolean old = this.cascadeMerge;
+		this.cascadeMerge = cascadeMerge;
+		this.firePropertyChanged(CASCADE_MERGE_PROPERTY, old, cascadeMerge);
+	}
+
+	// ***** cascade persist
+	public boolean isCascadePersist() {
+		return this.cascadePersist;
+	}
+
+	public void setCascadePersist(boolean cascadePersist) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCascadePersist_(boolean cascadePersist) {
+		boolean old = this.cascadePersist;
+		this.cascadePersist = cascadePersist;
+		this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, cascadePersist);
+	}
+
+	// ***** cascade refresh
+	public boolean isCascadeRefresh() {
+		return this.cascadeRefresh;
+	}
+
+	public void setCascadeRefresh(boolean cascadeRefresh) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCascadeRefresh_(boolean cascadeRefresh) {
+		boolean old = this.cascadeRefresh;
+		this.cascadeRefresh = cascadeRefresh;
+		this.firePropertyChanged(CASCADE_REFRESH_PROPERTY, old, cascadeRefresh);
+	}
+
+	// ***** cascade remove
+	public boolean isCascadeRemove() {
+		return this.cascadeRemove;
+	}
+
+	public void setCascadeRemove(boolean cascadeRemove) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCascadeRemove_(boolean cascadeRemove) {
+		boolean old = this.cascadeRemove;
+		this.cascadeRemove = cascadeRemove;
+		this.firePropertyChanged(CASCADE_REMOVE_PROPERTY, old, cascadeRemove);
+	}
+
+	// ***** cascade detach - JPA 2.0
+	public boolean isCascadeDetach() {
+		return this.cascadeDetach;
+	}
+
+	public void setCascadeDetach(boolean cascadeDetach) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCascadeDetach_(boolean cascadeDetach) {
+		boolean old = this.cascadeDetach;
+		this.cascadeDetach = cascadeDetach;
+		this.firePropertyChanged(CASCADE_DETACH_PROPERTY, old, cascadeDetach);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java
new file mode 100644
index 0000000..7e018e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTableAnnotation.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableSecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.SecondaryTable
+ */
+public final class BinarySecondaryTableAnnotation
+	extends BinaryBaseTableAnnotation
+	implements NestableSecondaryTableAnnotation
+{
+	private final Vector<PrimaryKeyJoinColumnAnnotation> pkJoinColumns;
+
+	public BinarySecondaryTableAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.pkJoinColumns = this.buildPkJoinColumns();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updatePkJoinColumns();
+	}
+
+
+	// ********** BinaryBaseTableAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.SECONDARY_TABLE__NAME;
+	}
+
+	@Override
+	protected String getSchemaElementName() {
+		return JPA.SECONDARY_TABLE__SCHEMA;
+	}
+
+	@Override
+	protected String getCatalogElementName() {
+		return JPA.SECONDARY_TABLE__CATALOG;
+	}
+
+	@Override
+	protected String getUniqueConstraintElementName() {
+		return JPA.SECONDARY_TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+
+	// ************* SecondaryTableAnnotation implementation *******************
+
+	// ***** pk join columns
+	public ListIterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns() {
+		return new CloneListIterator<PrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns);
+	}
+
+	public int pkJoinColumnsSize() {
+		return this.pkJoinColumns.size();
+	}
+
+	public PrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index) {
+		return this.pkJoinColumns.get(index);
+	}
+
+	public int indexOfPkJoinColumn(PrimaryKeyJoinColumnAnnotation pkJoinColumn) {
+		return this.pkJoinColumns.indexOf(pkJoinColumn);
+	}
+
+	public PrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void movePkJoinColumn(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removePkJoinColumn(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<PrimaryKeyJoinColumnAnnotation> buildPkJoinColumns() {
+		Object[] jdtJoinColumns = this.getJdtMemberValues(JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS);
+		Vector<PrimaryKeyJoinColumnAnnotation> result = new Vector<PrimaryKeyJoinColumnAnnotation>(jdtJoinColumns.length);
+		for (Object jdtJoinColumn : jdtJoinColumns) {
+			result.add(new BinaryPrimaryKeyJoinColumnAnnotation(this, (IAnnotation) jdtJoinColumn));
+		}
+		return result;
+	}
+
+	// TODO
+	private void updatePkJoinColumns() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTablesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTablesAnnotation.java
new file mode 100644
index 0000000..5dbc1fd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySecondaryTablesAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.NestableSecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTablesAnnotation;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.SecondaryTables
+ */
+public final class BinarySecondaryTablesAnnotation
+	extends BinaryContainerAnnotation<NestableSecondaryTableAnnotation>
+	implements SecondaryTablesAnnotation
+{
+	private final Vector<NestableSecondaryTableAnnotation> secondaryTables;
+
+
+	public BinarySecondaryTablesAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.secondaryTables = this.buildSecondaryTables();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableSecondaryTableAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableSecondaryTableAnnotation>(this.secondaryTables);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.secondaryTables.size();
+	}
+
+	private Vector<NestableSecondaryTableAnnotation> buildSecondaryTables() {
+		Object[] jdtSecondaryTables = this.getJdtMemberValues(JPA.SECONDARY_TABLES__VALUE);
+		Vector<NestableSecondaryTableAnnotation> result = new Vector<NestableSecondaryTableAnnotation>(jdtSecondaryTables.length);
+		for (Object jdtSecondaryTable : jdtSecondaryTables) {
+			result.add(new BinarySecondaryTableAnnotation(this, (IAnnotation) jdtSecondaryTable));
+		}
+		return result;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateSecondaryTables();
+	}
+
+	// TODO
+	private void updateSecondaryTables() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java
new file mode 100644
index 0000000..cfe2c82
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinarySequenceGeneratorAnnotation.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * javax.persistence.SequenceGenerator
+ */
+public abstract class BinarySequenceGeneratorAnnotation
+	extends BinaryGeneratorAnnotation
+	implements SequenceGeneratorAnnotation
+{
+	private String sequenceName;
+
+
+	protected BinarySequenceGeneratorAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.sequenceName = this.buildSequenceName();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setSequenceName_(this.buildSequenceName());
+	}
+
+
+	// ********** BinaryGeneratorAnnotation implementation **********
+
+	@Override
+	String getNameElementName() {
+		return JPA.SEQUENCE_GENERATOR__NAME;
+	}
+
+	@Override
+	String getInitialValueElementName() {
+		return JPA.SEQUENCE_GENERATOR__INITIAL_VALUE;
+	}
+
+	@Override
+	String getAllocationSizeElementName() {
+		return JPA.SEQUENCE_GENERATOR__ALLOCATION_SIZE;
+	}
+
+
+	// ********** SequenceGeneratorAnnotation implementation **********
+
+	// ***** sequence name
+	public String getSequenceName() {
+		return this.sequenceName;
+	}
+
+	public void setSequenceName(String sequenceName) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setSequenceName_(String sequenceName) {
+		String old = this.sequenceName;
+		this.sequenceName = sequenceName;
+		this.firePropertyChanged(SEQUENCE_NAME_PROPERTY, old, sequenceName);
+	}
+
+	private String buildSequenceName() {
+		return (String) this.getJdtMemberValue(JPA.SEQUENCE_GENERATOR__SEQUENCE_NAME);
+	}
+
+	public TextRange getSequenceNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean sequenceNameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTableAnnotation.java
new file mode 100644
index 0000000..e7bcdc7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTableAnnotation.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.TableAnnotation;
+
+/**
+ * javax.persistence.Table
+ */
+public final class BinaryTableAnnotation
+	extends BinaryBaseTableAnnotation
+	implements TableAnnotation
+{
+	public BinaryTableAnnotation(JavaResourcePersistentType parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** BinaryBaseTableAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.TABLE__NAME;
+	}
+
+	@Override
+	protected String getSchemaElementName() {
+		return JPA.TABLE__SCHEMA;
+	}
+
+	@Override
+	protected String getCatalogElementName() {
+		return JPA.TABLE__CATALOG;
+	}
+
+	@Override
+	protected String getUniqueConstraintElementName() {
+		return JPA.TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java
new file mode 100644
index 0000000..0ecdebb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTableGeneratorAnnotation.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.TableGenerator
+ */
+public final class BinaryTableGeneratorAnnotation
+	extends BinaryGeneratorAnnotation
+	implements TableGeneratorAnnotation
+{
+	private String table;
+	private String schema;
+	private String catalog;
+	private String pkColumnName;
+	private String valueColumnName;
+	private String pkColumnValue;
+	private final Vector<UniqueConstraintAnnotation> uniqueConstraints;
+
+
+	public BinaryTableGeneratorAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.table = this.buildTable();
+		this.schema = this.buildSchema();
+		this.catalog = this.buildCatalog();
+		this.pkColumnName = this.buildPkColumnName();
+		this.valueColumnName = this.buildValueColumnName();
+		this.pkColumnValue = this.buildPkColumnValue();
+		this.uniqueConstraints = this.buildUniqueConstraints();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.setTable_(this.buildTable());
+		this.setSchema_(this.buildSchema());
+		this.setCatalog_(this.buildCatalog());
+		this.setPkColumnName_(this.buildPkColumnName());
+		this.setValueColumnName_(this.buildValueColumnName());
+		this.setPkColumnValue_(this.buildPkColumnValue());
+		this.updateUniqueConstraints();
+	}
+
+
+	// ********** AbstractGeneratorAnnotation implementation **********
+
+	@Override
+	String getNameElementName() {
+		return JPA.TABLE_GENERATOR__NAME;
+	}
+
+	@Override
+	String getInitialValueElementName() {
+		return JPA.TABLE_GENERATOR__INITIAL_VALUE;
+	}
+
+	@Override
+	String getAllocationSizeElementName() {
+		return JPA.TABLE_GENERATOR__ALLOCATION_SIZE;
+	}
+
+
+	// ********** TableGeneratorAnnotation implementation **********
+
+	// ***** table
+	public String getTable() {
+		return this.table;
+	}
+
+	public void setTable(String table) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setTable_(String table) {
+		String old = this.table;
+		this.table = table;
+		this.firePropertyChanged(TABLE_PROPERTY, old, table);
+	}
+
+	private String buildTable() {
+		return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__TABLE);
+	}
+
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean tableTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** schema
+	public String getSchema() {
+		return this.schema;
+	}
+
+	public void setSchema(String schema) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setSchema_(String schema) {
+		String old = this.schema;
+		this.schema = schema;
+		this.firePropertyChanged(SCHEMA_PROPERTY, old, schema);
+	}
+
+	private String buildSchema() {
+		return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__SCHEMA);
+	}
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** catalog
+	public String getCatalog() {
+		return this.catalog;
+	}
+
+	public void setCatalog(String catalog) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setCatalog_(String catalog) {
+		String old = this.catalog;
+		this.catalog = catalog;
+		this.firePropertyChanged(CATALOG_PROPERTY, old, catalog);
+	}
+
+	private String buildCatalog() {
+		return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__CATALOG);
+	}
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** pk column name
+	public String getPkColumnName() {
+		return this.pkColumnName;
+	}
+
+	public void setPkColumnName(String pkColumnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setPkColumnName_(String pkColumnName) {
+		String old = this.pkColumnName;
+		this.pkColumnName = pkColumnName;
+		this.firePropertyChanged(PK_COLUMN_NAME_PROPERTY, old, pkColumnName);
+	}
+
+	private String buildPkColumnName() {
+		return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__PK_COLUMN_NAME);
+	}
+
+	public TextRange getPkColumnNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean pkColumnNameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** value column name
+	public String getValueColumnName() {
+		return this.valueColumnName;
+	}
+
+	public void setValueColumnName(String valueColumnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setValueColumnName_(String valueColumnName) {
+		String old = this.valueColumnName;
+		this.valueColumnName = valueColumnName;
+		this.firePropertyChanged(VALUE_COLUMN_NAME_PROPERTY, old, valueColumnName);
+	}
+
+	private String buildValueColumnName() {
+		return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__VALUE_COLUMN_NAME);
+	}
+
+	public TextRange getValueColumnNameTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean valueColumnNameTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** pk column value
+	public String getPkColumnValue() {
+		return this.pkColumnValue;
+	}
+
+	public void setPkColumnValue(String pkColumnValue) {
+		throw new UnsupportedOperationException();
+	}
+
+	private void setPkColumnValue_(String pkColumnValue) {
+		String old = this.pkColumnValue;
+		this.pkColumnValue = pkColumnValue;
+		this.firePropertyChanged(PK_COLUMN_VALUE_PROPERTY, old, pkColumnValue);
+	}
+
+	private String buildPkColumnValue() {
+		return (String) this.getJdtMemberValue(JPA.TABLE_GENERATOR__PK_COLUMN_VALUE);
+	}
+
+	public TextRange getPkColumnValueTextRange(CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean pkColumnValueTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	// ***** unique constraints
+	public ListIterator<UniqueConstraintAnnotation> uniqueConstraints() {
+		return new CloneListIterator<UniqueConstraintAnnotation>(this.uniqueConstraints);
+	}
+
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+
+	public UniqueConstraintAnnotation uniqueConstraintAt(int index) {
+		return this.uniqueConstraints.get(index);
+	}
+
+	public int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint) {
+		return this.uniqueConstraints.indexOf(uniqueConstraint);
+	}
+
+	public UniqueConstraintAnnotation addUniqueConstraint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeUniqueConstraint(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+	private Vector<UniqueConstraintAnnotation> buildUniqueConstraints() {
+		Object[] jdtUniqueConstraints = this.getJdtMemberValues(JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
+		Vector<UniqueConstraintAnnotation> result = new Vector<UniqueConstraintAnnotation>(jdtUniqueConstraints.length);
+		for (Object jdtUniqueConstraint : jdtUniqueConstraints) {
+			result.add(new BinaryUniqueConstraintAnnotation(this, (IAnnotation) jdtUniqueConstraint));
+		}
+		return result;
+	}
+
+	// TODO
+	private void updateUniqueConstraints() {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTemporalAnnotation.java
new file mode 100644
index 0000000..b4e6fd8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTemporalAnnotation.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+
+/**
+ * javax.persistence.Temporal
+ */
+public final class BinaryTemporalAnnotation
+	extends BinaryBaseTemporalAnnotation
+	implements TemporalAnnotation
+{
+
+	public BinaryTemporalAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+	
+	@Override
+	protected String getValueElementName() {
+		return JPA.TEMPORAL__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTransientAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTransientAnnotation.java
new file mode 100644
index 0000000..92e643f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryTransientAnnotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TransientAnnotation;
+
+/**
+ * javax.persistence.Transient
+ */
+public final class BinaryTransientAnnotation
+	extends BinaryAnnotation
+	implements TransientAnnotation
+{
+
+	public BinaryTransientAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java
new file mode 100644
index 0000000..2d8af3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryUniqueConstraintAnnotation.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.UniqueConstraint
+ */
+final class BinaryUniqueConstraintAnnotation
+	extends BinaryAnnotation
+	implements UniqueConstraintAnnotation
+{
+	private final Vector<String> columnNames;
+
+
+	BinaryUniqueConstraintAnnotation(JavaResourceNode parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+		this.columnNames = this.buildColumnNames();
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void update() {
+		super.update();
+		this.updateColumnNames();
+	}
+
+	// TODO
+	private void updateColumnNames() {
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** UniqueConstraintAnnotation implementation **********
+
+	// ***** column names
+	public ListIterator<String> columnNames() {
+		return new CloneListIterator<String>(this.columnNames);
+	}
+
+	public int columnNamesSize() {
+		return this.columnNames.size();
+	}
+
+	private Vector<String> buildColumnNames() {
+		Object[] jdtColumnNames = this.getJdtMemberValues(JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES);
+		Vector<String> result = new Vector<String>(jdtColumnNames.length);
+		for (Object jdtColumnName : jdtColumnNames) {
+			result.add((String) jdtColumnName);
+		}
+		return result;
+	}
+
+	public void addColumnName(String columnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void addColumnName(int index, String columnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void moveColumnName(int targetIndex, int sourceIndex) {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean columnNamesTouches(int pos, CompilationUnit astRoot) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeColumnName(String columnName) {
+		throw new UnsupportedOperationException();
+	}
+
+	public void removeColumnName(int index) {
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryVersionAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryVersionAnnotation.java
new file mode 100644
index 0000000..37f3256
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryVersionAnnotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.VersionAnnotation;
+
+/**
+ * javax.persistence.Version
+ */
+public final class BinaryVersionAnnotation
+	extends BinaryAnnotation
+	implements VersionAnnotation
+{
+
+	public BinaryVersionAnnotation(JavaResourcePersistentAttribute parent, IAnnotation jdtAnnotation) {
+		super(parent, jdtAnnotation);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/RootBinaryNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/RootBinaryNode.java
new file mode 100644
index 0000000..1a8152c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/RootBinaryNode.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.JpaResourceModelListener;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.utility.internal.ListenerList;
+
+/**
+ * JAR and external types
+ */
+abstract class RootBinaryNode
+	extends BinaryNode
+	implements JavaResourceNode.Root
+{
+	/** pluggable annotation provider */
+	private final JpaAnnotationProvider annotationProvider;
+
+	/** listeners notified whenever the resource model changes */
+	private final ListenerList<JpaResourceModelListener> resourceModelListenerList = new ListenerList<JpaResourceModelListener>(JpaResourceModelListener.class);
+
+
+	// ********** construction **********
+	
+	RootBinaryNode(JavaResourceNode parent, JpaAnnotationProvider annotationProvider) {
+		super(parent);
+		this.annotationProvider = annotationProvider;
+	}
+
+
+	// ********** overrides **********
+
+	@Override
+	protected boolean requiresParent() {
+		return false;
+	}
+
+	@Override
+	public Root getRoot() {
+		return this;
+	}
+
+	@Override
+	public JpaAnnotationProvider getAnnotationProvider() {
+		return this.annotationProvider;
+	}
+
+
+	// ********** JavaResourceNode.Root implementation **********
+
+	public void resourceModelChanged() {
+		for (JpaResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
+			listener.resourceModelChanged(this);
+		}
+	}
+
+
+	// ********** JpaResourceModel implementation **********
+	
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.JAR_RESOURCE_TYPE;
+	}
+
+	public void addResourceModelListener(JpaResourceModelListener listener) {
+		this.resourceModelListenerList.add(listener);
+	}
+
+	public void removeResourceModelListener(JpaResourceModelListener listener) {
+		this.resourceModelListenerList.remove(listener);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/AnnotationContainerTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/AnnotationContainerTools.java
new file mode 100644
index 0000000..b3ddfd6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/AnnotationContainerTools.java
@@ -0,0 +1,266 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * Utility methods for manipulating annotation containers.
+ */
+public final class AnnotationContainerTools {
+
+	/**
+	 * Add a nested annotation to the specified annotation container
+	 * at the specified index.
+	 * This method modifies both the resource model annotation container and the
+	 * AST; with <em>no</em> change notification.
+	 */
+	public static <T extends NestableAnnotation> NestableAnnotation addNestedAnnotation(int index, AnnotationContainer<T> annotationContainer) {
+		// add a new annotation to the end of the list...
+		int sourceIndex = annotationContainer.getNestedAnnotationsSize();
+		T nestedAnnotation = annotationContainer.addNestedAnnotation();
+		nestedAnnotation.newAnnotation();
+		// ...then move it to the specified index
+		moveNestedAnnotation(index, sourceIndex, annotationContainer);
+		return nestedAnnotation;
+	}
+
+	/**
+	 * Move the nested annotation at the specified source index in the
+	 * specified annotation container to the specified target index.
+	 * This method modifies both the resource model annotation container and the
+	 * AST; with <em>no</em> change notification.
+	 */
+	public static <T extends NestableAnnotation> void moveNestedAnnotation(int targetIndex, int sourceIndex, AnnotationContainer<T> annotationContainer) {
+		if (targetIndex != sourceIndex) {
+			moveNestedAnnotation_(targetIndex, sourceIndex, annotationContainer);
+		}
+	}
+
+	private static <T extends NestableAnnotation> void moveNestedAnnotation_(int targetIndex, int sourceIndex, AnnotationContainer<T> annotationContainer) {
+		NestableAnnotation nestedAnnotation = annotationContainer.moveNestedAnnotation(targetIndex, sourceIndex);
+		syncAstAnnotationsAfterMove(targetIndex, sourceIndex, annotationContainer, nestedAnnotation);
+	}
+
+	/**
+	 * An annotation was moved within the specified annotation container from
+	 * the specified source index to the specified target index.
+	 * Synchronize the AST annotations with the resource model annotation container,
+	 * starting with the lower index to prevent overlap.
+	 */
+	private static <T extends NestableAnnotation> void syncAstAnnotationsAfterMove(int targetIndex, int sourceIndex, AnnotationContainer<T> annotationContainer, NestableAnnotation nestedAnnotation) {
+		// move the Java annotation to the end of the list...
+		nestedAnnotation.moveAnnotation(annotationContainer.getNestedAnnotationsSize());
+		// ...then shift the other AST annotations over one slot...
+		List<T> nestableAnnotations = CollectionTools.list(annotationContainer.getNestedAnnotations());
+		if (sourceIndex < targetIndex) {
+			for (int i = sourceIndex; i < targetIndex; i++) {
+				nestableAnnotations.get(i).moveAnnotation(i);
+			}
+		} else {
+			for (int i = sourceIndex; i > targetIndex; i-- ) {
+				nestableAnnotations.get(i).moveAnnotation(i);
+			}
+		}
+		// ...then move the AST annotation to the now empty slot at the target index
+		nestedAnnotation.moveAnnotation(targetIndex);
+	}
+
+	/**
+	 * Remove the nested annotation at the specified index in the
+	 * specified annotation container.
+	 * This method modifies both the resource model annotation container and the
+	 * AST; with <em>no</em> change notification.
+	 */
+	public static <T extends NestableAnnotation> void removeNestedAnnotation(int index, AnnotationContainer<T> annotationContainer) {
+		T nestedAnnotation = annotationContainer.removeNestedAnnotation(index);
+		nestedAnnotation.removeAnnotation();
+		syncAstAnnotationsAfterRemove(index, annotationContainer);
+	}
+
+	/**
+	 * An annotation was removed from the specified annotation container at the
+	 * specified index.
+	 * Synchronize the AST annotations with the resource model annotation container,
+	 * starting at the specified index to prevent overlap.
+	 */
+	private static <T extends NestableAnnotation> void syncAstAnnotationsAfterRemove(int index, AnnotationContainer<T> annotationContainer) {
+		List<T> nestableAnnotations = CollectionTools.list(annotationContainer.getNestedAnnotations());
+		for (int i = index; i < nestableAnnotations.size(); i++) {
+			// the indices are the same because the model annotations are
+			// already in the proper locations - it's the AST annotations that
+			// need to be moved to the matching location
+			nestableAnnotations.get(i).moveAnnotation(i);
+		}
+	}
+
+	/**
+	 * Initialize the specified resource model annotation container to be in
+	 * sync with the specified AST. No change notification will occur.
+	 */
+	public static <T extends NestableAnnotation> void initialize(AnnotationContainer<T> annotationContainer, CompilationUnit astRoot) {
+		// ignore the nested AST annotations themselves
+		// (maybe someday we can use them during initialization...)
+		int size = getNestedAstAnnotations(astRoot, annotationContainer).size();
+		for (int i = 0; i < size; i++) {
+			T nestedAnnotation = annotationContainer.addNestedAnnotation();
+			nestedAnnotation.initialize(astRoot);
+		}
+	}
+
+	/**
+	 * Return a list of the nested AST annotations.
+	 */
+	private static <T extends NestableAnnotation> ArrayList<Annotation> getNestedAstAnnotations(CompilationUnit astRoot, AnnotationContainer<T> annotationContainer) {
+		ArrayList<Annotation> result = new ArrayList<Annotation>();
+		Annotation astContainerAnnotation = annotationContainer.getAstAnnotation(astRoot);
+		if (astContainerAnnotation == null || astContainerAnnotation.isMarkerAnnotation()) {
+			// no nested annotations
+		}
+		else if (astContainerAnnotation.isSingleMemberAnnotation()) {
+			if (annotationContainer.getElementName().equals("value")) { //$NON-NLS-1$
+				Expression ex = ((SingleMemberAnnotation) astContainerAnnotation).getValue();
+				addAstAnnotationsTo(ex, annotationContainer.getNestedAnnotationName(), result);
+			} else {
+				// no nested annotations
+			}
+		}
+		else if (astContainerAnnotation.isNormalAnnotation()) {
+			MemberValuePair pair = getMemberValuePair((NormalAnnotation) astContainerAnnotation, annotationContainer.getElementName());
+			if (pair == null) {
+				// no nested annotations
+			} else {
+				addAstAnnotationsTo(pair.getValue(), annotationContainer.getNestedAnnotationName(), result);
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Add whatever annotations are represented by the specified expression to
+	 * the specified list. Add null to the list for any non-annotation expression.
+	 */
+	private static void addAstAnnotationsTo(Expression expression, String annotationName, ArrayList<Annotation> astAnnotations) {
+		if (expression == null) {
+			astAnnotations.add(null);  // not sure how we would get here...
+		}
+		else if (expression.getNodeType() == ASTNode.ARRAY_INITIALIZER) {
+			addAstAnnotationsTo((ArrayInitializer) expression, annotationName, astAnnotations);
+		}
+		else {
+			astAnnotations.add(getAstAnnotation_(expression, annotationName));
+		}
+	}
+
+	private static void addAstAnnotationsTo(ArrayInitializer arrayInitializer, String annotationName, ArrayList<Annotation> astAnnotations) {
+		@SuppressWarnings("unchecked")
+		List<Expression> expressions = arrayInitializer.expressions();
+		for (Expression expression : expressions) {
+			astAnnotations.add(getAstAnnotation(expression, annotationName));
+		}
+	}
+
+	/**
+	 * If the specified expression is an annotation with the specified name, return it;
+	 * otherwise return null.
+	 */
+	private static Annotation getAstAnnotation(Expression expression, String annotationName) {
+		// not sure how the expression could be null...
+		return (expression == null) ? null : getAstAnnotation_(expression, annotationName);
+	}
+
+	/**
+	 * pre-condition: expression is not null
+	 */
+	private static Annotation getAstAnnotation_(Expression expression, String annotationName) {
+		switch (expression.getNodeType()) {
+			case ASTNode.NORMAL_ANNOTATION:
+			case ASTNode.SINGLE_MEMBER_ANNOTATION:
+			case ASTNode.MARKER_ANNOTATION:
+				Annotation astAnnotation = (Annotation) expression;
+				if (getQualifiedName(astAnnotation).equals(annotationName)) {
+					return astAnnotation;
+				}
+				return null;
+			default:
+				return null;
+		}
+	}
+
+	private static String getQualifiedName(Annotation astAnnotation) {
+		ITypeBinding typeBinding = astAnnotation.resolveTypeBinding();
+		if (typeBinding != null) {
+			String resolvedName = typeBinding.getQualifiedName();
+			if (resolvedName != null) {
+				return resolvedName;
+			}
+		}
+		return astAnnotation.getTypeName().getFullyQualifiedName();
+	}
+
+	private static MemberValuePair getMemberValuePair(NormalAnnotation annotation, String elementName) {
+		@SuppressWarnings("unchecked")
+		List<MemberValuePair> pairs = annotation.values();
+		for (MemberValuePair pair : pairs) {
+			if (pair.getName().getFullyQualifiedName().equals(elementName)) {
+				return pair;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Synchronize the resource model annotations in the specified annotation
+	 * container with those in the specified AST. Trigger the appropriate change
+	 * notification.
+	 */
+	public static <T extends NestableAnnotation> void synchronize(AnnotationContainer<T> annotationContainer, CompilationUnit astRoot) {
+		ArrayList<Annotation> astAnnotations = getNestedAstAnnotations(astRoot, annotationContainer);
+		Iterator<Annotation> astAnnotationStream = astAnnotations.iterator();
+
+		for (T nestedAnnotation : annotationContainer.getNestedAnnotations()) {
+			if (astAnnotationStream.hasNext()) {
+				// matching AST annotation is present - synchronize the nested annotation
+				astAnnotationStream.next();  // maybe someday we can pass this to the update
+				nestedAnnotation.synchronizeWith(astRoot);
+			} else {
+				// no more AST annotations - remove the remaining nested annotations and exit
+				annotationContainer.syncRemoveNestedAnnotations(astAnnotations.size());
+				return;
+			}
+		}
+
+		// add nested annotations for any remaining AST annotations
+		while (astAnnotationStream.hasNext()) {
+			annotationContainer.syncAddNestedAnnotation(astAnnotationStream.next());
+		}
+	}
+
+	private AnnotationContainerTools() {
+		super();
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java
new file mode 100644
index 0000000..27e8e8c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTNodeTextRange;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * some common state and behavior for Java source annotations;
+ * and lots of convenience methods
+ */
+public abstract class SourceAnnotation<M extends Member>
+	extends SourceNode
+	implements Annotation
+{
+	protected final M member;
+
+	protected final DeclarationAnnotationAdapter daa;
+
+	protected final AnnotationAdapter annotationAdapter;
+
+
+	/**
+	 * constructor for straight member annotation
+	 */
+	protected SourceAnnotation(JavaResourceNode parent, M member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+
+	/**
+	 * constructor for nested annotation (typically)
+	 */
+	protected SourceAnnotation(JavaResourceNode parent, M member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent);
+		this.member = member;
+		this.daa = daa;
+		this.annotationAdapter = annotationAdapter;
+	}
+
+
+	// ********** JavaResourceNode implementation **********
+
+	public TextRange getTextRange(CompilationUnit astRoot) {
+		return this.getAnnotationTextRange(astRoot);
+	}
+
+
+	// ********** Annotation implementation **********
+
+	public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+		return this.annotationAdapter.getAnnotation(astRoot);
+	}
+
+	public void newAnnotation() {
+		this.annotationAdapter.newMarkerAnnotation();
+	}
+
+	public void removeAnnotation() {
+		this.annotationAdapter.removeAnnotation();
+	}
+
+
+	// ********** convenience methods **********
+
+	/**
+	 * Return the text range corresponding to the annotation.
+	 * If the annotation is missing, return null.
+	 */
+	protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+		return this.getTextRange(this.getAstAnnotation(astRoot));
+	}
+
+	/**
+	 * Convenience method.
+	 * Return the text range corresponding to the specified element.
+	 * If the specified element is missing, return the annotation's text range instead.
+	 */
+	protected TextRange getElementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, CompilationUnit astRoot) {
+		return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, astRoot), astRoot);
+	}
+
+	/**
+	 * Convenience method. If the specified element text range is null
+	 * return the member's text range instead.
+	 */
+	protected TextRange getElementTextRange(TextRange elementTextRange, CompilationUnit astRoot) {
+		return (elementTextRange != null) ? elementTextRange : this.getAnnotationTextRange(astRoot);
+	}
+
+	/**
+	 * Convenience method. Return whether the specified position exists and
+	 * touches the specified element.
+	 */
+	protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
+		return this.textRangeTouches(this.getAnnotationElementTextRange(elementAdapter, astRoot), pos);
+	}
+
+	/**
+	 * Convenience method. Return whether the specified text range is not
+	 * null (meaning the corresponding AST node exists) and the specified position touches it.
+	 */
+	protected boolean textRangeTouches(TextRange textRange, int pos) {
+		return (textRange != null) && textRange.touches(pos);
+	}
+
+	/**
+	 * Return the text range corresponding to the specified element.
+	 * If the element is missing, return null.
+	 */
+	protected TextRange getAnnotationElementTextRange(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
+		return this.getTextRange(this.getAnnotationElementExpression(adapter, astRoot));
+	}
+
+	/**
+	 * Return the specified AST DOM element.
+	 */
+	protected Expression getAnnotationElementExpression(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
+		return adapter.getExpression(this.member.getModifiedDeclaration(astRoot));
+	}
+
+	/**
+	 * Return the text range corresponding to the specified AST node.
+	 * If the AST node is null, return null.
+	 */
+	protected TextRange getTextRange(ASTNode astNode) {
+		return (astNode == null) ? null : new ASTNodeTextRange(astNode);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
new file mode 100644
index 0000000..ea11bfe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.AssociationOverride
+ */
+public abstract class SourceAssociationOverrideAnnotation
+	extends SourceOverrideAnnotation
+	implements NestableAssociationOverrideAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableJoinColumnAnnotation> joinColumns = new Vector<NestableJoinColumnAnnotation>();
+	private final JoinColumnsAnnotationContainer joinColumnsContainer = new JoinColumnsAnnotationContainer();
+
+
+	// ********** construction/initialization **********
+
+	protected SourceAssociationOverrideAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		AnnotationContainerTools.initialize(this.joinColumnsContainer, astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		AnnotationContainerTools.synchronize(this.joinColumnsContainer, astRoot);
+	}
+
+	
+	// ********** SourceOverrideAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.ASSOCIATION_OVERRIDE__NAME;
+	}
+
+
+	// ********** AssociationOverrideAnnotation implementation **********
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.joinColumns);
+	}
+
+	Iterable<NestableJoinColumnAnnotation> getNestableJoinColumns() {
+		return new LiveCloneIterable<NestableJoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+
+	public NestableJoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.get(index);
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+
+	public NestableJoinColumnAnnotation addJoinColumn(int index) {
+		return (NestableJoinColumnAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation addJoinColumn_() {
+		return this.addJoinColumn_(this.joinColumns.size());
+	}
+
+	private NestableJoinColumnAnnotation addJoinColumn_(int index) {
+		NestableJoinColumnAnnotation joinColumn = this.buildJoinColumn(index);
+		this.joinColumns.add(joinColumn);
+		return joinColumn;
+	}
+
+	void syncAddJoinColumn(Annotation astAnnotation) {
+		int index = this.joinColumns.size();
+		NestableJoinColumnAnnotation joinColumn = this.addJoinColumn_(index);
+		joinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	private NestableJoinColumnAnnotation buildJoinColumn(int index) {
+		return SourceJoinColumnAnnotation.createAssociationOverrideJoinColumn(this.daa, this, this.member, index);
+	}
+
+	void joinColumnAdded(int index, NestableJoinColumnAnnotation joinColumn) {
+		this.fireItemAdded(JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation moveJoinColumn_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.joinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removeJoinColumn(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation removeJoinColumn_(int index) {
+		return this.joinColumns.remove(index);
+	}
+
+	void syncRemoveJoinColumns(int index) {
+		this.removeItemsFromList(index, this.joinColumns, JOIN_COLUMNS_LIST);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		AssociationOverrideAnnotation oldOverride = (AssociationOverrideAnnotation) oldAnnotation;
+		for (JoinColumnAnnotation oldJoinColumn : CollectionTools.iterable(oldOverride.joinColumns())) {
+			NestableJoinColumnAnnotation newJoinColumn = this.addJoinColumn(oldOverride.indexOfJoinColumn(oldJoinColumn));
+			newJoinColumn.initializeFrom((NestableAnnotation) oldJoinColumn);
+		}
+	}
+
+	// ********** join column container **********
+
+	/**
+	 * adapt the AnnotationContainer interface to the override's join columns
+	 */
+	class JoinColumnsAnnotationContainer
+		implements AnnotationContainer<NestableJoinColumnAnnotation> 
+	{
+		public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceAssociationOverrideAnnotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getElementName() {
+			return JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS;
+		}
+
+		public String getNestedAnnotationName() {
+			return JoinColumnAnnotation.ANNOTATION_NAME;
+		}
+
+		public Iterable<NestableJoinColumnAnnotation> getNestedAnnotations() {
+			return SourceAssociationOverrideAnnotation.this.getNestableJoinColumns();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceAssociationOverrideAnnotation.this.joinColumnsSize();
+		}
+
+		public NestableJoinColumnAnnotation addNestedAnnotation() {
+			return SourceAssociationOverrideAnnotation.this.addJoinColumn_();
+		}
+
+		public void syncAddNestedAnnotation(Annotation astAnnotation) {
+			SourceAssociationOverrideAnnotation.this.syncAddJoinColumn(astAnnotation);
+		}
+
+		public NestableJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceAssociationOverrideAnnotation.this.moveJoinColumn_(targetIndex, sourceIndex);
+		}
+
+		public NestableJoinColumnAnnotation removeNestedAnnotation(int index) {
+			return SourceAssociationOverrideAnnotation.this.removeJoinColumn_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceAssociationOverrideAnnotation.this.syncRemoveJoinColumns(index);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverridesAnnotation.java
new file mode 100644
index 0000000..bb5930a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverridesAnnotation.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAssociationOverrideAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.AssociationOverrides
+ */
+public abstract class SourceAssociationOverridesAnnotation
+	extends SourceAnnotation<Member>
+	implements AssociationOverridesAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableAssociationOverrideAnnotation> associationOverrides = new Vector<NestableAssociationOverrideAnnotation>();
+
+
+	protected SourceAssociationOverridesAnnotation(JavaResourceNode parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.associationOverrides);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA.ASSOCIATION_OVERRIDES__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return AssociationOverrideAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableAssociationOverrideAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableAssociationOverrideAnnotation>(this.associationOverrides);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.associationOverrides.size();
+	}
+
+	public NestableAssociationOverrideAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.associationOverrides.size());
+	}
+
+	private NestableAssociationOverrideAnnotation addNestedAnnotation(int index) {
+		NestableAssociationOverrideAnnotation associationOverride = this.buildAssociationOverride(index);
+		this.associationOverrides.add(associationOverride);
+		return associationOverride;
+	}
+
+	protected abstract NestableAssociationOverrideAnnotation buildAssociationOverride(int index);
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.associationOverrides.size();
+		NestableAssociationOverrideAnnotation associationOverride = this.addNestedAnnotation(index);
+		associationOverride.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(ASSOCIATION_OVERRIDES_LIST, index, associationOverride);
+	}
+
+	public NestableAssociationOverrideAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.associationOverrides, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableAssociationOverrideAnnotation removeNestedAnnotation(int index) {
+		return this.associationOverrides.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.associationOverrides, ASSOCIATION_OVERRIDES_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
new file mode 100644
index 0000000..f3f8f3b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.NullAttributeOverrideColumnAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.AttributeOverride
+ */
+public final class SourceAttributeOverrideAnnotation
+	extends SourceOverrideAnnotation
+	implements NestableAttributeOverrideAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final MemberAnnotationAdapter columnAdapter;
+	private NestableColumnAnnotation column;
+
+
+	// ********** construction/initialization **********
+
+	public SourceAttributeOverrideAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.columnAdapter = new MemberAnnotationAdapter(this.member, SourceColumnAnnotation.buildAttributeOverrideAnnotationAdapter(this.daa));
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		if (this.columnAdapter.getAnnotation(astRoot) != null) {
+			this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.member, this.daa);
+			this.column.initialize(astRoot);
+		}
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncColumn(astRoot);
+	}
+
+
+	// ********** SourceOverrideAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.ATTRIBUTE_OVERRIDE__NAME;
+	}
+	
+
+	//************ AttributeOverride implementation ****************
+
+	// ***** column
+	public ColumnAnnotation getColumn() {
+		return this.column;
+	}
+
+	public ColumnAnnotation getNonNullColumn() {
+		return (this.column != null) ? this.column : new NullAttributeOverrideColumnAnnotation(this);
+	}
+
+	public NestableColumnAnnotation addColumn() {
+		if (this.column != null) {
+			throw new IllegalStateException("'column' element already exists: " + this.column); //$NON-NLS-1$
+		}
+		this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.member, this.daa);
+		this.column.newAnnotation();
+		return this.column;
+	}
+
+	public void removeColumn() {
+		if (this.column == null) {
+			throw new IllegalStateException("'column' element does not exist"); //$NON-NLS-1$
+		}
+		this.column.removeAnnotation();
+		this.column = null;
+	}
+
+	private void syncColumn(CompilationUnit astRoot) {
+		if (this.columnAdapter.getAnnotation(astRoot) == null) {
+			this.syncColumn_(null);
+		} else {
+			if (this.column == null) {
+				NestableColumnAnnotation col = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.member, this.daa);
+				col.initialize(astRoot);
+				this.syncColumn_(col);
+			} else {
+				this.column.synchronizeWith(astRoot);
+			}
+		}
+	}
+
+	private void syncColumn_(NestableColumnAnnotation astColumn) {
+		ColumnAnnotation old = this.column;
+		this.column = astColumn;
+		this.firePropertyChanged(COLUMN_PROPERTY, old, astColumn);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		AttributeOverrideAnnotation oldOverride = (AttributeOverrideAnnotation) oldAnnotation;
+		ColumnAnnotation oldColumn = oldOverride.getColumn();
+		if (oldColumn != null) {
+			NestableColumnAnnotation newColumn = this.addColumn();
+			newColumn.initializeFrom((NestableAnnotation) oldColumn);
+		}
+	}
+
+
+	// ********** static methods **********
+
+	public static SourceAttributeOverrideAnnotation buildAttributeOverride(JavaResourceNode parent, Member member) {
+		return new SourceAttributeOverrideAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+	}
+
+	static SourceAttributeOverrideAnnotation buildNestedAttributeOverride(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+		return new SourceAttributeOverrideAnnotation(parent, member, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(attributeOverridesAdapter, index, JPA.ATTRIBUTE_OVERRIDE);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java
new file mode 100644
index 0000000..21eb002
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.AttributeOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAttributeOverrideAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.AttributeOverrides
+ */
+public final class SourceAttributeOverridesAnnotation
+	extends SourceAnnotation<Member>
+	implements AttributeOverridesAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableAttributeOverrideAnnotation> attributesOverrides = new Vector<NestableAttributeOverrideAnnotation>();
+
+
+	public SourceAttributeOverridesAnnotation(JavaResourceNode parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.attributesOverrides);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA.ATTRIBUTE_OVERRIDES__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return AttributeOverrideAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableAttributeOverrideAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableAttributeOverrideAnnotation>(this.attributesOverrides);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.attributesOverrides.size();
+	}
+
+	public NestableAttributeOverrideAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.attributesOverrides.size());
+	}
+
+	private NestableAttributeOverrideAnnotation addNestedAnnotation(int index) {
+		NestableAttributeOverrideAnnotation attributeOverride = this.buildAttributeOverride(index);
+		this.attributesOverrides.add(attributeOverride);
+		return attributeOverride;
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.attributesOverrides.size();
+		NestableAttributeOverrideAnnotation attributeOverride = this.addNestedAnnotation(index);
+		attributeOverride.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(ATTRIBUTE_OVERRIDES_LIST, index, attributeOverride);
+	}
+
+	private NestableAttributeOverrideAnnotation buildAttributeOverride(int index) {
+		return SourceAttributeOverrideAnnotation.buildNestedAttributeOverride(this, this.member, index, this.daa);
+	}
+
+	public NestableAttributeOverrideAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.attributesOverrides, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableAttributeOverrideAnnotation removeNestedAnnotation(int index) {
+		return this.attributesOverrides.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.attributesOverrides, ATTRIBUTE_OVERRIDES_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
new file mode 100644
index 0000000..2dab34a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.BaseColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Column
+ * javax.persistence.JoinColumn
+ */
+public abstract class SourceBaseColumnAnnotation
+	extends SourceNamedColumnAnnotation
+	implements BaseColumnAnnotation
+{
+	protected final DeclarationAnnotationElementAdapter<String> tableDeclarationAdapter;
+	protected final AnnotationElementAdapter<String> tableAdapter;
+	protected String table;
+
+	protected final DeclarationAnnotationElementAdapter<Boolean> uniqueDeclarationAdapter;
+	protected final AnnotationElementAdapter<Boolean> uniqueAdapter;
+	protected Boolean unique;
+
+	protected final DeclarationAnnotationElementAdapter<Boolean> nullableDeclarationAdapter;
+	protected final AnnotationElementAdapter<Boolean> nullableAdapter;
+	protected Boolean nullable;
+
+	protected final DeclarationAnnotationElementAdapter<Boolean> insertableDeclarationAdapter;
+	protected final AnnotationElementAdapter<Boolean> insertableAdapter;
+	protected Boolean insertable;
+
+	protected final DeclarationAnnotationElementAdapter<Boolean> updatableDeclarationAdapter;
+	protected final AnnotationElementAdapter<Boolean> updatableAdapter;
+	protected Boolean updatable;
+
+
+	protected SourceBaseColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+	
+	protected SourceBaseColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.tableDeclarationAdapter = this.buildStringElementAdapter(this.getTableElementName());
+		this.tableAdapter = this.buildShortCircuitElementAdapter(this.tableDeclarationAdapter);
+		this.uniqueDeclarationAdapter = this.buildBooleanElementAdapter(this.getUniqueElementName());
+		this.uniqueAdapter = this.buildShortCircuitBooleanElementAdapter(this.uniqueDeclarationAdapter);
+		this.nullableDeclarationAdapter = this.buildBooleanElementAdapter(this.getNullableElementName());
+		this.nullableAdapter = this.buildShortCircuitBooleanElementAdapter(this.nullableDeclarationAdapter);
+		this.insertableDeclarationAdapter = this.buildBooleanElementAdapter(this.getInsertableElementName());
+		this.insertableAdapter = this.buildShortCircuitBooleanElementAdapter(this.insertableDeclarationAdapter);
+		this.updatableDeclarationAdapter = this.buildBooleanElementAdapter(this.getUpdatableElementName());
+		this.updatableAdapter = this.buildShortCircuitBooleanElementAdapter(this.updatableDeclarationAdapter);
+	}
+	
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.table = this.buildTable(astRoot);
+		this.unique = this.buildUnique(astRoot);
+		this.nullable = this.buildNullable(astRoot);
+		this.insertable = this.buildInsertable(astRoot);
+		this.updatable = this.buildUpdatable(astRoot);
+	}
+	
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncTable(this.buildTable(astRoot));
+		this.syncUnique(this.buildUnique(astRoot));
+		this.syncNullable(this.buildNullable(astRoot));
+		this.syncInsertable(this.buildInsertable(astRoot));
+		this.syncUpdatable(this.buildUpdatable(astRoot));
+	}
+	
+
+	//************* BaseColumnAnnotation implementation *************
+
+	// ***** table
+	public String getTable() {
+		return this.table;
+	}
+
+	public void setTable(String table) {
+		if (this.attributeValueHasChanged(this.table, table)) {
+			this.table = table;
+			this.tableAdapter.setValue(table);
+		}
+	}
+	
+	private void syncTable(String astTable) {
+		String old = this.table;
+		this.table = astTable;
+		this.firePropertyChanged(TABLE_PROPERTY, old, astTable);
+	}
+	
+	private String buildTable(CompilationUnit astRoot) {
+		return this.tableAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.tableDeclarationAdapter, astRoot);
+	}
+	
+	public boolean tableTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.tableDeclarationAdapter, pos, astRoot);
+	}
+
+	protected abstract String getTableElementName();
+
+	// ***** unique
+	public Boolean getUnique() {
+		return this.unique;
+	}
+
+	public void setUnique(Boolean unique) {
+		if (this.attributeValueHasChanged(this.unique, unique)) {
+			this.unique = unique;
+			this.uniqueAdapter.setValue(unique);
+		}
+	}
+
+	private void syncUnique(Boolean astUnique) {
+		Boolean old = this.unique;
+		this.unique = astUnique;
+		this.firePropertyChanged(UNIQUE_PROPERTY, old, astUnique);
+	}
+
+	private Boolean buildUnique(CompilationUnit astRoot) {
+		return this.uniqueAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getUniqueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.uniqueDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getUniqueElementName();
+
+	// ***** nullable
+	public Boolean getNullable() {
+		return this.nullable;
+	}
+
+	public void setNullable(Boolean nullable) {
+		if (this.attributeValueHasChanged(this.nullable, nullable)) {
+			this.nullable = nullable;
+			this.nullableAdapter.setValue(nullable);
+		}
+	}
+
+	private void syncNullable(Boolean astNullable) {
+		Boolean old = this.nullable;
+		this.nullable = astNullable;
+		this.firePropertyChanged(NULLABLE_PROPERTY, old, astNullable);
+	}
+
+	private Boolean buildNullable(CompilationUnit astRoot) {
+		return this.nullableAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getNullableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nullableDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getNullableElementName();
+
+	// ***** insertable
+	public Boolean getInsertable() {
+		return this.insertable;
+	}
+
+	public void setInsertable(Boolean insertable) {
+		if (this.attributeValueHasChanged(this.insertable, insertable)) {
+			this.insertable = insertable;
+			this.insertableAdapter.setValue(insertable);
+		}
+	}
+
+	private void syncInsertable(Boolean astInsertable) {
+		Boolean old = this.insertable;
+		this.insertable = astInsertable;
+		this.firePropertyChanged(INSERTABLE_PROPERTY, old, astInsertable);
+	}
+
+	private Boolean buildInsertable(CompilationUnit astRoot) {
+		return this.insertableAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getInsertableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.insertableDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getInsertableElementName();
+
+	// ***** updatable
+	public Boolean getUpdatable() {
+		return this.updatable;
+	}
+
+	public void setUpdatable(Boolean updatable) {
+		if (this.attributeValueHasChanged(this.updatable, updatable)) {
+			this.updatable = updatable;
+			this.updatableAdapter.setValue(updatable);
+		}
+	}
+
+	private void syncUpdatable(Boolean astUpdatable) {
+		Boolean old = this.updatable;
+		this.updatable = astUpdatable;
+		this.firePropertyChanged(UPDATABLE_PROPERTY, old, astUpdatable);
+	}
+
+	private Boolean buildUpdatable(CompilationUnit astRoot) {
+		return this.updatableAdapter.getValue(astRoot);
+	}
+
+	public TextRange getUpdatableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.updatableDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getUpdatableElementName();
+
+
+	//************* NestableAnnotation implementation *************
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		BaseColumnAnnotation oldColumn = (BaseColumnAnnotation) oldAnnotation;
+		this.setTable(oldColumn.getTable());
+		this.setUnique(oldColumn.getUnique());
+		this.setNullable(oldColumn.getNullable());
+		this.setInsertable(oldColumn.getInsertable());
+		this.setUpdatable(oldColumn.getUpdatable());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
new file mode 100644
index 0000000..cd14ba5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.resource.java.EnumType;
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.Enumerated
+ * javax.persistence.MapKeyEnumerated
+ */
+public abstract class SourceBaseEnumeratedAnnotation
+	extends SourceAnnotation<Attribute>
+	implements EnumeratedAnnotation
+{
+	private final DeclarationAnnotationElementAdapter<String> valueDeclarationAdapter;
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private EnumType value;
+	
+
+	protected SourceBaseEnumeratedAnnotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
+		super(parent, attribute, daa);
+		this.valueDeclarationAdapter = new EnumDeclarationAnnotationElementAdapter(daa, getValueElementName(), false);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, this.valueDeclarationAdapter);
+	}
+	
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** EnumeratedAnnotation implementation **********
+
+	// ***** value
+	public EnumType getValue() {
+		return this.value;
+	}
+	
+	public void setValue(EnumType value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(EnumType.toJavaAnnotationValue(value));
+		}
+	}
+	
+	private void syncValue(EnumType astValue) {
+		EnumType old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+	
+	private EnumType buildValue(CompilationUnit astRoot) {
+		return EnumType.fromJavaAnnotationValue(this.valueAdapter.getValue(astRoot));
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.valueDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getValueElementName();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
new file mode 100644
index 0000000..63e1dc5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.BaseJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.JoinColumn
+ * javax.persistence.MapKeyJoinColumn
+ */
+public abstract class SourceBaseJoinColumnAnnotation
+	extends SourceBaseColumnAnnotation
+	implements BaseJoinColumnAnnotation
+{
+	private final DeclarationAnnotationElementAdapter<String> referencedColumnNameDeclarationAdapter;
+	private final AnnotationElementAdapter<String> referencedColumnNameAdapter;
+	private String referencedColumnName;
+
+
+	protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.referencedColumnNameDeclarationAdapter = this.buildStringElementAdapter(this.getReferencedColumnNameElementName());
+		this.referencedColumnNameAdapter = this.buildShortCircuitElementAdapter(this.referencedColumnNameDeclarationAdapter);
+	}
+
+	protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+
+	protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
+		this(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.referencedColumnName = this.buildReferencedColumnName(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncReferencedColumnName(this.buildReferencedColumnName(astRoot));
+	}
+
+	protected abstract String getReferencedColumnNameElementName();
+
+
+	//************ BaseJoinColumnAnnotation implementation ***************
+
+	// referenced column name
+	public String getReferencedColumnName() {
+		return this.referencedColumnName;
+	}
+
+	public void setReferencedColumnName(String referencedColumnName) {
+		if (this.attributeValueHasChanged(this.referencedColumnName, referencedColumnName)) {
+			this.referencedColumnName = referencedColumnName;
+			this.referencedColumnNameAdapter.setValue(referencedColumnName);
+		}
+	}
+
+	private void syncReferencedColumnName(String astReferencedColumnName) {
+		String old = this.referencedColumnName;
+		this.referencedColumnName = astReferencedColumnName;
+		this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, astReferencedColumnName);
+	}
+
+	private String buildReferencedColumnName(CompilationUnit astRoot) {
+		return this.referencedColumnNameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.referencedColumnNameDeclarationAdapter, astRoot);
+	}
+
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.referencedColumnNameDeclarationAdapter, pos, astRoot);
+	}
+
+
+	 // ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		BaseJoinColumnAnnotation oldJoinColumn = (BaseJoinColumnAnnotation) oldAnnotation;
+		this.setReferencedColumnName(oldJoinColumn.getReferencedColumnName());
+	}
+
+	public void moveAnnotation(int newIndex) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
+	}
+
+	protected IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java
new file mode 100644
index 0000000..33c866b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java
@@ -0,0 +1,311 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.BaseNamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableQueryHintAnnotation;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.NamedQuery
+ * javax.persistence.NamedNativeQuery
+ */
+abstract class SourceBaseNamedQueryAnnotation
+	extends SourceAnnotation<Type> 
+	implements BaseNamedQueryAnnotation
+{
+	final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
+	final AnnotationElementAdapter<String> nameAdapter;
+	String name;
+
+	final DeclarationAnnotationElementAdapter<String> queryDeclarationAdapter;
+	final AnnotationElementAdapter<String> queryAdapter;
+	String query;
+
+	final Vector<NestableQueryHintAnnotation> hints = new Vector<NestableQueryHintAnnotation>();
+	final HintsAnnotationContainer hintsContainer = new HintsAnnotationContainer();
+
+
+	SourceBaseNamedQueryAnnotation(JavaResourceNode parent, Type type,DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, type, daa, annotationAdapter);
+		this.nameDeclarationAdapter = this.buildNameAdapter(daa);
+		this.queryDeclarationAdapter = this.buildQueryAdapter(daa);
+		this.nameAdapter = this.buildAdapter(this.nameDeclarationAdapter);
+		this.queryAdapter = this.buildAdapter(this.queryDeclarationAdapter);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+		this.query = this.buildQuery(astRoot);
+		AnnotationContainerTools.initialize(this.hintsContainer, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+		this.syncQuery(this.buildQuery(astRoot));
+		AnnotationContainerTools.synchronize(this.hintsContainer, astRoot);
+	}
+
+	/**
+	 * convenience method
+	 */
+	protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** BaseNamedQueryAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
+	}
+
+	private DeclarationAnnotationElementAdapter<String> buildNameAdapter(DeclarationAnnotationAdapter daAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(daAdapter, this.getNameElementName());
+	}
+
+	abstract String getNameElementName();
+
+	// ***** query
+	public String getQuery() {
+		return this.query;
+	}
+
+	public void setQuery(String query) {
+		if (this.attributeValueHasChanged(this.query, query)) {
+			this.query = query;
+			this.queryAdapter.setValue(query);
+		}
+	}
+
+	private void syncQuery(String annotationQuery) {
+		String old = this.query;
+		this.query = annotationQuery;
+		this.firePropertyChanged(QUERY_PROPERTY, old, annotationQuery);
+	}
+
+	private String buildQuery(CompilationUnit astRoot) {
+		return this.queryAdapter.getValue(astRoot);
+	}
+
+	public TextRange getQueryTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.queryDeclarationAdapter, astRoot);
+	}
+
+	private DeclarationAnnotationElementAdapter<String> buildQueryAdapter(DeclarationAnnotationAdapter daAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(daAdapter, this.getQueryElementName());
+	}
+
+	abstract String getQueryElementName();
+
+	// ***** hints
+	public ListIterator<QueryHintAnnotation> hints() {
+		return new CloneListIterator<QueryHintAnnotation>(this.hints);
+	}
+
+	Iterable<NestableQueryHintAnnotation> getNestableHints() {
+		return new LiveCloneIterable<NestableQueryHintAnnotation>(this.hints);
+	}
+
+	public int hintsSize() {
+		return this.hints.size();
+	}
+
+	public NestableQueryHintAnnotation hintAt(int index) {
+		return this.hints.get(index);
+	}
+
+	public int indexOfHint(QueryHintAnnotation hint) {
+		return this.hints.indexOf(hint);
+	}
+
+	public NestableQueryHintAnnotation addHint(int index) {
+		return (NestableQueryHintAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.hintsContainer);
+	}
+
+	NestableQueryHintAnnotation addHint_() {
+		return this.addHint_(this.hints.size());
+	}
+
+	private NestableQueryHintAnnotation addHint_(int index) {
+		NestableQueryHintAnnotation hint = this.buildHint(index);
+		this.hints.add(hint);
+		return hint;
+	}
+
+	void syncAddHint(Annotation astAnnotation) {
+		int index = this.hints.size();
+		NestableQueryHintAnnotation hint = this.addHint_(index);
+		hint.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(HINTS_LIST, index, hint);
+	}
+
+	abstract NestableQueryHintAnnotation buildHint(int index);
+
+	void hintAdded(int index, NestableQueryHintAnnotation hint) {
+		this.fireItemAdded(HINTS_LIST, index, hint);
+	}
+
+	public void moveHint(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.hintsContainer);
+	}
+
+	NestableQueryHintAnnotation moveHint_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.hints, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removeHint(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.hintsContainer);
+	}
+
+	NestableQueryHintAnnotation removeHint_(int index) {
+		return this.hints.remove(index);
+	}
+
+	void syncRemoveHints(int index) {
+		this.removeItemsFromList(index, this.hints, HINTS_LIST);
+	}
+
+	abstract String getHintsElementName();
+
+
+	// ********** NestableAnnotation implementation **********
+
+	/**
+	 * convenience implementation of method from NestableAnnotation interface
+	 * for subclasses
+	 */
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		BaseNamedQueryAnnotation oldQuery = (BaseNamedQueryAnnotation) oldAnnotation;
+		this.setName(oldQuery.getName());
+		this.setQuery(oldQuery.getQuery());
+		for (QueryHintAnnotation oldHint : CollectionTools.iterable(oldQuery.hints())) {
+			NestableQueryHintAnnotation newHint = this.addHint(oldQuery.indexOfHint(oldHint));
+			newHint.initializeFrom((NestableQueryHintAnnotation) oldHint);
+		}
+	}
+
+	/**
+	 * convenience implementation of method from NestableAnnotation interface
+	 * for subclasses
+	 */
+	public void moveAnnotation(int newIndex) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
+	}
+
+	private IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+
+
+	// ********** hint container **********
+
+	/**
+	 * adapt the AnnotationContainer interface to the override's join columns
+	 */
+	class HintsAnnotationContainer
+		implements AnnotationContainer<NestableQueryHintAnnotation>
+	{
+		public Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceBaseNamedQueryAnnotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getElementName() {
+			return SourceBaseNamedQueryAnnotation.this.getHintsElementName();
+		}
+
+		public String getNestedAnnotationName() {
+			return QueryHintAnnotation.ANNOTATION_NAME;
+		}
+
+		public Iterable<NestableQueryHintAnnotation> getNestedAnnotations() {
+			return SourceBaseNamedQueryAnnotation.this.getNestableHints();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceBaseNamedQueryAnnotation.this.hintsSize();
+		}
+
+		public NestableQueryHintAnnotation addNestedAnnotation() {
+			return SourceBaseNamedQueryAnnotation.this.addHint_();
+		}
+
+		public void syncAddNestedAnnotation(Annotation astAnnotation) {
+			SourceBaseNamedQueryAnnotation.this.syncAddHint(astAnnotation);
+		}
+
+		public NestableQueryHintAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceBaseNamedQueryAnnotation.this.moveHint_(targetIndex, sourceIndex);
+		}
+
+		public NestableQueryHintAnnotation removeNestedAnnotation(int index) {
+			return SourceBaseNamedQueryAnnotation.this.removeHint_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceBaseNamedQueryAnnotation.this.syncRemoveHints(index);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java
new file mode 100644
index 0000000..2375108
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java
@@ -0,0 +1,362 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.BaseTableAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableUniqueConstraintAnnotation;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.Table
+ * javax.persistence.JoinTable
+ * javax.persistence.SecondaryTable
+ * javax.persistence.CollectionTable
+ */
+public abstract class SourceBaseTableAnnotation
+	extends SourceAnnotation<Member>
+	implements BaseTableAnnotation
+{
+	final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
+	final AnnotationElementAdapter<String> nameAdapter;
+	String name;
+
+	final DeclarationAnnotationElementAdapter<String> schemaDeclarationAdapter;
+	final AnnotationElementAdapter<String> schemaAdapter;
+	String schema;
+
+	final DeclarationAnnotationElementAdapter<String> catalogDeclarationAdapter;
+	final AnnotationElementAdapter<String> catalogAdapter;
+	String catalog;
+
+	final Vector<NestableUniqueConstraintAnnotation> uniqueConstraints = new Vector<NestableUniqueConstraintAnnotation>();
+	final UniqueConstraintsAnnotationContainer uniqueConstraintsContainer = new UniqueConstraintsAnnotationContainer();
+
+
+	protected SourceBaseTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+
+	protected SourceBaseTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.nameDeclarationAdapter = this.getNameAdapter(daa);
+		this.schemaDeclarationAdapter = this.getSchemaAdapter(daa);
+		this.catalogDeclarationAdapter = this.getCatalogAdapter(daa);
+		this.nameAdapter = this.buildAnnotationElementAdapter(this.nameDeclarationAdapter);
+		this.schemaAdapter = this.buildAnnotationElementAdapter(this.schemaDeclarationAdapter);
+		this.catalogAdapter = this.buildAnnotationElementAdapter(this.catalogDeclarationAdapter);
+	}
+
+	private AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+		this.schema = this.buildSchema(astRoot);
+		this.catalog = this.buildCatalog(astRoot);
+		AnnotationContainerTools.initialize(this.uniqueConstraintsContainer, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+		this.syncSchema(this.buildSchema(astRoot));
+		this.syncCatalog(this.buildCatalog(astRoot));
+		AnnotationContainerTools.synchronize(this.uniqueConstraintsContainer, astRoot);
+	}
+
+	/**
+	 * Return the uniqueConstraints element name
+	 */
+	protected abstract String getUniqueConstraintsElementName();
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** BaseTableAnnotation implementation **********
+
+	public boolean isSpecified() {
+		return true;
+	}
+	
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
+	}
+
+	/**
+	 * Build and return a declaration element adapter for the table's 'name' element
+	 */
+	protected abstract DeclarationAnnotationElementAdapter<String> getNameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter);
+
+	// ***** schema
+	public String getSchema() {
+		return this.schema;
+	}
+
+	public void setSchema(String schema) {
+		if (this.attributeValueHasChanged(this.schema, schema)) {
+			this.schema = schema;
+			this.schemaAdapter.setValue(schema);
+		}
+	}
+
+	private void syncSchema(String astSchema) {
+		String old = this.schema;
+		this.schema = astSchema;
+		this.firePropertyChanged(SCHEMA_PROPERTY, old, astSchema);
+	}
+
+	private String buildSchema(CompilationUnit astRoot) {
+		return this.schemaAdapter.getValue(astRoot);
+	}
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.schemaDeclarationAdapter, astRoot);
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.schemaDeclarationAdapter, pos, astRoot);
+	}
+
+	/**
+	 * Build and return a declaration element adapter for the table's 'schema' element
+	 */
+	protected abstract DeclarationAnnotationElementAdapter<String> getSchemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter);
+
+	// ***** catalog
+	public String getCatalog() {
+		return this.catalog;
+	}
+
+	public void setCatalog(String catalog) {
+		if (this.attributeValueHasChanged(this.catalog, catalog)) {
+			this.catalog = catalog;
+			this.catalogAdapter.setValue(catalog);
+		}
+	}
+
+	private void syncCatalog(String astCatalog) {
+		String old = this.catalog;
+		this.catalog = astCatalog;
+		this.firePropertyChanged(CATALOG_PROPERTY, old, astCatalog);
+	}
+
+	private String buildCatalog(CompilationUnit astRoot) {
+		return this.catalogAdapter.getValue(astRoot);
+	}
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.catalogDeclarationAdapter, astRoot);
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.catalogDeclarationAdapter, pos, astRoot);
+	}
+
+	/**
+	 * Build and return a declaration element adapter for the table's 'catalog' element
+	 */
+	protected abstract DeclarationAnnotationElementAdapter<String> getCatalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter);
+
+	// ***** unique constraints
+	public ListIterator<UniqueConstraintAnnotation> uniqueConstraints() {
+		return new CloneListIterator<UniqueConstraintAnnotation>(this.uniqueConstraints);
+	}
+
+	Iterable<NestableUniqueConstraintAnnotation> getNestableUniqueConstraints() {
+		return new LiveCloneIterable<NestableUniqueConstraintAnnotation>(this.uniqueConstraints);
+	}
+
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+
+	public NestableUniqueConstraintAnnotation uniqueConstraintAt(int index) {
+		return this.uniqueConstraints.get(index);
+	}
+
+	public int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint) {
+		return this.uniqueConstraints.indexOf(uniqueConstraint);
+	}
+
+	public NestableUniqueConstraintAnnotation addUniqueConstraint(int index) {
+		return (NestableUniqueConstraintAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.uniqueConstraintsContainer);
+	}
+
+	NestableUniqueConstraintAnnotation addUniqueConstraint_() {
+		return this.addUniqueConstraint_(this.uniqueConstraints.size());
+	}
+
+	private NestableUniqueConstraintAnnotation addUniqueConstraint_(int index) {
+		NestableUniqueConstraintAnnotation uniqueConstraint = this.buildUniqueConstraint(index);
+		this.uniqueConstraints.add(uniqueConstraint);
+		return uniqueConstraint;
+	}
+
+	void syncAddUniqueConstraint(Annotation astAnnotation) {
+		int index = this.uniqueConstraints.size();
+		NestableUniqueConstraintAnnotation uniqueConstraint = this.addUniqueConstraint_(index);
+		uniqueConstraint.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, uniqueConstraint);
+	}
+
+	NestableUniqueConstraintAnnotation buildUniqueConstraint(int index) {
+		return new SourceUniqueConstraintAnnotation(this, this.member, buildUniqueConstraintAnnotationAdapter(index));
+	}
+
+	IndexedDeclarationAnnotationAdapter buildUniqueConstraintAnnotationAdapter(int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(this.daa, getUniqueConstraintsElementName(), index, JPA.UNIQUE_CONSTRAINT);
+	}
+
+	void uniqueConstraintAdded(int index, NestableUniqueConstraintAnnotation constraint) {
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, constraint);
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.uniqueConstraintsContainer);
+	}
+
+	NestableUniqueConstraintAnnotation moveUniqueConstraint_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.uniqueConstraints, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removeUniqueConstraint(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.uniqueConstraintsContainer);
+	}
+
+	NestableUniqueConstraintAnnotation removeUniqueConstraint_(int index) {
+		return this.uniqueConstraints.remove(index);
+	}
+
+	void syncRemoveUniqueConstraints(int index) {
+		this.removeItemsFromList(index, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+
+	
+	// ********** NestableAnnotation implementation **********
+
+	protected void initializeFrom(NestableAnnotation oldAnnotation) {
+		BaseTableAnnotation oldTable = (BaseTableAnnotation) oldAnnotation;
+		this.setName(oldTable.getName());
+		this.setSchema(oldTable.getSchema());
+		this.setCatalog(oldTable.getCatalog());
+		for (UniqueConstraintAnnotation oldUniqueConstraint : CollectionTools.iterable(oldTable.uniqueConstraints())) {
+			NestableUniqueConstraintAnnotation newUniqueConstraint = this.addUniqueConstraint(oldTable.indexOfUniqueConstraint(oldUniqueConstraint));
+			newUniqueConstraint.initializeFrom((NestableAnnotation) oldUniqueConstraint);
+		}
+	}
+	
+	// ********** unique constraint container **********
+
+	/**
+	 * adapt the AnnotationContainer interface to the table's unique constraints
+	 */
+	class UniqueConstraintsAnnotationContainer
+		implements AnnotationContainer<NestableUniqueConstraintAnnotation> 
+	{
+		public Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceBaseTableAnnotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getElementName() {
+			return SourceBaseTableAnnotation.this.getUniqueConstraintsElementName();
+		}
+
+		public String getNestedAnnotationName() {
+			return UniqueConstraintAnnotation.ANNOTATION_NAME;
+		}
+
+		public Iterable<NestableUniqueConstraintAnnotation> getNestedAnnotations() {
+			return SourceBaseTableAnnotation.this.getNestableUniqueConstraints();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceBaseTableAnnotation.this.uniqueConstraintsSize();
+		}
+
+		public NestableUniqueConstraintAnnotation addNestedAnnotation() {
+			return SourceBaseTableAnnotation.this.addUniqueConstraint_();
+		}
+
+		public void syncAddNestedAnnotation(Annotation astAnnotation) {
+			SourceBaseTableAnnotation.this.syncAddUniqueConstraint(astAnnotation);
+		}
+
+		public NestableUniqueConstraintAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceBaseTableAnnotation.this.moveUniqueConstraint_(targetIndex, sourceIndex);
+		}
+
+		public NestableUniqueConstraintAnnotation removeNestedAnnotation(int index) {
+			return SourceBaseTableAnnotation.this.removeUniqueConstraint_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceBaseTableAnnotation.this.syncRemoveUniqueConstraints(index);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
new file mode 100644
index 0000000..4845d65
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.resource.java.TemporalType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * Abstract implementation for JPA annotations
+ * javax.persistence.Temporal
+ * javax.persistence.MapKeyTemporal
+ */
+public abstract class SourceBaseTemporalAnnotation
+	extends SourceAnnotation<Attribute>
+	implements TemporalAnnotation
+{
+	protected final DeclarationAnnotationElementAdapter<String> valueDeclarationAdapter;
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private TemporalType value;
+
+
+	protected SourceBaseTemporalAnnotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
+		super(parent, attribute, daa);
+		this.valueDeclarationAdapter = new EnumDeclarationAnnotationElementAdapter(daa, getValueElementName());
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, this.valueDeclarationAdapter);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** TemporalAnnotation implementation **********
+
+	// ***** value
+	public TemporalType getValue() {
+		return this.value;
+	}
+
+	public void setValue(TemporalType value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(TemporalType.toJavaAnnotationValue(value));
+		}
+	}
+
+	private void syncValue(TemporalType astValue) {
+		TemporalType old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private TemporalType buildValue(CompilationUnit astRoot) {
+		return TemporalType.fromJavaAnnotationValue(this.valueAdapter.getValue(astRoot));
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.valueDeclarationAdapter, astRoot);
+	}
+
+	protected abstract String getValueElementName();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java
new file mode 100644
index 0000000..fe61516
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.Basic
+ */
+public final class SourceBasicAnnotation
+	extends SourceAnnotation<Attribute>
+	implements BasicAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<Boolean> OPTIONAL_ADAPTER = buildOptionalAdapter();
+	private final AnnotationElementAdapter<Boolean> optionalAdapter;
+	private Boolean optional;
+
+	private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
+	private final AnnotationElementAdapter<String> fetchAdapter;
+	private FetchType fetch;
+
+
+	public SourceBasicAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.optionalAdapter = new MemberAnnotationElementAdapter<Boolean>(attribute, OPTIONAL_ADAPTER);
+		this.fetchAdapter = new MemberAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.optional = this.buildOptional(astRoot);
+		this.fetch = this.buildFetch(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncOptional(this.buildOptional(astRoot));
+		this.syncFetch(this.buildFetch(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.fetch);
+	}
+
+
+	//*************** Basic implementation ****************
+
+	// ***** optional
+	public Boolean getOptional() {
+		return this.optional;
+	}
+
+	public void setOptional(Boolean optional) {
+		if (this.attributeValueHasChanged(this.optional, optional)) {
+			this.optional = optional;
+			this.optionalAdapter.setValue(optional);
+		}
+	}
+
+	private void syncOptional(Boolean astOptional) {
+		Boolean old = this.optional;
+		this.optional = astOptional;
+		this.firePropertyChanged(OPTIONAL_PROPERTY, old, astOptional);
+	}
+
+	private Boolean buildOptional(CompilationUnit astRoot) {
+		return this.optionalAdapter.getValue(astRoot);
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(OPTIONAL_ADAPTER, astRoot);
+	}
+
+	// ***** fetch
+	public FetchType getFetch() {
+		return this.fetch;
+	}
+
+	public void setFetch(FetchType fetch) {
+		if (this.attributeValueHasChanged(this.fetch, fetch)) {
+			this.fetch = fetch;
+			this.fetchAdapter.setValue(FetchType.toJavaAnnotationValue(fetch));
+		}
+	}
+
+	private void syncFetch(FetchType astFetch) {
+		FetchType old = this.fetch;
+		this.fetch = astFetch;
+		this.firePropertyChanged(FETCH_PROPERTY, old, astFetch);
+	}
+
+	private FetchType buildFetch(CompilationUnit astRoot) {
+		return FetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot));
+	}
+
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(FETCH_ADAPTER, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter() {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(DECLARATION_ANNOTATION_ADAPTER, JPA.BASIC__OPTIONAL, false, BooleanExpressionConverter.instance());
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
+		return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.BASIC__FETCH, false);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceColumnAnnotation.java
new file mode 100644
index 0000000..1d2f286
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceColumnAnnotation.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Column
+ */
+public final class SourceColumnAnnotation
+	extends SourceCompleteColumnAnnotation
+	implements NestableColumnAnnotation
+{
+	// this adapter is only used by a Column annotation associated with a mapping annotation (e.g. Basic)
+	public static final DeclarationAnnotationAdapter MAPPING_DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		super(parent, member, daa);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	// ********** SourceNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** SourceBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA.COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA.COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA.COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA.COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA.COLUMN__UPDATABLE;
+	}
+	
+	// ********** SourceCompleteColumnAnnotation implementation **********
+
+	@Override
+	protected String getLengthElementName() {
+		return JPA.COLUMN__LENGTH;
+	}
+	
+	@Override
+	protected String getPrecisionElementName() {
+		return JPA.COLUMN__PRECISION;
+	}
+	
+	@Override
+	protected String getScaleElementName() {
+		return JPA.COLUMN__SCALE;
+	}
+
+	 // ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		ColumnAnnotation oldColumn = (ColumnAnnotation) oldAnnotation;
+		this.setLength(oldColumn.getLength());
+		this.setPrecision(oldColumn.getPrecision());
+		this.setScale(oldColumn.getScale());
+	}
+
+	public void moveAnnotation(int newIndex) {
+		// the only place where a column annotation is nested is in an
+		// attribute override; and that only nests a single column, not an array
+		// of columns; so #moveAnnotation(int) is never called
+		// TODO maybe NestableAnnotation should be split up;
+		// moving this method to something like IndexableAnnotation
+		throw new UnsupportedOperationException();
+	}
+
+
+	// ********** static methods **********
+
+	static NestableColumnAnnotation createAttributeOverrideColumn(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter attributeOverrideAnnotationAdapter) {
+		return new SourceColumnAnnotation(parent, member, buildAttributeOverrideAnnotationAdapter(attributeOverrideAnnotationAdapter));
+	}
+
+	static DeclarationAnnotationAdapter buildAttributeOverrideAnnotationAdapter(DeclarationAnnotationAdapter attributeOverrideAnnotationAdapter) {
+		return new NestedDeclarationAnnotationAdapter(attributeOverrideAnnotationAdapter, JPA.ATTRIBUTE_OVERRIDE__COLUMN, JPA.COLUMN);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceCompilationUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceCompilationUnit.java
new file mode 100644
index 0000000..d726419
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceCompilationUnit.java
@@ -0,0 +1,291 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.JpaResourceModelListener;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.utility.CommandExecutor;
+import org.eclipse.jpt.utility.internal.ListenerList;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+
+/**
+ * Java compilation unit (source file)
+ */
+public final class SourceCompilationUnit
+	extends SourceNode
+	implements JavaResourceCompilationUnit
+{
+	/** JDT compilation unit */
+	private final ICompilationUnit compilationUnit;
+
+	/** pluggable annotation provider */
+	private final JpaAnnotationProvider annotationProvider;
+
+	/** improved annotation formatting */
+	private final AnnotationEditFormatter annotationEditFormatter;
+
+	/** pluggable executor that allows the document to be modified on another thread */
+	private final CommandExecutor modifySharedDocumentCommandExecutor;
+
+	/** listeners notified whenever the resource model changes */
+	private final ListenerList<JpaResourceModelListener> resourceModelListenerList;
+
+	/**
+	 * The primary type of the AST compilation unit. We are not going to handle
+	 * multiple types defined in a single compilation unit. Entities must have
+	 * a public/protected no-arg constructor, and there is no way to access
+	 * the constructor in a package class (which is what all top-level,
+	 * non-primary classes must be).
+	 */
+	private JavaResourcePersistentType persistentType;	
+
+
+	// ********** construction **********
+
+	public SourceCompilationUnit(
+			ICompilationUnit compilationUnit,
+			JpaAnnotationProvider annotationProvider, 
+			AnnotationEditFormatter annotationEditFormatter,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		super(null);  // the JPA compilation unit is the root of its sub-tree
+		this.compilationUnit = compilationUnit;
+		this.annotationProvider = annotationProvider;
+		this.annotationEditFormatter = annotationEditFormatter;
+		this.modifySharedDocumentCommandExecutor = modifySharedDocumentCommandExecutor;
+		this.resourceModelListenerList = new ListenerList<JpaResourceModelListener>(JpaResourceModelListener.class);
+		this.persistentType = this.buildPersistentType();
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// never called?
+	}
+
+	private JavaResourcePersistentType buildPersistentType() {
+		this.openCompilationUnit();
+		CompilationUnit astRoot = this.buildASTRoot();
+		this.closeCompilationUnit();
+		return this.buildPersistentType(astRoot);
+	}
+
+	private void openCompilationUnit() {
+		try {
+			this.compilationUnit.open(null);
+		} catch (JavaModelException ex) {
+			// do nothing - we just won't have a primary type in this case
+		}
+	}
+
+	private void closeCompilationUnit() {
+		try {
+			this.compilationUnit.close();
+		} catch (JavaModelException ex) {
+			// hmmm
+		}
+	}
+
+
+	// ********** AbstractJavaResourceNode overrides **********
+
+	@Override
+	protected boolean requiresParent() {
+		return false;
+	}
+
+	@Override
+	public JavaResourceCompilationUnit getRoot() {
+		return this;
+	}
+
+	@Override
+	public IFile getFile() {
+		return (IFile) this.compilationUnit.getResource();
+	}
+	
+	@Override
+	public JpaAnnotationProvider getAnnotationProvider() {
+		return this.annotationProvider;
+	}
+	
+
+	// ********** JavaResourceNode implementation **********
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncPersistentType(astRoot);
+	}
+
+	public TextRange getTextRange(CompilationUnit astRoot) {
+		return null;
+	}
+
+
+	// ********** JavaResourceNode.Root implementation **********
+
+	/**
+	 * NB: return *all* the persistent types since we build them all
+	 */
+	public Iterator<JavaResourcePersistentType> persistentTypes() {
+		return (this.persistentType == null) ?
+				EmptyIterator.<JavaResourcePersistentType>instance() :
+				this.persistentType.allTypes();
+	}
+
+	public void resourceModelChanged() {
+		for (JpaResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
+			listener.resourceModelChanged(this);
+		}
+	}
+
+
+	// ********** JavaResourceCompilationUnit implementation **********
+
+	public ICompilationUnit getCompilationUnit() {
+		return this.compilationUnit;
+	}
+
+	public void resolveTypes() {
+		if (this.persistentType != null) {
+			this.persistentType.resolveTypes(this.buildASTRoot());
+		}
+	}
+
+	public CommandExecutor getModifySharedDocumentCommandExecutor() {
+		return this.modifySharedDocumentCommandExecutor;
+	}
+	
+	public AnnotationEditFormatter getAnnotationEditFormatter()  {
+		return this.annotationEditFormatter;
+	}
+	
+	public CompilationUnit buildASTRoot() {
+		return ASTTools.buildASTRoot(this.compilationUnit);
+	}
+
+
+	// ********** persistent type **********
+
+	private JavaResourcePersistentType buildPersistentType(CompilationUnit astRoot) {
+		TypeDeclaration td = this.getPrimaryTypeDeclaration(astRoot);
+		return (td == null) ? null : this.buildPersistentType(astRoot, td);
+	}
+
+
+	private void syncPersistentType(CompilationUnit astRoot) {
+		TypeDeclaration td = this.getPrimaryTypeDeclaration(astRoot);
+		if (td == null) {
+			this.syncPersistentType_(null);
+		} else {
+			if (this.persistentType == null) {
+				this.syncPersistentType_(this.buildPersistentType(astRoot, td));
+			} else {
+				this.persistentType.synchronizeWith(astRoot);
+			}
+		}
+	}
+
+	private void syncPersistentType_(JavaResourcePersistentType astPersistentType) {
+		JavaResourcePersistentType old = this.persistentType;
+		this.persistentType = astPersistentType;
+		this.firePropertyChanged(PERSISTENT_TYPES_COLLECTION, old, astPersistentType);
+	}
+
+
+	// ********** JpaResourceModel implementation **********
+	
+	public JpaResourceType getResourceType() {
+		return JptCorePlugin.JAVA_SOURCE_RESOURCE_TYPE;
+	}
+
+	public void addResourceModelListener(JpaResourceModelListener listener) {
+		this.resourceModelListenerList.add(listener);
+	}
+
+	public void removeResourceModelListener(JpaResourceModelListener listener) {
+		this.resourceModelListenerList.remove(listener);
+	}
+
+
+	// ********** Java changes **********
+
+	public void synchronizeWithJavaSource() {
+		this.synchronizeWith(this.buildASTRoot());
+	}
+
+
+	// ********** internal **********
+
+	private JavaResourcePersistentType buildPersistentType(CompilationUnit astRoot, TypeDeclaration typeDeclaration) {
+		return SourcePersistentType.newInstance(this, typeDeclaration, astRoot);
+	}
+
+	/**
+	 * i.e. the type with the same name as the compilation unit;
+	 * return the first class or interface (ignore annotations and enums) with
+	 * the same name as the compilation unit (file);
+	 * NB: this type could be in error if there is an annotation or enum
+	 * with the same name preceding it in the compilation unit
+	 * 
+	 * Return null if the parser did not resolve the type declaration's binding.
+	 * This can occur if the project JRE is removed (bug 225332).
+	 */
+	private TypeDeclaration getPrimaryTypeDeclaration(CompilationUnit astRoot) {
+		String primaryTypeName = this.getPrimaryTypeName();
+		for (AbstractTypeDeclaration atd : this.types(astRoot)) {
+			if (this.nodeIsPrimaryTypeDeclaration(atd, primaryTypeName)) {
+				return (atd.resolveBinding() == null) ? null : (TypeDeclaration) atd;
+			}
+		}
+		return null;
+	}
+
+	private boolean nodeIsPrimaryTypeDeclaration(AbstractTypeDeclaration atd, String primaryTypeName) {
+		return (atd.getNodeType() == ASTNode.TYPE_DECLARATION) &&
+					atd.getName().getFullyQualifiedName().equals(primaryTypeName);
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	private List<AbstractTypeDeclaration> types(CompilationUnit astRoot) {
+		return astRoot.types();
+	}
+
+	/**
+	 * i.e. the name of the compilation unit
+	 */
+	private String getPrimaryTypeName() {
+		return this.removeJavaExtension(this.compilationUnit.getElementName());
+	}
+
+	private String removeJavaExtension(String fileName) {
+		int index = fileName.lastIndexOf(".java"); //$NON-NLS-1$
+		return (index == -1) ? fileName : fileName.substring(0, index);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getPrimaryTypeName());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java
new file mode 100644
index 0000000..766c351
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceCompleteColumnAnnotation.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * Abstract implementation of ColumnAnnotation to be used for JPA annotations:
+ * javax.persistence.Column
+ * javax.persistence.MapKeyColumn
+ */
+public abstract class SourceCompleteColumnAnnotation
+	extends SourceBaseColumnAnnotation
+	implements ColumnAnnotation
+{
+	protected final DeclarationAnnotationElementAdapter<Integer> lengthDeclarationAdapter;
+	protected final AnnotationElementAdapter<Integer> lengthAdapter;
+	protected Integer length;
+
+	protected final DeclarationAnnotationElementAdapter<Integer> precisionDeclarationAdapter;
+	protected final AnnotationElementAdapter<Integer> precisionAdapter;
+	protected Integer precision;
+
+	protected final DeclarationAnnotationElementAdapter<Integer> scaleDeclarationAdapter;
+	protected final AnnotationElementAdapter<Integer> scaleAdapter;
+	protected Integer scale;
+
+
+	protected SourceCompleteColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		super(parent, member, daa);
+		this.lengthDeclarationAdapter = this.buildIntegerElementAdapter(this.getLengthElementName());
+		this.lengthAdapter = this.buildShortCircuitIntegerElementAdapter(this.lengthDeclarationAdapter);
+		this.precisionDeclarationAdapter = this.buildIntegerElementAdapter(this.getPrecisionElementName());
+		this.precisionAdapter = this.buildShortCircuitIntegerElementAdapter(this.precisionDeclarationAdapter);
+		this.scaleDeclarationAdapter = this.buildIntegerElementAdapter(this.getScaleElementName());
+		this.scaleAdapter = this.buildShortCircuitIntegerElementAdapter(this.scaleDeclarationAdapter);
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.length = this.buildLength(astRoot);
+		this.precision = this.buildPrecision(astRoot);
+		this.scale = this.buildScale(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncLength(this.buildLength(astRoot));
+		this.syncPrecision(this.buildPrecision(astRoot));
+		this.syncScale(this.buildScale(astRoot));
+	}
+
+
+	 // ********** ColumnAnnotation implementation **********
+
+	// ***** length
+	public Integer getLength() {
+		return this.length;
+	}
+
+	public void setLength(Integer length) {
+		if (this.attributeValueHasChanged(this.length, length)) {
+			this.length = length;
+			this.lengthAdapter.setValue(length);
+		}
+	}
+
+	private void syncLength(Integer astLength) {
+		Integer old = this.length;
+		this.length = astLength;
+		this.firePropertyChanged(LENGTH_PROPERTY, old, astLength);
+	}
+
+	private Integer buildLength(CompilationUnit astRoot) {
+		return this.lengthAdapter.getValue(astRoot);
+	}
+
+	public TextRange getLengthTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.lengthDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getLengthElementName();
+
+	// ***** precision
+	public Integer getPrecision() {
+		return this.precision;
+	}
+
+	public void setPrecision(Integer precision) {
+		if (this.attributeValueHasChanged(this.precision, precision)) {
+			this.precision = precision;
+			this.precisionAdapter.setValue(precision);
+		}
+	}
+
+	private void syncPrecision(Integer astPrecision) {
+		Integer old = this.precision;
+		this.precision = astPrecision;
+		this.firePropertyChanged(PRECISION_PROPERTY, old, astPrecision);
+	}
+
+	private Integer buildPrecision(CompilationUnit astRoot) {
+		return this.precisionAdapter.getValue(astRoot);
+	}
+
+	public TextRange getPrecisionTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.precisionDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getPrecisionElementName();
+
+	// ***** scale
+	public Integer getScale() {
+		return this.scale;
+	}
+
+	public void setScale(Integer scale) {
+		if (this.attributeValueHasChanged(this.scale, scale)) {
+			this.scale = scale;
+			this.scaleAdapter.setValue(scale);
+		}
+	}
+
+	private void syncScale(Integer astScale) {
+		Integer old = this.scale;
+		this.scale = astScale;
+		this.firePropertyChanged(SCALE_PROPERTY, old, astScale);
+	}
+
+	private Integer buildScale(CompilationUnit astRoot) {
+		return this.scaleAdapter.getValue(astRoot);
+	}
+
+	public TextRange getScaleTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.scaleDeclarationAdapter, astRoot);
+	}
+	
+	protected abstract String getScaleElementName();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
new file mode 100644
index 0000000..e600666
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.DiscriminatorType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.DiscriminatorColumn
+ */
+public final class SourceDiscriminatorColumnAnnotation
+	extends SourceNamedColumnAnnotation
+	implements DiscriminatorColumnAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> DISCRIMINATOR_TYPE_ADAPTER = buildDiscriminatorTypeAdapter();
+	private final AnnotationElementAdapter<String> discriminatorTypeAdapter;
+	private DiscriminatorType discriminatorType;
+
+	private final DeclarationAnnotationElementAdapter<Integer> lengthDeclarationAdapter;
+	private final AnnotationElementAdapter<Integer> lengthAdapter;
+	private Integer length;
+
+
+	public SourceDiscriminatorColumnAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.discriminatorTypeAdapter = new MemberAnnotationElementAdapter<String>(type, DISCRIMINATOR_TYPE_ADAPTER);
+		this.lengthDeclarationAdapter = this.buildIntegerElementAdapter(JPA.DISCRIMINATOR_COLUMN__LENGTH);
+		this.lengthAdapter = this.buildShortCircuitIntegerElementAdapter(this.lengthDeclarationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.discriminatorType = this.buildDiscriminatorType(astRoot);
+		this.length = this.buildLength(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncLength(this.buildLength(astRoot));
+		this.syncDiscriminatorType(this.buildDiscriminatorType(astRoot));
+	}
+
+
+	// ********** JavaSourceNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.DISCRIMINATOR_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.DISCRIMINATOR_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** DiscriminatorColumn implementation **********
+
+	// ***** discriminator type
+	public DiscriminatorType getDiscriminatorType() {
+		return this.discriminatorType;
+	}
+
+	public void setDiscriminatorType(DiscriminatorType discriminatorType) {
+		if (this.attributeValueHasChanged(this.discriminatorType, discriminatorType)) {
+			this.discriminatorType = discriminatorType;
+			this.discriminatorTypeAdapter.setValue(DiscriminatorType.toJavaAnnotationValue(discriminatorType));
+		}
+	}
+
+	private void syncDiscriminatorType(DiscriminatorType astDiscriminatorType) {
+		DiscriminatorType old = this.discriminatorType;
+		this.discriminatorType = astDiscriminatorType;
+		this.firePropertyChanged(DISCRIMINATOR_TYPE_PROPERTY, old, astDiscriminatorType);
+	}
+
+	private DiscriminatorType buildDiscriminatorType(CompilationUnit astRoot) {
+		return DiscriminatorType.fromJavaAnnotationValue(this.discriminatorTypeAdapter.getValue(astRoot));
+	}
+
+	// ***** length
+	public Integer getLength() {
+		return this.length;
+	}
+
+	public void setLength(Integer length) {
+		if (this.attributeValueHasChanged(this.length, length)) {
+			this.length = length;
+			this.lengthAdapter.setValue(length);
+		}
+	}
+
+	private void syncLength(Integer astLength) {
+		Integer old = this.length;
+		this.length = astLength;
+		this.firePropertyChanged(LENGTH_PROPERTY, old, astLength);
+	}
+
+	private Integer buildLength(CompilationUnit astRoot) {
+		return this.lengthAdapter.getValue(astRoot);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		throw new UnsupportedOperationException("DiscriminatorColumn is not a nestable annotation"); //$NON-NLS-1$
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildDiscriminatorTypeAdapter() {
+		return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
new file mode 100644
index 0000000..17f63b8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.DiscriminatorValue
+ */
+public final class SourceDiscriminatorValueAnnotation
+	extends SourceAnnotation<Type>
+	implements DiscriminatorValueAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private String value;
+
+
+	public SourceDiscriminatorValueAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** DiscriminatorValueAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.DISCRIMINATOR_VALUE__VALUE);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddableAnnotation.java
new file mode 100644
index 0000000..a336c44
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddableAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.EmbeddableAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Embeddable
+ */
+public final class SourceEmbeddableAnnotation
+	extends SourceAnnotation<Type>
+	implements EmbeddableAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceEmbeddableAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddedAnnotation.java
new file mode 100644
index 0000000..2e29565
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddedAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Embedded
+ */
+public final class SourceEmbeddedAnnotation
+	extends SourceAnnotation<Attribute>
+	implements EmbeddedAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceEmbeddedAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java
new file mode 100644
index 0000000..17901e5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEmbeddedIdAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.EmbeddedIdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.EmbeddedId
+ */
+public final class SourceEmbeddedIdAnnotation
+	extends SourceAnnotation<Attribute>
+	implements EmbeddedIdAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceEmbeddedIdAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java
new file mode 100644
index 0000000..8aa53f2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.EntityAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Entity
+ */
+public final class SourceEntityAnnotation
+	extends SourceAnnotation<Type>
+	implements EntityAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildNameAdapter();
+	private final AnnotationElementAdapter<String> nameAdapter;
+	private String name;
+
+
+	public SourceEntityAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.nameAdapter = new MemberAnnotationElementAdapter<String>(this.member, NAME_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** EntityAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(NAME_ADAPTER, astRoot);
+	}
+
+
+	//*********** static methods ****************
+
+	private static DeclarationAnnotationElementAdapter<String> buildNameAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ENTITY__NAME, false); // false = do not remove annotation when empty
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEnumeratedAnnotation.java
new file mode 100644
index 0000000..031706d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEnumeratedAnnotation.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Enumerated
+ */
+public final class SourceEnumeratedAnnotation
+	extends SourceBaseEnumeratedAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);	
+
+	public SourceEnumeratedAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected String getValueElementName() {
+		return JPA.ENUMERATED__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
new file mode 100644
index 0000000..75b8b9f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.resource.java.GenerationType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.GeneratedValue
+ */
+public final class SourceGeneratedValueAnnotation
+	extends SourceAnnotation<Member>
+	implements GeneratedValueAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> STRATEGY_ADAPTER = buildStrategyAdapter();
+	private final AnnotationElementAdapter<String> strategyAdapter;
+	private GenerationType strategy;
+
+	private static final DeclarationAnnotationElementAdapter<String> GENERATOR_ADAPTER = buildGeneratorAdapter();
+	private final AnnotationElementAdapter<String> generatorAdapter;
+	private String generator;
+	
+		
+	public SourceGeneratedValueAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.strategyAdapter = new MemberAnnotationElementAdapter<String>(attribute, STRATEGY_ADAPTER);
+		this.generatorAdapter = new MemberAnnotationElementAdapter<String>(attribute, GENERATOR_ADAPTER);
+	}
+	
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.strategy = this.buildStrategy(astRoot);
+		this.generator = this.buildGenerator(astRoot);
+	}
+	
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncStrategy(this.buildStrategy(astRoot));
+		this.syncGenerator(this.buildGenerator(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.strategy);
+	}
+
+
+	// ********** GeneratedValueAnnotation implementation **********
+
+	// ***** strategy
+	public GenerationType getStrategy() {
+		return this.strategy;
+	}
+	
+	public void setStrategy(GenerationType strategy) {
+		if (this.attributeValueHasChanged(this.strategy, strategy)) {
+			this.strategy = strategy;
+			this.strategyAdapter.setValue(GenerationType.toJavaAnnotationValue(strategy));
+		}
+	}
+	
+	private void syncStrategy(GenerationType astStrategy) {
+		GenerationType old = this.strategy;
+		this.strategy = astStrategy;
+		this.firePropertyChanged(STRATEGY_PROPERTY, old, astStrategy);
+	}
+	
+	private GenerationType buildStrategy(CompilationUnit astRoot) {
+		return GenerationType.fromJavaAnnotationValue(this.strategyAdapter.getValue(astRoot));
+	}
+	
+	public TextRange getStrategyTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(STRATEGY_ADAPTER, astRoot);
+	}
+	
+	// ***** generator
+	public String getGenerator() {
+		return this.generator;
+	}
+	
+	public void setGenerator(String generator) {
+		if (this.attributeValueHasChanged(this.generator, generator)) {
+			this.generator = generator;
+			this.generatorAdapter.setValue(generator);
+		}
+	}
+
+	private void syncGenerator(String astGenerator) {
+		String old = this.generator;
+		this.generator = astGenerator;
+		this.firePropertyChanged(GENERATOR_PROPERTY, old, astGenerator);
+	}
+
+	private String buildGenerator(CompilationUnit astRoot) {
+		return this.generatorAdapter.getValue(astRoot);
+	}
+	
+	public TextRange getGeneratorTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(GENERATOR_ADAPTER, astRoot);
+	}
+
+	public boolean generatorTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(GENERATOR_ADAPTER, pos, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildStrategyAdapter() {
+		return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.GENERATED_VALUE__STRATEGY, false);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildGeneratorAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.GENERATED_VALUE__GENERATOR, false);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java
new file mode 100644
index 0000000..7e2d84f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
+import org.eclipse.jpt.core.resource.java.GeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SequenceGenerator
+ * javax.persistence.TableGenerator
+ */
+abstract class SourceGeneratorAnnotation
+	extends SourceAnnotation<Member>
+	implements GeneratorAnnotation
+{
+	final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
+	final AnnotationElementAdapter<String> nameAdapter;
+	String name;
+
+	final DeclarationAnnotationElementAdapter<Integer> initialValueDeclarationAdapter;
+	final AnnotationElementAdapter<Integer> initialValueAdapter;
+	Integer initialValue;
+
+	final DeclarationAnnotationElementAdapter<Integer> allocationSizeDeclarationAdapter;
+	final AnnotationElementAdapter<Integer> allocationSizeAdapter;
+	Integer allocationSize;
+
+
+	SourceGeneratorAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		super(parent, member, daa);
+		this.nameDeclarationAdapter = this.getNameAdapter();
+		this.nameAdapter = this.buildAdapter(this.nameDeclarationAdapter);
+		this.initialValueDeclarationAdapter = this.getInitialValueAdapter();
+		this.initialValueAdapter = this.buildIntegerAdapter(this.initialValueDeclarationAdapter);
+		this.allocationSizeDeclarationAdapter = this.getAllocationSizeAdapter();
+		this.allocationSizeAdapter = this.buildIntegerAdapter(this.allocationSizeDeclarationAdapter);
+	}
+
+	protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	protected AnnotationElementAdapter<Integer> buildIntegerAdapter(DeclarationAnnotationElementAdapter<Integer> daea) {
+		return new MemberAnnotationElementAdapter<Integer>(this.member, daea);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+		this.initialValue = this.buildInitialValue(astRoot);
+		this.allocationSize = this.buildAllocationSize(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+		this.syncInitialValue(this.buildInitialValue(astRoot));
+		this.syncAllocationSize(this.buildAllocationSize(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** GeneratorAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
+	}
+
+	abstract DeclarationAnnotationElementAdapter<String> getNameAdapter();
+
+	// ***** initial value
+	public Integer getInitialValue() {
+		return this.initialValue;
+	}
+
+	public void setInitialValue(Integer initialValue) {
+		if (this.attributeValueHasChanged(this.initialValue, initialValue)) {
+			this.initialValue = initialValue;
+			this.initialValueAdapter.setValue(initialValue);
+		}
+	}
+
+	private void syncInitialValue(Integer astIinitialValue) {
+		Integer old = this.initialValue;
+		this.initialValue = astIinitialValue;
+		this.firePropertyChanged(INITIAL_VALUE_PROPERTY, old, astIinitialValue);
+	}
+
+	private Integer buildInitialValue(CompilationUnit astRoot) {
+		return this.initialValueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getInitialValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.initialValueDeclarationAdapter, astRoot);
+	}
+
+	abstract DeclarationAnnotationElementAdapter<Integer> getInitialValueAdapter();
+
+	// ***** allocation size
+	public Integer getAllocationSize() {
+		return this.allocationSize;
+	}
+
+	public void setAllocationSize(Integer allocationSize) {
+		if (this.attributeValueHasChanged(this.allocationSize, allocationSize)) {
+			this.allocationSize = allocationSize;
+			this.allocationSizeAdapter.setValue(allocationSize);
+		}
+	}
+
+	private void syncAllocationSize(Integer astAllocationSize) {
+		Integer old = this.allocationSize;
+		this.allocationSize = astAllocationSize;
+		this.firePropertyChanged(ALLOCATION_SIZE_PROPERTY, old, astAllocationSize);
+	}
+
+	private Integer buildAllocationSize(CompilationUnit astRoot) {
+		return this.allocationSizeAdapter.getValue(astRoot);
+	}
+
+	public TextRange getAllocationSizeTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.allocationSizeDeclarationAdapter, astRoot);
+	}
+
+	abstract DeclarationAnnotationElementAdapter<Integer> getAllocationSizeAdapter();
+
+
+	// ********** static methods **********
+
+	static DeclarationAnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(annotationAdapter, elementName);
+	}
+
+	static DeclarationAnnotationElementAdapter<Integer> buildIntegerAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Integer>(annotationAdapter, elementName, NumberIntegerExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdAnnotation.java
new file mode 100644
index 0000000..63cbbd1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.IdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Id
+ */
+public final class SourceIdAnnotation
+	extends SourceAnnotation<Attribute>
+	implements IdAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceIdAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java
new file mode 100644
index 0000000..1160907
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
+import org.eclipse.jpt.core.resource.java.IdClassAnnotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.IdClass
+ */
+public final class SourceIdClassAnnotation
+	extends SourceAnnotation<Type>
+	implements IdClassAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private String value;
+
+	private String fullyQualifiedClassName;
+
+
+	public SourceIdClassAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+		this.fullyQualifiedClassName = this.buildFullyQualifiedClassName(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+		this.syncFullyQualifiedClassName(this.buildFullyQualifiedClassName(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** IdClassAnnotation implementation **********
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+
+	// ***** fully-qualified class name
+	public String getFullyQualifiedClassName() {
+		return this.fullyQualifiedClassName;
+	}
+
+	private void syncFullyQualifiedClassName(String astFullyQualifiedClassName) {
+		String old = this.fullyQualifiedClassName;
+		this.fullyQualifiedClassName = astFullyQualifiedClassName;
+		this.firePropertyChanged(FULLY_QUALIFIED_CLASS_NAME_PROPERTY, old, astFullyQualifiedClassName);
+	}
+
+	private String buildFullyQualifiedClassName(CompilationUnit astRoot) {
+		return (this.value == null) ? null : ASTTools.resolveFullyQualifiedName(this.valueAdapter.getExpression(astRoot));
+	}
+
+
+	// ********** static methods **********
+
+	protected static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(DECLARATION_ANNOTATION_ADAPTER, JPA.ID_CLASS__VALUE, SimpleTypeStringExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java
new file mode 100644
index 0000000..e08d9ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
+import org.eclipse.jpt.core.resource.java.InheritanceType;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Inheritance
+ */
+public final class SourceInheritanceAnnotation
+	extends SourceAnnotation<Type>
+	implements InheritanceAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> STRATEGY_ADAPTER = buildStrategyAdapter();
+	private final AnnotationElementAdapter<String> strategyAdapter;
+	private InheritanceType strategy;
+
+
+	public SourceInheritanceAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+		this.strategyAdapter = new MemberAnnotationElementAdapter<String>(type, STRATEGY_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.strategy = this.buildStrategy(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncStrategy(this.buildStrategy(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.strategy);
+	}
+
+
+	// ********** InheritanceAnnotation implementation **********
+
+	// ***** strategy
+	public InheritanceType getStrategy() {
+		return this.strategy;
+	}
+
+	public void setStrategy(InheritanceType strategy) {
+		if (this.attributeValueHasChanged(this.strategy, strategy)) {
+			this.strategy = strategy;
+			this.strategyAdapter.setValue(InheritanceType.toJavaAnnotationValue(strategy));
+		}
+	}
+
+	private void syncStrategy(InheritanceType astStrategy) {
+		InheritanceType old = this.strategy;
+		this.strategy = astStrategy;
+		this.firePropertyChanged(STRATEGY_PROPERTY, old, astStrategy);
+	}
+
+	private InheritanceType buildStrategy(CompilationUnit astRoot) {
+		return InheritanceType.fromJavaAnnotationValue(this.strategyAdapter.getValue(astRoot));
+	}
+
+	public TextRange getStrategyTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(STRATEGY_ADAPTER, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildStrategyAdapter() {
+		return new EnumDeclarationAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.INHERITANCE__STRATEGY);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
new file mode 100644
index 0000000..d1c8e0d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.JoinColumn
+ */
+public final class SourceJoinColumnAnnotation
+	extends SourceBaseJoinColumnAnnotation
+	implements NestableJoinColumnAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+	}
+
+	public SourceJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+
+	public SourceJoinColumnAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
+		this(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	// ********** SourceNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.JOIN_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.JOIN_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** SourceBaseColumnAnnotation implementation **********
+
+	@Override
+	protected String getTableElementName() {
+		return JPA.JOIN_COLUMN__TABLE;
+	}
+
+	@Override
+	protected String getUniqueElementName() {
+		return JPA.JOIN_COLUMN__UNIQUE;
+	}
+
+	@Override
+	protected String getNullableElementName() {
+		return JPA.JOIN_COLUMN__NULLABLE;
+	}
+
+	@Override
+	protected String getInsertableElementName() {
+		return JPA.JOIN_COLUMN__INSERTABLE;
+	}
+
+	@Override
+	protected String getUpdatableElementName() {
+		return JPA.JOIN_COLUMN__UPDATABLE;
+	}
+
+
+	// ********** SourceBaseJoinColumnAnnotation implementation **********
+
+	@Override
+	protected String getReferencedColumnNameElementName() {
+		return JPA.JOIN_COLUMN__REFERENCED_COLUMN_NAME;
+	}
+
+
+	// ********** static methods **********
+
+	public static SourceJoinColumnAnnotation createJoinColumn(JavaResourceNode parent, Member member) {
+		return new SourceJoinColumnAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	static SourceJoinColumnAnnotation createNestedJoinColumn(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter joinColumnsAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, joinColumnsAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+		return new SourceJoinColumnAnnotation(parent, member, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter joinColumnsAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(joinColumnsAdapter, index, JPA.JOIN_COLUMN);
+	}
+
+	static NestableJoinColumnAnnotation createAssociationOverrideJoinColumn(DeclarationAnnotationAdapter associationOverrideAdapter, JavaResourceNode parent, Member member, int index) {
+		return new SourceJoinColumnAnnotation(parent, member, buildAssociationOverrideAnnotationAdapter(associationOverrideAdapter, index));
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildAssociationOverrideAnnotationAdapter(DeclarationAnnotationAdapter associationOverrideAdapter, int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(associationOverrideAdapter, JPA.ASSOCIATION_OVERRIDE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java
new file mode 100644
index 0000000..81335c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinColumnsAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.JoinColumns
+ */
+public final class SourceJoinColumnsAnnotation
+	extends SourceAnnotation<Member>
+	implements JoinColumnsAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableJoinColumnAnnotation> joinColumns = new Vector<NestableJoinColumnAnnotation>();
+
+
+	public SourceJoinColumnsAnnotation(JavaResourceNode parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.joinColumns);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA.JOIN_COLUMNS__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return JoinColumnAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableJoinColumnAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableJoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.joinColumns.size();
+	}
+
+	public NestableJoinColumnAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.joinColumns.size());
+	}
+
+	private NestableJoinColumnAnnotation addNestedAnnotation(int index) {
+		NestableJoinColumnAnnotation joinColumn = this.buildJoinColumn(index);
+		this.joinColumns.add(joinColumn);
+		return joinColumn;
+	}
+
+	public void syncAddNestedAnnotation(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+		int index = this.joinColumns.size();
+		NestableJoinColumnAnnotation joinColumn = this.addNestedAnnotation(index);
+		joinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	private NestableJoinColumnAnnotation buildJoinColumn(int index) {
+		return SourceJoinColumnAnnotation.createNestedJoinColumn(this, this.member, index, this.daa);
+	}
+
+	public NestableJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.joinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableJoinColumnAnnotation removeNestedAnnotation(int index) {
+		return this.joinColumns.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.joinColumns, JOIN_COLUMNS_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java
new file mode 100644
index 0000000..66bc641
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java
@@ -0,0 +1,376 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableJoinTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.JoinTable
+ */
+public final class SourceJoinTableAnnotation
+	extends SourceBaseTableAnnotation
+	implements NestableJoinTableAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(JoinTableAnnotation.ANNOTATION_NAME);
+
+
+	private final Vector<NestableJoinColumnAnnotation> joinColumns = new Vector<NestableJoinColumnAnnotation>();
+	private final JoinColumnsAnnotationContainer joinColumnsContainer = new JoinColumnsAnnotationContainer();
+
+	private final Vector<NestableJoinColumnAnnotation> inverseJoinColumns = new Vector<NestableJoinColumnAnnotation>();
+	private final InverseJoinColumnsContainerAnnotation inverseJoinColumnsContainer = new InverseJoinColumnsContainerAnnotation();
+
+
+	public SourceJoinTableAnnotation(JavaResourceNode parent, Member member) {
+		this(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public SourceJoinTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		super(parent, member, daa);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		AnnotationContainerTools.initialize(this.joinColumnsContainer, astRoot);
+		AnnotationContainerTools.initialize(this.inverseJoinColumnsContainer, astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		AnnotationContainerTools.synchronize(this.joinColumnsContainer, astRoot);
+		AnnotationContainerTools.synchronize(this.inverseJoinColumnsContainer, astRoot);
+	}
+
+
+	// ********** SourceBaseTableAnnotation implementation **********
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getNameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(declarationAnnotationAdapter, JPA.JOIN_TABLE__NAME);
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getSchemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(declarationAnnotationAdapter, JPA.JOIN_TABLE__SCHEMA);
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getCatalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(declarationAnnotationAdapter, JPA.JOIN_TABLE__CATALOG);
+	}
+
+	@Override
+	protected String getUniqueConstraintsElementName() {
+		return JPA.JOIN_TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+	// ********** JoinTableAnnotation implementation **********
+
+	// ***** join columns
+	public ListIterator<JoinColumnAnnotation> joinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.joinColumns);
+	}
+
+	Iterable<NestableJoinColumnAnnotation> getNestableJoinColumns() {
+		return new LiveCloneIterable<NestableJoinColumnAnnotation>(this.joinColumns);
+	}
+
+	public int joinColumnsSize() {
+		return this.joinColumns.size();
+	}
+
+	public NestableJoinColumnAnnotation joinColumnAt(int index) {
+		return this.joinColumns.get(index);
+	}
+
+	public int indexOfJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.joinColumns.indexOf(joinColumn);
+	}
+
+	public NestableJoinColumnAnnotation addJoinColumn(int index) {
+		return (NestableJoinColumnAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation addJoinColumn_() {
+		return this.addJoinColumn_(this.joinColumns.size());
+	}
+
+	private NestableJoinColumnAnnotation addJoinColumn_(int index) {
+		NestableJoinColumnAnnotation joinColumn = this.buildJoinColumn(index);
+		this.joinColumns.add(index, joinColumn);
+		return joinColumn;
+	}
+
+	void syncAddJoinColumn(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+		int index = this.joinColumns.size();
+		NestableJoinColumnAnnotation joinColumn = this.addJoinColumn_(index);
+		joinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	private NestableJoinColumnAnnotation buildJoinColumn(int index) {
+		return new SourceJoinColumnAnnotation(this, this.member, buildJoinColumnAnnotationAdapter(index));
+	}
+
+	private IndexedDeclarationAnnotationAdapter buildJoinColumnAnnotationAdapter(int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(this.daa, JPA.JOIN_TABLE__JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
+	}
+
+	public void moveJoinColumn(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation moveJoinColumn_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.joinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removeJoinColumn(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.joinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation removeJoinColumn_(int index) {
+		return this.joinColumns.remove(index);
+	}
+
+	void syncRemoveJoinColumns(int index) {
+		this.removeItemsFromList(index, this.joinColumns, JOIN_COLUMNS_LIST);
+	}
+
+	// ***** inverse join columns
+	public ListIterator<JoinColumnAnnotation> inverseJoinColumns() {
+		return new CloneListIterator<JoinColumnAnnotation>(this.inverseJoinColumns);
+	}
+
+	Iterable<NestableJoinColumnAnnotation> getNestableInverseJoinColumns() {
+		return new LiveCloneIterable<NestableJoinColumnAnnotation>(this.inverseJoinColumns);
+	}
+
+	public int inverseJoinColumnsSize() {
+		return this.inverseJoinColumns.size();
+	}
+
+	public NestableJoinColumnAnnotation inverseJoinColumnAt(int index) {
+		return this.inverseJoinColumns.get(index);
+	}
+
+	public int indexOfInverseJoinColumn(JoinColumnAnnotation joinColumn) {
+		return this.inverseJoinColumns.indexOf(joinColumn);
+	}
+
+	public NestableJoinColumnAnnotation addInverseJoinColumn(int index) {
+		return (NestableJoinColumnAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.inverseJoinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation addInverseJoinColumn_() {
+		return this.addInverseJoinColumn_(this.inverseJoinColumns.size());
+	}
+
+	private NestableJoinColumnAnnotation addInverseJoinColumn_(int index) {
+		NestableJoinColumnAnnotation joinColumn = this.buildInverseJoinColumn(index);
+		this.inverseJoinColumns.add(joinColumn);
+		return joinColumn;
+	}
+
+	void syncAddInverseJoinColumn(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+		int index = this.inverseJoinColumns.size();
+		NestableJoinColumnAnnotation joinColumn = this.addInverseJoinColumn_(index);
+		joinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(INVERSE_JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	private NestableJoinColumnAnnotation buildInverseJoinColumn(int index) {
+		return new SourceJoinColumnAnnotation(this, this.member, buildInverseJoinColumnAnnotationAdapter(index));
+	}
+
+	private IndexedDeclarationAnnotationAdapter buildInverseJoinColumnAnnotationAdapter(int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(this.daa, JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS, index, JPA.JOIN_COLUMN);
+	}
+
+	void inverseJoinColumnAdded(int index, NestableJoinColumnAnnotation joinColumn) {
+		this.fireItemAdded(INVERSE_JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	public void moveInverseJoinColumn(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.inverseJoinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation moveInverseJoinColumn_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.inverseJoinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	void inverseJoinColumnMoved(int targetIndex, int sourceIndex) {
+		this.fireItemMoved(INVERSE_JOIN_COLUMNS_LIST, targetIndex, sourceIndex);
+	}
+
+	public void removeInverseJoinColumn(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.inverseJoinColumnsContainer);
+	}
+
+	NestableJoinColumnAnnotation removeInverseJoinColumn_(int index) {
+		return this.inverseJoinColumns.remove(index);
+	}
+
+	void syncRemoveInverseJoinColumns(int index) {
+		this.removeItemsFromList(index, this.inverseJoinColumns, INVERSE_JOIN_COLUMNS_LIST);
+	}
+
+	// ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		JoinTableAnnotation oldJoinTable = (JoinTableAnnotation) oldAnnotation;
+		for (JoinColumnAnnotation oldJoinColumn : CollectionTools.iterable(oldJoinTable.joinColumns())) {
+			NestableJoinColumnAnnotation newJoinColumn = this.addJoinColumn(oldJoinTable.indexOfJoinColumn(oldJoinColumn));
+			newJoinColumn.initializeFrom((NestableAnnotation) oldJoinColumn);
+		}
+		for (JoinColumnAnnotation oldInverseJoinColumn : CollectionTools.iterable(oldJoinTable.inverseJoinColumns())) {
+			NestableJoinColumnAnnotation newInverseJoinColumn = this.addInverseJoinColumn(oldJoinTable.indexOfInverseJoinColumn(oldInverseJoinColumn));
+			newInverseJoinColumn.initializeFrom((NestableAnnotation) oldInverseJoinColumn);
+		}
+	}
+
+	public void moveAnnotation(int newIndex) {
+		// the only place where a join table annotation is nested is in an
+		// association override; and that only nests a single join table, not an array
+		// of join tables; so #moveAnnotation(int) is never called
+		// TODO maybe NestableAnnotation should be split up;
+		// moving this method to something like IndexableAnnotation
+		throw new UnsupportedOperationException();
+	}
+
+	// ********** annotation containers **********
+
+	abstract class AbstractJoinColumnAnnotationContainer
+		implements AnnotationContainer<NestableJoinColumnAnnotation>
+	{
+		public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceJoinTableAnnotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getNestedAnnotationName() {
+			return JoinColumnAnnotation.ANNOTATION_NAME;
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+
+	/**
+	 * adapt the AnnotationContainer interface to the join table's join columns
+	 */
+	class JoinColumnsAnnotationContainer
+		extends AbstractJoinColumnAnnotationContainer
+	{
+		public String getElementName() {
+			return JPA.JOIN_TABLE__JOIN_COLUMNS;
+		}
+
+		public Iterable<NestableJoinColumnAnnotation> getNestedAnnotations() {
+			return SourceJoinTableAnnotation.this.getNestableJoinColumns();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceJoinTableAnnotation.this.joinColumnsSize();
+		}
+
+		public NestableJoinColumnAnnotation addNestedAnnotation() {
+			return SourceJoinTableAnnotation.this.addJoinColumn_();
+		}
+
+		public void syncAddNestedAnnotation(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+			SourceJoinTableAnnotation.this.syncAddJoinColumn(astAnnotation);
+		}
+
+		public NestableJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceJoinTableAnnotation.this.moveJoinColumn_(targetIndex, sourceIndex);
+		}
+
+		public NestableJoinColumnAnnotation removeNestedAnnotation(int index) {
+			return SourceJoinTableAnnotation.this.removeJoinColumn_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceJoinTableAnnotation.this.syncRemoveJoinColumns(index);
+		}
+	}
+
+
+	/**
+	 * adapt the AnnotationContainer interface to the join table's inverse join columns
+	 */
+	class InverseJoinColumnsContainerAnnotation
+		extends AbstractJoinColumnAnnotationContainer
+	{
+		public String getElementName() {
+			return JPA.JOIN_TABLE__INVERSE_JOIN_COLUMNS;
+		}
+
+		public Iterable<NestableJoinColumnAnnotation> getNestedAnnotations() {
+			return SourceJoinTableAnnotation.this.getNestableInverseJoinColumns();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceJoinTableAnnotation.this.inverseJoinColumnsSize();
+		}
+
+		public NestableJoinColumnAnnotation addNestedAnnotation() {
+			return SourceJoinTableAnnotation.this.addInverseJoinColumn_();
+		}
+
+		public void syncAddNestedAnnotation(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+			SourceJoinTableAnnotation.this.syncAddInverseJoinColumn(astAnnotation);
+		}
+
+		public NestableJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceJoinTableAnnotation.this.moveInverseJoinColumn_(targetIndex, sourceIndex);
+		}
+
+		public NestableJoinColumnAnnotation removeNestedAnnotation(int index) {
+			return SourceJoinTableAnnotation.this.removeInverseJoinColumn_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceJoinTableAnnotation.this.syncRemoveInverseJoinColumns(index);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceLobAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceLobAnnotation.java
new file mode 100644
index 0000000..103b3bc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceLobAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.LobAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Lob
+ */
+public final class SourceLobAnnotation
+	extends SourceAnnotation<Attribute>
+	implements LobAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceLobAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceManyToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceManyToManyAnnotation.java
new file mode 100644
index 0000000..59216f2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceManyToManyAnnotation.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.ManyToMany
+ */
+public final class SourceManyToManyAnnotation
+	extends SourceRelationshipMappingAnnotation
+	implements ManyToMany2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildMappedByAdapter();
+	private final AnnotationElementAdapter<String> mappedByAdapter;
+	private String mappedBy;
+
+
+	public SourceManyToManyAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.mappedBy = this.buildMappedBy(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncMappedBy(this.buildMappedBy(astRoot));
+	}
+
+
+	// ********** SourceRelationshipMappingAnnotation implementation **********
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
+		return TARGET_ENTITY_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
+		return FETCH_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
+		return CASCADE_ADAPTER;
+	}
+
+
+	//**************** OwnableRelationshipMappingAnnotation implementation **************
+
+	// ***** mapped by
+	public String getMappedBy() {
+		return this.mappedBy;
+	}
+
+	public void setMappedBy(String mappedBy) {
+		if (this.attributeValueHasChanged(this.mappedBy, mappedBy)) {
+			this.mappedBy = mappedBy;
+			this.mappedByAdapter.setValue(mappedBy);
+		}
+	}
+
+	private void syncMappedBy(String astMappedBy) {
+		String old = this.mappedBy;
+		this.mappedBy = astMappedBy;
+		this.firePropertyChanged(MAPPED_BY_PROPERTY, old, astMappedBy);
+	}
+
+	private String buildMappedBy(CompilationUnit astRoot) {
+		return this.mappedByAdapter.getValue(astRoot);
+	}
+
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(MAPPED_BY_ADAPTER, astRoot);
+	}
+
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(MAPPED_BY_ADAPTER, pos, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
+		return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__TARGET_ENTITY);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildMappedByAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__MAPPED_BY, false); // false = do not remove annotation when empty
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
+		return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__FETCH);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
+		return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_MANY__CASCADE);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceManyToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceManyToOneAnnotation.java
new file mode 100644
index 0000000..12ec5ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceManyToOneAnnotation.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.ManyToOne
+ */
+public final class SourceManyToOneAnnotation
+	extends SourceRelationshipMappingAnnotation
+	implements ManyToOne2_0Annotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<Boolean> OPTIONAL_ADAPTER = buildOptionalAdapter();
+	private final AnnotationElementAdapter<Boolean> optionalAdapter;
+	private Boolean optional;
+
+
+	public SourceManyToOneAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.optionalAdapter = this.buildBooleanAnnotationElementAdapter(OPTIONAL_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.optional = this.buildOptional(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncOptional(this.buildOptional(astRoot));
+	}
+
+
+	// ********** SourceRelationshipMappingAnnotation implementation **********
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
+		return TARGET_ENTITY_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
+		return FETCH_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
+		return CASCADE_ADAPTER;
+	}
+
+
+	// ********** ManyToOneMappingAnnotation implementation **********
+
+	// ***** optional
+	public Boolean getOptional() {
+		return this.optional;
+	}
+
+	public void setOptional(Boolean optional) {
+		if (this.attributeValueHasChanged(this.optional, optional)) {
+			this.optional = optional;
+			this.optionalAdapter.setValue(optional);
+		}
+	}
+
+	private void syncOptional(Boolean astOptional) {
+		Boolean old = this.optional;
+		this.optional = astOptional;
+		this.firePropertyChanged(OPTIONAL_PROPERTY, old, astOptional);
+	}
+
+	private Boolean buildOptional(CompilationUnit astRoot) {
+		return this.optionalAdapter.getValue(astRoot);
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(OPTIONAL_ADAPTER, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
+		return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__TARGET_ENTITY);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
+		return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__FETCH);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter() {
+		return buildOptionalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__OPTIONAL);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
+		return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.MANY_TO_ONE__CASCADE);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, false, BooleanExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java
new file mode 100644
index 0000000..24a3087
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.MapKey
+ */
+public final class SourceMapKeyAnnotation
+	extends SourceAnnotation<Attribute>
+	implements MapKeyAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildNameAdapter();
+	private final AnnotationElementAdapter<String> nameAdapter;
+	private String name;
+
+
+	public SourceMapKeyAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.nameAdapter = new MemberAnnotationElementAdapter<String>(attribute, NAME_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** MapKeyAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(NAME_ADAPTER, astRoot);
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(NAME_ADAPTER, pos, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildNameAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.MAP_KEY__NAME, false);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java
new file mode 100644
index 0000000..75f8cc4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMappedSuperclassAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.MappedSuperclassAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.MappedSuperclass
+ */
+public final class SourceMappedSuperclassAnnotation
+	extends SourceAnnotation<Type>
+	implements MappedSuperclassAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceMappedSuperclassAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
new file mode 100644
index 0000000..b168201
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.Column
+ * javax.persistence.JoinColumn
+ * javax.persistence.DiscriminatorColumn
+ * javax.persistence.PrimaryKeyJoinColumn.
+ */
+public abstract class SourceNamedColumnAnnotation
+	extends SourceAnnotation<Member>
+	implements NamedColumnAnnotation
+{
+	private final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
+	private final AnnotationElementAdapter<String> nameAdapter;
+	private String name;
+
+	private final DeclarationAnnotationElementAdapter<String> columnDefinitionDeclarationAdapter;
+	private final AnnotationElementAdapter<String> columnDefinitionAdapter;
+	private String columnDefinition;
+
+
+	protected SourceNamedColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+	
+	protected SourceNamedColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.nameDeclarationAdapter = this.buildStringElementAdapter(this.getNameElementName());
+		this.nameAdapter = this.buildShortCircuitElementAdapter(this.nameDeclarationAdapter);
+		this.columnDefinitionDeclarationAdapter = this.buildStringElementAdapter(this.getColumnDefinitionElementName());
+		this.columnDefinitionAdapter = this.buildShortCircuitElementAdapter(this.columnDefinitionDeclarationAdapter);
+	}
+
+	protected DeclarationAnnotationElementAdapter<String> buildStringElementAdapter(String elementName) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(this.daa, elementName);
+	}
+
+	protected DeclarationAnnotationElementAdapter<Boolean> buildBooleanElementAdapter(String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(this.daa, elementName, BooleanExpressionConverter.instance());
+	}
+
+	protected DeclarationAnnotationElementAdapter<Integer> buildIntegerElementAdapter(String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Integer>(this.daa, elementName, NumberIntegerExpressionConverter.instance());
+	}
+
+	AnnotationElementAdapter<String> buildShortCircuitElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	protected AnnotationElementAdapter<Boolean> buildShortCircuitBooleanElementAdapter(DeclarationAnnotationElementAdapter<Boolean> daea) {
+		return new MemberAnnotationElementAdapter<Boolean>(this.member, daea);
+	}
+
+	protected AnnotationElementAdapter<Integer> buildShortCircuitIntegerElementAdapter(DeclarationAnnotationElementAdapter<Integer> daea) {
+		return new MemberAnnotationElementAdapter<Integer>(this.member, daea);
+	}
+
+	AnnotationElementAdapter<String> buildShortCircuitStringElementAdapter(String elementName) {
+		return this.buildShortCircuitElementAdapter(this.buildStringElementAdapter(elementName));
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+		this.columnDefinition = this.buildColumnDefinition(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+		this.syncColumnDefinition(this.buildColumnDefinition(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** NamedColumn implementation **********
+
+	public boolean isSpecified() {
+		return true;
+	}
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
+	}
+
+	protected abstract String getNameElementName();
+
+	// ***** column definition
+	public String getColumnDefinition() {
+		return this.columnDefinition;
+	}
+
+	public void setColumnDefinition(String columnDefinition) {
+		if (this.attributeValueHasChanged(this.columnDefinition, columnDefinition)) {
+			this.columnDefinition = columnDefinition;
+			this.columnDefinitionAdapter.setValue(columnDefinition);
+		}
+	}
+
+	private void syncColumnDefinition(String astColumnDefinition) {
+		String old = this.columnDefinition;
+		this.columnDefinition = astColumnDefinition;
+		this.firePropertyChanged(COLUMN_DEFINITION_PROPERTY, old, astColumnDefinition);
+	}
+
+	private String buildColumnDefinition(CompilationUnit astRoot) {
+		return this.columnDefinitionAdapter.getValue(astRoot);
+	}
+
+	public TextRange getColumnDefinitionTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.columnDefinitionDeclarationAdapter, astRoot);
+	}
+
+	protected abstract String getColumnDefinitionElementName();
+
+
+	// ********** NestableAnnotation implementation **********
+
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		NamedColumnAnnotation oldColumn = (NamedColumnAnnotation) oldAnnotation;
+		this.setName(oldColumn.getName());
+		this.setColumnDefinition(oldColumn.getColumnDefinition());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java
new file mode 100644
index 0000000..fba3361
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableNamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.NamedNativeQueries
+ */
+public final class SourceNamedNativeQueriesAnnotation
+	extends SourceAnnotation<Type>
+	implements NamedNativeQueriesAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableNamedNativeQueryAnnotation> namedNativeQueries = new Vector<NestableNamedNativeQueryAnnotation>();
+
+
+	public SourceNamedNativeQueriesAnnotation(JavaResourceNode parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.namedNativeQueries);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA.NAMED_NATIVE_QUERIES__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return NamedNativeQueryAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableNamedNativeQueryAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableNamedNativeQueryAnnotation>(this.namedNativeQueries);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.namedNativeQueries.size();
+	}
+
+	public NestableNamedNativeQueryAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.namedNativeQueries.size());
+	}
+
+	private NestableNamedNativeQueryAnnotation addNestedAnnotation(int index) {
+		NestableNamedNativeQueryAnnotation namedNativeQuery = this.buildNamedNativeQuery(index);
+		this.namedNativeQueries.add(namedNativeQuery);
+		return namedNativeQuery;
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.namedNativeQueries.size();
+		NestableNamedNativeQueryAnnotation namedNativeQuery = this.addNestedAnnotation(index);
+		namedNativeQuery.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(NAMED_NATIVE_QUERIES_LIST, index, namedNativeQuery);
+	}
+
+	private NestableNamedNativeQueryAnnotation buildNamedNativeQuery(int index) {
+		return SourceNamedNativeQueryAnnotation.createNestedNamedNativeQuery(this, this.member, index, this.daa);
+	}
+
+	public NestableNamedNativeQueryAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.namedNativeQueries, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableNamedNativeQueryAnnotation removeNestedAnnotation(int index) {
+		return this.namedNativeQueries.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.namedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
new file mode 100644
index 0000000..b3d3483
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableNamedNativeQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableQueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedNativeQuery
+ */
+public final class SourceNamedNativeQueryAnnotation
+	extends SourceBaseNamedQueryAnnotation
+	implements NestableNamedNativeQueryAnnotation
+{
+	public static final SimpleDeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final DeclarationAnnotationElementAdapter<String> resultClassDeclarationAdapter;
+	private final AnnotationElementAdapter<String> resultClassAdapter;
+	private String resultClass;
+
+	private String fullyQualifiedResultClassName;
+
+	private final DeclarationAnnotationElementAdapter<String> resultSetMappingDeclarationAdapter;
+	private final AnnotationElementAdapter<String> resultSetMappingAdapter;
+	private String resultSetMapping;
+
+
+	public SourceNamedNativeQueryAnnotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, type, daa, annotationAdapter);
+		this.resultClassDeclarationAdapter = this.buildResultClassAdapter(daa);
+		this.resultClassAdapter = this.buildAdapter(this.resultClassDeclarationAdapter);
+		this.resultSetMappingDeclarationAdapter = this.buildResultSetMappingAdapter(daa);
+		this.resultSetMappingAdapter = this.buildAdapter(this.resultSetMappingDeclarationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.resultClass = this.buildResultClass(astRoot);
+		this.fullyQualifiedResultClassName = this.buildFullyQualifiedResultClassName(astRoot);
+		this.resultSetMapping = this.buildResultSetMapping(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncResultClass(this.buildResultClass(astRoot));
+		this.syncFullyQualifiedResultClassName(this.buildFullyQualifiedResultClassName(astRoot));
+		this.syncResultSetMapping(this.buildResultSetMapping(astRoot));
+	}
+
+
+	// ********** AbstractBaseNamedQueryAnnotation implementation **********
+
+	@Override
+	String getNameElementName() {
+		return JPA.NAMED_NATIVE_QUERY__NAME;
+	}
+
+	@Override
+	String getQueryElementName() {
+		return JPA.NAMED_NATIVE_QUERY__QUERY;
+	}
+
+	@Override
+	String getHintsElementName() {
+		return JPA.NAMED_NATIVE_QUERY__HINTS;
+	}
+
+	@Override
+	NestableQueryHintAnnotation buildHint(int index) {
+		return SourceQueryHintAnnotation.createNamedNativeQueryQueryHint(this, this.member, this.daa, index);
+	}
+
+
+	// ********** NamedNativeQueryAnnotation implementation **********
+
+	// ***** result class
+	public String getResultClass() {
+		return this.resultClass;
+	}
+
+	public void setResultClass(String resultClass) {
+		if (this.attributeValueHasChanged(this.resultClass, resultClass)) {
+			this.resultClass = resultClass;
+			this.resultClassAdapter.setValue(resultClass);
+		}
+	}
+
+	private void syncResultClass(String astResultClass) {
+		String old = this.resultClass;
+		this.resultClass = astResultClass;
+		this.firePropertyChanged(RESULT_CLASS_PROPERTY, old, astResultClass);
+	}
+
+	private String buildResultClass(CompilationUnit astRoot) {
+		return this.resultClassAdapter.getValue(astRoot);
+	}
+
+	public TextRange getResultClassTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.resultClassDeclarationAdapter, astRoot);
+	}
+
+	private DeclarationAnnotationElementAdapter<String> buildResultClassAdapter(DeclarationAnnotationAdapter daAdapter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(daAdapter, JPA.NAMED_NATIVE_QUERY__RESULT_CLASS, SimpleTypeStringExpressionConverter.instance());
+	}
+
+	// ***** fully-qualified result class name
+	public String getFullyQualifiedResultClassName()  {
+		return this.fullyQualifiedResultClassName;
+	}
+
+	private void syncFullyQualifiedResultClassName(String astName) {
+		String old = this.fullyQualifiedResultClassName;
+		this.fullyQualifiedResultClassName = astName;
+		this.firePropertyChanged(FULLY_QUALIFIED_RESULT_CLASS_NAME_PROPERTY, old, astName);
+	}
+
+	private String buildFullyQualifiedResultClassName(CompilationUnit astRoot) {
+		return (this.resultClass == null) ? null : ASTTools.resolveFullyQualifiedName(this.resultClassAdapter.getExpression(astRoot));
+	}
+
+	// ***** result set mapping
+	public String getResultSetMapping() {
+		return this.resultSetMapping;
+	}
+
+	public void setResultSetMapping(String resultSetMapping) {
+		if (this.attributeValueHasChanged(this.resultSetMapping, resultSetMapping)) {
+			this.resultSetMapping = resultSetMapping;
+			this.resultSetMappingAdapter.setValue(resultSetMapping);
+		}
+	}
+
+	private void syncResultSetMapping(String astResultSetMapping) {
+		String old = this.resultSetMapping;
+		this.resultSetMapping = astResultSetMapping;
+		this.firePropertyChanged(RESULT_SET_MAPPING_PROPERTY, old, astResultSetMapping);
+	}
+
+	private String buildResultSetMapping(CompilationUnit astRoot) {
+		return this.resultSetMappingAdapter.getValue(astRoot);
+	}
+
+	public TextRange getResultSetMappingTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.resultSetMappingDeclarationAdapter, astRoot);
+	}
+
+	private DeclarationAnnotationElementAdapter<String> buildResultSetMappingAdapter(DeclarationAnnotationAdapter daAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(daAdapter, JPA.NAMED_NATIVE_QUERY__RESULT_SET_MAPPING);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		NamedNativeQueryAnnotation oldQuery = (NamedNativeQueryAnnotation) oldAnnotation;
+		this.setResultClass(oldQuery.getResultClass());
+		this.setResultSetMapping(oldQuery.getResultSetMapping());
+	}
+
+
+	// ********** static methods **********
+
+	public static SourceNamedNativeQueryAnnotation createNamedNativeQuery(JavaResourceNode parent, Type type) {
+		return new SourceNamedNativeQueryAnnotation(parent, type, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
+	}
+
+	static SourceNamedNativeQueryAnnotation createNestedNamedNativeQuery(JavaResourceNode parent, Type type, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(type, idaa);
+		return new SourceNamedNativeQueryAnnotation(parent, type, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter namedQueriesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(namedQueriesAdapter, index, JPA.NAMED_NATIVE_QUERY);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java
new file mode 100644
index 0000000..451da89
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableNamedQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public final class SourceNamedQueries1_0Annotation
+	extends SourceNamedQueriesAnnotation
+{
+	public SourceNamedQueries1_0Annotation(JavaResourceNode parent, Type type) {
+		super(parent, type);
+	}
+
+	@Override
+	protected NestableNamedQueryAnnotation buildNamedQuery(int index) {
+		return SourceNamedQueryAnnotation.createNestedNamedQuery(this, member, index, this.daa);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueriesAnnotation.java
new file mode 100644
index 0000000..2c097d2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueriesAnnotation.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableNamedQueryAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.NamedQueries
+ */
+public abstract class SourceNamedQueriesAnnotation
+	extends SourceAnnotation<Type>
+	implements NamedQueriesAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableNamedQueryAnnotation> namedQueries = new Vector<NestableNamedQueryAnnotation>();
+
+
+	public SourceNamedQueriesAnnotation(JavaResourceNode parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.namedQueries);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA.NAMED_QUERIES__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return NamedQueryAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableNamedQueryAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableNamedQueryAnnotation>(this.namedQueries);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.namedQueries.size();
+	}
+
+	public NestableNamedQueryAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.namedQueries.size());
+	}
+
+	private NestableNamedQueryAnnotation addNestedAnnotation(int index) {
+		NestableNamedQueryAnnotation namedQuery = this.buildNamedQuery(index);
+		this.namedQueries.add(namedQuery);
+		return namedQuery;
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.namedQueries.size();
+		NestableNamedQueryAnnotation namedQuery = this.addNestedAnnotation(index);
+		namedQuery.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(NAMED_QUERIES_LIST, index, namedQuery);
+	}
+
+	protected abstract NestableNamedQueryAnnotation buildNamedQuery(int index);
+
+	public NestableNamedQueryAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.namedQueries, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableNamedQueryAnnotation removeNestedAnnotation(int index) {
+		return this.namedQueries.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.namedQueries, NAMED_QUERIES_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
new file mode 100644
index 0000000..01c8053
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceNamedQuery1_0Annotation;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableQueryHintAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.NamedQuery
+ */
+public abstract class SourceNamedQueryAnnotation
+	extends SourceBaseNamedQueryAnnotation
+	implements NamedQueryAnnotation
+{
+	public static final SimpleDeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	// ********** constructors **********
+	public SourceNamedQueryAnnotation(JavaResourceNode parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
+	}
+
+	public SourceNamedQueryAnnotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, type, daa, annotationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** AbstractBaseNamedQueryAnnotation implementation **********
+
+	@Override
+	String getNameElementName() {
+		return JPA.NAMED_QUERY__NAME;
+	}
+
+	@Override
+	String getQueryElementName() {
+		return JPA.NAMED_QUERY__QUERY;
+	}
+
+	@Override
+	String getHintsElementName() {
+		return JPA.NAMED_QUERY__HINTS;
+	}
+
+	@Override
+	NestableQueryHintAnnotation buildHint(int index) {
+		return SourceQueryHintAnnotation.createNamedQueryQueryHint(this, this.member, this.daa, index);
+	}
+
+
+	// ********** static methods **********
+
+	static SourceNamedQueryAnnotation createNestedNamedQuery(JavaResourceNode parent, Type type, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(type, idaa);
+
+		return new SourceNamedQuery1_0Annotation(parent, type, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter namedQueriesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(namedQueriesAdapter, index, JPA.NAMED_QUERY);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNode.java
new file mode 100644
index 0000000..354ba9d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNode.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.resource.java.AbstractJavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+
+/**
+ * Source convenience methods
+ */
+public abstract class SourceNode
+	extends AbstractJavaResourceNode
+{
+
+	public SourceNode(JavaResourceNode parent) {
+		super(parent);
+	}
+
+	public JavaResourceCompilationUnit getJavaResourceCompilationUnit() {
+		return (JavaResourceCompilationUnit) this.getRoot();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOneToManyAnnotation.java
new file mode 100644
index 0000000..925ed56
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOneToManyAnnotation.java
@@ -0,0 +1,178 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.OneToMany
+ */
+public final class SourceOneToManyAnnotation
+	extends SourceRelationshipMappingAnnotation
+	implements OneToMany2_0Annotation
+{
+	protected static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildMappedByAdapter();
+	private final AnnotationElementAdapter<String> mappedByAdapter;
+	private String mappedBy;
+
+	//added in JPA2.0
+	private static final DeclarationAnnotationElementAdapter<Boolean> ORPHAN_REMOVAL_ADAPTER = buildOrphanRemovalAdapter();
+	private final AnnotationElementAdapter<Boolean> orphanRemovalAdapter;
+	private Boolean orphanRemoval;
+
+	public SourceOneToManyAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
+		this.orphanRemovalAdapter = this.buildBooleanAnnotationElementAdapter(ORPHAN_REMOVAL_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.mappedBy = this.buildMappedBy(astRoot);
+		this.orphanRemoval = this.buildOrphanRemoval(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncMappedBy(this.buildMappedBy(astRoot));
+		this.syncOrphanRemoval(this.buildOrphanRemoval(astRoot));
+	}
+
+
+	// ********** SourceRelationshipMappingAnnotation implementation **********
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
+		return TARGET_ENTITY_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
+		return FETCH_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
+		return CASCADE_ADAPTER;
+	}
+
+
+	// ********** OwnableRelationshipMappingAnnotation implementation **********
+
+	public String getMappedBy() {
+		return this.mappedBy;
+	}
+
+	public void setMappedBy(String mappedBy) {
+		if (this.attributeValueHasChanged(this.mappedBy, mappedBy)) {
+			this.mappedBy = mappedBy;
+			this.mappedByAdapter.setValue(mappedBy);
+		}
+	}
+
+	private void syncMappedBy(String astMappedBy) {
+		String old = this.mappedBy;
+		this.mappedBy = astMappedBy;
+		this.firePropertyChanged(MAPPED_BY_PROPERTY, old, astMappedBy);
+	}
+
+	private String buildMappedBy(CompilationUnit astRoot) {
+		return this.mappedByAdapter.getValue(astRoot);
+	}
+
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		return getElementTextRange(MAPPED_BY_ADAPTER, astRoot);
+	}
+
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(MAPPED_BY_ADAPTER, pos, astRoot);
+	}
+
+	// ********** OneToMany2_0Annotation implementation **********
+
+	public Boolean getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+
+	public void setOrphanRemoval(Boolean orphanRemoval) {
+		if (this.attributeValueHasChanged(this.orphanRemoval, orphanRemoval)) {
+			this.orphanRemoval = orphanRemoval;
+			this.orphanRemovalAdapter.setValue(orphanRemoval);
+		}
+	}
+
+	private void syncOrphanRemoval(Boolean astOrphanRemoval) {
+		Boolean old = this.orphanRemoval;
+		this.orphanRemoval = astOrphanRemoval;
+		this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, astOrphanRemoval);
+	}
+
+	public TextRange getOrphanRemovalTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(ORPHAN_REMOVAL_ADAPTER, astRoot);
+	}
+
+	private Boolean buildOrphanRemoval(CompilationUnit astRoot) {
+		return this.orphanRemovalAdapter.getValue(astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
+		return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__TARGET_ENTITY);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildMappedByAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__MAPPED_BY, false); // false = do not remove annotation when empty
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
+		return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__FETCH);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
+		return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_MANY__CASCADE);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter() {
+		return buildOrphanRemovalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ONE_TO_MANY__ORPHAN_REMOVAL);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, false, BooleanExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOneToOneAnnotation.java
new file mode 100644
index 0000000..3ebc6a9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOneToOneAnnotation.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToOne2_0Annotation;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.OneToOne
+ */
+public final class SourceOneToOneAnnotation
+	extends SourceRelationshipMappingAnnotation
+	implements OneToOne2_0Annotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	static final DeclarationAnnotationElementAdapter<String> TARGET_ENTITY_ADAPTER = buildTargetEntityAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String> FETCH_ADAPTER = buildFetchAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<String[]> CASCADE_ADAPTER = buildCascadeAdapter();
+
+	private static final DeclarationAnnotationElementAdapter<Boolean> OPTIONAL_ADAPTER = buildOptionalAdapter();
+	private final AnnotationElementAdapter<Boolean> optionalAdapter;
+	private Boolean optional;
+
+	private static final DeclarationAnnotationElementAdapter<String> MAPPED_BY_ADAPTER = buildMappedByAdapter();
+	private final AnnotationElementAdapter<String> mappedByAdapter;
+	private String mappedBy;
+
+	//added in JPA 2.0
+	private static final DeclarationAnnotationElementAdapter<Boolean> ORPHAN_REMOVAL_ADAPTER = buildOrphanRemovalAdapter();
+	private final AnnotationElementAdapter<Boolean> orphanRemovalAdapter;
+	private Boolean orphanRemoval;
+
+	public SourceOneToOneAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.mappedByAdapter = this.buildAnnotationElementAdapter(MAPPED_BY_ADAPTER);
+		this.optionalAdapter = this.buildBooleanAnnotationElementAdapter(OPTIONAL_ADAPTER);
+		this.orphanRemovalAdapter = this.buildBooleanAnnotationElementAdapter(ORPHAN_REMOVAL_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.mappedBy = this.buildMappedBy(astRoot);
+		this.optional = this.buildOptional(astRoot);
+		this.orphanRemoval = this.buildOrphanRemoval(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncMappedBy(this.buildMappedBy(astRoot));
+		this.syncOptional(this.buildOptional(astRoot));
+		this.syncOrphanRemoval(this.buildOrphanRemoval(astRoot));
+	}
+
+
+	// ********** SourceRelationshipMappingAnnotation implementation **********
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter() {
+		return TARGET_ENTITY_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getFetchAdapter() {
+		return FETCH_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter() {
+		return CASCADE_ADAPTER;
+	}
+
+
+	// ********** OneToOneAnnotation implementation **********
+
+	// ***** mapped by
+	public String getMappedBy() {
+		return this.mappedBy;
+	}
+
+	public void setMappedBy(String mappedBy) {
+		if (this.attributeValueHasChanged(this.mappedBy, mappedBy)) {
+			this.mappedBy = mappedBy;
+			this.mappedByAdapter.setValue(mappedBy);
+		}
+	}
+
+	private void syncMappedBy(String astMappedBy) {
+		String old = this.mappedBy;
+		this.mappedBy = astMappedBy;
+		this.firePropertyChanged(MAPPED_BY_PROPERTY, old, astMappedBy);
+	}
+
+	private String buildMappedBy(CompilationUnit astRoot) {
+		return this.mappedByAdapter.getValue(astRoot);
+	}
+
+	public TextRange getMappedByTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(MAPPED_BY_ADAPTER, astRoot);
+	}
+
+	public boolean mappedByTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(MAPPED_BY_ADAPTER, pos, astRoot);
+	}
+
+	// ***** optional
+	public Boolean getOptional() {
+		return this.optional;
+	}
+
+	public void setOptional(Boolean optional) {
+		if (this.attributeValueHasChanged(this.optional, optional)) {
+			this.optional = optional;
+			this.optionalAdapter.setValue(optional);
+		}
+	}
+
+	private void syncOptional(Boolean astOptional) {
+		Boolean old = this.optional;
+		this.optional = astOptional;
+		this.firePropertyChanged(OPTIONAL_PROPERTY, old, astOptional);
+	}
+
+	private Boolean buildOptional(CompilationUnit astRoot) {
+		return this.optionalAdapter.getValue(astRoot);
+	}
+
+	public TextRange getOptionalTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(OPTIONAL_ADAPTER, astRoot);
+	}
+
+	// ********** OneToOne2_0Annotation implementation **********
+
+	public Boolean getOrphanRemoval() {
+		return this.orphanRemoval;
+	}
+
+	public void setOrphanRemoval(Boolean orphanRemoval) {
+		if (this.attributeValueHasChanged(this.orphanRemoval, orphanRemoval)) {
+			this.orphanRemoval = orphanRemoval;
+			this.orphanRemovalAdapter.setValue(orphanRemoval);
+		}
+	}
+
+	private void syncOrphanRemoval(Boolean astOrphanRemoval) {
+		Boolean old = this.orphanRemoval;
+		this.orphanRemoval = astOrphanRemoval;
+		this.firePropertyChanged(ORPHAN_REMOVAL_PROPERTY, old, astOrphanRemoval);
+	}
+
+	public TextRange getOrphanRemovalTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(ORPHAN_REMOVAL_ADAPTER, astRoot);
+	}
+
+	private Boolean buildOrphanRemoval(CompilationUnit astRoot) {
+		return this.orphanRemovalAdapter.getValue(astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter() {
+		return buildTargetEntityAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__TARGET_ENTITY);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildMappedByAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__MAPPED_BY, false); // false = do not remove annotation when empty
+	}
+
+	private static DeclarationAnnotationElementAdapter<String> buildFetchAdapter() {
+		return buildFetchAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__FETCH);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter() {
+		return buildOptionalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__OPTIONAL);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOptionalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, false, BooleanExpressionConverter.instance());
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildCascadeAdapter() {
+		return buildEnumArrayAnnotationElementAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA.ONE_TO_ONE__CASCADE);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter() {
+		return buildOrphanRemovalAdapter(DECLARATION_ANNOTATION_ADAPTER, JPA2_0.ONE_TO_ONE__ORPHAN_REMOVAL);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Boolean> buildOrphanRemovalAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, false, BooleanExpressionConverter.instance());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java
new file mode 100644
index 0000000..08c060a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.OrderByAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+
+/**
+ * javax.persistence.OrderBy
+ */
+public final class SourceOrderByAnnotation
+	extends SourceAnnotation<Attribute>
+	implements OrderByAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_ADAPTER = buildValueAdapter();
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private String value;
+
+
+	public SourceOrderByAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+		this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncValue(this.buildValue(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.value);
+	}
+
+
+	// ********** OrderByAnnotation implementation **********
+
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_ADAPTER, astRoot);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildValueAdapter() {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.ORDER_BY__VALUE, false);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java
new file mode 100644
index 0000000..dbb5b89
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * Common behavior for
+ *     javax.persistence.AttributeOverride
+ *     javax.persistence.AssociationOverride
+ */
+abstract class SourceOverrideAnnotation 
+	extends SourceAnnotation<Member>  
+	implements OverrideAnnotation
+{		
+	final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
+	final AnnotationElementAdapter<String> nameAdapter;
+	String name;
+		
+
+	// ********** construction/initialization **********
+
+	SourceOverrideAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.nameDeclarationAdapter = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, this.getNameElementName(), false); // false = do not remove annotation when empty
+		this.nameAdapter = new MemberAnnotationElementAdapter<String>(this.member, this.nameDeclarationAdapter);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+	}
+	
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+	}
+	
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+	
+
+	// ********** OverrideAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
+	}
+
+	public boolean nameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
+	}
+
+	protected abstract String getNameElementName();
+
+
+	// ********** NestableAnnotation implementation **********
+
+	void initializeFrom(NestableAnnotation oldAnnotation) {
+		OverrideAnnotation oldOverride = (OverrideAnnotation) oldAnnotation;
+		this.setName(oldOverride.getName());
+	}
+	
+	/**
+	 * convenience implementation of method from NestableAnnotation interface
+	 * for subclasses
+	 */
+	public void moveAnnotation(int index) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(index);
+	}
+	
+	private IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+			
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java
new file mode 100644
index 0000000..99852e1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java
@@ -0,0 +1,400 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jpt.core.internal.utility.jdt.JDTFieldAttribute;
+import org.eclipse.jpt.core.internal.utility.jdt.JDTMethodAttribute;
+import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.MethodAttribute;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.MethodSignature;
+import org.eclipse.jpt.utility.internal.ClassName;
+import org.eclipse.jpt.utility.internal.iterators.CloneIterator;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * Java source persistent attribute (field or property)
+ */
+final class SourcePersistentAttribute
+	extends SourcePersistentMember<Attribute>
+	implements JavaResourcePersistentAttribute
+{
+	private int modifiers;
+
+	private String typeName;
+
+	private boolean typeIsInterface;
+
+	private boolean typeIsEnum;
+
+	private final Vector<String> typeSuperclassNames = new Vector<String>();
+
+	private final Vector<String> typeInterfaceNames = new Vector<String>();
+
+	private final Vector<String> typeTypeArgumentNames = new Vector<String>();
+
+
+	/**
+	 * construct field attribute
+	 */
+	static JavaResourcePersistentAttribute newInstance(
+			JavaResourcePersistentType parent,
+			Type declaringType,
+			String name,
+			int occurrence,
+			JavaResourceCompilationUnit javaResourceCompilationUnit,
+			CompilationUnit astRoot) {
+		Attribute attribute = new JDTFieldAttribute(
+				declaringType,
+				name,
+				occurrence,
+				javaResourceCompilationUnit.getCompilationUnit(),
+				javaResourceCompilationUnit.getModifySharedDocumentCommandExecutor(),
+				javaResourceCompilationUnit.getAnnotationEditFormatter());
+		JavaResourcePersistentAttribute jrpa = new SourcePersistentAttribute(parent, attribute);
+		jrpa.initialize(astRoot);
+		return jrpa;
+	}
+
+	/**
+	 * construct property attribute
+	 */
+	static JavaResourcePersistentAttribute newInstance(
+			JavaResourcePersistentType parent,
+			Type declaringType,
+			MethodSignature signature,
+			int occurrence,
+			JavaResourceCompilationUnit javaResourceCompilationUnit,
+			CompilationUnit astRoot) {
+		Attribute attribute = JDTMethodAttribute.newInstance(
+				declaringType,
+				signature,
+				occurrence,
+				javaResourceCompilationUnit.getCompilationUnit(),
+				javaResourceCompilationUnit.getModifySharedDocumentCommandExecutor(),
+				javaResourceCompilationUnit.getAnnotationEditFormatter());
+		JavaResourcePersistentAttribute jrpa = new SourcePersistentAttribute(parent, attribute);
+		jrpa.initialize(astRoot);
+		return jrpa;
+	}
+
+	private SourcePersistentAttribute(JavaResourcePersistentType parent, Attribute attribute){
+		super(parent, attribute);
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		ITypeBinding typeBinding = this.getTypeBinding(astRoot); //build once, minor performance tweak for major benefit
+		this.modifiers = this.buildModifiers(astRoot);
+		this.typeName = this.buildTypeName(typeBinding);
+		this.typeIsInterface = this.buildTypeIsInterface(typeBinding);
+		this.typeIsEnum = this.buildTypeIsEnum(typeBinding);
+		this.typeSuperclassNames.addAll(this.buildTypeSuperclassNames(typeBinding));
+		this.typeInterfaceNames.addAll(this.buildTypeInterfaceNames(typeBinding));
+		this.typeTypeArgumentNames.addAll(this.buildTypeTypeArgumentNames(typeBinding));
+	}
+
+
+	// ******** overrides ********
+
+	@Override
+	public void resolveTypes(CompilationUnit astRoot) {
+		super.resolveTypes(astRoot);
+		ITypeBinding typeBinding = this.getTypeBinding(astRoot);//build once, minor performance tweak for major benefit
+		this.syncTypeName(this.buildTypeName(typeBinding));
+		this.syncTypeSuperclassNames(this.buildTypeSuperclassNames(typeBinding));
+		this.syncTypeInterfaceNames(this.buildTypeInterfaceNames(typeBinding));
+		this.syncTypeTypeArgumentNames(this.buildTypeTypeArgumentNames(typeBinding));
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		ITypeBinding typeBinding = this.getTypeBinding(astRoot);//build once, minor performance tweak for major benefit
+		this.syncModifiers(this.buildModifiers(astRoot));
+		this.syncTypeName(this.buildTypeName(typeBinding));
+		this.syncTypeIsInterface(this.buildTypeIsInterface(typeBinding));
+		this.syncTypeIsEnum(this.buildTypeIsEnum(typeBinding));
+		this.syncTypeSuperclassNames(this.buildTypeSuperclassNames(typeBinding));
+		this.syncTypeInterfaceNames(this.buildTypeInterfaceNames(typeBinding));
+		this.syncTypeTypeArgumentNames(this.buildTypeTypeArgumentNames(typeBinding));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.getName());
+	}
+
+
+	// ******** AbstractJavaResourcePersistentMember implementation ********
+
+	@Override
+	Iterator<String> validAnnotationNames() {
+		return this.getAnnotationProvider().attributeAnnotationNames();
+	}
+
+	@Override
+	Annotation buildAnnotation(String annotationName) {
+		return this.getAnnotationProvider().buildAttributeAnnotation(this, this.member, annotationName);
+	}
+
+	Annotation buildNullAnnotation_(String annotationName) {
+		return this.getAnnotationProvider().buildNullAttributeAnnotation(this, annotationName);
+	}
+
+	public boolean isFor(MethodSignature signature, int occurrence) {
+		return ((MethodAttribute) this.member).matches(signature, occurrence);
+	}
+
+
+	// ******** JavaResourcePersistentAttribute implementation ********
+
+	public String getName() {
+		return this.member.getAttributeName();
+	}
+
+	@Override
+	public Annotation buildNullAnnotation(String annotationName) {
+		return (annotationName == null) ? null : this.buildNullAnnotation_(annotationName);
+	}
+
+	public boolean isField() {
+		return this.member.isField();
+	}
+
+	public boolean isProperty() {
+		return ! this.isField();
+	}
+
+	public AccessType getSpecifiedAccess() {
+		Access2_0Annotation accessAnnotation = this.getAccessAnnotation();
+		return (accessAnnotation == null) ? null : accessAnnotation.getValue();
+	}
+
+	private Access2_0Annotation getAccessAnnotation() {
+		return (Access2_0Annotation) this.getAnnotation(Access2_0Annotation.ANNOTATION_NAME);
+	}
+
+	public boolean typeIsSubTypeOf(String tn) {
+		if (this.typeName == null) {
+			return false;
+		}
+		return this.typeName.equals(tn)
+				|| this.typeInterfaceNames.contains(tn)
+				|| this.typeSuperclassNames.contains(tn);
+	}
+
+	public boolean typeIsVariablePrimitive() {
+		return (this.typeName != null) && ClassName.isVariablePrimitive(this.typeName);
+	}
+
+	private ITypeBinding getTypeBinding(CompilationUnit astRoot) {
+		return this.member.getTypeBinding(astRoot);
+	}
+
+
+	// ***** modifiers
+	public int getModifiers() {
+		return this.modifiers;
+	}
+
+	private void syncModifiers(int astModifiers) {
+		int old = this.modifiers;
+		this.modifiers = astModifiers;
+		this.firePropertyChanged(MODIFIERS_PROPERTY, old, astModifiers);
+	}
+
+	/**
+	 * zero seems like a reasonable default...
+	 */
+	private int buildModifiers(CompilationUnit astRoot) {
+		IBinding binding = this.member.getBinding(astRoot);
+		return (binding == null) ? 0 : binding.getModifiers();
+	}
+
+	// ***** type name
+	public String getTypeName() {
+		return this.typeName;
+	}
+
+	private void syncTypeName(String astTypeName) {
+		String old = this.typeName;
+		this.typeName = astTypeName;
+		this.firePropertyChanged(TYPE_NAME_PROPERTY, old, astTypeName);
+	}
+
+	/**
+	 * this can be an array (e.g. "java.lang.String[]");
+	 * but no generic type arguments
+	 */
+	private String buildTypeName(ITypeBinding typeBinding) {
+		if (typeBinding == null) {
+			return null;
+		}
+		// a type variable is what is declared by a generic type;
+		// e.g. "E" is a type variable declared by the generic type "Collection" in
+		//     public interface Collection<E>
+		if (typeBinding.isTypeVariable()) {
+			// e.g. "E extends Number" has an erasure of "Number"
+			typeBinding = typeBinding.getErasure();
+		}
+		String tbName = typeBinding.getTypeDeclaration().getQualifiedName();
+		return (tbName.length() == 0) ? null : tbName;
+	}
+
+	// ***** type is interface
+	public boolean typeIsInterface() {
+		return this.typeIsInterface;
+	}
+
+	private void syncTypeIsInterface(boolean astTypeIsInterface) {
+		boolean old = this.typeIsInterface;
+		this.typeIsInterface = astTypeIsInterface;
+		this.firePropertyChanged(TYPE_IS_INTERFACE_PROPERTY, old, astTypeIsInterface);
+	}
+
+	private boolean buildTypeIsInterface(ITypeBinding typeBinding) {
+		return (typeBinding != null) && ( ! typeBinding.isArray()) && typeBinding.isInterface();
+	}
+
+	// ***** type is enum
+	public boolean typeIsEnum() {
+		return this.typeIsEnum;
+	}
+
+	private void syncTypeIsEnum(boolean astTypeIsEnum) {
+		boolean old = this.typeIsEnum;
+		this.typeIsEnum = astTypeIsEnum;
+		this.firePropertyChanged(TYPE_IS_ENUM_PROPERTY, old, astTypeIsEnum);
+	}
+
+	private boolean buildTypeIsEnum(ITypeBinding typeBinding) {
+		return (typeBinding != null) && ( ! typeBinding.isArray()) && typeBinding.isEnum();
+	}
+
+	// ***** type superclass hierarchy
+	public ListIterator<String> typeSuperclassNames() {
+		return new CloneListIterator<String>(this.typeSuperclassNames);
+	}
+
+	private void syncTypeSuperclassNames(List<String> astTypeSuperclassNames) {
+		this.synchronizeList(astTypeSuperclassNames, this.typeSuperclassNames, TYPE_SUPERCLASS_NAMES_LIST);
+	}
+
+	private List<String> buildTypeSuperclassNames(ITypeBinding typeBinding) {
+		if (typeBinding == null) {
+			return Collections.emptyList();
+		}
+		ArrayList<String> names = new ArrayList<String>();
+		typeBinding = typeBinding.getSuperclass();
+		while (typeBinding != null) {
+			names.add(typeBinding.getQualifiedName());
+			typeBinding = typeBinding.getSuperclass();
+		}
+		return names;
+	}
+
+	// ***** type interface hierarchy
+	public Iterator<String> typeInterfaceNames() {
+		return new CloneIterator<String>(this.typeInterfaceNames);
+	}
+
+//	private boolean typeInterfaceNamesContains(String interfaceName) {
+//		return this.typeInterfaceNames.contains(interfaceName);
+//	}
+//
+	private void syncTypeInterfaceNames(Collection<String> astTypeInterfaceNames) {
+		this.synchronizeCollection(astTypeInterfaceNames, this.typeInterfaceNames, TYPE_INTERFACE_NAMES_COLLECTION);
+	}
+
+	private Collection<String> buildTypeInterfaceNames(ITypeBinding typeBinding) {
+		if (typeBinding == null) {
+			return Collections.emptySet();
+		}
+		HashSet<String> names = new HashSet<String>();
+		while (typeBinding != null) {
+			this.addInterfaceNamesTo(typeBinding, names);
+			typeBinding = typeBinding.getSuperclass();
+		}
+		return names;
+	}
+
+	private void addInterfaceNamesTo(ITypeBinding typeBinding, HashSet<String> names) {
+		for (ITypeBinding interfaceBinding : typeBinding.getInterfaces()) {
+			names.add(interfaceBinding.getTypeDeclaration().getQualifiedName());
+			this.addInterfaceNamesTo(interfaceBinding, names);  // recurse
+		}
+	}
+
+	// ***** type type argument names
+	public ListIterator<String> typeTypeArgumentNames() {
+		return new CloneListIterator<String>(this.typeTypeArgumentNames);
+	}
+
+	public int typeTypeArgumentNamesSize() {
+		return this.typeTypeArgumentNames.size();
+	}
+
+	public String getTypeTypeArgumentName(int index) {
+		return this.typeTypeArgumentNames.get(index);
+	}
+
+	private void syncTypeTypeArgumentNames(List<String> astTypeTypeArgumentNames) {
+		this.synchronizeList(astTypeTypeArgumentNames, this.typeTypeArgumentNames, TYPE_TYPE_ARGUMENT_NAMES_LIST);
+	}
+
+	/**
+	 * these types can be arrays (e.g. "java.lang.String[]");
+	 * but they won't have any further nested generic type arguments
+	 * (e.g. "java.util.Collection<java.lang.String>")
+	 */
+	private List<String> buildTypeTypeArgumentNames(ITypeBinding typeBinding) {
+		if (typeBinding == null) {
+			return Collections.emptyList();
+		}
+
+		ITypeBinding[] typeArguments = typeBinding.getTypeArguments();
+		if (typeArguments.length == 0) {
+			return Collections.emptyList();
+		}
+
+		ArrayList<String> names = new ArrayList<String>(typeArguments.length);
+		for (ITypeBinding typeArgument : typeArguments) {
+			if (typeArgument == null) {
+				names.add(null);
+			} else {
+				// e.g. "? extends Number" has an erasure of "Number"
+				ITypeBinding erasure = typeArgument.getErasure();
+				names.add(erasure.getTypeDeclaration().getQualifiedName());
+			}
+		}
+		return names;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java
new file mode 100644
index 0000000..114613b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java
@@ -0,0 +1,507 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.BodyDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTNodeTextRange;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+
+/**
+ * Java source persistent member (annotations, "persistable")
+ */
+abstract class SourcePersistentMember<M extends Member>
+	extends SourceNode
+	implements JavaResourcePersistentMember
+{
+	final M member;
+
+	/**
+	 * annotations; no duplicates (java compiler has an error for duplicates)
+	 */
+	final Vector<Annotation> annotations = new Vector<Annotation>();
+
+	boolean persistable;
+
+
+	// ********** construction/initialization **********
+
+	SourcePersistentMember(JavaResourceNode parent, M member) {
+		super(parent);
+		this.member = member;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.member.getBodyDeclaration(astRoot).accept(this.buildInitialAnnotationVisitor(astRoot));
+		this.persistable = this.buildPersistable(astRoot);
+	}
+
+	private ASTVisitor buildInitialAnnotationVisitor(CompilationUnit astRoot) {
+		return new InitialAnnotationVisitor(astRoot, this.member.getBodyDeclaration(astRoot));
+	}
+
+	/**
+	 * called from {@link InitialAnnotationVisitor}
+	 */
+	/* private */ void addInitialAnnotation(org.eclipse.jdt.core.dom.Annotation node, CompilationUnit astRoot) {
+		String jdtAnnotationName = ASTTools.resolveAnnotation(node);
+		if (jdtAnnotationName != null) {
+			this.addInitialAnnotation(jdtAnnotationName, astRoot);
+		}
+	}
+
+	/**
+	 * pre-condition: jdtAnnotationName is not null
+	 */
+	void addInitialAnnotation(String jdtAnnotationName, CompilationUnit astRoot) {
+		if (this.annotationIsValid(jdtAnnotationName)) {
+			if (this.selectAnnotationNamed(this.annotations, jdtAnnotationName) == null) { // ignore duplicates
+				Annotation annotation = this.buildAnnotation(jdtAnnotationName);
+				annotation.initialize(astRoot);
+				this.annotations.add(annotation);
+			}
+		}
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncAnnotations(astRoot);
+		this.syncPersistable(this.buildPersistable(astRoot));
+	}
+
+
+	// ********** annotations **********
+
+	public Iterator<Annotation> annotations() {
+		return this.getAnnotations().iterator();
+	}
+
+	Iterable<Annotation> getAnnotations() {
+		return new LiveCloneIterable<Annotation>(this.annotations);
+	}
+
+	public int annotationsSize() {
+		return this.annotations.size();
+	}
+
+	public Annotation getAnnotation(String annotationName) {
+		return this.selectAnnotationNamed(this.getAnnotations(), annotationName);
+	}
+
+	public Annotation getNonNullAnnotation(String annotationName) {
+		Annotation annotation = this.getAnnotation(annotationName);
+		return (annotation != null) ? annotation : this.buildNullAnnotation(annotationName);
+	}
+
+	public Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName) {
+		ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+		if (containerAnnotation != null) {
+			return containerAnnotation.getNestedAnnotations().iterator();
+		}
+		NestableAnnotation nestableAnnotation = this.getNestableAnnotation(nestableAnnotationName);
+		if (nestableAnnotation != null) {
+			return new SingleElementIterator<NestableAnnotation>(nestableAnnotation);
+		}
+		return EmptyIterator.instance();
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	private ContainerAnnotation<NestableAnnotation> getContainerAnnotation(String annotationName) {
+		return (ContainerAnnotation<NestableAnnotation>) this.getAnnotation(annotationName);
+	}
+
+	private NestableAnnotation getNestableAnnotation(String annotationName) {
+		return (NestableAnnotation) this.getAnnotation(annotationName);
+	}
+
+	public Annotation addAnnotation(String annotationName) {
+		Annotation annotation = this.buildAnnotation(annotationName);
+		this.annotations.add(annotation);
+		annotation.newAnnotation();
+		return annotation;
+	}
+
+	/**
+	 * 1. check for a container annotation;
+	 *     if it is present, add a nested annotation to it
+	 * 2. check for a stand-alone nested annotation;
+	 *     if it is missing, add a stand-alone nested annotation
+	 * 3. if there is an existing stand-alone nested annotation,
+	 *     add a container annotation and move the stand-alone nested annotation to it
+	 *     and add a new nested annotation to it also
+	 */
+	public NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+		ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+		if (containerAnnotation != null) {
+			// ignore any stand-alone nestable annotations and just add to the container annotation
+			return AnnotationContainerTools.addNestedAnnotation(index, containerAnnotation);
+		}
+		NestableAnnotation standAloneAnnotation = this.getNestableAnnotation(nestableAnnotationName);
+		if (standAloneAnnotation == null) {
+			// add a stand-alone nestable annotation since neither the nestable nor the container exist
+			return (NestableAnnotation) this.addAnnotation(nestableAnnotationName);
+		}
+		// move the stand-alone nestable annotation to a container and add another nestable
+		return this.addSecondNestedAnnotation(index, containerAnnotationName, standAloneAnnotation);
+	}
+
+	/**
+	 * "move" the existing nestable annotation to a new container annotation and
+	 * add a new nestable annotation at the specified index (which should be 0 or 1)
+	 */
+	private NestableAnnotation addSecondNestedAnnotation(int index, String containerAnnotationName, NestableAnnotation standAloneAnnotation) {
+		ContainerAnnotation<NestableAnnotation> containerAnnotation = this.buildContainerAnnotation(containerAnnotationName);
+		this.annotations.add(containerAnnotation);
+		containerAnnotation.newAnnotation();
+
+		NestableAnnotation nestedAnnotation0 = containerAnnotation.addNestedAnnotation();
+		nestedAnnotation0.newAnnotation();
+		NestableAnnotation nestedAnnotation1 = containerAnnotation.addNestedAnnotation();
+		nestedAnnotation1.newAnnotation();
+		this.removeAnnotation(standAloneAnnotation);
+
+		if (index == 0) {
+			// adding new annotation at 0, so stand-alone is "copied" to slot 1
+			nestedAnnotation1.initializeFrom(standAloneAnnotation);
+		} else {
+			// adding new annotation at 1, so stand-alone is "copied" to slot 0
+			nestedAnnotation0.initializeFrom(standAloneAnnotation);
+		}
+
+		return (index == 0) ? nestedAnnotation0 : nestedAnnotation1;
+	}
+
+	public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
+		this.moveAnnotation(targetIndex, sourceIndex, this.getContainerAnnotation(containerAnnotationName));
+	}
+
+	private void moveAnnotation(int targetIndex, int sourceIndex, ContainerAnnotation<NestableAnnotation> containerAnnotation) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, containerAnnotation);
+	}
+
+	public void removeAnnotation(String annotationName) {
+		Annotation annotation = this.getAnnotation(annotationName);
+		if (annotation != null) {
+			this.removeAnnotation(annotation);
+		}
+	}
+
+	private void removeAnnotation(Annotation annotation) {
+		this.annotations.remove(annotation);
+		annotation.removeAnnotation();
+	}
+
+	public void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+		ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+		if (containerAnnotation == null) {  // assume the index is 0
+			this.removeAnnotation(this.getAnnotation(nestableAnnotationName));
+		} else {
+			this.removeAnnotation(index, containerAnnotation);
+		}
+	}
+
+	/**
+	 * after we remove the nested annotation, check to see whether we need to
+	 * either remove the container (if it is empty) or convert the last nested
+	 * annotation to a stand-alone annotation
+	 */
+	private void removeAnnotation(int index, ContainerAnnotation<NestableAnnotation> containerAnnotation) {
+		AnnotationContainerTools.removeNestedAnnotation(index, containerAnnotation);
+		switch (containerAnnotation.getNestedAnnotationsSize()) {
+			case 0:
+				this.removeAnnotation(containerAnnotation);
+				break;
+			case 1:
+				this.convertLastNestedAnnotation(containerAnnotation);
+				break;
+			default:
+				break;
+		}
+	}
+
+	/**
+	 * convert the last nested annotation in the container to a stand-alone
+	 * annotation
+	 */
+	private void convertLastNestedAnnotation(ContainerAnnotation<NestableAnnotation> containerAnnotation) {
+		NestableAnnotation lastNestedAnnotation = containerAnnotation.getNestedAnnotations().iterator().next();
+		this.annotations.remove(containerAnnotation);
+		containerAnnotation.removeAnnotation();
+
+		NestableAnnotation standAloneAnnotation = this.buildNestableAnnotation(lastNestedAnnotation.getAnnotationName());
+		this.annotations.add(standAloneAnnotation);
+		standAloneAnnotation.newAnnotation();
+		standAloneAnnotation.initializeFrom(lastNestedAnnotation);
+	}
+
+	public Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames) {
+		ArrayList<String> annotationNames = new ArrayList<String>();
+		CollectionTools.addAll(annotationNames, supportingAnnotationNames);
+		if (primaryAnnotationName != null) {
+			annotationNames.add(primaryAnnotationName);
+		}
+		for (Annotation annotation : this.getAnnotations()) {
+			if ( ! CollectionTools.contains(annotationNames, annotation.getAnnotationName())) {
+				this.annotations.remove(annotation);
+				annotation.removeAnnotation();
+			}
+		}
+		Annotation newPrimaryAnnotation = null;
+		if ((primaryAnnotationName != null) && (this.getAnnotation(primaryAnnotationName) == null)) {
+			newPrimaryAnnotation = this.buildAnnotation(primaryAnnotationName);
+			this.annotations.add(newPrimaryAnnotation);
+			newPrimaryAnnotation.newAnnotation();
+		}
+		// fire collection change event after all annotation changes are done
+		this.fireCollectionChanged(ANNOTATIONS_COLLECTION, this.annotations);
+		return newPrimaryAnnotation;
+	}
+
+	private boolean annotationIsValid(String annotationName) {
+		return CollectionTools.contains(this.validAnnotationNames(), annotationName);
+	}
+
+	abstract Iterator<String> validAnnotationNames();
+
+	abstract Annotation buildAnnotation(String mappingAnnotationName);
+
+	abstract Annotation buildNullAnnotation(String annotationName);
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	private ContainerAnnotation<NestableAnnotation> buildContainerAnnotation(String annotationName) {
+		return (ContainerAnnotation<NestableAnnotation>) this.buildAnnotation(annotationName);
+	}
+
+	private NestableAnnotation buildNestableAnnotation(String annotationName) {
+		return (NestableAnnotation) this.buildAnnotation(annotationName);
+	}
+
+	private void syncAnnotations(CompilationUnit astRoot) {
+		HashSet<Annotation> annotationsToRemove = new HashSet<Annotation>(this.annotations);
+
+		this.member.getBodyDeclaration(astRoot).accept(this.buildSynchronizeAnnotationVisitor(astRoot, annotationsToRemove));
+
+		for (Annotation annotation : annotationsToRemove) {
+			this.removeItemFromCollection(annotation, this.annotations, ANNOTATIONS_COLLECTION);
+		}
+	}
+
+	private ASTVisitor buildSynchronizeAnnotationVisitor(CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+		return new SynchronizeAnnotationVisitor(astRoot, this.member.getBodyDeclaration(astRoot), annotationsToRemove);
+	}
+
+	/**
+	 * called from {@link SynchronizeAnnotationVisitor}
+	 */
+	/* private */ void addOrSyncAnnotation(org.eclipse.jdt.core.dom.Annotation node, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+		String jdtAnnotationName = ASTTools.resolveAnnotation(node);
+		if (jdtAnnotationName != null) {
+			this.addOrSyncAnnotation(jdtAnnotationName, astRoot, annotationsToRemove);
+		}
+	}
+
+	/**
+	 * pre-condition: jdtAnnotationName is not null
+	 */
+	void addOrSyncAnnotation(String jdtAnnotationName, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+		if (this.annotationIsValid(jdtAnnotationName)) {
+			this.addOrSyncAnnotation_(jdtAnnotationName, astRoot, annotationsToRemove);
+		}
+	}
+
+	/**
+	 * pre-condition: jdtAnnotationName is valid
+	 */
+	private void addOrSyncAnnotation_(String jdtAnnotationName, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+		Annotation annotation = this.selectAnnotationNamed(annotationsToRemove, jdtAnnotationName);
+		if (annotation != null) {
+			annotation.synchronizeWith(astRoot);
+			annotationsToRemove.remove(annotation);
+		} else {
+			annotation = this.buildAnnotation(jdtAnnotationName);
+			annotation.initialize(astRoot);
+			this.addItemToCollection(annotation, this.annotations, ANNOTATIONS_COLLECTION);
+		}
+	}
+
+
+	// ********** persistable **********
+
+	public boolean isPersistable() {
+		return this.persistable;
+	}
+
+	private void syncPersistable(boolean astPersistable) {
+		boolean old = this.persistable;
+		this.persistable = astPersistable;
+		this.firePropertyChanged(PERSISTABLE_PROPERTY, old, astPersistable);
+	}
+
+	private boolean buildPersistable(CompilationUnit astRoot) {
+		return this.member.isPersistable(astRoot);
+	}
+
+
+	// ********** miscellaneous **********
+
+	public boolean isAnnotated() {
+		return ! this.annotations.isEmpty();
+	}
+
+	public boolean isFor(String memberName, int occurrence) {
+		return this.member.matches(memberName, occurrence);
+	}
+
+	public TextRange getTextRange(CompilationUnit astRoot) {
+		return this.fullTextRange(astRoot);
+	}
+
+	private TextRange fullTextRange(CompilationUnit astRoot) {
+		return this.buildTextRange(this.member.getBodyDeclaration(astRoot));
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.member.getNameTextRange(astRoot);
+	}
+
+	public void resolveTypes(CompilationUnit astRoot) {
+		this.syncPersistable(this.buildPersistable(astRoot));
+	}
+
+	private Annotation selectAnnotationNamed(Iterable<Annotation> list, String annotationName) {
+		for (Annotation annotation : list) {
+			if (annotation.getAnnotationName().equals(annotationName)) {
+				return annotation;
+			}
+		}
+		return null;
+	}
+
+	private TextRange buildTextRange(ASTNode astNode) {
+		return (astNode == null) ? null : new ASTNodeTextRange(astNode);
+	}
+
+	/**
+	 * convenience method
+	 */
+	<T extends JavaResourcePersistentMember> Iterator<T> persistableMembers(Iterator<T> members) {
+		return new FilteringIterator<T>(members) {
+			@Override
+			protected boolean accept(T m) {
+				return m.isPersistable();
+			}
+		};
+	}
+
+
+	// ********** AST visitors **********
+
+	/**
+	 * annotation visitor
+	 */
+	protected static abstract class AnnotationVisitor
+			extends ASTVisitor
+	{
+		protected final CompilationUnit astRoot;
+		protected final BodyDeclaration bodyDeclaration;
+
+		protected AnnotationVisitor(CompilationUnit astRoot, BodyDeclaration bodyDeclaration) {
+			super();
+			this.astRoot = astRoot;
+			this.bodyDeclaration = bodyDeclaration;
+		}
+
+		@Override
+		public boolean visit(SingleMemberAnnotation node) {
+			return this.visit_(node);
+		}
+
+		@Override
+		public boolean visit(NormalAnnotation node) {
+			return this.visit_(node);
+		}
+
+		@Override
+		public boolean visit(MarkerAnnotation node) {
+			return this.visit_(node);
+		}
+
+		protected boolean visit_(org.eclipse.jdt.core.dom.Annotation node) {
+			// ignore annotations for child members, only this member
+			if (node.getParent() == this.bodyDeclaration) {
+				this.visitChildAnnotation(node);
+			}
+			return false;
+		}
+
+		protected abstract void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node);
+	}
+
+
+	/**
+	 * initial annotation visitor
+	 */
+	protected class InitialAnnotationVisitor
+			extends AnnotationVisitor
+	{
+		protected InitialAnnotationVisitor(CompilationUnit astRoot, BodyDeclaration bodyDeclaration) {
+			super(astRoot, bodyDeclaration);
+		}
+
+		@Override
+		protected void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node) {
+			SourcePersistentMember.this.addInitialAnnotation(node, this.astRoot);
+		}
+	}
+
+
+	/**
+	 * synchronize annotation visitor
+	 */
+	protected class SynchronizeAnnotationVisitor
+			extends AnnotationVisitor
+	{
+		protected final Set<Annotation> annotationsToRemove;
+
+		protected SynchronizeAnnotationVisitor(CompilationUnit astRoot, BodyDeclaration bodyDeclaration, Set<Annotation> annotationsToRemove) {
+			super(astRoot, bodyDeclaration);
+			this.annotationsToRemove = annotationsToRemove;
+		}
+
+		@Override
+		protected void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node) {
+			SourcePersistentMember.this.addOrSyncAnnotation(node, this.astRoot, this.annotationsToRemove);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java
new file mode 100644
index 0000000..058550b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java
@@ -0,0 +1,830 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.IAnnotationBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.GeneratedAnnotationDefinition;
+import org.eclipse.jpt.core.internal.jpa2.resource.java.StaticMetamodelAnnotationDefinition;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.JDTType;
+import org.eclipse.jpt.core.internal.utility.jdt.JPTTools;
+import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
+import org.eclipse.jpt.core.jpa2.resource.java.JavaResourcePersistentType2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.StaticMetamodelAnnotation;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.MethodSignature;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.IntReference;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.TreeIterator;
+
+/**
+ * Java source persistent type
+ */
+final class SourcePersistentType
+	extends SourcePersistentMember<Type>
+	implements JavaResourcePersistentType2_0
+{
+	private String name;
+
+	private String qualifiedName;
+
+	private String superclassQualifiedName;
+
+	private String declaringTypeName;
+
+	private boolean abstract_;  // 'abstract' is a reserved word
+
+	private final Vector<JavaResourcePersistentType> types;
+
+	private final Vector<JavaResourcePersistentAttribute> fields;
+
+	private final Vector<JavaResourcePersistentAttribute> methods;
+
+	private AccessType access;
+
+	private StaticMetamodelAnnotation staticMetamodelAnnotation;
+		//TODO move to interface after maintenance
+		public static final String STATIC_METAMODEL_ANNOTATION_PROPERTY = "staticMetamodelAnnotation"; //$NON-NLS-1$
+
+	private GeneratedAnnotation generatedAnnotation;
+		//TODO move to interface after maintenance
+		public static final String GENERATED_ANNOTATION_PROPERTY = "generatedAnnotation"; //$NON-NLS-1$
+
+
+	private static final StaticMetamodelAnnotationDefinition STATIC_METAMODEL_ANNOTATION_DEFINITION = StaticMetamodelAnnotationDefinition.instance();
+	private static final GeneratedAnnotationDefinition GENERATED_ANNOTATION_DEFINITION = GeneratedAnnotationDefinition.instance();
+
+
+	// ********** construction/initialization **********
+
+	/**
+	 * build top-level persistent type
+	 */
+	static JavaResourcePersistentType newInstance(
+			JavaResourceCompilationUnit javaResourceCompilationUnit,
+			TypeDeclaration typeDeclaration,
+			CompilationUnit astRoot) {
+		Type type = new JDTType(
+				typeDeclaration,
+				javaResourceCompilationUnit.getCompilationUnit(),
+				javaResourceCompilationUnit.getModifySharedDocumentCommandExecutor(),
+				javaResourceCompilationUnit.getAnnotationEditFormatter());
+		JavaResourcePersistentType jrpt = new SourcePersistentType(javaResourceCompilationUnit, type);
+		jrpt.initialize(astRoot);
+		return jrpt;
+	}
+
+	/**
+	 * build nested persistent type
+	 */
+	private static JavaResourcePersistentType newInstance(
+			JavaResourceCompilationUnit javaResourceCompilationUnit,
+			Type declaringType,
+			TypeDeclaration typeDeclaration,
+			int occurrence,
+			CompilationUnit astRoot) {
+		Type type = new JDTType(
+				declaringType,
+				typeDeclaration,
+				occurrence,
+				javaResourceCompilationUnit.getCompilationUnit(),
+				javaResourceCompilationUnit.getModifySharedDocumentCommandExecutor(),
+				javaResourceCompilationUnit.getAnnotationEditFormatter());
+		JavaResourcePersistentType jrpt = new SourcePersistentType(javaResourceCompilationUnit, type);
+		jrpt.initialize(astRoot);
+		return jrpt;
+	}
+
+	private SourcePersistentType(JavaResourceCompilationUnit javaResourceCompilationUnit, Type type) {
+		super(javaResourceCompilationUnit, type);
+		this.types = new Vector<JavaResourcePersistentType>();
+		this.fields = new Vector<JavaResourcePersistentAttribute>();
+		this.methods = new Vector<JavaResourcePersistentAttribute>();
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.name = this.buildName(astRoot);
+		this.qualifiedName = this.buildQualifiedName(astRoot);
+		this.superclassQualifiedName = this.buildSuperclassQualifiedName(astRoot);
+		this.declaringTypeName = this.buildDeclaringTypeName(astRoot);
+		this.abstract_ = this.buildAbstract(astRoot);
+		this.initializeTypes(astRoot);
+		this.initializeFields(astRoot);
+		this.initializeMethods(astRoot);
+		// need to wait until everything is built to calculate 'access'
+		this.access = this.buildAccess();
+	}
+
+	/**
+	 * Handle the <code>StaticMetamodel</code> and <code>Generated</code>
+	 * annotations differently, since they are not really JPA "mapping"
+	 * annotations....
+	 */
+	@Override
+	void addInitialAnnotation(String jdtAnnotationName, CompilationUnit astRoot) {
+		if (jdtAnnotationName.equals(STATIC_METAMODEL_ANNOTATION_DEFINITION.getAnnotationName())) {
+			if (this.staticMetamodelAnnotation == null) { // ignore duplicates
+				this.staticMetamodelAnnotation = STATIC_METAMODEL_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+				this.staticMetamodelAnnotation.initialize(astRoot);
+			}
+		} else if (jdtAnnotationName.equals(GENERATED_ANNOTATION_DEFINITION.getAnnotationName())) {
+			if (this.generatedAnnotation == null) { // ignore duplicates
+				this.generatedAnnotation = GENERATED_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+				this.generatedAnnotation.initialize(astRoot);
+			}
+		} else {
+			super.addInitialAnnotation(jdtAnnotationName, astRoot);
+		}
+	}
+
+
+	// ********** update **********
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncName(this.buildName(astRoot));
+		this.syncQualifiedName(this.buildQualifiedName(astRoot));
+		this.syncSuperclassQualifiedName(this.buildSuperclassQualifiedName(astRoot));
+		this.syncDeclaringTypeName(this.buildDeclaringTypeName(astRoot));
+		this.syncAbstract(this.buildAbstract(astRoot));
+		this.syncTypes(astRoot);
+		this.syncFields(astRoot);
+		this.syncMethods(astRoot);
+		this.syncMetamodelAnnotations(astRoot);
+		// need to wait until everything is built to calculate 'access'
+		this.syncAccess(this.buildAccess());
+	}
+
+	/**
+	 * Handle the <code>StaticMetamodel</code> and <code>Generated</code>
+	 * annotations differently, since they are not really JPA "mapping"
+	 * annotations. We aren't overriding {@link #addOrSyncAnnotation(String, CompilationUnit, java.util.Set)}
+	 * because we also have to handle removing these annotations separately.
+	 */
+	private void syncMetamodelAnnotations(CompilationUnit astRoot) {
+		ITypeBinding binding = this.member.getBinding(astRoot);
+		this.syncStaticMetamodelAnnotation(astRoot, binding);
+		this.syncGeneratedAnnotation(astRoot, binding);
+	}
+
+	private void syncStaticMetamodelAnnotation(CompilationUnit astRoot, ITypeBinding binding) {
+		if (binding != null && this.containsStaticMetamodelAnnotation(binding)) {
+			if (this.staticMetamodelAnnotation != null) {
+				this.staticMetamodelAnnotation.synchronizeWith(astRoot);				
+			}
+			else {
+				StaticMetamodelAnnotation newStaticMetamodelAnnotation = STATIC_METAMODEL_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+				newStaticMetamodelAnnotation.initialize(astRoot);				
+				this.setStaticMetamodelAnnotation(newStaticMetamodelAnnotation);
+			}
+		}
+		else {
+			this.setStaticMetamodelAnnotation(null);
+		}
+	}
+
+	private void syncGeneratedAnnotation(CompilationUnit astRoot, ITypeBinding binding) {
+		if (binding != null && this.containsGeneratedAnnotation(binding)) {
+			if (this.generatedAnnotation != null) {
+				this.generatedAnnotation.synchronizeWith(astRoot);				
+			}
+			else {
+				GeneratedAnnotation newGeneratedAnnotation = GENERATED_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+				newGeneratedAnnotation.initialize(astRoot);
+				this.setGeneratedAnnotation(newGeneratedAnnotation);
+			}
+		}
+		else {
+			this.setGeneratedAnnotation(null);
+		}
+	}
+
+	private boolean containsStaticMetamodelAnnotation(ITypeBinding binding) {
+		return this.containsAnnotation(binding, STATIC_METAMODEL_ANNOTATION_DEFINITION.getAnnotationName());
+	}
+
+	private boolean containsGeneratedAnnotation(ITypeBinding binding) {
+		return this.containsAnnotation(binding, GENERATED_ANNOTATION_DEFINITION.getAnnotationName());
+	}
+
+	private boolean containsAnnotation(ITypeBinding binding, String annotationName) {
+		for (IAnnotationBinding annotationBinding : binding.getAnnotations()) {
+			ITypeBinding annotationTypeBinding = annotationBinding.getAnnotationType();
+			if (annotationTypeBinding != null && annotationTypeBinding.getQualifiedName().equals(annotationName)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	// ********** SourcePersistentMember implementation **********
+
+	@Override
+	Iterator<String> validAnnotationNames() {
+		return this.getAnnotationProvider().typeAnnotationNames();
+	}
+
+	@Override
+	Annotation buildAnnotation(String mappingAnnotationName) {
+		return this.getAnnotationProvider().buildTypeAnnotation(this, this.member, mappingAnnotationName);
+	}
+
+	@Override
+	Annotation buildNullAnnotation(String annotationName) {
+		return this.getAnnotationProvider().buildNullTypeAnnotation(this, annotationName);
+	}
+
+	@Override
+	public void resolveTypes(CompilationUnit astRoot) {
+		super.resolveTypes(astRoot);
+
+		this.syncSuperclassQualifiedName(this.buildSuperclassQualifiedName(astRoot));
+
+		for (JavaResourcePersistentAttribute field : this.getFields()) {
+			field.resolveTypes(astRoot);
+		}
+
+		// a new type can trigger a method parameter type to be a resolved,
+		// fully-qualified name, so we need to rebuild our list of methods:
+		//     "setFoo(Foo)" is not the same as "setFoo(com.bar.Foo)"
+		// and, vice-versa, a removed type can "unresolve" a parameter type
+		this.syncMethods(astRoot);
+
+		for (JavaResourcePersistentAttribute method : this.getMethods()) {
+			method.resolveTypes(astRoot);
+		}
+		for (JavaResourcePersistentType type : this.getTypes()) {
+			type.resolveTypes(astRoot);
+		}
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ******** JavaResourcePersistentType implementation ********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		ITypeBinding binding = this.member.getBinding(astRoot);
+		return (binding == null) ? null : binding.getName();
+	}
+
+	// ***** qualified name
+	public String getQualifiedName() {
+		return this.qualifiedName;
+	}
+
+	private void syncQualifiedName(String astQualifiedName) {
+		String old = this.qualifiedName;
+		this.qualifiedName = astQualifiedName;
+		this.firePropertyChanged(QUALIFIED_NAME_PROPERTY, old, astQualifiedName);
+	}
+
+	private String buildQualifiedName(CompilationUnit astRoot) {
+		ITypeBinding binding = this.member.getBinding(astRoot);
+		return (binding == null) ? null : binding.getQualifiedName();
+	}
+
+	// ***** superclass qualified name
+	public String getSuperclassQualifiedName() {
+		return this.superclassQualifiedName;
+	}
+
+	private void syncSuperclassQualifiedName(String astSuperclassQualifiedName) {
+		String old = this.superclassQualifiedName;
+		this.superclassQualifiedName = astSuperclassQualifiedName;
+		this.firePropertyChanged(SUPERCLASS_QUALIFIED_NAME_PROPERTY, old, astSuperclassQualifiedName);
+	}
+
+	private String buildSuperclassQualifiedName(CompilationUnit astRoot) {
+		ITypeBinding binding = this.member.getBinding(astRoot);
+		if (binding == null) {
+			return null;
+		}
+		ITypeBinding superclass = binding.getSuperclass();
+		return (superclass == null) ? null : superclass.getTypeDeclaration().getQualifiedName();
+	}
+
+	// ***** declaring type name
+	public String getDeclaringTypeName() {
+		return this.declaringTypeName;
+	}
+
+	private void syncDeclaringTypeName(String astDeclaringTypeName) {
+		String old = this.declaringTypeName;
+		this.declaringTypeName = astDeclaringTypeName;
+		this.firePropertyChanged(DECLARING_TYPE_NAME_PROPERTY, old, astDeclaringTypeName);
+	}
+
+	private String buildDeclaringTypeName(CompilationUnit astRoot) {
+		ITypeBinding binding = this.member.getBinding(astRoot);
+		if (binding == null) {
+			return null;
+		}
+		ITypeBinding declaringClass = binding.getDeclaringClass();
+		return (declaringClass == null) ? null : declaringClass.getTypeDeclaration().getQualifiedName();
+	}
+
+
+	// ***** abstract
+	public boolean isAbstract() {
+		return this.abstract_;
+	}
+
+	private void syncAbstract(boolean astAbstract) {
+		boolean old = this.abstract_;
+		this.abstract_ = astAbstract;
+		this.firePropertyChanged(ABSTRACT_PROPERTY, old, astAbstract);
+	}
+
+	private boolean buildAbstract(CompilationUnit astRoot) {
+		ITypeBinding binding = this.member.getBinding(astRoot);
+		return (binding == null) ? false : Modifier.isAbstract(binding.getModifiers());
+	}
+
+	// ***** access
+	public AccessType getAccess() {
+		return this.access;
+	}
+
+	// TODO
+	//seems we could have a public changeAccess() api which would
+	//move all annotations from fields to their corresponding methods or vice versa
+	//though of course it's more complicated than that since what if the
+	//corresponding field/method does not exist?
+	//making this internal since it should only be set based on changes in the source, the
+	//context model should not need to set this
+	private void syncAccess(AccessType astAccess) {
+		AccessType old = this.access;
+		this.access = astAccess;
+		this.firePropertyChanged(ACCESS_PROPERTY, old, astAccess);
+	}
+
+	private AccessType buildAccess() {
+		return JPTTools.buildAccess(this);
+	}
+
+	public boolean isMapped() {
+		for (Annotation each : this.getAnnotations()) {
+			if (this.annotationIsMappingAnnotation(each)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private boolean annotationIsMappingAnnotation(Annotation annotation) {
+		return CollectionTools.contains(this.mappingAnnotationNames(), annotation.getAnnotationName());
+	}
+
+	private Iterator<String> mappingAnnotationNames() {
+		return this.getAnnotationProvider().typeMappingAnnotationNames();
+	}
+
+	/**
+	 * check only persistable attributes
+	 */
+	public boolean hasAnyAnnotatedAttributes() {
+		for (Iterator<JavaResourcePersistentAttribute> stream = this.persistableAttributes(); stream.hasNext(); ) {
+			if (stream.next().isAnnotated()) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+
+	// ********** types **********
+
+	public Iterator<JavaResourcePersistentType> types() {
+		return this.getTypes().iterator();
+	}
+
+	private Iterable<JavaResourcePersistentType> getTypes() {
+		return new LiveCloneIterable<JavaResourcePersistentType>(this.types);  // read-only
+	}
+
+	public Iterator<JavaResourcePersistentType> allTypes() {
+		return new TreeIterator<JavaResourcePersistentType>(this) {
+			@Override
+			protected Iterator<? extends JavaResourcePersistentType> children(JavaResourcePersistentType type) {
+				return type.types();
+			}
+		};
+	}
+
+	public Iterator<JavaResourcePersistentType> persistableTypes() {
+		return this.persistableMembers(this.types());
+	}
+
+	private JavaResourcePersistentType getType(String typeName, int occurrence) {
+		for (JavaResourcePersistentType type : this.getTypes()) {
+			if (type.isFor(typeName, occurrence)) {
+				return type;
+			}
+		}
+		return null;
+	}
+
+	private void addType(JavaResourcePersistentType type) {
+		this.addItemToCollection(type, this.types, TYPES_COLLECTION);
+	}
+
+	private void removeTypes(Collection<JavaResourcePersistentType> remove) {
+		this.removeItemsFromCollection(remove, this.types, TYPES_COLLECTION);
+	}
+
+	private void initializeTypes(CompilationUnit astRoot) {
+		TypeDeclaration[] typeDeclarations = this.member.getTypes(astRoot);
+		CounterMap counters = new CounterMap(typeDeclarations.length);
+		for (TypeDeclaration td : typeDeclarations) {
+			String tdName = td.getName().getFullyQualifiedName();
+			int occurrence = counters.increment(tdName);
+			this.types.add(this.buildType(td, occurrence, astRoot));
+		}
+	}
+
+	private void syncTypes(CompilationUnit astRoot) {
+		TypeDeclaration[] typeDeclarations = this.member.getTypes(astRoot);
+		CounterMap counters = new CounterMap(typeDeclarations.length);
+		HashSet<JavaResourcePersistentType> typesToRemove = new HashSet<JavaResourcePersistentType>(this.types);
+		for (TypeDeclaration typeDeclaration : typeDeclarations) {
+			String tdName = typeDeclaration.getName().getFullyQualifiedName();
+			int occurrence = counters.increment(tdName);
+
+			JavaResourcePersistentType type = this.getType(tdName, occurrence);
+			if (type == null) {
+				this.addType(this.buildType(typeDeclaration, occurrence, astRoot));
+			} else {
+				typesToRemove.remove(type);
+				type.synchronizeWith(astRoot);
+			}
+		}
+		this.removeTypes(typesToRemove);
+	}
+
+	private JavaResourcePersistentType buildType(TypeDeclaration nestedTypeDeclaration, int occurrence, CompilationUnit astRoot) {
+		return newInstance(this.getJavaResourceCompilationUnit(), this.member, nestedTypeDeclaration, occurrence, astRoot);
+	}
+
+
+	// ********** fields **********
+
+	public Iterator<JavaResourcePersistentAttribute> fields() {
+		return this.getFields().iterator();
+	}
+
+	private Iterable<JavaResourcePersistentAttribute> getFields() {
+		return new LiveCloneIterable<JavaResourcePersistentAttribute>(this.fields);
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistableFields() {
+		return this.persistableMembers(this.fields());
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistableFieldsWithSpecifiedFieldAccess() {
+		return new FilteringIterator<JavaResourcePersistentAttribute>(this.persistableFields()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentAttribute resourceAttribute) {
+				return resourceAttribute.getSpecifiedAccess() == AccessType.FIELD;
+			}
+		};
+	}
+
+	private void addField(JavaResourcePersistentAttribute field) {
+		this.addItemToCollection(field, this.fields, FIELDS_COLLECTION);
+	}
+
+	private JavaResourcePersistentAttribute getField(String fieldName, int occurrence) {
+		for (JavaResourcePersistentAttribute field : this.getFields()) {
+			if (field.isFor(fieldName, occurrence)) {
+				return field;
+			}
+		}
+		return null;
+	}
+
+	private void removeFields(Collection<JavaResourcePersistentAttribute> remove) {
+		this.removeItemsFromCollection(remove, this.fields, FIELDS_COLLECTION);
+	}
+
+	private void initializeFields(CompilationUnit astRoot) {
+		FieldDeclaration[] fieldDeclarations = this.member.getFields(astRoot);
+		CounterMap counters = new CounterMap(fieldDeclarations.length);
+		for (FieldDeclaration fieldDeclaration : fieldDeclarations) {
+			for (VariableDeclarationFragment fragment : fragments(fieldDeclaration)) {
+				String fieldName = fragment.getName().getFullyQualifiedName();
+				int occurrence = counters.increment(fieldName);
+				this.fields.add(this.buildField(fieldName, occurrence, astRoot));
+			}
+		}
+	}
+
+	private void syncFields(CompilationUnit astRoot) {
+		FieldDeclaration[] fieldDeclarations = this.member.getFields(astRoot);
+		CounterMap counters = new CounterMap(fieldDeclarations.length);
+		HashSet<JavaResourcePersistentAttribute> fieldsToRemove = new HashSet<JavaResourcePersistentAttribute>(this.fields);
+		for (FieldDeclaration fieldDeclaration : fieldDeclarations) {
+			for (VariableDeclarationFragment fragment : fragments(fieldDeclaration)) {
+				String fieldName = fragment.getName().getFullyQualifiedName();
+				int occurrence = counters.increment(fieldName);
+
+				JavaResourcePersistentAttribute field = this.getField(fieldName, occurrence);
+				if (field == null) {
+					this.addField(this.buildField(fieldName, occurrence, astRoot));
+				} else {
+					fieldsToRemove.remove(field);
+					field.synchronizeWith(astRoot);
+				}
+			}
+		}
+		this.removeFields(fieldsToRemove);
+	}
+
+	private JavaResourcePersistentAttribute buildField(String fieldName, int occurrence, CompilationUnit astRoot) {
+		return SourcePersistentAttribute.newInstance(this, this.member, fieldName, occurrence, this.getJavaResourceCompilationUnit(), astRoot);
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	private static List<VariableDeclarationFragment> fragments(FieldDeclaration fd) {
+		return fd.fragments();
+	}
+
+
+	// ********** methods **********
+
+	public Iterator<JavaResourcePersistentAttribute> methods() {
+		return this.getMethods().iterator();
+	}
+
+	private Iterable<JavaResourcePersistentAttribute> getMethods() {
+		return new LiveCloneIterable<JavaResourcePersistentAttribute>(this.methods);
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistableProperties() {
+		return this.persistableMembers(this.methods());
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistablePropertiesWithSpecifiedPropertyAccess() {
+		return new FilteringIterator<JavaResourcePersistentAttribute>(this.persistableProperties()) {
+			@Override
+			protected boolean accept(JavaResourcePersistentAttribute resourceAttribute) {
+				return resourceAttribute.getSpecifiedAccess() == AccessType.PROPERTY;
+			}
+		};
+	}
+
+	private JavaResourcePersistentAttribute getMethod(MethodSignature signature, int occurrence) {
+		for (JavaResourcePersistentAttribute method : this.getMethods()) {
+			if (method.isFor(signature, occurrence)) {
+				return method;
+			}
+		}
+		return null;
+	}
+
+	private void addMethod(JavaResourcePersistentAttribute method) {
+		this.addItemToCollection(method, this.methods, METHODS_COLLECTION);
+	}
+
+	private void removeMethods(Collection<JavaResourcePersistentAttribute> remove) {
+		this.removeItemsFromCollection(remove, this.methods, METHODS_COLLECTION);
+	}
+
+	private void initializeMethods(CompilationUnit astRoot) {
+		MethodDeclaration[] methodDeclarations = this.member.getMethods(astRoot);
+		CounterMap counters = new CounterMap(methodDeclarations.length);
+		for (MethodDeclaration methodDeclaration : methodDeclarations) {
+			MethodSignature signature = ASTTools.buildMethodSignature(methodDeclaration);
+			int occurrence = counters.increment(signature);
+			this.methods.add(this.buildMethod(signature, occurrence, astRoot));
+		}
+	}
+
+	private void syncMethods(CompilationUnit astRoot) {
+		MethodDeclaration[] methodDeclarations = this.member.getMethods(astRoot);
+		CounterMap counters = new CounterMap(methodDeclarations.length);
+		HashSet<JavaResourcePersistentAttribute> methodsToRemove = new HashSet<JavaResourcePersistentAttribute>(this.methods);
+		for (MethodDeclaration methodDeclaration : methodDeclarations) {
+			MethodSignature signature = ASTTools.buildMethodSignature(methodDeclaration);
+			int occurrence = counters.increment(signature);
+
+			JavaResourcePersistentAttribute method = this.getMethod(signature, occurrence);
+			if (method == null) {
+				this.addMethod(this.buildMethod(signature, occurrence, astRoot));
+			} else {
+				methodsToRemove.remove(method);
+				method.synchronizeWith(astRoot);
+			}
+		}
+		this.removeMethods(methodsToRemove);
+	}
+
+	private JavaResourcePersistentAttribute buildMethod(MethodSignature signature, int occurrence, CompilationUnit astRoot) {
+		return SourcePersistentAttribute.newInstance(this, this.member, signature, occurrence, this.getJavaResourceCompilationUnit(), astRoot);
+	}
+
+
+	// ********** attributes **********
+
+	@SuppressWarnings("unchecked")
+	public Iterator<JavaResourcePersistentAttribute> persistableAttributes() {
+		return new CompositeIterator<JavaResourcePersistentAttribute>(
+				this.persistableFields(),
+				this.persistableProperties()
+			);
+	}
+
+	public Iterator<JavaResourcePersistentAttribute> persistableAttributes(AccessType specifiedAccess) {
+		if (specifiedAccess == null) {
+			throw new IllegalArgumentException("specified access is null"); //$NON-NLS-1$
+		}
+		return (specifiedAccess == AccessType.FIELD) ?
+					this.persistableAttributesForFieldAccessType() :
+					this.persistableAttributesForPropertyAccessType();
+	}
+
+	@SuppressWarnings("unchecked")
+	private Iterator<JavaResourcePersistentAttribute> persistableAttributesForFieldAccessType() {
+		return new CompositeIterator<JavaResourcePersistentAttribute>(
+				this.persistableFields(),
+				this.persistablePropertiesWithSpecifiedPropertyAccess()
+			);
+	}
+
+	@SuppressWarnings("unchecked")
+	private Iterator<JavaResourcePersistentAttribute> persistableAttributesForPropertyAccessType() {
+		return new CompositeIterator<JavaResourcePersistentAttribute>(
+				this.persistableProperties(),
+				this.persistableFieldsWithSpecifiedFieldAccess()
+			);
+	}
+
+
+	// ********** metamodel **********
+
+	public GeneratedAnnotation getGeneratedAnnotation() {
+		return this.generatedAnnotation;
+	}
+
+	private void setGeneratedAnnotation(GeneratedAnnotation generatedAnnotation) {
+		GeneratedAnnotation old = this.generatedAnnotation;
+		this.generatedAnnotation = generatedAnnotation;
+		firePropertyChanged(GENERATED_ANNOTATION_PROPERTY, old, this.generatedAnnotation);
+	}
+
+	private void setStaticMetamodelAnnotation(StaticMetamodelAnnotation staticMetamodelAnnotation) {
+		StaticMetamodelAnnotation old = this.staticMetamodelAnnotation;
+		this.staticMetamodelAnnotation = staticMetamodelAnnotation;
+		firePropertyChanged(STATIC_METAMODEL_ANNOTATION_PROPERTY, old, this.staticMetamodelAnnotation);
+	}
+
+	/**
+	 * The type must be:<ul>
+	 * <li>in the specified source folder
+	 * <li>a top-level type
+	 * <li>annotated with <code>&#64;javax.annotation.Generated</code> with
+	 *     the appropriate <code>value</code> and <code>date</code>
+	 * <li>either itself or one of its nested types annotated with
+	 *     <code>&#64;javax.persistence.metamodel.StaticMetamodel</code>
+	 * </ul>
+	 */
+	public boolean isGeneratedMetamodelTopLevelType(IPackageFragmentRoot sourceFolder) {
+		if ( ! this.getSourceFolder().equals(sourceFolder)) {
+			return false;
+		}
+		return this.isGeneratedMetamodelTopLevelType();
+	}
+
+	/**
+	 * The type must be:<ul>
+	 * <li>a top-level type
+	 * <li>annotated with <code>&#64;javax.annotation.Generated</code> with
+	 *     the appropriate <code>value</code> and <code>date</code>
+	 * <li>either itself or one of its nested types annotated with
+	 *     <code>&#64;javax.persistence.metamodel.StaticMetamodel</code>
+	 * </ul>
+	 */
+	public boolean isGeneratedMetamodelTopLevelType() {
+		if ( !  this.isGenerated()) {
+			return false;
+		}
+		// if we get here we know we have a top-level type, since only top-level
+		// types are annotated @Generated; now see if anything is a metamodel
+		for (Iterator<JavaResourcePersistentType> stream = this.allTypes(); stream.hasNext(); ) {
+			JavaResourcePersistentType2_0 type = (JavaResourcePersistentType2_0) stream.next();
+			if (type.isMetamodel()) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * The type must be annotated with
+	 * <code>&#64;javax.annotation.Generated</code> with the appropriate
+	 * <code>value</code> and <code>date</code>.
+	 */
+	protected boolean isGenerated() {
+		if (this.generatedAnnotation == null) {
+			return false;
+		}
+		if (this.generatedAnnotation.valuesSize() != 1) {
+			return false;
+		}
+		if ( ! this.generatedAnnotation.getValue(0).equals(METAMODEL_GENERATED_ANNOTATION_VALUE)) {
+			return false;
+		}
+		if (StringTools.stringIsEmpty(this.generatedAnnotation.getDate())) {
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * The type must be annotated with
+	 * <code>&#64;javax.persistence.metamodel.StaticMetamodel</code>.
+	 */
+	public boolean isMetamodel() {
+		return this.staticMetamodelAnnotation != null;
+	}
+
+	private IPackageFragmentRoot getSourceFolder() {
+		return (IPackageFragmentRoot) this.getJavaResourceCompilationUnit().getCompilationUnit().getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
+	}
+
+
+	// ********** CounterMap **********
+
+	private static class CounterMap {
+		private final HashMap<Object, IntReference> counters;
+
+		protected CounterMap(int initialCapacity) {
+			super();
+			this.counters = new HashMap<Object, IntReference>(initialCapacity);
+		}
+
+		/**
+		 * Return the incremented count for the specified object.
+		 */
+		int increment(Object o) {
+			IntReference counter = this.counters.get(o);
+			if (counter == null) {
+				counter = new IntReference();
+				this.counters.put(o, counter);
+			}
+			counter.increment();
+			return counter.getValue();
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
new file mode 100644
index 0000000..65c7b71
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestablePrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumn
+ */
+public final class SourcePrimaryKeyJoinColumnAnnotation
+	extends SourceNamedColumnAnnotation
+	implements NestablePrimaryKeyJoinColumnAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final DeclarationAnnotationElementAdapter<String> referencedColumnNameDeclarationAdapter;
+	private final AnnotationElementAdapter<String> referencedColumnNameAdapter;
+	private String referencedColumnName;
+
+
+	public SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+		this.referencedColumnNameDeclarationAdapter = this.buildStringElementAdapter(JPA.PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
+		this.referencedColumnNameAdapter = this.buildShortCircuitElementAdapter(this.referencedColumnNameDeclarationAdapter);
+	}
+
+	public SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
+		this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+	}
+
+	public SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
+		this(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.referencedColumnName = this.buildReferencedColumnName(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncReferencedColumnName(this.buildReferencedColumnName(astRoot));
+	}
+
+
+	// ********** JavaSourceNamedColumnAnnotation implementation **********
+
+	@Override
+	protected String getNameElementName() {
+		return JPA.PRIMARY_KEY_JOIN_COLUMN__NAME;
+	}
+
+	@Override
+	protected String getColumnDefinitionElementName() {
+		return JPA.PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION;
+	}
+
+
+	// ********** PrimaryKeyJoinColumn implementation **********
+
+	// ***** referenced column name
+	public String getReferencedColumnName() {
+		return this.referencedColumnName;
+	}
+
+	public void setReferencedColumnName(String referencedColumnName) {
+		if (this.attributeValueHasChanged(this.referencedColumnName, referencedColumnName)) {
+			this.referencedColumnName = referencedColumnName;
+			this.referencedColumnNameAdapter.setValue(referencedColumnName);
+		}
+	}
+
+	private void syncReferencedColumnName(String astReferencedColumnName) {
+		String old = this.referencedColumnName;
+		this.referencedColumnName = astReferencedColumnName;
+		this.firePropertyChanged(REFERENCED_COLUMN_NAME_PROPERTY, old, astReferencedColumnName);
+	}
+
+	private String buildReferencedColumnName(CompilationUnit astRoot) {
+		return this.referencedColumnNameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.referencedColumnNameDeclarationAdapter, astRoot);
+	}
+
+	public boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.referencedColumnNameDeclarationAdapter, pos, astRoot);
+	}
+
+
+	 // ********** NestableAnnotation implementation **********
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		PrimaryKeyJoinColumnAnnotation oldJoinColumn = (PrimaryKeyJoinColumnAnnotation) oldAnnotation;
+		this.setReferencedColumnName(oldJoinColumn.getReferencedColumnName());
+	}
+
+	public void moveAnnotation(int newIndex) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
+	}
+
+	protected IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+
+
+	// ********** static methods **********
+
+	public static SourcePrimaryKeyJoinColumnAnnotation createPrimaryKeyJoinColumn(JavaResourceNode parent, Member member) {
+		return new SourcePrimaryKeyJoinColumnAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	static SourcePrimaryKeyJoinColumnAnnotation createNestedPrimaryKeyJoinColumn(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter pkJoinColumnsAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, pkJoinColumnsAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+		return new SourcePrimaryKeyJoinColumnAnnotation(parent, member, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter pkJoinColumnsAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(pkJoinColumnsAdapter, index, JPA.PRIMARY_KEY_JOIN_COLUMN);
+	}
+
+	static NestablePrimaryKeyJoinColumnAnnotation createSecondaryTablePrimaryKeyJoinColumn(DeclarationAnnotationAdapter secondaryTableAdapter, JavaResourceNode parent, Member member, int index) {
+		return new SourcePrimaryKeyJoinColumnAnnotation(parent, member, buildSecondaryTableAnnotationAdapter(secondaryTableAdapter, index));
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildSecondaryTableAnnotationAdapter(DeclarationAnnotationAdapter secondaryTableAdapter, int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(secondaryTableAdapter, JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS, index, JPA.PRIMARY_KEY_JOIN_COLUMN);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java
new file mode 100644
index 0000000..e687955
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestablePrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.PrimaryKeyJoinColumns
+ */
+public final class SourcePrimaryKeyJoinColumnsAnnotation
+	extends SourceAnnotation<Member>
+	implements PrimaryKeyJoinColumnsAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestablePrimaryKeyJoinColumnAnnotation> pkJoinColumns = new Vector<NestablePrimaryKeyJoinColumnAnnotation>();
+
+
+	public SourcePrimaryKeyJoinColumnsAnnotation(JavaResourceNode parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.pkJoinColumns);
+	}
+
+
+	// ********** AnnotationContainer Implementation **********
+
+	public String getElementName() {
+		return JPA.PRIMARY_KEY_JOIN_COLUMNS__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestablePrimaryKeyJoinColumnAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestablePrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.pkJoinColumns.size();
+	}
+
+	public NestablePrimaryKeyJoinColumnAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.pkJoinColumns.size());
+	}
+
+	private NestablePrimaryKeyJoinColumnAnnotation addNestedAnnotation(int index) {
+		NestablePrimaryKeyJoinColumnAnnotation pkJoinColumn = this.buildPrimaryKeyJoinColumn(index);
+		this.pkJoinColumns.add(pkJoinColumn);
+		return pkJoinColumn;
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.pkJoinColumns.size();
+		NestablePrimaryKeyJoinColumnAnnotation pkJoinColumn = this.addNestedAnnotation(index);
+		pkJoinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(PK_JOIN_COLUMNS_LIST, index, pkJoinColumn);
+	}
+
+	private NestablePrimaryKeyJoinColumnAnnotation buildPrimaryKeyJoinColumn(int index) {
+		return SourcePrimaryKeyJoinColumnAnnotation.createNestedPrimaryKeyJoinColumn(this, this.member, index, this.daa);
+	}
+
+	public NestablePrimaryKeyJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.pkJoinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestablePrimaryKeyJoinColumnAnnotation removeNestedAnnotation(int index) {
+		return this.pkJoinColumns.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.pkJoinColumns, PK_JOIN_COLUMNS_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java
new file mode 100644
index 0000000..4b5718b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableQueryHintAnnotation;
+import org.eclipse.jpt.core.resource.java.QueryHintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.QueryHint
+ */
+public final class SourceQueryHintAnnotation
+	extends SourceAnnotation<Type>
+	implements NestableQueryHintAnnotation
+{
+	private final DeclarationAnnotationElementAdapter<String> nameDeclarationAdapter;
+	private final AnnotationElementAdapter<String> nameAdapter;
+	private String name;
+
+	private final DeclarationAnnotationElementAdapter<String> valueDeclarationAdapter;
+	private final AnnotationElementAdapter<String> valueAdapter;
+	private String value;
+
+
+	public SourceQueryHintAnnotation(JavaResourceNode parent, Type type, IndexedDeclarationAnnotationAdapter idaa) {
+		super(parent, type, idaa, new MemberIndexedAnnotationAdapter(type, idaa));
+		this.nameDeclarationAdapter = this.buildNameAdapter(idaa);
+		this.nameAdapter = this.buildAdapter(this.nameDeclarationAdapter);
+		this.valueDeclarationAdapter = this.buildValueAdapter(idaa);
+		this.valueAdapter = this.buildAdapter(this.valueDeclarationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	private AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	private DeclarationAnnotationElementAdapter<String> buildNameAdapter(DeclarationAnnotationAdapter adapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(adapter, JPA.QUERY_HINT__NAME);
+	}
+
+	private DeclarationAnnotationElementAdapter<String> buildValueAdapter(DeclarationAnnotationAdapter adapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(adapter, JPA.QUERY_HINT__VALUE);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.name = this.buildName(astRoot);
+		this.value = this.buildValue(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncName(this.buildName(astRoot));
+		this.syncValue(this.buildValue(astRoot));
+	}
+
+	public IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.name);
+	}
+
+
+	// ********** QueryHintAnnotation implementation **********
+
+	// ***** name
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		if (this.attributeValueHasChanged(this.name, name)) {
+			this.name = name;
+			this.nameAdapter.setValue(name);
+		}
+	}
+
+	private void syncName(String astName) {
+		String old = this.name;
+		this.name = astName;
+		this.firePropertyChanged(NAME_PROPERTY, old, astName);
+	}
+
+	private String buildName(CompilationUnit astRoot) {
+		return this.nameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.nameDeclarationAdapter, astRoot);
+	}
+
+	// ***** value
+	public String getValue() {
+		return this.value;
+	}
+
+	public void setValue(String value) {
+		if (this.attributeValueHasChanged(this.value, value)) {
+			this.value = value;
+			this.valueAdapter.setValue(value);
+		}
+	}
+
+	private void syncValue(String astValue) {
+		String old = this.value;
+		this.value = astValue;
+		this.firePropertyChanged(VALUE_PROPERTY, old, astValue);
+	}
+
+	private String buildValue(CompilationUnit astRoot) {
+		return this.valueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.valueDeclarationAdapter, astRoot);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		QueryHintAnnotation oldHint = (QueryHintAnnotation) oldAnnotation;
+		this.setName(oldHint.getName());
+		this.setValue(oldHint.getValue());
+	}
+
+	public void moveAnnotation(int newIndex) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
+	}
+
+
+	// ********** static methods **********
+
+	static SourceQueryHintAnnotation createNamedQueryQueryHint(JavaResourceNode parent, Type type,  DeclarationAnnotationAdapter namedQueryAdapter, int index) {
+		return new SourceQueryHintAnnotation(parent, type, buildNamedQueryQueryHintAnnotationAdapter(namedQueryAdapter, index));
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNamedQueryQueryHintAnnotationAdapter(DeclarationAnnotationAdapter namedQueryAdapter, int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(namedQueryAdapter, JPA.NAMED_QUERY__HINTS, index, JPA.QUERY_HINT);
+	}
+
+	static SourceQueryHintAnnotation createNamedNativeQueryQueryHint(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter namedNativeQueryAdapter, int index) {
+		return new SourceQueryHintAnnotation(parent, type, buildNamedNativeQueryQueryHintAnnotationAdapter(namedNativeQueryAdapter, index));
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNamedNativeQueryQueryHintAnnotationAdapter(DeclarationAnnotationAdapter namedNativeQueryAdapter, int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(namedNativeQueryAdapter, JPA.NAMED_NATIVE_QUERY__HINTS, index, JPA.QUERY_HINT);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
new file mode 100644
index 0000000..7877b36
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
@@ -0,0 +1,336 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumArrayDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+import org.eclipse.jpt.core.resource.java.CascadeType;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+/**
+ * javax.persistence.ManyToMany
+ * javax.persistence.ManyToOne
+ * javax.persistence.OneToMany
+ * javax.persistence.OneToOne
+ */
+abstract class SourceRelationshipMappingAnnotation
+	extends SourceAnnotation<Attribute>
+	implements RelationshipMapping2_0Annotation
+{
+	final DeclarationAnnotationElementAdapter<String> targetEntityDeclarationAdapter;
+	final AnnotationElementAdapter<String> targetEntityAdapter;
+	String targetEntity;
+
+	String fullyQualifiedTargetEntityClassName;
+
+	final DeclarationAnnotationElementAdapter<String> fetchDeclarationAdapter;
+	final AnnotationElementAdapter<String> fetchAdapter;
+	FetchType fetch;
+
+	final DeclarationAnnotationElementAdapter<String[]> cascadeDeclarationAdapter;
+	final AnnotationElementAdapter<String[]> cascadeAdapter;
+	CascadeType[] cascadeTypes = EMPTY_CASCADE_TYPE_ARRAY;  // this should never be null
+	private static final CascadeType[] EMPTY_CASCADE_TYPE_ARRAY = new CascadeType[0];
+
+
+	SourceRelationshipMappingAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
+		super(parent, attribute, daa);
+		this.targetEntityDeclarationAdapter = this.getTargetEntityAdapter();
+		this.targetEntityAdapter = this.buildAnnotationElementAdapter(this.targetEntityDeclarationAdapter);
+		this.fetchDeclarationAdapter = this.getFetchAdapter();
+		this.fetchAdapter = this.buildAnnotationElementAdapter(this.fetchDeclarationAdapter);
+		this.cascadeDeclarationAdapter = this.getCascadeAdapter();
+		this.cascadeAdapter = new MemberAnnotationElementAdapter<String[]>(attribute, this.cascadeDeclarationAdapter);
+	}
+
+	protected AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+		return new MemberAnnotationElementAdapter<String>(this.member, daea);
+	}
+
+	protected AnnotationElementAdapter<Boolean> buildBooleanAnnotationElementAdapter(DeclarationAnnotationElementAdapter<Boolean> daea) {
+		return new MemberAnnotationElementAdapter<Boolean>(this.member, daea);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.targetEntity = this.buildTargetEntity(astRoot);
+		this.fullyQualifiedTargetEntityClassName = this.buildFullyQualifiedTargetEntityClassName(astRoot);
+		this.fetch = this.buildFetch(astRoot);
+		this.cascadeTypes = this.buildCascadeTypes(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncFetch(this.buildFetch(astRoot));
+		this.syncTargetEntity(this.buildTargetEntity(astRoot));
+		this.syncFullyQualifiedTargetEntityClassName(this.buildFullyQualifiedTargetEntityClassName(astRoot));
+		this.syncCascadeTypes(this.buildCascadeTypes(astRoot));
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.targetEntity);
+	}
+
+
+	// ********** RelationshipMappingAnnotation implementation **********
+
+	// ***** target entity
+	public String getTargetEntity() {
+		return this.targetEntity;
+	}
+
+	public void setTargetEntity(String targetEntity) {
+		if (this.attributeValueHasChanged(this.targetEntity, targetEntity)) {
+			this.targetEntity = targetEntity;
+			this.targetEntityAdapter.setValue(targetEntity);
+		}
+	}
+
+	private void syncTargetEntity(String astTargetEntity) {
+		String old = this.targetEntity;
+		this.targetEntity = astTargetEntity;
+		this.firePropertyChanged(TARGET_ENTITY_PROPERTY, old, astTargetEntity);
+	}
+
+	private String buildTargetEntity(CompilationUnit astRoot) {
+		return this.targetEntityAdapter.getValue(astRoot);
+	}
+
+	public TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.targetEntityDeclarationAdapter, astRoot);
+	}
+
+	/**
+	 * return the Java adapter's 'targetEntity' element adapter config
+	 */
+	abstract DeclarationAnnotationElementAdapter<String> getTargetEntityAdapter();
+
+	// ***** fully-qualified target entity class name
+	public String getFullyQualifiedTargetEntityClassName() {
+		return this.fullyQualifiedTargetEntityClassName;
+	}
+
+	private void syncFullyQualifiedTargetEntityClassName(String name) {
+		String old = this.fullyQualifiedTargetEntityClassName;
+		this.fullyQualifiedTargetEntityClassName = name;
+		this.firePropertyChanged(FULLY_QUALIFIED_TARGET_ENTITY_CLASS_NAME_PROPERTY, old, name);
+	}
+
+	private String buildFullyQualifiedTargetEntityClassName(CompilationUnit astRoot) {
+		return (this.targetEntity == null) ? null : ASTTools.resolveFullyQualifiedName(this.targetEntityAdapter.getExpression(astRoot));
+	}
+
+	// ***** fetch
+	public FetchType getFetch() {
+		return this.fetch;
+	}
+
+	public void setFetch(FetchType fetch) {
+		if (this.attributeValueHasChanged(this.fetch, fetch)) {
+			this.fetch = fetch;
+			this.fetchAdapter.setValue(FetchType.toJavaAnnotationValue(fetch));
+		}
+	}
+
+	private void syncFetch(FetchType astFetch) {
+		FetchType old = this.fetch;
+		this.fetch = astFetch;
+		this.firePropertyChanged(FETCH_PROPERTY, old, astFetch);
+	}
+
+	private FetchType buildFetch(CompilationUnit astRoot) {
+		return FetchType.fromJavaAnnotationValue(this.fetchAdapter.getValue(astRoot));
+	}
+
+	public TextRange getFetchTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(this.fetchDeclarationAdapter, astRoot);
+	}
+
+	/**
+	 * return the Java adapter's 'fetch' element adapter config
+	 */
+	abstract DeclarationAnnotationElementAdapter<String> getFetchAdapter();
+
+	// ***** cascade types
+	/**
+	 * pre-condition: state of 'cascadeTypes' is to change
+	 */
+	private void setCascadeType(CascadeType cascadeType, boolean set) {
+		this.setCascadeTypes(set ?
+			ArrayTools.add(this.cascadeTypes, cascadeType) :
+			ArrayTools.remove(this.cascadeTypes, cascadeType)
+		);
+	}
+
+	/**
+	 * pre-condition: state of 'cascadeTypes' is to change
+	 */
+	private void setCascadeTypes(CascadeType[] cascadeTypes) {
+		this.cascadeTypes = cascadeTypes;
+		this.cascadeAdapter.setValue(CascadeType.toJavaAnnotationValues(cascadeTypes));
+	}
+
+	private void syncCascadeTypes(CascadeType[] astCascadeTypes) {
+		CascadeType[] old = this.cascadeTypes;
+		this.cascadeTypes = astCascadeTypes;
+		this.syncCascadeAll(old);
+		this.syncCascadeMerge(old);
+		this.syncCascadePersist(old);
+		this.syncCascadeRefresh(old);
+		this.syncCascadeRemove(old);
+		this.syncCascadeDetach(old);
+	}
+
+	private CascadeType[] buildCascadeTypes(CompilationUnit astRoot) {
+		return CascadeType.fromJavaAnnotationValues(this.cascadeAdapter.getValue(astRoot));
+	}
+
+	private boolean cascadeTypeIsTrue(CascadeType cascadeType) {
+		return ArrayTools.contains(this.cascadeTypes, cascadeType);
+	}
+
+	public TextRange getCascadeTextRange(CompilationUnit astRoot) {
+		return getElementTextRange(this.cascadeDeclarationAdapter, astRoot);
+	}
+
+	/**
+	 * return the Java adapter's 'cascade' element adapter config
+	 */
+	abstract DeclarationAnnotationElementAdapter<String[]> getCascadeAdapter();
+
+	// ***** cascade all
+	public boolean isCascadeAll() {
+		return this.cascadeTypeIsTrue(CascadeType.ALL);
+	}
+
+	public void setCascadeAll(boolean cascadeAll) {
+		if (this.isCascadeAll() != cascadeAll) {
+			this.setCascadeType(CascadeType.ALL, cascadeAll);
+		}
+	}
+
+	private void syncCascadeAll(CascadeType[] oldCascadeTypes) {
+		boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.ALL);
+		this.firePropertyChanged(CASCADE_ALL_PROPERTY, old, this.isCascadeAll());
+	}
+
+	// ***** cascade persist
+	public boolean isCascadePersist() {
+		return this.cascadeTypeIsTrue(CascadeType.PERSIST);
+	}
+
+	public void setCascadePersist(boolean cascadePersist) {
+		if (this.isCascadePersist() != cascadePersist) {
+			this.setCascadeType(CascadeType.PERSIST, cascadePersist);
+		}
+	}
+
+	private void syncCascadePersist(CascadeType[] oldCascadeTypes) {
+		boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.PERSIST);
+		this.firePropertyChanged(CASCADE_PERSIST_PROPERTY, old, this.isCascadePersist());
+	}
+
+	// ***** cascade merge
+	public boolean isCascadeMerge() {
+		return this.cascadeTypeIsTrue(CascadeType.MERGE);
+	}
+
+	public void setCascadeMerge(boolean cascadeMerge) {
+		if (this.isCascadeMerge() != cascadeMerge) {
+			this.setCascadeType(CascadeType.MERGE, cascadeMerge);
+		}
+	}
+
+	private void syncCascadeMerge(CascadeType[] oldCascadeTypes) {
+		boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.MERGE);
+		this.firePropertyChanged(CASCADE_MERGE_PROPERTY, old, this.isCascadeMerge());
+	}
+
+	// ***** cascade remove
+	public boolean isCascadeRemove() {
+		return this.cascadeTypeIsTrue(CascadeType.REMOVE);
+	}
+
+	public void setCascadeRemove(boolean cascadeRemove) {
+		if (this.isCascadeRemove() != cascadeRemove) {
+			this.setCascadeType(CascadeType.REMOVE, cascadeRemove);
+		}
+	}
+
+	private void syncCascadeRemove(CascadeType[] oldCascadeTypes) {
+		boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.REMOVE);
+		this.firePropertyChanged(CASCADE_REMOVE_PROPERTY, old, this.isCascadeRemove());
+	}
+
+	// ***** cascade refresh
+	public boolean isCascadeRefresh() {
+		return this.cascadeTypeIsTrue(CascadeType.REFRESH);
+	}
+
+	public void setCascadeRefresh(boolean cascadeRefresh) {
+		if (this.isCascadeRefresh() != cascadeRefresh) {
+			this.setCascadeType(CascadeType.REFRESH, cascadeRefresh);
+		}
+	}
+
+	private void syncCascadeRefresh(CascadeType[] oldCascadeTypes) {
+		boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.REFRESH);
+		this.firePropertyChanged(CASCADE_REFRESH_PROPERTY, old, this.isCascadeRefresh());
+	}
+
+	// ***** cascade detach - JPA 2.0
+	public boolean isCascadeDetach() {
+		return this.cascadeTypeIsTrue(CascadeType.DETACH);
+	}
+
+	public void setCascadeDetach(boolean cascadeDetach) {
+		if (this.isCascadeDetach() != cascadeDetach) {
+			this.setCascadeType(CascadeType.DETACH, cascadeDetach);
+		}
+	}
+
+	private void syncCascadeDetach(CascadeType[] oldCascadeTypes) {
+		boolean old = ArrayTools.contains(oldCascadeTypes, CascadeType.DETACH);
+		this.firePropertyChanged(CASCADE_DETACH_PROPERTY, old, this.isCascadeDetach());
+	}
+
+	// ********** static methods **********
+
+	static DeclarationAnnotationElementAdapter<String> buildTargetEntityAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		// TODO what about QualifiedType?
+		return buildAnnotationElementAdapter(annotationAdapter, elementName, SimpleTypeStringExpressionConverter.instance());
+	}
+
+	static DeclarationAnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String> converter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, false, converter);
+	}
+
+	static DeclarationAnnotationElementAdapter<String> buildFetchAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new EnumDeclarationAnnotationElementAdapter(annotationAdapter, elementName, false);
+	}
+
+	static DeclarationAnnotationElementAdapter<String[]> buildEnumArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new EnumArrayDeclarationAnnotationElementAdapter(annotationAdapter, elementName, false);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
new file mode 100644
index 0000000..b7cf02e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
@@ -0,0 +1,265 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestablePrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableSecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.SecondaryTable
+ */
+public final class SourceSecondaryTableAnnotation
+	extends SourceBaseTableAnnotation
+	implements NestableSecondaryTableAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(SecondaryTableAnnotation.ANNOTATION_NAME);
+
+	private final Vector<NestablePrimaryKeyJoinColumnAnnotation> pkJoinColumns = new Vector<NestablePrimaryKeyJoinColumnAnnotation>();
+	private final PkJoinColumnsAnnotationContainer pkJoinColumnsContainer = new PkJoinColumnsAnnotationContainer();
+
+
+	public SourceSecondaryTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+		super(parent, member, daa, annotationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		AnnotationContainerTools.initialize(this.pkJoinColumnsContainer, astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		AnnotationContainerTools.synchronize(this.pkJoinColumnsContainer, astRoot);
+	}
+
+
+	// ********** SourceBaseTableAnnotation implementation **********
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getNameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(declarationAnnotationAdapter, JPA.SECONDARY_TABLE__NAME);
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getSchemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(declarationAnnotationAdapter, JPA.SECONDARY_TABLE__SCHEMA);
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getCatalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		return ConversionDeclarationAnnotationElementAdapter.forStrings(declarationAnnotationAdapter, JPA.SECONDARY_TABLE__CATALOG);
+	}
+
+	@Override
+	protected String getUniqueConstraintsElementName() {
+		return JPA.SECONDARY_TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+
+	// ************* SecondaryTableAnnotation implementation *******************
+
+	// ***** pk join columns
+	public ListIterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns() {
+		return new CloneListIterator<PrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns);
+	}
+
+	Iterable<NestablePrimaryKeyJoinColumnAnnotation> getNestablePkJoinColumns() {
+		return new LiveCloneIterable<NestablePrimaryKeyJoinColumnAnnotation>(this.pkJoinColumns);
+	}
+
+	public int pkJoinColumnsSize() {
+		return this.pkJoinColumns.size();
+	}
+
+	public NestablePrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index) {
+		return this.pkJoinColumns.get(index);
+	}
+
+	public int indexOfPkJoinColumn(PrimaryKeyJoinColumnAnnotation joinColumn) {
+		return this.pkJoinColumns.indexOf(joinColumn);
+	}
+
+	public NestablePrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index) {
+		return (NestablePrimaryKeyJoinColumnAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.pkJoinColumnsContainer);
+	}
+
+	NestablePrimaryKeyJoinColumnAnnotation addPkJoinColumn_() {
+		return this.addPkJoinColumn_(this.pkJoinColumns.size());
+	}
+
+	private NestablePrimaryKeyJoinColumnAnnotation addPkJoinColumn_(int index) {
+		NestablePrimaryKeyJoinColumnAnnotation pkJoinColumn = this.buildPrimaryKeyJoinColumn(index);
+		this.pkJoinColumns.add(pkJoinColumn);
+		return pkJoinColumn;
+	}
+
+	void syncAddPkJoinColumn(Annotation astAnnotation) {
+		int index = this.pkJoinColumns.size();
+		NestablePrimaryKeyJoinColumnAnnotation pkJoinColumn = this.addPkJoinColumn_(index);
+		pkJoinColumn.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(PK_JOIN_COLUMNS_LIST, index, pkJoinColumn);
+	}
+
+	private NestablePrimaryKeyJoinColumnAnnotation buildPrimaryKeyJoinColumn(int index) {
+		return SourcePrimaryKeyJoinColumnAnnotation.createSecondaryTablePrimaryKeyJoinColumn(this.daa, this, this.member, index);
+	}
+
+	void pkJoinColumnAdded(int index, NestablePrimaryKeyJoinColumnAnnotation joinColumn) {
+		this.fireItemAdded(PK_JOIN_COLUMNS_LIST, index, joinColumn);
+	}
+
+	public void movePkJoinColumn(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.pkJoinColumnsContainer);
+	}
+
+	NestablePrimaryKeyJoinColumnAnnotation movePkJoinColumn_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.pkJoinColumns, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removePkJoinColumn(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.pkJoinColumnsContainer);
+	}
+
+	NestablePrimaryKeyJoinColumnAnnotation removePkJoinColumn_(int index) {
+		return this.pkJoinColumns.remove(index);
+	}
+
+	void syncRemovePkJoinColumns(int index) {
+		this.removeItemsFromList(index, this.pkJoinColumns, PK_JOIN_COLUMNS_LIST);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	public void moveAnnotation(int newIndex) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
+	}
+
+	protected IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+
+	@Override
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		super.initializeFrom(oldAnnotation);
+		SecondaryTableAnnotation oldTable = (SecondaryTableAnnotation) oldAnnotation;
+		for (PrimaryKeyJoinColumnAnnotation oldPkJoinColumn : CollectionTools.iterable(oldTable.pkJoinColumns())) {
+			NestablePrimaryKeyJoinColumnAnnotation newPkJoinColumn = this.addPkJoinColumn(oldTable.indexOfPkJoinColumn(oldPkJoinColumn));
+			newPkJoinColumn.initializeFrom((NestableAnnotation) oldPkJoinColumn);
+		}
+	}
+
+
+	// ********** static methods **********
+
+	public static SourceSecondaryTableAnnotation createSecondaryTable(JavaResourceNode parent, Member member) {
+		return new SourceSecondaryTableAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+	}
+
+	static SourceSecondaryTableAnnotation createNestedSecondaryTable(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter secondaryTablesAdapter) {
+		IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, secondaryTablesAdapter);
+		IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+		return new SourceSecondaryTableAnnotation(parent, member, idaa, annotationAdapter);
+	}
+
+	private static IndexedDeclarationAnnotationAdapter buildNestedDeclarationAnnotationAdapter(int index, DeclarationAnnotationAdapter secondaryTablesAdapter) {
+		return new NestedIndexedDeclarationAnnotationAdapter(secondaryTablesAdapter, index, JPA.SECONDARY_TABLE);
+	}
+
+
+	// ********** pk join column container **********
+
+	/**
+	 * adapt the AnnotationContainer interface to the secondary table's
+	 * primary key join columns
+	 */
+	class PkJoinColumnsAnnotationContainer
+		implements AnnotationContainer<NestablePrimaryKeyJoinColumnAnnotation> 
+	{
+		public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceSecondaryTableAnnotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getElementName() {
+			return JPA.SECONDARY_TABLE__PK_JOIN_COLUMNS;
+		}
+
+		public String getNestedAnnotationName() {
+			return PrimaryKeyJoinColumnAnnotation.ANNOTATION_NAME;
+		}
+
+		public Iterable<NestablePrimaryKeyJoinColumnAnnotation> getNestedAnnotations() {
+			return SourceSecondaryTableAnnotation.this.getNestablePkJoinColumns();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceSecondaryTableAnnotation.this.pkJoinColumnsSize();
+		}
+
+		public NestablePrimaryKeyJoinColumnAnnotation addNestedAnnotation() {
+			return SourceSecondaryTableAnnotation.this.addPkJoinColumn_();
+		}
+
+		public void syncAddNestedAnnotation(Annotation astAnnotation) {
+			SourceSecondaryTableAnnotation.this.syncAddPkJoinColumn(astAnnotation);
+		}
+
+		public NestablePrimaryKeyJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceSecondaryTableAnnotation.this.movePkJoinColumn_(targetIndex, sourceIndex);
+		}
+
+		public NestablePrimaryKeyJoinColumnAnnotation removeNestedAnnotation(int index) {
+			return SourceSecondaryTableAnnotation.this.removePkJoinColumn_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceSecondaryTableAnnotation.this.syncRemovePkJoinColumns(index);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java
new file mode 100644
index 0000000..4729ee7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.NestableSecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+import org.eclipse.jpt.core.resource.java.SecondaryTablesAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+
+/**
+ * javax.persistence.SecondaryTables
+ */
+public final class SourceSecondaryTablesAnnotation
+	extends SourceAnnotation<Member>
+	implements SecondaryTablesAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final Vector<NestableSecondaryTableAnnotation> secondaryTables = new Vector<NestableSecondaryTableAnnotation>();
+
+
+	public SourceSecondaryTablesAnnotation(JavaResourcePersistentType parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		AnnotationContainerTools.initialize(this, astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		AnnotationContainerTools.synchronize(this, astRoot);
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.secondaryTables);
+	}
+
+
+	// ********** AnnotationContainer implementation **********
+
+	public String getElementName() {
+		return JPA.SECONDARY_TABLES__VALUE;
+	}
+
+	public String getNestedAnnotationName() {
+		return SecondaryTableAnnotation.ANNOTATION_NAME;
+	}
+
+	public Iterable<NestableSecondaryTableAnnotation> getNestedAnnotations() {
+		return new LiveCloneIterable<NestableSecondaryTableAnnotation>(this.secondaryTables);
+	}
+
+	public int getNestedAnnotationsSize() {
+		return this.secondaryTables.size();
+	}
+
+	public NestableSecondaryTableAnnotation addNestedAnnotation() {
+		return this.addNestedAnnotation(this.secondaryTables.size());
+	}
+
+	private NestableSecondaryTableAnnotation addNestedAnnotation(int index) {
+		NestableSecondaryTableAnnotation secondaryTable = this.buildSecondaryTable(index);
+		this.secondaryTables.add(secondaryTable);
+		return secondaryTable;
+	}
+
+	public void syncAddNestedAnnotation(Annotation astAnnotation) {
+		int index = this.secondaryTables.size();
+		NestableSecondaryTableAnnotation secondaryTable = this.addNestedAnnotation(index);
+		secondaryTable.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(SECONDARY_TABLES_LIST, index, secondaryTable);
+	}
+
+	private NestableSecondaryTableAnnotation buildSecondaryTable(int index) {
+		return SourceSecondaryTableAnnotation.createNestedSecondaryTable(this, this.member, index, this.daa);
+	}
+
+	public NestableSecondaryTableAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.secondaryTables, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public NestableSecondaryTableAnnotation removeNestedAnnotation(int index) {
+		return this.secondaryTables.remove(index);
+	}
+
+	public void syncRemoveNestedAnnotations(int index) {
+		this.removeItemsFromList(index, this.secondaryTables, SECONDARY_TABLES_LIST);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java
new file mode 100644
index 0000000..b1894b7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSequenceGeneratorAnnotation.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * javax.persistence.SequenceGenerator
+ */
+public abstract class SourceSequenceGeneratorAnnotation
+	extends SourceGeneratorAnnotation
+	implements SequenceGeneratorAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildAdapter(JPA.SEQUENCE_GENERATOR__NAME);
+
+	private static final DeclarationAnnotationElementAdapter<Integer> INITIAL_VALUE_ADAPTER = buildIntegerAdapter(JPA.SEQUENCE_GENERATOR__INITIAL_VALUE);
+
+	private static final DeclarationAnnotationElementAdapter<Integer> ALLOCATION_SIZE_ADAPTER = buildIntegerAdapter(JPA.SEQUENCE_GENERATOR__ALLOCATION_SIZE);
+
+	private static final DeclarationAnnotationElementAdapter<String> SEQUENCE_NAME_ADAPTER = buildAdapter(JPA.SEQUENCE_GENERATOR__SEQUENCE_NAME);
+	private final AnnotationElementAdapter<String> sequenceNameAdapter;
+	private String sequenceName;
+
+
+	protected SourceSequenceGeneratorAnnotation(JavaResourceNode parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+		this.sequenceNameAdapter = this.buildAdapter(SEQUENCE_NAME_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.sequenceName = this.buildSequenceName(astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncSequenceName(this.buildSequenceName(astRoot));
+	}
+
+
+	// ********** AbstractGeneratorAnnotation implementation **********
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getNameAdapter() {
+		return NAME_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<Integer> getInitialValueAdapter() {
+		return INITIAL_VALUE_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<Integer> getAllocationSizeAdapter() {
+		return ALLOCATION_SIZE_ADAPTER;
+	}
+
+
+	// ********** SequenceGeneratorAnnotation implementation **********
+
+	// ***** sequence name
+	public String getSequenceName() {
+		return this.sequenceName;
+	}
+
+	public void setSequenceName(String sequenceName) {
+		if (this.attributeValueHasChanged(this.sequenceName, sequenceName)) {
+			this.sequenceName = sequenceName;
+			this.sequenceNameAdapter.setValue(sequenceName);
+		}
+	}
+
+	public void syncSequenceName(String astSequenceName) {
+		String old = this.sequenceName;
+		this.sequenceName = astSequenceName;
+		this.firePropertyChanged(SEQUENCE_NAME_PROPERTY, old, astSequenceName);
+	}
+
+	private String buildSequenceName(CompilationUnit astRoot) {
+		return this.sequenceNameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getSequenceNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(SEQUENCE_NAME_ADAPTER, astRoot);
+	}
+
+	public boolean sequenceNameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(SEQUENCE_NAME_ADAPTER, pos, astRoot);
+	}
+
+
+	// ********** static methods **********
+
+	protected static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
+		return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
+	}
+
+	protected static DeclarationAnnotationElementAdapter<Integer> buildIntegerAdapter(String elementName) {
+		return buildIntegerAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableAnnotation.java
new file mode 100644
index 0000000..a7719dc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableAnnotation.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+import org.eclipse.jpt.core.resource.java.TableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+
+/**
+ * javax.persistence.Table
+ */
+public final class SourceTableAnnotation
+	extends SourceBaseTableAnnotation
+	implements TableAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__SCHEMA);
+
+	private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = ConversionDeclarationAnnotationElementAdapter.forStrings(DECLARATION_ANNOTATION_ADAPTER, JPA.TABLE__CATALOG);
+
+
+	public SourceTableAnnotation(JavaResourcePersistentType parent, Type type) {
+		super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+
+	// ********** SourceBaseTableAnnotation implementation **********
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getNameAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		// ignore the daa passed in, @Table is never nested
+		return NAME_ADAPTER;
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getSchemaAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		// ignore the daa passed in, @Table is never nested
+		return SCHEMA_ADAPTER;
+	}
+
+	@Override
+	protected DeclarationAnnotationElementAdapter<String> getCatalogAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
+		// ignore the daa passed in, @Table is never nested
+		return CATALOG_ADAPTER;
+	}
+
+	@Override
+	protected String getUniqueConstraintsElementName() {
+		return JPA.TABLE__UNIQUE_CONSTRAINTS;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
new file mode 100644
index 0000000..fe519de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
@@ -0,0 +1,459 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.AnnotationContainer;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableUniqueConstraintAnnotation;
+import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.TableGenerator
+ */
+public final class SourceTableGeneratorAnnotation
+	extends SourceGeneratorAnnotation
+	implements TableGeneratorAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__NAME);
+
+	private static final DeclarationAnnotationElementAdapter<Integer> INITIAL_VALUE_ADAPTER = buildIntegerAdapter(JPA.TABLE_GENERATOR__INITIAL_VALUE);
+
+	private static final DeclarationAnnotationElementAdapter<Integer> ALLOCATION_SIZE_ADAPTER = buildIntegerAdapter(JPA.TABLE_GENERATOR__ALLOCATION_SIZE);
+
+	private static final DeclarationAnnotationElementAdapter<String> TABLE_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__TABLE);
+	private final AnnotationElementAdapter<String> tableAdapter;
+	private String table;
+
+	private static final DeclarationAnnotationElementAdapter<String> SCHEMA_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__SCHEMA);
+	private final AnnotationElementAdapter<String> schemaAdapter;
+	private String schema;
+
+	private static final DeclarationAnnotationElementAdapter<String> CATALOG_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__CATALOG);
+	private final AnnotationElementAdapter<String> catalogAdapter;
+	private String catalog;
+
+	private static final DeclarationAnnotationElementAdapter<String> PK_COLUMN_NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__PK_COLUMN_NAME);
+	private final AnnotationElementAdapter<String> pkColumnNameAdapter;
+	private String pkColumnName;
+
+	private static final DeclarationAnnotationElementAdapter<String> VALUE_COLUMN_NAME_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__VALUE_COLUMN_NAME);
+	private final AnnotationElementAdapter<String> valueColumnNameAdapter;
+	private String valueColumnName;
+
+	private static final DeclarationAnnotationElementAdapter<String> PK_COLUMN_VALUE_ADAPTER = buildAdapter(JPA.TABLE_GENERATOR__PK_COLUMN_VALUE);
+	private final AnnotationElementAdapter<String> pkColumnValueAdapter;
+	private String pkColumnValue;
+
+	private final Vector<NestableUniqueConstraintAnnotation> uniqueConstraints = new Vector<NestableUniqueConstraintAnnotation>();
+	private final UniqueConstraintsAnnotationContainer uniqueConstraintsContainer = new UniqueConstraintsAnnotationContainer();
+
+
+	public SourceTableGeneratorAnnotation(JavaResourceNode parent, Member member) {
+		super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+		this.tableAdapter = this.buildAdapter(TABLE_ADAPTER);
+		this.catalogAdapter = this.buildAdapter(CATALOG_ADAPTER);
+		this.schemaAdapter = this.buildAdapter(SCHEMA_ADAPTER);
+		this.pkColumnNameAdapter = this.buildAdapter(PK_COLUMN_NAME_ADAPTER);
+		this.valueColumnNameAdapter = this.buildAdapter(VALUE_COLUMN_NAME_ADAPTER);
+		this.pkColumnValueAdapter = this.buildAdapter(PK_COLUMN_VALUE_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	public void initialize(CompilationUnit astRoot) {
+		super.initialize(astRoot);
+		this.table = this.buildTable(astRoot);
+		this.schema = this.buildSchema(astRoot);
+		this.catalog = this.buildCatalog(astRoot);
+		this.pkColumnName = this.buildPkColumnName(astRoot);
+		this.valueColumnName = this.buildValueColumnName(astRoot);
+		this.pkColumnValue = this.buildPkColumnValue(astRoot);
+		AnnotationContainerTools.initialize(this.uniqueConstraintsContainer, astRoot);
+	}
+
+	@Override
+	public void synchronizeWith(CompilationUnit astRoot) {
+		super.synchronizeWith(astRoot);
+		this.syncTable(this.buildTable(astRoot));
+		this.syncSchema(this.buildSchema(astRoot));
+		this.syncCatalog(this.buildCatalog(astRoot));
+		this.syncPkColumnName(this.buildPkColumnName(astRoot));
+		this.syncValueColumnName(this.buildValueColumnName(astRoot));
+		this.syncPkColumnValue(this.buildPkColumnValue(astRoot));
+		AnnotationContainerTools.synchronize(this.uniqueConstraintsContainer, astRoot);
+	}
+
+
+	// ********** AbstractGeneratorAnnotation implementation **********
+
+	@Override
+	DeclarationAnnotationElementAdapter<String> getNameAdapter() {
+		return NAME_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<Integer> getInitialValueAdapter() {
+		return INITIAL_VALUE_ADAPTER;
+	}
+
+	@Override
+	DeclarationAnnotationElementAdapter<Integer> getAllocationSizeAdapter() {
+		return ALLOCATION_SIZE_ADAPTER;
+	}
+
+
+	// ********** TableGeneratorAnnotation implementation **********
+
+	// ***** table
+	public String getTable() {
+		return this.table;
+	}
+
+	public void setTable(String table) {
+		if (this.attributeValueHasChanged(this.table, table)) {
+			this.table = table;
+			this.tableAdapter.setValue(table);
+		}
+	}
+
+	private void syncTable(String astTable) {
+		String old = this.table;
+		this.table = astTable;
+		this.firePropertyChanged(TABLE_PROPERTY, old, astTable);
+	}
+
+	private String buildTable(CompilationUnit astRoot) {
+		return this.tableAdapter.getValue(astRoot);
+	}
+
+	public TextRange getTableTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(TABLE_ADAPTER, astRoot);
+	}
+
+	public boolean tableTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(TABLE_ADAPTER, pos, astRoot);
+	}
+
+	// ***** schema
+	public String getSchema() {
+		return this.schema;
+	}
+
+	public void setSchema(String schema) {
+		if (this.attributeValueHasChanged(this.schema, schema)) {
+			this.schema = schema;
+			this.schemaAdapter.setValue(schema);
+		}
+	}
+
+	private void syncSchema(String astSchema) {
+		String old = this.schema;
+		this.schema = astSchema;
+		this.firePropertyChanged(SCHEMA_PROPERTY, old, astSchema);
+	}
+
+	private String buildSchema(CompilationUnit astRoot) {
+		return this.schemaAdapter.getValue(astRoot);
+	}
+
+	public TextRange getSchemaTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(SCHEMA_ADAPTER, astRoot);
+	}
+
+	public boolean schemaTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(SCHEMA_ADAPTER, pos, astRoot);
+	}
+
+	// ***** catalog
+	public String getCatalog() {
+		return this.catalog;
+	}
+
+	public void setCatalog(String catalog) {
+		if (this.attributeValueHasChanged(this.catalog, catalog)) {
+			this.catalog = catalog;
+			this.catalogAdapter.setValue(catalog);
+		}
+	}
+
+	private void syncCatalog(String astCatalog) {
+		String old = this.catalog;
+		this.catalog = astCatalog;
+		this.firePropertyChanged(CATALOG_PROPERTY, old, astCatalog);
+	}
+
+	private String buildCatalog(CompilationUnit astRoot) {
+		return this.catalogAdapter.getValue(astRoot);
+	}
+
+	public TextRange getCatalogTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(CATALOG_ADAPTER, astRoot);
+	}
+
+	public boolean catalogTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(CATALOG_ADAPTER, pos, astRoot);
+	}
+
+	// ***** pk column name
+	public String getPkColumnName() {
+		return this.pkColumnName;
+	}
+
+	public void setPkColumnName(String pkColumnName) {
+		if (this.attributeValueHasChanged(this.pkColumnName, pkColumnName)) {
+			this.pkColumnName = pkColumnName;
+			this.pkColumnNameAdapter.setValue(pkColumnName);
+		}
+	}
+
+	private void syncPkColumnName(String astPkColumnName) {
+		String old = this.pkColumnName;
+		this.pkColumnName = astPkColumnName;
+		this.firePropertyChanged(PK_COLUMN_NAME_PROPERTY, old, astPkColumnName);
+	}
+
+	private String buildPkColumnName(CompilationUnit astRoot) {
+		return this.pkColumnNameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getPkColumnNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(PK_COLUMN_NAME_ADAPTER, astRoot);
+	}
+
+	public boolean pkColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(PK_COLUMN_NAME_ADAPTER, pos, astRoot);
+	}
+
+	// ***** value column name
+	public String getValueColumnName() {
+		return this.valueColumnName;
+	}
+
+	public void setValueColumnName(String valueColumnName) {
+		if (this.attributeValueHasChanged(this.valueColumnName, valueColumnName)) {
+			this.valueColumnName = valueColumnName;
+			this.valueColumnNameAdapter.setValue(valueColumnName);
+		}
+	}
+
+	private void syncValueColumnName(String astValueColumnName) {
+		String old = this.valueColumnName;
+		this.valueColumnName = astValueColumnName;
+		this.firePropertyChanged(VALUE_COLUMN_NAME_PROPERTY, old, astValueColumnName);
+	}
+
+	private String buildValueColumnName(CompilationUnit astRoot) {
+		return this.valueColumnNameAdapter.getValue(astRoot);
+	}
+
+	public TextRange getValueColumnNameTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(VALUE_COLUMN_NAME_ADAPTER, astRoot);
+	}
+
+	public boolean valueColumnNameTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(VALUE_COLUMN_NAME_ADAPTER, pos, astRoot);
+	}
+
+	// ***** pk column value
+	public String getPkColumnValue() {
+		return this.pkColumnValue;
+	}
+
+	public void setPkColumnValue(String pkColumnValue) {
+		if (this.attributeValueHasChanged(this.pkColumnValue, pkColumnValue)) {
+			this.pkColumnValue = pkColumnValue;
+			this.pkColumnValueAdapter.setValue(pkColumnValue);
+		}
+	}
+
+	private void syncPkColumnValue(String astPkColumnValue) {
+		String old = this.pkColumnValue;
+		this.pkColumnValue = astPkColumnValue;
+		this.firePropertyChanged(PK_COLUMN_VALUE_PROPERTY, old, astPkColumnValue);
+	}
+
+	private String buildPkColumnValue(CompilationUnit astRoot) {
+		return this.pkColumnValueAdapter.getValue(astRoot);
+	}
+
+	public TextRange getPkColumnValueTextRange(CompilationUnit astRoot) {
+		return this.getElementTextRange(PK_COLUMN_VALUE_ADAPTER, astRoot);
+	}
+
+	public boolean pkColumnValueTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(PK_COLUMN_VALUE_ADAPTER, pos, astRoot);
+	}
+
+	// ***** unique constraints
+	public ListIterator<UniqueConstraintAnnotation> uniqueConstraints() {
+		return new CloneListIterator<UniqueConstraintAnnotation>(this.uniqueConstraints);
+	}
+
+	Iterable<NestableUniqueConstraintAnnotation> getNestableUniqueConstraints() {
+		return new LiveCloneIterable<NestableUniqueConstraintAnnotation>(this.uniqueConstraints);
+	}
+
+	public int uniqueConstraintsSize() {
+		return this.uniqueConstraints.size();
+	}
+
+	public NestableUniqueConstraintAnnotation uniqueConstraintAt(int index) {
+		return this.uniqueConstraints.get(index);
+	}
+
+	public int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint) {
+		return this.uniqueConstraints.indexOf(uniqueConstraint);
+	}
+
+	public NestableUniqueConstraintAnnotation addUniqueConstraint(int index) {
+		return (NestableUniqueConstraintAnnotation) AnnotationContainerTools.addNestedAnnotation(index, this.uniqueConstraintsContainer);
+	}
+
+	NestableUniqueConstraintAnnotation addUniqueConstraint_() {
+		return this.addUniqueConstraint_(this.uniqueConstraints.size());
+	}
+
+	private NestableUniqueConstraintAnnotation addUniqueConstraint_(int index) {
+		NestableUniqueConstraintAnnotation uniqueConstraint = this.buildUniqueConstraint(index);
+		this.uniqueConstraints.add(uniqueConstraint);
+		return uniqueConstraint;
+	}
+
+	void syncAddUniqueConstraint(Annotation astAnnotation) {
+		int index = this.uniqueConstraints.size();
+		NestableUniqueConstraintAnnotation uniqueConstraint = this.addUniqueConstraint_(index);
+		uniqueConstraint.initialize((CompilationUnit) astAnnotation.getRoot());
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, uniqueConstraint);
+	}
+
+	NestableUniqueConstraintAnnotation buildUniqueConstraint(int index) {
+		return new SourceUniqueConstraintAnnotation(this, this.member, buildUniqueConstraintAnnotationAdapter(index));
+	}
+
+	IndexedDeclarationAnnotationAdapter buildUniqueConstraintAnnotationAdapter(int index) {
+		return new NestedIndexedDeclarationAnnotationAdapter(this.daa, JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS, index, JPA.UNIQUE_CONSTRAINT);
+	}
+
+	void uniqueConstraintAdded(int index, NestableUniqueConstraintAnnotation constraint) {
+		this.fireItemAdded(UNIQUE_CONSTRAINTS_LIST, index, constraint);
+	}
+
+	public void moveUniqueConstraint(int targetIndex, int sourceIndex) {
+		AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, this.uniqueConstraintsContainer);
+	}
+
+	NestableUniqueConstraintAnnotation moveUniqueConstraint_(int targetIndex, int sourceIndex) {
+		return CollectionTools.move(this.uniqueConstraints, targetIndex, sourceIndex).get(targetIndex);
+	}
+
+	public void removeUniqueConstraint(int index) {
+		AnnotationContainerTools.removeNestedAnnotation(index, this.uniqueConstraintsContainer);
+	}
+
+	NestableUniqueConstraintAnnotation removeUniqueConstraint_(int index) {
+		return this.uniqueConstraints.remove(index);
+	}
+
+	void syncRemoveUniqueConstraints(int index) {
+		this.removeItemsFromList(index, this.uniqueConstraints, UNIQUE_CONSTRAINTS_LIST);
+	}
+
+
+	// ********** static methods **********
+
+	private static DeclarationAnnotationElementAdapter<String> buildAdapter(String elementName) {
+		return buildAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
+	}
+
+	private static DeclarationAnnotationElementAdapter<Integer> buildIntegerAdapter(String elementName) {
+		return buildIntegerAdapter(DECLARATION_ANNOTATION_ADAPTER, elementName);
+	}
+
+
+	// ********** unique constraint container **********
+
+	/**
+	 * adapt the AnnotationContainer interface to the table generator's unique constraints
+	 */
+	class UniqueConstraintsAnnotationContainer
+		implements AnnotationContainer<NestableUniqueConstraintAnnotation> 
+	{
+		public org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot) {
+			return SourceTableGeneratorAnnotation.this.getAstAnnotation(astRoot);
+		}
+
+		public String getElementName() {
+			return JPA.TABLE_GENERATOR__UNIQUE_CONSTRAINTS;
+		}
+
+		public String getNestedAnnotationName() {
+			return UniqueConstraintAnnotation.ANNOTATION_NAME;
+		}
+
+		public Iterable<NestableUniqueConstraintAnnotation> getNestedAnnotations() {
+			return SourceTableGeneratorAnnotation.this.getNestableUniqueConstraints();
+		}
+
+		public int getNestedAnnotationsSize() {
+			return SourceTableGeneratorAnnotation.this.uniqueConstraintsSize();
+		}
+
+		public NestableUniqueConstraintAnnotation addNestedAnnotation() {
+			return SourceTableGeneratorAnnotation.this.addUniqueConstraint_();
+		}
+
+		public void syncAddNestedAnnotation(Annotation astAnnotation) {
+			SourceTableGeneratorAnnotation.this.syncAddUniqueConstraint(astAnnotation);
+		}
+
+		public NestableUniqueConstraintAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
+			return SourceTableGeneratorAnnotation.this.moveUniqueConstraint_(targetIndex, sourceIndex);
+		}
+
+		public NestableUniqueConstraintAnnotation removeNestedAnnotation(int index) {
+			return SourceTableGeneratorAnnotation.this.removeUniqueConstraint_(index);
+		}
+
+		public void syncRemoveNestedAnnotations(int index) {
+			SourceTableGeneratorAnnotation.this.syncRemoveUniqueConstraints(index);
+		}
+
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTemporalAnnotation.java
new file mode 100644
index 0000000..ca5a5de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTemporalAnnotation.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Temporal
+ */
+public final class SourceTemporalAnnotation
+	extends SourceBaseTemporalAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceTemporalAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	@Override
+	protected String getValueElementName() {
+		return JPA.TEMPORAL__VALUE;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTransientAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTransientAnnotation.java
new file mode 100644
index 0000000..fe3c171
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTransientAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.TransientAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Transient
+ */
+public final class SourceTransientAnnotation
+	extends SourceAnnotation<Attribute>
+	implements TransientAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+	
+
+	public SourceTransientAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+	
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
new file mode 100644
index 0000000..474d351
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.Arrays;
+import java.util.ListIterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotationStringArrayExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JPA;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.resource.java.NestableUniqueConstraintAnnotation;
+import org.eclipse.jpt.core.resource.java.UniqueConstraintAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.CloneListIterator;
+
+/**
+ * javax.persistence.UniqueConstraint
+ */
+public final class SourceUniqueConstraintAnnotation
+	extends SourceAnnotation<Member>
+	implements NestableUniqueConstraintAnnotation
+{
+	public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+	private final DeclarationAnnotationElementAdapter<String[]> columnNamesDeclarationAdapter;
+	private final AnnotationElementAdapter<String[]> columnNamesAdapter;
+	private final Vector<String> columnNames = new Vector<String>();
+
+
+	public SourceUniqueConstraintAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
+		super(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+		this.columnNamesDeclarationAdapter = buildArrayAnnotationElementAdapter(idaa, JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES);
+		this.columnNamesAdapter = this.buildAnnotationElementAdapter(this.columnNamesDeclarationAdapter);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	private AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
+		return new MemberAnnotationElementAdapter<String[]>(this.member, daea);
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return buildArrayAnnotationElementAdapter(annotationAdapter, elementName, AnnotationStringArrayExpressionConverter.forStrings());
+	}
+
+	private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<String[]> converter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String[]>(annotationAdapter, elementName, false, converter);
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		this.initializeColumnNames(astRoot);
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		this.syncColumnNames(astRoot);
+	}
+
+	public IndexedAnnotationAdapter getIndexedAnnotationAdapter() {
+		return (IndexedAnnotationAdapter) this.annotationAdapter;
+	}
+
+	@Override
+	public void toString(StringBuilder sb) {
+		sb.append(this.columnNames);
+	}
+
+
+	// ********** UniqueConstraintAnnotation implementation **********
+
+	// ***** column names
+	public ListIterator<String> columnNames() {
+		return new CloneListIterator<String>(this.columnNames);
+	}
+
+	public int columnNamesSize() {
+		return this.columnNames.size();
+	}
+
+	public void addColumnName(String columnName) {
+		this.addColumnName(this.columnNames.size(), columnName);
+	}
+
+	public void addColumnName(int index, String columnName) {
+		this.columnNames.add(index, columnName);
+		this.writeColumnNames();
+	}
+
+	public void moveColumnName(int targetIndex, int sourceIndex) {
+		CollectionTools.move(this.columnNames, targetIndex, sourceIndex);
+		this.writeColumnNames();
+	}
+
+	public void removeColumnName(String columnName) {
+		this.columnNames.remove(columnName);
+		this.writeColumnNames();
+	}
+
+	public void removeColumnName(int index) {
+		this.columnNames.remove(index);
+		this.writeColumnNames();
+	}
+
+	private void writeColumnNames() {
+		this.columnNamesAdapter.setValue(this.columnNames.toArray(new String[this.columnNames.size()]));
+	}
+
+	private void initializeColumnNames(CompilationUnit astRoot) {
+		String[] astColumnNames = this.columnNamesAdapter.getValue(astRoot);
+		for (int i = 0; i < astColumnNames.length; i++) {
+			this.columnNames.add(astColumnNames[i]);
+		}
+	}
+
+	private void syncColumnNames(CompilationUnit astRoot) {
+		String[] javaColumnNames = this.columnNamesAdapter.getValue(astRoot);
+		this.synchronizeList(Arrays.asList(javaColumnNames), this.columnNames, COLUMN_NAMES_LIST);
+	}
+
+	public boolean columnNamesTouches(int pos, CompilationUnit astRoot) {
+		return this.elementTouches(this.columnNamesDeclarationAdapter, pos, astRoot);
+	}
+
+
+	// ********** NestableAnnotation implementation **********
+
+	public void initializeFrom(NestableAnnotation oldAnnotation) {
+		UniqueConstraintAnnotation oldConstraint = (UniqueConstraintAnnotation) oldAnnotation;
+		for (String columnName : CollectionTools.iterable(oldConstraint.columnNames())) {
+			this.addColumnName(columnName);
+		}
+	}
+
+	public void moveAnnotation(int newIndex) {
+		this.getIndexedAnnotationAdapter().moveAnnotation(newIndex);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceVersionAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceVersionAnnotation.java
new file mode 100644
index 0000000..7e1e448
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceVersionAnnotation.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.VersionAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+
+/**
+ * javax.persistence.Version
+ */
+public final class SourceVersionAnnotation
+	extends SourceAnnotation<Attribute>
+	implements VersionAnnotation
+{
+	private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+
+	public SourceVersionAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
+		super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
+	}
+
+	public String getAnnotationName() {
+		return ANNOTATION_NAME;
+	}
+
+	public void initialize(CompilationUnit astRoot) {
+		// nothing to initialize
+	}
+
+	public void synchronizeWith(CompilationUnit astRoot) {
+		// nothing to update
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/orm/OrmXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/orm/OrmXmlResourceProvider.java
new file mode 100644
index 0000000..523bacf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/orm/OrmXmlResourceProvider.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.orm;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.operations.OrmFileCreationDataModelProperties;
+import org.eclipse.jpt.core.resource.AbstractXmlResourceProvider;
+import org.eclipse.jpt.core.resource.orm.AccessType;
+import org.eclipse.jpt.core.resource.orm.OrmFactory;
+import org.eclipse.jpt.core.resource.orm.XmlEntityMappings;
+import org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults;
+import org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+public class OrmXmlResourceProvider
+	extends AbstractXmlResourceProvider
+	implements OrmFileCreationDataModelProperties
+{
+	/**
+	 * (Convenience method) Returns an ORM resource model provider for 
+	 * the given file.
+	 */
+	public static OrmXmlResourceProvider getXmlResourceProvider(IFile file) {
+		return getXmlResourceProvider_(file.getProject(), file.getFullPath().toString());
+	}
+	
+	/**
+	 * (Convenience method) Returns an ORM resource model provider for
+	 * the given project in the specified deploy location
+	 */
+	public static OrmXmlResourceProvider getXmlResourceProvider(IProject project, String deployLocation) {
+		return getXmlResourceProvider_(project, JptCorePlugin.getDeploymentURI(project, deployLocation));
+	}
+	
+	/**
+	 * (Convenience method) Returns an ORM resource model provider for 
+	 * the given project in the default deploy location
+	 */
+	public static OrmXmlResourceProvider getDefaultXmlResourceProvider(IProject project) {
+		return getXmlResourceProvider(project, JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH);
+	}
+	
+	private static OrmXmlResourceProvider getXmlResourceProvider_(IProject project, String location) {
+		return new OrmXmlResourceProvider(project, new Path(location));
+	}
+	
+	
+	public OrmXmlResourceProvider(IProject project) {
+		this(project, new Path(JptCorePlugin.DEFAULT_ORM_XML_FILE_PATH));
+	}
+	
+	public OrmXmlResourceProvider(IProject project, IPath filePath) {
+		super(project, filePath, JptCorePlugin.ORM_XML_CONTENT_TYPE);
+	}
+	
+	@Override
+	protected void populateRoot(Object config) {
+		IDataModel dataModel = (IDataModel) config;
+		XmlEntityMappings entityMappings = OrmFactory.eINSTANCE.createXmlEntityMappings();
+		entityMappings.setVersion(dataModel.getStringProperty(VERSION));
+		getResourceContents().add(entityMappings);
+		
+		AccessType defaultAccess = (AccessType) dataModel.getProperty(DEFAULT_ACCESS); 
+		if (defaultAccess != null) {
+			XmlPersistenceUnitMetadata puMetadata = OrmFactory.eINSTANCE.createXmlPersistenceUnitMetadata();
+			entityMappings.setPersistenceUnitMetadata(puMetadata);
+			XmlPersistenceUnitDefaults puDefaults = OrmFactory.eINSTANCE.createXmlPersistenceUnitDefaults();
+			puMetadata.setPersistenceUnitDefaults(puDefaults);
+			puDefaults.setAccess(defaultAccess);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/persistence/PersistenceXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/persistence/PersistenceXmlResourceProvider.java
new file mode 100644
index 0000000..7db9082
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/persistence/PersistenceXmlResourceProvider.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.persistence;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.internal.operations.PersistenceFileCreationDataModelProperties;
+import org.eclipse.jpt.core.resource.AbstractXmlResourceProvider;
+import org.eclipse.jpt.core.resource.persistence.PersistenceFactory;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+public class PersistenceXmlResourceProvider
+	extends AbstractXmlResourceProvider
+	implements PersistenceFileCreationDataModelProperties
+{
+	/**
+	 * (Convenience method) Returns a persistence resource model provider for 
+	 * the given file.
+	 */
+	public static PersistenceXmlResourceProvider getXmlResourceProvider(IFile file) {
+		return getXmlResourceProvider_(file.getProject(), file.getFullPath().toString());
+	}
+	
+	/**
+	 * (Convenience method) Returns an persistence resource model provider for
+	 * the given project in the specified deploy location
+	 */
+	public static PersistenceXmlResourceProvider getXmlResourceProvider(IProject project, String deployLocation) {
+		return getXmlResourceProvider_(project, JptCorePlugin.getDeploymentURI(project, deployLocation));
+	}
+	
+	/**
+	 * (Convenience method) Returns a persistence resource model provider for 
+	 * the given project in the default deploy location
+	 */
+	public static PersistenceXmlResourceProvider getDefaultXmlResourceProvider(IProject project) {
+		return getXmlResourceProvider(project, JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATH);
+	}
+	
+	private static PersistenceXmlResourceProvider getXmlResourceProvider_(IProject project, String location) {
+		return new PersistenceXmlResourceProvider(project, new Path(location));
+	}
+	
+	
+	public PersistenceXmlResourceProvider(IProject project) {
+		this(project, new Path(JptCorePlugin.DEFAULT_PERSISTENCE_XML_FILE_PATH));
+	}
+		
+	public PersistenceXmlResourceProvider(IProject project, IPath filePath) {
+		super(project, filePath, JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE);
+	}
+	
+	
+	@Override
+	protected void populateRoot(Object config) {
+		IDataModel dataModel = (IDataModel) config;
+		XmlPersistence persistence = PersistenceFactory.eINSTANCE.createXmlPersistence();
+		persistence.setVersion(dataModel.getStringProperty(VERSION));
+		XmlPersistenceUnit persistenceUnit = PersistenceFactory.eINSTANCE.createXmlPersistenceUnit();
+		persistenceUnit.setName(getProject().getName());
+		persistence.getPersistenceUnits().add(persistenceUnit);
+		getResourceContents().add(persistence);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/xml/JpaXmlResourceAdapterFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/xml/JpaXmlResourceAdapterFactory.java
new file mode 100644
index 0000000..c03f4b1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/xml/JpaXmlResourceAdapterFactory.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.xml;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.jpt.core.JpaFile;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+public class JpaXmlResourceAdapterFactory
+	implements IAdapterFactory
+{
+	private static final Class<?>[] ADAPTER_LIST = new Class[] { JpaXmlResource.class };
+	
+	public Class<?>[] getAdapterList() {
+		return ADAPTER_LIST;
+	}
+	
+	public Object getAdapter(Object adaptableObject, @SuppressWarnings("unchecked") Class adapterType) {
+		if (adaptableObject instanceof IFile) {
+			return this.getAdapter((IFile) adaptableObject, adapterType);
+		}
+		return null;
+	}
+	
+	private Object getAdapter(final IFile file, Class <?>adapterType) {
+		if (adapterType == JpaXmlResource.class) {
+			JpaFile jpaFile = JptCorePlugin.getJpaFile(file);
+			if (jpaFile != null) {
+				JpaResourceModel resourceModel = jpaFile.getResourceModel();
+				if (resourceModel instanceof JpaXmlResource) {
+					return resourceModel;
+				}
+			}
+		}
+		return null;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/xml/JpaXmlResourcePropertyTester.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/xml/JpaXmlResourcePropertyTester.java
new file mode 100644
index 0000000..f1c518d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/xml/JpaXmlResourcePropertyTester.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.xml;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.XmlFile;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+// TODO move to o.e.jpt.core.internal(.context)?
+// rename to JpaXmlPropertyTester
+public class JpaXmlResourcePropertyTester
+	extends PropertyTester
+{
+	public static final String IS_LATEST_SUPPORTED_VERSION = "isLatestSupportedVersion"; //$NON-NLS-1$
+	
+	
+	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+		JpaXmlResource xmlResource = null;
+		if (receiver instanceof JpaXmlResource) {
+			xmlResource = (JpaXmlResource) receiver;
+		}
+		else if (receiver instanceof XmlFile) {
+			xmlResource = ((XmlFile) receiver).getXmlResource();
+		}
+		else {
+			return false;
+		}
+		
+		if (IS_LATEST_SUPPORTED_VERSION.equals(property)) {
+			boolean expected = ((Boolean) expectedValue).booleanValue();
+			JpaProject jpaProject = JptCorePlugin.getJpaProject(xmlResource.getProject());
+			IContentType contentType = xmlResource.getContentType();
+			boolean actual = 
+					xmlResource.getVersion() != null
+						&& xmlResource.getVersion().equals(
+							jpaProject.getJpaPlatform().getMostRecentSupportedResourceType(contentType).getVersion());
+			
+			return actual == expected;
+		}
+		
+		return false;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/synch/SynchronizeClassesJob.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/synch/SynchronizeClassesJob.java
new file mode 100644
index 0000000..331ca73
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/synch/SynchronizeClassesJob.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.synch;
+
+import java.util.Iterator;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResourceRuleFactory;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.context.persistence.MappingFileRef;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jpt.core.resource.persistence.PersistenceFactory;
+import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistence;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+
+/**
+ * Synchronizes the lists of persistent classes in a persistence unit and a 
+ * persistence project.
+ */
+public class SynchronizeClassesJob extends WorkspaceJob
+{
+	private IFile persistenceXmlFile;
+	
+	
+	public SynchronizeClassesJob(IFile file) {
+		super(JptCoreMessages.SYNCHRONIZE_CLASSES_JOB);
+		IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory();
+		setRule(ruleFactory.modifyRule(file.getProject()));
+		this.persistenceXmlFile = file;
+	}
+	
+	@Override
+	public IStatus runInWorkspace(final IProgressMonitor monitor) {
+		monitor.beginTask(JptCoreMessages.SYNCHRONIZING_CLASSES_TASK, 200);
+		
+		if (monitor.isCanceled()) {
+			return Status.CANCEL_STATUS;
+		}
+		
+		final JpaProject jpaProject = JptCorePlugin.getJpaProject(this.persistenceXmlFile.getProject());
+		final JpaXmlResource resource = jpaProject.getPersistenceXmlResource();
+		if (resource == null) {
+			//the resource would only be null if the persistence.xml file had an invalid content type
+			return Status.OK_STATUS;
+		}
+		
+		monitor.worked(25);
+		
+		resource.modify(new Runnable() {
+				public void run() {
+					XmlPersistence persistence = (XmlPersistence) resource.getRootObject();					
+					XmlPersistenceUnit persistenceUnit;
+					
+					if (persistence.getPersistenceUnits().size() > 0) {
+						persistenceUnit = persistence.getPersistenceUnits().get(0);
+					}
+					else {
+						persistenceUnit = PersistenceFactory.eINSTANCE.createXmlPersistenceUnit();
+						persistenceUnit.setName(jpaProject.getName());
+						persistence.getPersistenceUnits().add(persistenceUnit);
+					}
+					
+					persistenceUnit.getClasses().clear();
+					
+					monitor.worked(25);
+			
+					for (Iterator<String> stream = mappedClassNames(jpaProject, '$'); stream.hasNext(); ) {
+						String fullyQualifiedTypeName = stream.next();
+						if ( ! mappingFileContains(jpaProject, fullyQualifiedTypeName)) {
+							XmlJavaClassRef classRef = PersistenceFactory.eINSTANCE.createXmlJavaClassRef();
+							classRef.setJavaClass(fullyQualifiedTypeName);
+							persistenceUnit.getClasses().add(classRef);
+						}
+					}
+					
+					monitor.worked(100);
+				}
+			});
+		
+		monitor.done();
+		
+		return Status.OK_STATUS;
+	}
+	
+	protected Iterator<String> mappedClassNames(final JpaProject jpaProject, final char enclosingTypeSeparator) {
+		return new TransformationIterator<String, String>(jpaProject.mappedJavaSourceClassNames()) {
+			@Override
+			protected String transform(String fullyQualifiedName) {
+				IType jdtType = SynchronizeClassesJob.this.findType(jpaProject, fullyQualifiedName);
+				return jdtType.getFullyQualifiedName(enclosingTypeSeparator);
+			}
+		};
+	}
+	
+	protected IType findType(JpaProject jpaProject, String typeName) {
+		try {
+			return jpaProject.getJavaProject().findType(typeName);
+		} catch (JavaModelException ex) {
+			return null;  // ignore exception?
+		}
+	}
+
+	boolean mappingFileContains(JpaProject jpaProject, String fullyQualifiedTypeName) {
+		PersistenceXml persistenceXml = jpaProject.getRootContextNode().getPersistenceXml();
+		if (persistenceXml == null) {
+			return false;
+		}
+		Persistence persistence = persistenceXml.getPersistence();
+		if (persistence == null) {
+			return false;
+		}
+		if (persistence.persistenceUnitsSize() == 0) {
+			return false;
+		}
+		PersistenceUnit persistenceUnit = persistence.persistenceUnits().next();
+		for (MappingFileRef mappingFileRef : CollectionTools.iterable(persistenceUnit.mappingFileRefs())) {
+			if (mappingFileRef.getPersistentType(fullyQualifiedTypeName) != null) {
+				return true;
+			}
+		}
+		return false;
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/CallbackJobSynchronizer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/CallbackJobSynchronizer.java
new file mode 100644
index 0000000..7ddb587
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/CallbackJobSynchronizer.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jpt.utility.internal.ListenerList;
+import org.eclipse.jpt.utility.internal.synchronizers.CallbackSynchronizer;
+
+/**
+ * Extend the job synchronizer to notify listeners
+ * when a synchronization "cycle" is complete; i.e. the synchronization has,
+ * for the moment, handled every "synchronize" request and quiesced.
+ * This notification is <em>not</em> guaranteed to occur with <em>every</em>
+ * synchronization "cycle";
+ * since other, unrelated, synchronizations can be triggered concurrently.
+ */
+public class CallbackJobSynchronizer
+	extends JobSynchronizer
+	implements CallbackSynchronizer
+{
+	private final ListenerList<Listener> listenerList = new ListenerList<Listener>(Listener.class);
+
+
+	// ********** construction **********
+
+	/**
+	 * Construct a callback job synchronizer that uses the specified job command to
+	 * perform the synchronization. Assign the generated Eclipse job the
+	 * specified name.
+	 */
+	public CallbackJobSynchronizer(String jobName, JobCommand command) {
+		super(jobName, command);
+	}
+
+	/**
+	 * Construct a callback job synchronizer that uses the specified job command to
+	 * perform the synchronization. Assign the generated Eclipse job the
+	 * specified name and scheduling rule.
+	 */
+	public CallbackJobSynchronizer(String jobName, JobCommand command, ISchedulingRule schedulingRule) {
+		super(jobName, command, schedulingRule);
+	}
+
+	/**
+	 * Build a job that will let us know when the synchronization has
+	 * quiesced.
+	 */
+	@Override
+	SynchronizationJob buildJob(String jobName, JobCommand command, ISchedulingRule schedulingRule) {
+		return new CallbackSynchronizationJob(jobName, command, schedulingRule);
+	}
+
+
+	// ********** CallbackSynchronizer implementation **********
+
+	public void addListener(Listener listener) {
+		this.listenerList.add(listener);
+	}
+
+	public void removeListener(Listener listener) {
+		this.listenerList.remove(listener);
+	}
+
+	/**
+	 * Notify our listeners.
+	 */
+	void synchronizationQuiesced() {
+		for (Listener listener : this.listenerList.getListeners()) {
+			listener.synchronizationQuiesced(this);
+		}
+	}
+
+
+	// ********** synchronization job **********
+
+	/**
+	 * Extend {@link JobSynchronizer.SynchronizationJob}
+	 * to notify the synchronizer when the synchronization has quiesced
+	 * (i.e. the command has finished executing and there are no further
+	 * requests for synchronization).
+	 * Because synchronization occurs during the job's execution,
+	 * no other thread will be able to
+	 * initiate another synchronization until the synchronizer's listeners have been
+	 * notified. Note also, the synchronizer's listeners can, themselves,
+	 * trigger another synchronization (by directly or indirectly calling
+	 * {@link org.eclipse.jpt.utility.internal.synchronizers.Synchronizer#synchronize());
+	 * but this synchronization will not occur until <em>after</em> all the
+	 * listeners have been notified.
+	 */
+	class CallbackSynchronizationJob
+		extends SynchronizationJob
+	{
+		/**
+		 * When this flag is set to true, the job has been scheduled to run.
+		 * We need this because {@link org.eclipse.core.runtime.jobs.Job Job}
+		 * has no public API for discovering whether a job is "scheduled".
+		 */
+		// use 'volatile' because synchronization isn't really required
+		private volatile boolean scheduled;
+
+
+		CallbackSynchronizationJob(String jobName, JobCommand command, ISchedulingRule schedulingRule) {
+			super(jobName, command, schedulingRule);
+			this.scheduled = false;
+		}
+
+		/**
+		 * If we are allowing the job to be scheduled (i.e. {@link #start()}
+		 * was called), set the "scheduled" flag.
+		 */
+		@Override
+		void synchronize() {
+			if (this.shouldSchedule) {
+				this.scheduled = true;
+			}
+			super.synchronize();
+		}
+
+		/**
+		 * Clear the "scheduled" flag; perform the synchronization; and,
+		 * if the "scheduled" flag is still clear (i.e. there have been no
+		 * further calls to {@link #synchronize()}), notify our listeners.
+		 */
+		@Override
+		protected IStatus run(IProgressMonitor monitor) {
+			this.scheduled = false;
+			IStatus status = super.run(monitor);
+			// hmmm - we will notify listeners even when we our job is "stopped";
+			// that seems ok...  ~bjv
+			if ( ! this.scheduled) {
+				CallbackJobSynchronizer.this.synchronizationQuiesced();
+			}
+			return status;
+		}
+
+		@Override
+		void stop() {
+			this.scheduled = false;
+			super.stop();
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/JobCommand.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/JobCommand.java
new file mode 100644
index 0000000..f4b1a0d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/JobCommand.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import java.io.Serializable;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+/**
+ * Simple interface for implementing the GOF Command design pattern in an
+ * Eclipse job.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public interface JobCommand {
+
+	/**
+	 * Execute the command. The semantics of the command
+	 * is determined by the contract between the client and server.
+	 * The command should check, as appropriate, whether the specified progress
+	 * monitor is {@link IProgressMonitor#isCanceled() "canceled"}; if it is,
+	 * the command should throw an
+	 * {@link org.eclipse.core.runtime.OperationCanceledException OperationCanceledException}.
+	 * @see IProgressMonitor#isCanceled()
+	 */
+	IStatus execute(IProgressMonitor monitor);
+
+	/**
+	 * Singleton implementation of the job command interface that will do
+	 * nothing when executed.
+	 */
+	final class Null implements JobCommand, Serializable {
+		public static final JobCommand INSTANCE = new Null();
+		public static JobCommand instance() {
+			return INSTANCE;
+		}
+		// ensure single instance
+		private Null() {
+			super();
+		}
+		public IStatus execute(IProgressMonitor arg0) {
+			return Status.OK_STATUS;
+		}
+		@Override
+		public String toString() {
+			return "JobCommand.Null"; //$NON-NLS-1$
+		}
+		private static final long serialVersionUID = 1L;
+		private Object readResolve() {
+			// replace this object with the singleton
+			return INSTANCE;
+		}
+	}
+
+	/**
+	 * Singleton implementation of the job command interface that will throw an
+	 * exception when executed.
+	 */
+	final class Disabled implements JobCommand, Serializable {
+		public static final JobCommand INSTANCE = new Disabled();
+		public static JobCommand instance() {
+			return INSTANCE;
+		}
+		// ensure single instance
+		private Disabled() {
+			super();
+		}
+		// throw an exception
+		public IStatus execute(IProgressMonitor arg0) {
+			throw new UnsupportedOperationException();
+		}
+		@Override
+		public String toString() {
+			return "JobCommand.Disabled"; //$NON-NLS-1$
+		}
+		private static final long serialVersionUID = 1L;
+		private Object readResolve() {
+			// replace this object with the singleton
+			return INSTANCE;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/JobSynchronizer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/JobSynchronizer.java
new file mode 100644
index 0000000..30d5cf3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/JobSynchronizer.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.synchronizers.Synchronizer;
+
+/**
+ * This synchronizer will perform synchronizations in an Eclipse job on a
+ * separate thread, allowing calls to {@link Synchronizer#synchronize()}
+ * to return immediately.
+ * <p>
+ * If necessary, the client-supplied job command should handle any
+ * exceptions appropriately. Although, the default exception-handling provided
+ * by the Eclipse Job Framework is probably adequate in most cases:<ul>
+ * <li>An {@link org.eclipse.core.runtime.OperationCanceledException OperationCanceledException}
+ *     results in a {@link org.eclipse.core.runtime.Status#CANCEL_STATUS CANCEL_STATUS}.
+ * <li>Any non-{@link ThreadDeath} {@link Throwable}
+ *     results in a {@link org.eclipse.core.runtime.IStatus#ERROR ERROR}
+ *     {@link org.eclipse.core.runtime.IStatus IStatus}
+ * </ul>
+ * @see org.eclipse.core.internal.jobs.Worker#run()
+ */
+public class JobSynchronizer
+	implements Synchronizer
+{
+	/**
+	 * The synchronization is performed by this job. The same job is used
+	 * for every start/stop cycle (since a job can be re-started).
+	 */
+	private final SynchronizationJob job;
+
+
+	// ********** construction **********
+
+	/**
+	 * Construct a job synchronizer that uses the specified job command to
+	 * perform the synchronization. Assign the generated Eclipse job the
+	 * specified name.
+	 */
+	public JobSynchronizer(String jobName, JobCommand command) {
+		this(jobName, command, null);
+	}
+
+	/**
+	 * Construct a job synchronizer that uses the specified job command to
+	 * perform the synchronization. Assign the generated Eclipse job the
+	 * specified name and scheduling rule.
+	 */
+	public JobSynchronizer(String jobName, JobCommand command, ISchedulingRule schedulingRule) {
+		super();
+		this.job = this.buildJob(jobName, command, schedulingRule);
+	}
+
+	SynchronizationJob buildJob(String jobName, JobCommand command, ISchedulingRule schedulingRule) {
+		return new SynchronizationJob(jobName, command, schedulingRule);
+	}
+
+
+	// ********** Synchronizer implementation **********
+
+	/**
+	 * Allow the job to be scheduled, but postpone the first synchronization
+	 * until requested, via {@link #synchronize()}.
+	 */
+	public void start() {
+		this.job.start();
+	}
+
+	/**
+	 * "Schedule" the job.
+	 */
+	public void synchronize() {
+		this.job.synchronize();
+	}
+
+	/**
+	 * Wait for the current job execution to complete.
+	 */
+	public void stop() {
+		this.job.stop();
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.job);
+	}
+
+
+	// ********** synchronization job **********
+
+	/**
+	 * This is the job that gets scheduled by the job synchronizer.
+	 * When the job is run it executes the client-supplied job command.
+	 */
+	static class SynchronizationJob extends Job {
+		/**
+		 * The client-supplied job command that executes every time the job
+		 * runs.
+		 */
+		private final JobCommand command;
+
+		/**
+		 * When this flag is set to false, the job does not stop immediately;
+		 * but it will not be scheduled to run again.
+		 */
+		// use 'volatile' because synchronization isn't really required
+		volatile boolean shouldSchedule;
+
+
+		SynchronizationJob(String jobName, JobCommand command, ISchedulingRule schedulingRule) {
+			super(jobName);
+			if (command == null) {
+				throw new NullPointerException();
+			}
+			this.command = command;
+			this.shouldSchedule = false;
+			this.setRule(schedulingRule);
+		}
+
+		/**
+		 * Just set the "should schedule" flag so the job <em>can</em> be
+		 * scheduled; but don't actually schedule it.
+		 */
+		void start() {
+			if (this.shouldSchedule) {
+				throw new IllegalStateException("The Synchronizer was not stopped."); //$NON-NLS-1$
+			}
+			this.shouldSchedule = true;
+		}
+
+		/**
+		 * Simply re-schedule the job, allowing the current execution
+		 * to run to completion (i.e. do not try to cancel it prematurely).
+		 * This should minimize the number of times the job is re-executed
+		 * (recursively and otherwise).
+		 */
+		void synchronize() {
+			this.schedule();
+		}
+
+		/**
+		 * Any uncaught exceptions thrown by the command will be reasonably
+		 * handled by the Job Framework.
+		 * @see org.eclipse.core.internal.jobs.Worker#run()
+		 */
+		@Override
+		protected IStatus run(IProgressMonitor monitor) {
+			return this.command.execute(monitor);
+		}
+
+		/**
+		 * Prevent the job from running again and wait for the current
+		 * execution, if there is any, to end before returning.
+		 */
+		void stop() {
+			if ( ! this.shouldSchedule) {
+				throw new IllegalStateException("The Synchronizer was not started."); //$NON-NLS-1$
+			}
+			// this will prevent the job from being scheduled to run again
+			this.shouldSchedule = false;
+			// this will cancel the job if it has already been scheduled, but is currently WAITING
+			this.cancel();
+			try {
+				// if the job is currently RUNNING, wait until it is done before returning
+				this.join();
+			} catch (InterruptedException ex) {
+				// the thread that called #stop() was interrupted while waiting to
+				// join the synchronization job - ignore;
+				// 'shouldSchedule' is still set to 'false', so the job loop will still stop - we
+				// just won't wait around for it...
+			}
+		}
+
+		/**
+		 * This is part of the normal {@link Job} behavior. By default, it is
+		 * not used (i.e. it always returns <code>true</code>).
+		 * We implement it here.
+		 */
+		@Override
+		public boolean shouldSchedule() {
+			return this.shouldSchedule;
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/KeyClassesValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/KeyClassesValidator.java
new file mode 100644
index 0000000..a16f50d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/KeyClassesValidator.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - ongoing maintenance
+ *  
+ *  Originally copied from 
+ *  {@link org.eclipse.jst.common.project.facet.core.libprov.user.KeyClassesValidator}
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import static org.eclipse.jst.common.project.facet.core.internal.FacetedProjectFrameworkJavaPlugin.PLUGIN_ID;
+import java.io.File;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jpt.core.internal.JptCoreMessages;
+import org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryProviderInstallOperationConfig;
+import org.eclipse.jst.common.project.facet.core.libprov.user.UserLibraryValidator;
+import org.eclipse.osgi.util.NLS;
+
+/** 
+ * This class differs from the original in that it does not give an error if multiple instances of 
+ * a class are discovered
+ */
+public class KeyClassesValidator
+	extends UserLibraryValidator
+{
+	private final Set<String> classFileNames = new HashSet<String>();
+	
+	private final Map<String,String> classFileNameToClassName = new HashMap<String,String>();
+	
+	
+	@Override
+	public void init(final List<String> params) {
+		for (String className : params) {
+			String classFileName = className.replace('.', '/') + ".class";
+			this.classFileNames.add(classFileName);
+			this.classFileNameToClassName.put(classFileName, className);
+		}
+	}
+	
+	@Override
+	public IStatus validate( final UserLibraryProviderInstallOperationConfig config ) {
+		final Map<String,Integer> classAppearanceCounts = new HashMap<String,Integer>();
+		
+		for (String classFileName : this.classFileNames) {
+			classAppearanceCounts.put(classFileName, 0);
+		}
+		
+		for (IClasspathEntry cpe : config.resolve()) {
+			if( cpe.getEntryKind() == IClasspathEntry.CPE_LIBRARY ) {
+				final File file = cpe.getPath().toFile();
+				
+				if (file.exists()) {
+					ZipFile zip = null;
+					
+					try {
+						zip = new ZipFile(file);
+						
+						for (Enumeration<? extends ZipEntry> itr = zip.entries(); itr.hasMoreElements(); ) {
+							final ZipEntry zipEntry = itr.nextElement();
+							final String name = zipEntry.getName();
+							
+							Integer count = classAppearanceCounts.get(name);
+							
+							if (count != null) {
+								classAppearanceCounts.put(name, count + 1);
+							}
+						}
+					}
+					catch (IOException e) {}
+					finally {
+						if (zip != null) {
+							try {
+								zip.close();
+							}
+							catch (IOException e) {}
+						}
+					}
+				}
+			}
+		}
+		
+		for (Map.Entry<String,Integer> entry : classAppearanceCounts.entrySet()) {
+			final int count = entry.getValue();
+			
+			if (count == 0) {
+				final String classFileName = entry.getKey();
+				final String className = this.classFileNameToClassName.get(classFileName);
+				final String message = 
+						NLS.bind(JptCoreMessages.KEY_CLASSES_VALIDATOR__CLASS_NOT_FOUND, className);
+				return new Status(IStatus.ERROR, PLUGIN_ID, message);
+			}
+		}
+		
+		return Status.OK_STATUS;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java
new file mode 100644
index 0000000..43f461e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/PlatformTools.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import java.io.IOException;
+import java.io.InputStream;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.jpt.core.JptCorePlugin;
+
+/**
+ * A collection of utilities for dealing with the Eclipse platform API.
+ */
+public class PlatformTools {
+
+	/**
+	 * Return the {@link IContainer} with the workspace relative "full" path
+	 */
+	public static IContainer getContainer(IPath fullContainerPath) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		// changed to handle non-workspace projects
+		String projectName = fullContainerPath.segment(0).toString();
+		IPath projectRelativePath = fullContainerPath.removeFirstSegments(1);
+		IProject project = root.getProject(projectName);
+		if (projectRelativePath.isEmpty()) {
+			return project;
+		}
+		return project.getFolder(projectRelativePath);
+	}
+	
+	/**
+	 * Return the specified file's content type,
+	 * using the Eclipse platform's content type manager.
+	 */
+	public static IContentType getContentType(IFile file) {
+		String fileName = file.getName();
+		InputStream fileContents = null;
+		try {
+			fileContents = file.getContents();
+		} catch (CoreException ex) {
+			// seems like we can ignore any exception that might occur here;
+			// e.g. we get a FNFE if the workspace is out of synch with the O/S file system
+			// JptCorePlugin.log(ex);
+
+			// look for content type based on the file name only(?)
+			return findContentTypeFor(fileName);
+		}
+
+		IContentType contentType = null;
+		try {
+			contentType = findContentTypeFor(fileContents, fileName);
+		} catch (IOException ex) {
+			JptCorePlugin.log(ex);
+		} finally {
+			try {
+				fileContents.close();
+			} catch (IOException ex) {
+				JptCorePlugin.log(ex);
+			}
+		}
+		return contentType;
+	}
+
+	private static IContentType findContentTypeFor(InputStream fileContents, String fileName) throws IOException {
+		return getContentTypeManager().findContentTypeFor(fileContents, fileName);
+	}
+
+	private static IContentType findContentTypeFor(String fileName) {
+		return getContentTypeManager().findContentTypeFor(fileName);
+	}
+
+	private static IContentTypeManager getContentTypeManager() {
+		return Platform.getContentTypeManager();
+	}
+
+	private PlatformTools() {
+		super();
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/SimpleSchedulingRule.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/SimpleSchedulingRule.java
new file mode 100644
index 0000000..575c775
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/SimpleSchedulingRule.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * A job scheduling rule that conflicts only with itself.
+ */
+public final class SimpleSchedulingRule
+	implements ISchedulingRule
+{
+	public SimpleSchedulingRule() {
+		super();
+	}
+
+	public boolean contains(ISchedulingRule rule) {
+		return rule == this;
+	}
+
+	public boolean isConflicting(ISchedulingRule rule) {
+		return rule == this;
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/SimpleTextRange.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/SimpleTextRange.java
new file mode 100644
index 0000000..bbb398f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/SimpleTextRange.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility;
+
+import org.eclipse.jpt.core.utility.AbstractTextRange;
+
+/**
+ * Straightforward implementation of TextRange.
+ */
+public class SimpleTextRange extends AbstractTextRange {
+	private final int offset;
+	private final int length;
+	private final int lineNumber;
+
+	public SimpleTextRange(int offset, int length, int lineNumber) {
+		super();
+		this.offset = offset;
+		this.length = length;
+		this.lineNumber = lineNumber;
+	}
+
+	public int getOffset() {
+		return this.offset;
+	}
+
+	public int getLength() {
+		return this.length;
+	}
+
+	public int getLineNumber() {
+		return this.lineNumber;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ASTNodeTextRange.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ASTNodeTextRange.java
new file mode 100644
index 0000000..1cb4049
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ASTNodeTextRange.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.AbstractTextRange;
+
+/**
+ * Adapt an ASTNode to the TextRange interface.
+ */
+public class ASTNodeTextRange extends AbstractTextRange {
+	private final ASTNode astNode;
+
+	public ASTNodeTextRange(ASTNode astNode) {
+		super();
+		this.astNode = astNode;
+	}
+
+	public int getOffset() {
+		return this.astNode.getStartPosition();
+	}
+
+	public int getLength() {
+		return this.astNode.getLength();
+	}
+
+	public int getLineNumber() {
+		return ((CompilationUnit) this.astNode.getRoot()).getLineNumber(this.getOffset());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ASTTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ASTTools.java
new file mode 100644
index 0000000..531ae81
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ASTTools.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.IAnnotationBinding;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.TypeLiteral;
+import org.eclipse.jpt.utility.JavaType;
+import org.eclipse.jpt.utility.MethodSignature;
+import org.eclipse.jpt.utility.internal.SimpleJavaType;
+import org.eclipse.jpt.utility.internal.SimpleMethodSignature;
+
+/**
+ * Convenience methods for dealing with JDT ASTs.
+ */
+public class ASTTools {
+
+	/**
+	 * Build an AST without method bodies for the specified compilation unit
+	 * with its bindings resolved (and the resultant performance hit).
+	 */
+	public static CompilationUnit buildASTRoot(ICompilationUnit compilationUnit) {
+		ASTParser parser = ASTParser.newParser(AST.JLS3);
+		parser.setSource(compilationUnit);
+		parser.setIgnoreMethodBodies(true);  // we don't need method bodies
+		parser.setResolveBindings(true);
+		parser.setBindingsRecovery(true);  // see bugs 196200, 222735
+		return (CompilationUnit) parser.createAST(null);
+	}
+
+
+	// ********** JDT DOM **********
+
+	public static String resolveEnum(Expression expression) {
+		if (expression == null) {
+			return null;
+		}
+		switch (expression.getNodeType()) {
+			case ASTNode.QUALIFIED_NAME:
+			case ASTNode.SIMPLE_NAME:
+				return resolveEnum((Name) expression);
+			default:
+				return null;
+		}
+	}
+
+	public static String resolveEnum(Name enumExpression) {
+		IBinding binding = enumExpression.resolveBinding();
+		if (binding == null) {
+			return null;  // TODO figure out why this is null sometimes
+		}
+		if (binding.getKind() != IBinding.VARIABLE) {
+			return null;
+		}
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		return variableBinding.getType().getQualifiedName() + '.' + variableBinding.getName();
+	}
+
+	/**
+	 * Return the fully-qualified name of the specified node's annotation
+	 * class.
+	 */
+	public static String resolveAnnotation(Annotation node) {
+		IAnnotationBinding annotationBinding = node.resolveAnnotationBinding();
+		if (annotationBinding == null) {
+			return null;
+		}
+		ITypeBinding annotationTypeBinding = annotationBinding.getAnnotationType();
+		return (annotationTypeBinding == null) ? null : annotationTypeBinding.getQualifiedName();
+	}
+	
+	/**
+	 * If the specified expression is a type literal, return the type's fully-
+	 * qualified name. Return null otherwise.
+	 */
+	public static String resolveFullyQualifiedName(Expression expression) {
+		ITypeBinding resolvedTypeBinding = resolveTypeBinding(expression);
+		return (resolvedTypeBinding == null) ? null : resolvedTypeBinding.getQualifiedName();
+	}
+	
+	/**
+	 * If the specified expression is a type literal, return the corresponding
+	 * type binding.
+	 */
+	public static ITypeBinding resolveTypeBinding(Expression expression) {
+		if (expression.getNodeType() == ASTNode.TYPE_LITERAL) {
+			return ((TypeLiteral) expression).getType().resolveBinding();
+		}
+		return null;
+	}
+
+	public static MethodSignature buildMethodSignature(MethodDeclaration methodDeclaration) {
+		return new SimpleMethodSignature(
+				methodDeclaration.getName().getFullyQualifiedName(),
+				buildParameterTypes(methodDeclaration)
+			);
+	}
+
+	public static JavaType[] buildParameterTypes(MethodDeclaration methodDeclaration) {
+		List<SingleVariableDeclaration> parameters = parameters(methodDeclaration);
+		int len = parameters.size();
+		JavaType[] parameterTypes = new JavaType[len];
+		for (int i = 0; i < len; i++) {
+			ITypeBinding type = parameters.get(i).getType().resolveBinding();
+			parameterTypes[i] = new SimpleJavaType(type.getQualifiedName(), type.getDimensions());
+		}
+		return parameterTypes;
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	private static List<SingleVariableDeclaration> parameters(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.parameters();
+	}
+
+	/**
+	 * Return whether the specified expression is a type literal and the type binding
+	 * corresponding to the specified type name exists in the type
+	 * literal's inheritance hierarchy (superclasses and interfaces).
+	 * Return null otherwise.
+	 */
+	public static boolean typeIsSubTypeOf(Expression expression, String searchTypeName) {
+		return findTypeInHierarchy(expression, searchTypeName) != null;
+	}
+
+	/**
+	 * If the specified expression is a type literal, return the type binding
+	 * corresponding to the specified type name if it exists in the type
+	 * literal's inheritance hierarchy (superclasses and interfaces).
+	 * Return null otherwise.
+	 */
+	public static ITypeBinding findTypeInHierarchy(Expression expression, String searchTypeName) {
+		ITypeBinding typeBinding = resolveTypeBinding(expression);
+		return (typeBinding == null) ? null : findTypeInHierarchy(typeBinding, searchTypeName);
+	}
+
+	/**
+	 * Return whether a type binding with the specified type name exists in
+	 * the specified type binding's inheritance hierarchy (superclasses
+	 * and interfaces).
+	 */
+	public static boolean typeIsSubTypeOf(ITypeBinding typeBinding, String searchTypeName) {
+		return findTypeInHierarchy(typeBinding, searchTypeName) != null;
+	}
+
+	/**
+	 * Return the type binding corresponding to the specified type name if it
+	 * exists in the specified type binding's inheritance hierarchy (superclasses
+	 * and interfaces). Return null otherwise.
+	 */
+	public static ITypeBinding findTypeInHierarchy(ITypeBinding typeBinding, String searchTypeName) {
+		return findTypeInHierarchy(typeBinding, searchTypeName, new HashSet<String>());
+	}
+
+	private static ITypeBinding findTypeInHierarchy(ITypeBinding typeBinding, String searchTypeName, HashSet<String> visited) {
+		String typeName = typeBinding.getQualifiedName();
+		if (visited.contains(typeName)) {
+			return null;
+		}
+		if (typeName.equals(searchTypeName)) {
+			return typeBinding;
+		}
+		visited.add(typeName);
+
+		ITypeBinding[] interfaceBindings = typeBinding.getInterfaces();
+		for (ITypeBinding interfaceBinding : interfaceBindings) {  // recurse up interfaces
+			ITypeBinding result = findTypeInHierarchy(interfaceBinding, searchTypeName, visited);
+			if (result != null) {
+				return result;
+			}
+		}
+
+		ITypeBinding superBinding = typeBinding.getSuperclass();
+		if (superBinding != null) {  // recurse up superclasses
+			ITypeBinding result = findTypeInHierarchy(superBinding, searchTypeName, visited);
+			if (result != null) {
+				return result;
+			}
+		}
+
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java
new file mode 100644
index 0000000..09631de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Adapt a member and a declaration annotation adapter.
+ */
+public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
+	private final Member member;
+	private final DeclarationAnnotationAdapter daa;
+
+
+	// ********** constructor **********
+
+	public AbstractAnnotationAdapter(Member member, DeclarationAnnotationAdapter daa) {
+		super();
+		this.member = member;
+		this.daa = daa;
+	}
+
+
+	// ********** AnnotationAdapter implementation **********
+
+	public Annotation getAnnotation(CompilationUnit astRoot) {
+		return this.daa.getAnnotation(this.member.getModifiedDeclaration(astRoot));
+	}
+
+	public void newMarkerAnnotation() {
+		this.edit(this.buildNewMarkerAnnotationEditor());
+	}
+
+	public void newSingleMemberAnnotation() {
+		this.edit(this.buildNewSingleMemberAnnotationEditor());
+	}
+
+	public void newNormalAnnotation() {
+		this.edit(this.buildNewNormalAnnotationEditor());
+	}
+
+	public void removeAnnotation() {
+		this.edit(this.buildRemoveAnnotationEditor());
+	}
+
+	public ASTNode getAstNode(CompilationUnit astRoot) {
+		return this.daa.getAstNode(this.member.getModifiedDeclaration(astRoot));
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.daa);
+	}
+
+
+	// ********** internal methods **********
+
+	protected void edit(Member.Editor editor) {
+		this.member.edit(editor);
+	}
+
+
+	// ********** factory methods **********
+
+	protected Member.Editor buildNewMarkerAnnotationEditor() {
+		return new NewMarkerAnnotationEditor(this.daa);
+	}
+
+	protected Member.Editor buildNewSingleMemberAnnotationEditor() {
+		return new NewSingleMemberAnnotationEditor(this.daa);
+	}
+
+	protected Member.Editor buildNewNormalAnnotationEditor() {
+		return new NewNormalAnnotationEditor(this.daa);
+	}
+
+	protected Member.Editor buildRemoveAnnotationEditor() {
+		return new RemoveAnnotationEditor(this.daa);
+	}
+
+
+	// ********** member classes **********
+
+	protected static class NewMarkerAnnotationEditor implements Member.Editor {
+		private final DeclarationAnnotationAdapter daa;
+
+		NewMarkerAnnotationEditor(DeclarationAnnotationAdapter daa) {
+			super();
+			this.daa = daa;
+		}
+		public void edit(ModifiedDeclaration declaration) {
+			this.daa.newMarkerAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+
+	protected static class NewSingleMemberAnnotationEditor implements Member.Editor {
+		private final DeclarationAnnotationAdapter daa;
+
+		NewSingleMemberAnnotationEditor(DeclarationAnnotationAdapter daa) {
+			super();
+			this.daa = daa;
+		}
+		public void edit(ModifiedDeclaration declaration) {
+			this.daa.newSingleMemberAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+
+	protected static class NewNormalAnnotationEditor implements Member.Editor {
+		private final DeclarationAnnotationAdapter daa;
+
+		NewNormalAnnotationEditor(DeclarationAnnotationAdapter daa) {
+			super();
+			this.daa = daa;
+		}
+		public void edit(ModifiedDeclaration declaration) {
+			this.daa.newNormalAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+
+	protected static class RemoveAnnotationEditor implements Member.Editor {
+		private final DeclarationAnnotationAdapter daa;
+
+		RemoveAnnotationEditor(DeclarationAnnotationAdapter daa) {
+			super();
+			this.daa = daa;
+		}
+		public void edit(ModifiedDeclaration declaration) {
+			this.daa.removeAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..85c4983
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractDeclarationAnnotationAdapter.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * 
+ */
+public abstract class AbstractDeclarationAnnotationAdapter implements DeclarationAnnotationAdapter {
+	private final String annotationName;
+
+
+	// ********** constructors **********
+
+	protected AbstractDeclarationAnnotationAdapter(String annotationName) {
+		super();
+		this.annotationName = annotationName;
+	}
+
+
+	// ********** DeclarationAnnotationAdapter implementation **********
+
+	public MarkerAnnotation newMarkerAnnotation(ModifiedDeclaration declaration) {
+		MarkerAnnotation annotation = this.newMarkerAnnotation(declaration.getAst());
+		this.addAnnotationAndImport(declaration, annotation);
+		return annotation;
+	}
+
+	public SingleMemberAnnotation newSingleMemberAnnotation(ModifiedDeclaration declaration) {
+		SingleMemberAnnotation annotation = this.newSingleMemberAnnotation(declaration.getAst());
+		this.addAnnotationAndImport(declaration, annotation);
+		return annotation;
+	}
+
+	public NormalAnnotation newNormalAnnotation(ModifiedDeclaration declaration) {
+		NormalAnnotation annotation = this.newNormalAnnotation(declaration.getAst());
+		this.addAnnotationAndImport(declaration, annotation);
+		return annotation;
+	}
+
+	/**
+	 * Add the appropriate import statement, then shorten the annotation's
+	 * name before adding it to the declaration.
+	 */
+	protected void addAnnotationAndImport(ModifiedDeclaration declaration, Annotation annotation) {
+		annotation.setTypeName(declaration.getAst().newName(this.getSourceCodeAnnotationName(declaration)));
+		this.addAnnotation(declaration, annotation);
+	}
+
+	/**
+	 * Return the annotation's name as it can be used in source code;
+	 * i.e. if we can add it to the compilation unit's imports, return the short
+	 * name; if we can't (because of a collision), return the fully-qualified name.
+	 * NB: an import may be added as a side-effect :-(
+	 */
+	protected String getSourceCodeAnnotationName(ModifiedDeclaration declaration) {
+		return declaration.addImport(this.annotationName) ? this.getShortAnnotationName() : this.annotationName;
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.annotationName);
+	}
+
+	/**
+	 * Add the specified annotation to the specified declaration,
+	 * replacing the original annotation if present.
+	 */
+	protected abstract void addAnnotation(ModifiedDeclaration declaration, Annotation annotation);
+
+
+	// ********** public methods **********
+
+	/**
+	 * This is 'public' because we use it in CombinationIndexedDeclarationAnnotationAdapter
+	 * to get the annotation name from a NestedIndexedDeclarationAnnotationAdapter.
+	 */
+	public String getAnnotationName() {
+		return this.annotationName;
+	}
+
+
+	// ********** helper methods **********
+
+	protected boolean nameMatches(ModifiedDeclaration declaration, Annotation annotation) {
+		return this.nameMatches(declaration, annotation, this.annotationName);
+	}
+
+	protected boolean nameMatches(ModifiedDeclaration declaration, Annotation annotation, String name) {
+		return declaration.annotationIsNamed(annotation, name);
+	}
+
+	protected MarkerAnnotation newMarkerAnnotation(AST ast) {
+		return this.newMarkerAnnotation(ast, this.annotationName);
+	}
+
+	protected MarkerAnnotation newMarkerAnnotation(AST ast, String name) {
+		MarkerAnnotation annotation = ast.newMarkerAnnotation();
+		annotation.setTypeName(ast.newName(name));
+		return annotation;
+	}
+
+	protected SingleMemberAnnotation newSingleMemberAnnotation(AST ast) {
+		return this.newSingleMemberAnnotation(ast, this.annotationName);
+	}
+
+	protected SingleMemberAnnotation newSingleMemberAnnotation(AST ast, String name) {
+		SingleMemberAnnotation annotation = ast.newSingleMemberAnnotation();
+		annotation.setTypeName(ast.newName(name));
+		return annotation;
+	}
+
+	protected NormalAnnotation newNormalAnnotation(AST ast) {
+		return this.newNormalAnnotation(ast, this.annotationName);
+	}
+
+	protected NormalAnnotation newNormalAnnotation(AST ast, String name) {
+		NormalAnnotation annotation = ast.newNormalAnnotation();
+		annotation.setTypeName(ast.newName(name));
+		return annotation;
+	}
+
+	protected String getShortAnnotationName() {
+		return convertToShortName(this.annotationName);
+	}
+	
+	protected static String convertToShortName(String name) {
+		return name.substring(name.lastIndexOf('.') + 1);
+	}
+	
+	@SuppressWarnings("unchecked")
+	protected List<MemberValuePair> values(NormalAnnotation na) {
+		return na.values();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractExpressionConverter.java
new file mode 100644
index 0000000..a4bde67
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractExpressionConverter.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Gather together the common implementation behavior.
+ * T is the type of the object to be converted to and from an expression.
+ * 
+ * We're still figuring out Java Generics here.... The methods in this abstract
+ * class work fine with any subclass of Expression E; but a ClassCastException
+ * will occur as soon as we call any method implemented by a subclass
+ * (e.g. StringExpressionConverter) that expects a particular subclass of
+ * Expression (e.g. StringLiteral).
+ */
+public abstract class AbstractExpressionConverter<T>
+	implements ExpressionConverter<T>
+{
+
+	protected AbstractExpressionConverter() {
+		super();
+	}
+
+
+	// ********** object -> expression **********
+
+	public Expression convert(T object, AST ast) {
+		return (object == null) ? this.convertNull(ast) : this.convertObject(object, ast);
+	}
+
+	/**
+	 * Return the expression for a null object. By default, a null object will
+	 * be converted into a null expression.
+	 */
+	protected Expression convertNull(@SuppressWarnings("unused") AST ast) {
+		return null;
+	}
+
+	/**
+	 * The specified object is not null.
+	 * @see #convert(T, AST)
+	 */
+	protected abstract Expression convertObject(T object, AST ast);
+
+
+	// ********** expression -> object **********
+
+	public T convert(Expression expression) {
+		return (expression == null) ? this.convertNull() : this.convertExpression(expression);
+	}
+
+	/**
+	 * Return the object for a null expression. By default, a null expression will
+	 * be converted into a null object.
+	 */
+	protected T convertNull() {
+		return null;
+	}
+
+	/**
+	 * The specified expression is not null.
+	 * @see #convert(Expression)
+	 */
+	protected abstract T convertExpression(Expression expression);
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractNestedDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractNestedDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..9606e65
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractNestedDeclarationAnnotationAdapter.java
@@ -0,0 +1,422 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Pull together some of the behavior common to NestedDeclarationAnnotationAdapter
+ * and IndexedNestedDeclarationAnnotationAdapter
+ */
+public abstract class AbstractNestedDeclarationAnnotationAdapter extends AbstractDeclarationAnnotationAdapter {
+	private final DeclarationAnnotationAdapter outerAnnotationAdapter;
+	private final String elementName;
+	private final boolean removeOuterAnnotationWhenEmpty;
+
+	// reduce NLS checks
+	protected static final String VALUE = "value"; //$NON-NLS-1$
+
+
+	// ********** constructors **********
+
+	/**
+	 * default element name is "value";
+	 * default behavior is to remove the outer annotation when it is empty
+	 */
+	protected AbstractNestedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter outerAnnotationAdapter, String annotationName) {
+		this(outerAnnotationAdapter, VALUE, annotationName);
+	}
+
+	/**
+	 * default behavior is to remove the outer annotation when it is empty
+	 */
+	protected AbstractNestedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter outerAnnotationAdapter, String elementName, String annotationName) {
+		this(outerAnnotationAdapter, elementName, annotationName, true);
+	}
+
+	protected AbstractNestedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter outerAnnotationAdapter, String elementName, String annotationName, boolean removeOuterAnnotationWhenEmpty) {
+		super(annotationName);
+		this.outerAnnotationAdapter = outerAnnotationAdapter;
+		this.elementName = elementName;
+		this.removeOuterAnnotationWhenEmpty = removeOuterAnnotationWhenEmpty;
+	}
+
+
+	// ********** DeclarationAnnotationAdapter implementation **********
+
+	public Annotation getAnnotation(ModifiedDeclaration declaration) {
+		Annotation outer = this.outerAnnotationAdapter.getAnnotation(declaration);
+		if (outer == null) {
+			return null;
+		}
+		Expression value = this.elementValue(outer);
+		if (value == null) {
+			return null;
+		}
+		Annotation inner = this.getAnnotation(value);
+		if (inner == null) {
+			return null;
+		}
+		// return the annotation only if it has a matching name(?)
+		return this.nameMatches(declaration, inner) ? inner : null;
+	}
+
+	public void removeAnnotation(ModifiedDeclaration declaration) {
+		Annotation outer = this.outerAnnotationAdapter.getAnnotation(declaration);
+		if (outer == null) {
+			return;
+		}
+		Expression value = this.elementValue(outer);
+		if (value == null) {
+			return;
+		}
+		// hack to allow short-circuit when the value is an array initializer
+		if (this.removeAnnotation(declaration, outer, value)) {
+			return;
+		}
+		Annotation inner = this.annotationValue(value);
+		if (inner == null) {
+			return;
+		}
+		// remove the annotation only if it has a matching name(?)
+		if (this.nameMatches(declaration, inner)) {
+			this.removeElementAndNormalize(declaration, outer);
+		}
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		// if the annotation is missing, return the outer annotation's node
+		Annotation annotation = this.getAnnotation(declaration);
+		return (annotation != null) ? annotation : this.outerAnnotationAdapter.getAstNode(declaration);
+	}
+
+	@Override
+	protected void addAnnotation(ModifiedDeclaration declaration, Annotation inner) {
+		Annotation outer = this.outerAnnotationAdapter.getAnnotation(declaration);
+		if (outer == null) {
+			this.buildNewOuterAnnotation(declaration, inner);
+		} else if (outer.isMarkerAnnotation()) {
+			this.modifyAnnotation(declaration, (MarkerAnnotation) outer, inner);
+		} else if (outer.isSingleMemberAnnotation()) {
+			this.modifyAnnotation(declaration, (SingleMemberAnnotation) outer, inner);
+		} else if (outer.isNormalAnnotation()) {
+			this.modifyAnnotation(declaration, (NormalAnnotation) outer, inner);
+		} else {
+			throw new IllegalStateException("unknown annotation type: " + outer); //$NON-NLS-1$
+		}
+	}
+
+
+	// ********** abstract methods **********
+
+	/**
+	 * Return an annotation extracted from the specified expression,
+	 * which is the value of the adapter's element.
+	 */
+	protected abstract Annotation getAnnotation(Expression value);
+
+	/**
+	 * Remove the annotation from the specified expression,
+	 * which is the value of the adapter's element.
+	 * Return whether the removal was successful.
+	 */
+	protected abstract boolean removeAnnotation(ModifiedDeclaration declaration, Annotation outer, Expression value);
+
+	/**
+	 * Set the value of the specified outer annotation to the
+	 * specified inner annotation.
+	 */
+	protected abstract void modifyAnnotationValue(SingleMemberAnnotation outer, Annotation inner);
+
+	/**
+	 * Set the value of the specified member value pair to the
+	 * specified inner annotation.
+	 */
+	protected abstract void modifyMemberValuePair(MemberValuePair pair, Annotation inner);
+
+
+	// ********** public methods **********
+
+	public DeclarationAnnotationAdapter getOuterAnnotationAdapter() {
+		return this.outerAnnotationAdapter;
+	}
+
+	public String getElementName() {
+		return this.elementName;
+	}
+
+
+	// ********** internal methods **********
+
+	/**
+	 * If the specified expression is an annotation, cast it to an annotation;
+	 * otherwise return null.
+	 */
+	protected Annotation annotationValue(Expression expression) {
+		switch (expression.getNodeType()) {
+			case ASTNode.NORMAL_ANNOTATION:
+			case ASTNode.SINGLE_MEMBER_ANNOTATION:
+			case ASTNode.MARKER_ANNOTATION:
+				return (Annotation) expression;
+			default:
+				return null;
+		}
+	}
+
+	/**
+	 * Remove the *first* annotation element with the specified name
+	 * from the specified annotation, converting the annotation as appropriate.
+	 */
+	protected void removeElementAndNormalize(ModifiedDeclaration declaration, Annotation outer) {
+		if (outer.isNormalAnnotation()) {
+			this.removeElementAndNormalize(declaration, (NormalAnnotation) outer);
+		} else if (outer.isSingleMemberAnnotation()) {
+			this.removeElementAndNormalize(declaration, (SingleMemberAnnotation) outer);
+		} else if (outer.isMarkerAnnotation()) {
+			this.removeElementAndNormalize(declaration, (MarkerAnnotation) outer);
+		} else {
+			throw new IllegalArgumentException("unknown annotation type: " + outer); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Remove the *first* annotation element with the adapter's element name
+	 * from the specified annotation. Convert the annotation to
+	 * a marker annotation or single member annotation if appropriate.
+	 * <pre>
+	 * &#64;Outer(name="Fred", foo=&#64;Inner) => &#64;Outer(name="Fred")
+	 * &#64;Outer(foo=&#64;Inner) => &#64;Outer
+	 * </pre>
+	 */
+	protected void removeElementAndNormalize(ModifiedDeclaration declaration, NormalAnnotation outer) {
+		this.removeElement(outer);
+		this.normalizeAnnotation(declaration, outer);
+	}
+
+	/**
+	 * Remove from the specified annotation the element with
+	 * the adapter's element name.
+	 */
+	protected void removeElement(NormalAnnotation annotation) {
+		for (Iterator<MemberValuePair> stream = this.values(annotation).iterator(); stream.hasNext(); ) {
+			MemberValuePair pair = stream.next();
+			if (pair.getName().getFullyQualifiedName().equals(this.elementName)) {
+				stream.remove();
+				break;
+			}
+		}
+	}
+
+	/**
+	 * Convert the specified normal annotation to a marker annotation or
+	 * single member annotation if appropriate.
+	 */
+	protected void normalizeAnnotation(ModifiedDeclaration declaration, NormalAnnotation outer) {
+		List<MemberValuePair> values = this.values(outer);
+		switch (values.size()) {
+			case 0:
+				// if the elements are all gone, remove the annotation or convert it to a marker annotation
+				if (this.removeOuterAnnotationWhenEmpty) {
+					this.outerAnnotationAdapter.removeAnnotation(declaration);
+				} else {
+					// convert the annotation to a marker annotation
+					this.outerAnnotationAdapter.newMarkerAnnotation(declaration);
+				}
+				break;
+			case 1:
+				MemberValuePair pair = values.get(0);
+				if (pair.getName().getFullyQualifiedName().equals(VALUE)) {
+					// if the last remaining element is 'value', convert the annotation to a single member annotation
+					Expression vv = pair.getValue();
+					vv = (Expression) ASTNode.copySubtree(vv.getAST(), vv);
+					this.outerAnnotationAdapter.newSingleMemberAnnotation(declaration).setValue(vv);
+				}
+				break;
+			default:
+				// do nothing
+				break;
+		}
+	}
+
+	/**
+	 * Convert the specified single member annotation to a marker annotation
+	 * if the adapter's element name is "value".
+	 */
+	protected void removeElementAndNormalize(ModifiedDeclaration declaration, @SuppressWarnings("unused") SingleMemberAnnotation outer) {
+		if (this.elementName.equals(VALUE)) {
+			if (this.removeOuterAnnotationWhenEmpty) {
+				this.outerAnnotationAdapter.removeAnnotation(declaration);
+			} else {
+				// convert the annotation to a marker annotation
+				this.outerAnnotationAdapter.newMarkerAnnotation(declaration);
+			}
+		}
+	}
+
+	protected void removeElementAndNormalize(ModifiedDeclaration declaration, @SuppressWarnings("unused") MarkerAnnotation outer) {
+		if (this.removeOuterAnnotationWhenEmpty) {
+			this.outerAnnotationAdapter.removeAnnotation(declaration);
+		}
+	}
+
+	/**
+	 * Return the value of the *first* annotation element
+	 * with the adapter's element name.
+	 * Return null if the annotation has no such element.
+	 * (An element name of "value" will return the value of a single
+	 * member annotation.)
+	 */
+	protected Expression elementValue(Annotation annotation) {
+		if (annotation.isNormalAnnotation()) {
+			return this.elementValue((NormalAnnotation) annotation);
+		}
+		if (annotation.isSingleMemberAnnotation()) {
+			return this.elementValue((SingleMemberAnnotation) annotation);
+		}
+		return null;
+	}
+
+	protected Expression elementValue(NormalAnnotation annotation) {
+		MemberValuePair pair = this.memberValuePair(annotation);
+		return (pair == null) ? null : pair.getValue();
+	}
+
+	/**
+	 * If the adapter's element name is "value", return the value of the
+	 * annotation, otherwise return null.
+	 */
+	protected Expression elementValue(SingleMemberAnnotation annotation) {
+		return this.elementName.equals(VALUE) ? annotation.getValue() : null;
+	}
+
+	/**
+	 * Return the *first* member value pair for the adapter's element name.
+	 * Return null if the specified annotation has no such element.
+	 */
+	protected MemberValuePair memberValuePair(NormalAnnotation annotation) {
+		for (MemberValuePair pair : this.values(annotation)) {
+			if (pair.getName().getFullyQualifiedName().equals(this.elementName)) {
+				return pair;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Build a new outer annotation and add the specified
+	 * inner annotation to it:
+	 * <pre>
+	 *     &#64;Outer(&#64;Inner)
+	 * </pre>
+	 * or
+	 * <pre>
+	 *     &#64;Outer(foo=&#64;Inner)
+	 * </pre>
+	 */
+	protected void buildNewOuterAnnotation(ModifiedDeclaration declaration, Annotation inner) {
+		if (this.elementName.equals(VALUE)) {
+			this.outerAnnotationAdapter.newSingleMemberAnnotation(declaration).setValue(this.buildNewInnerExpression(inner));
+		} else {
+			List<MemberValuePair> values = this.values(this.outerAnnotationAdapter.newNormalAnnotation(declaration));
+			values.add(this.newMemberValuePair(this.buildNewInnerExpression(inner)));
+		}
+	}
+
+	/**
+	 * Build an expression to be added to a new outer annotation
+	 * for the specified inner annotation.
+	 */
+	protected abstract Expression buildNewInnerExpression(Annotation inner);
+
+	/**
+	 * Build a new member value pair with the specified name and value.
+	 */
+	protected MemberValuePair newMemberValuePair(String name, Expression value) {
+		AST ast = value.getAST();
+		MemberValuePair pair = ast.newMemberValuePair();
+		pair.setName(ast.newSimpleName(name));
+		pair.setValue(value);
+		return pair;
+	}
+
+	/**
+	 * Build a new member value pair with the adapter's element name
+	 * and the specified inner annotation.
+	 */
+	protected MemberValuePair newMemberValuePair(Expression value) {
+		return this.newMemberValuePair(this.elementName, value);
+	}
+
+	/**
+	 * Add the specified inner annotation to the marker annotation.
+	 */
+	protected void modifyAnnotation(ModifiedDeclaration declaration, @SuppressWarnings("unused") MarkerAnnotation outer, Annotation inner) {
+		this.buildNewOuterAnnotation(declaration, inner);
+	}
+
+	/**
+	 * Add the specified inner annotation to the single member annotation.
+	 */
+	protected void modifyAnnotation(ModifiedDeclaration declaration, SingleMemberAnnotation outer, Annotation inner) {
+		if (this.elementName.equals(VALUE)) {
+			this.modifyAnnotationValue(outer, inner);
+		} else {
+			this.modifyAnnotationNonValue(declaration, outer, inner);
+		}
+	}
+
+	/**
+	 * Add the specified inner annotation to the single member annotation,
+	 * converting it to a normal annotation:
+	 * <pre>
+	 *     &#64;Outer("lorem ipsum") => &#64;Outer(value="lorem ipsum", foo=&#64;Inner)
+	 * </pre>
+	 */
+	protected void modifyAnnotationNonValue(ModifiedDeclaration declaration, SingleMemberAnnotation outer, Annotation inner) {
+		Expression vv = outer.getValue();
+		vv = (Expression) ASTNode.copySubtree(vv.getAST(), vv);
+		NormalAnnotation newOuter = this.outerAnnotationAdapter.newNormalAnnotation(declaration);
+		List<MemberValuePair> values = this.values(newOuter);
+		values.add(this.newMemberValuePair(VALUE, vv));
+		values.add(this.newMemberValuePair(this.buildNewInnerExpression(inner)));
+	}
+
+	/**
+	 * Add the specified inner annotation to the normal annotation:
+	 * <pre>
+	 *     &#64;Outer(bar="lorem ipsum") => &#64;Outer(bar="lorem ipsum", foo=&#64;Inner)
+	 * </pre>
+	 * or
+	 * <pre>
+	 *     &#64;Outer(foo=&#64;Inner("lorem ipsum")) => &#64;Outer(foo=&#64;Inner)
+	 * </pre>
+	 */
+	protected void modifyAnnotation(@SuppressWarnings("unused") ModifiedDeclaration declaration, NormalAnnotation outer, Annotation inner) {
+		MemberValuePair pair = this.memberValuePair(outer);
+		if (pair == null) {
+			List<MemberValuePair> values = this.values(outer);
+			values.add(this.newMemberValuePair(inner));
+		} else {
+			this.modifyMemberValuePair(pair, inner);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AnnotationStringArrayExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AnnotationStringArrayExpressionConverter.java
new file mode 100644
index 0000000..889b59e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AnnotationStringArrayExpressionConverter.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert an array initializer or single expression to/from an array of
+ * strings (e.g. {"text0", "text1"}).
+ * E is the type of the expressions to be found either standalone or
+ * as elements in the array initializer.
+ */
+public class AnnotationStringArrayExpressionConverter
+	extends AbstractExpressionConverter<String[]>
+{
+	private final ExpressionConverter<String> elementConverter;
+	private final StringArrayExpressionConverter arrayConverter;
+
+
+	/**
+	 * The default behavior is to remove the array initializer if it is empty.
+	 */
+	public AnnotationStringArrayExpressionConverter(ExpressionConverter<String> elementConverter) {
+		this(elementConverter, true);
+	}
+
+	public AnnotationStringArrayExpressionConverter(ExpressionConverter<String> elementConverter, boolean removeArrayInitializerWhenEmpty) {
+		super();
+		this.elementConverter = elementConverter;
+		this.arrayConverter = new StringArrayExpressionConverter(elementConverter, removeArrayInitializerWhenEmpty);
+	}
+
+	/**
+	 * if we only have a single string in the array return the single expression,
+	 * without braces, instead of an array initializer
+	 */
+	@Override
+	protected Expression convertObject(String[] strings, AST ast) {
+		return (strings.length == 1) ?
+				this.elementConverter.convert(strings[0], ast)
+			:
+				this.arrayConverter.convertObject(strings, ast);
+	}
+
+	@Override
+	protected String[] convertNull() {
+		return this.arrayConverter.convertNull();
+	}
+
+	/**
+	 * check for a single expression with no surrounding braces, implying a
+	 * single-entry array
+	 */
+	@Override
+	protected String[] convertExpression(Expression expression) {
+		return (expression.getNodeType() == ASTNode.ARRAY_INITIALIZER) ?
+				this.arrayConverter.convertArrayInitializer((ArrayInitializer) expression)
+			:
+				new String[] {this.elementConverter.convert(expression)};
+	}
+
+
+	// ********** factory methods **********
+
+	/**
+	 * Build an expression converter for an annotation element of type String[].
+	 *     @Foo(bar={"text0", "text1"})
+	 * or
+	 *     @Foo(bar="text0")
+	 */
+	public static AnnotationStringArrayExpressionConverter forStrings() {
+		return new AnnotationStringArrayExpressionConverter(StringExpressionConverter.instance());
+	}
+
+	/**
+	 * Build an expression converter for an annotation element of type <enum>[].
+	 *     @Foo(bar={BAZ, BAT})
+	 * or
+	 *     @Foo(bar=BAZ)
+	 */
+	public static AnnotationStringArrayExpressionConverter forNames() {
+		return new AnnotationStringArrayExpressionConverter(NameStringExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/BooleanExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/BooleanExpressionConverter.java
new file mode 100644
index 0000000..d6fc40d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/BooleanExpressionConverter.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.BooleanLiteral;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a boolean literal to/from a Boolean
+ * (e.g. Boolean.TRUE).
+ */
+public final class BooleanExpressionConverter
+	extends AbstractExpressionConverter<Boolean>
+{
+	private static final ExpressionConverter<Boolean> INSTANCE = new BooleanExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<Boolean> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private BooleanExpressionConverter() {
+		super();
+	}
+
+	@Override
+	protected BooleanLiteral convertObject(Boolean booleanObject, AST ast) {
+		return ast.newBooleanLiteral(booleanObject.booleanValue());
+	}
+
+	@Override
+	protected Boolean convertExpression(Expression expression) {
+		Object value = expression.resolveConstantExpressionValue();
+		return (value instanceof Boolean) ? ((Boolean) value) : null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/CharacterStringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/CharacterStringExpressionConverter.java
new file mode 100644
index 0000000..1da206b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/CharacterStringExpressionConverter.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.CharacterLiteral;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a character literal to/from a string representation of a character
+ * (e.g. "A").
+ */
+public final class CharacterStringExpressionConverter
+	extends AbstractExpressionConverter<String>
+{
+	private static final ExpressionConverter<String> INSTANCE = new CharacterStringExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<String> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private CharacterStringExpressionConverter() {
+		super();
+	}
+	
+	@Override
+	protected CharacterLiteral convertObject(String string, AST ast) {
+		CharacterLiteral characterLiteral = ast.newCharacterLiteral();
+		characterLiteral.setCharValue(string.charAt(0));
+		return characterLiteral;
+	}
+
+	@Override
+	protected String convertExpression(Expression expression) {
+		Object value = expression.resolveConstantExpressionValue();
+		return (value instanceof Character) ? ((Character) value).toString() : null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..e43a30e9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapter.java
@@ -0,0 +1,496 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Manipulate an annotation that either occurs stand-alone, e.g.
+ * <pre>
+ *     &#64;Inner("zero")
+ *     private int id;
+ * </pre>
+ *     
+ * or is embedded in an element array within another annotation, e.g.
+ * <pre>
+ *     &#64;Outer(foo={&#64;Inner("zero"), &#64;Inner("one"), &#64;Inner("two")})
+ *     private int id;
+ *     
+ *         annotationName = "Inner"
+ *         containerAnnotationName = "Outer"
+ *         elementName = "foo"
+ *         index = 0-2
+ * </pre>
+ * 
+ * This is a useful pattern because a declaration cannot have more
+ * than one annotation of the same type, and allowing the stand-alone
+ * configuration reduces clutter.
+ * <br>
+ * NB: This configuration only makes sense for "top-level" annotations, as
+ * opposed to "nested" annotations. This is because annotation elements
+ * can only be declared with a type of a single annotation and annotations
+ * cannot be part of an inheritance hierarchy.
+ * For example, the following configurations cannot *both* be supported:
+ * <pre>
+ *     &#64;Foo(bar=&#64;Outer(...))
+ *     private int id;
+ * 
+ *     &#64;Foo(bar=&#64;Inner(...))  // not allowed
+ *     private int id;
+ * </pre>
+ * 
+ * NB: Behavior is undefined when both the stand-alone and the nested
+ * configurations annotate the same declaration, e.g.
+ * <pre>
+ *     // undefined behavior
+ *     &#64;Inner("zero")
+ *     &#64;Outer(foo={&#64;Inner("zero"), &#64;Inner("one"), &#64;Inner("two")})
+ *     private int id;
+ * </pre>
+ */
+public class CombinationIndexedDeclarationAnnotationAdapter
+	implements IndexedDeclarationAnnotationAdapter
+{
+
+	/**
+	 * this adapter is used when the annotation is "stand-alone":
+	 * <pre>
+	 *     &#64;Inner("zero")
+	 * </pre>
+	 * and is only used when the index is 0 or 1
+	 */
+	private final SimpleDeclarationAnnotationAdapter standAloneAnnotationAdapter;
+
+	/**
+	 * this adapter is used when the annotation is "nested":
+	 * <pre>
+	 *     &#64;Outer(foo={&#64;Inner("zero"), &#64;Inner("one")})
+	 * </pre>
+	 */
+	private final NestedIndexedDeclarationAnnotationAdapter nestedAnnotationAdapter;
+
+	/**
+	 * this adapter is for the "nested" annotation at the zero index;
+	 * and is only used when the index is 1
+	 */
+	private final NestedIndexedDeclarationAnnotationAdapter zeroNestedAnnotationAdapter;
+
+	// reduce NLS checks
+	protected static final String VALUE = "value"; //$NON-NLS-1$
+
+
+	// ********** constructors **********
+
+	/**
+	 * default element name is "value"
+	 * <pre>
+	 *     &#64;Inner("zero")
+	 *     &#64;Outer({&#64;Inner("zero"), &#64;Inner("one")})
+	 * </pre>
+	 */
+	public CombinationIndexedDeclarationAnnotationAdapter(String annotationName, String containerAnnotationName, int index) {
+		this(annotationName, containerAnnotationName, VALUE, index);
+	}
+
+	public CombinationIndexedDeclarationAnnotationAdapter(String annotationName, String containerAnnotationName, String elementName, int index) {
+		this(new SimpleDeclarationAnnotationAdapter(annotationName), new SimpleDeclarationAnnotationAdapter(containerAnnotationName), elementName, index, annotationName);
+	}
+
+	/**
+	 * default element name is "value"
+	 */
+	public CombinationIndexedDeclarationAnnotationAdapter(
+			SimpleDeclarationAnnotationAdapter standAloneAnnotationAdapter, 
+			SimpleDeclarationAnnotationAdapter containerAnnotationAdapter, 
+			int index, 
+			String nestedAnnotationName
+	) {
+		this(standAloneAnnotationAdapter, containerAnnotationAdapter, VALUE, index, nestedAnnotationName);
+	}
+
+	public CombinationIndexedDeclarationAnnotationAdapter(
+			SimpleDeclarationAnnotationAdapter standAloneAnnotationAdapter, 
+			SimpleDeclarationAnnotationAdapter containerAnnotationAdapter, 
+			String elementName, 
+			int index, 
+			String nestedAnnotationName
+	) {
+		super();
+		this.standAloneAnnotationAdapter = standAloneAnnotationAdapter;
+		this.nestedAnnotationAdapter = new NestedIndexedDeclarationAnnotationAdapter(containerAnnotationAdapter, elementName, index, nestedAnnotationName);
+		this.zeroNestedAnnotationAdapter = new NestedIndexedDeclarationAnnotationAdapter(containerAnnotationAdapter, elementName, 0, nestedAnnotationName);
+	}
+
+
+	// ********** DeclarationAnnotationAdapter implementation **********
+
+	public Annotation getAnnotation(ModifiedDeclaration declaration) {
+		if (this.getIndex() == 0) {
+			// check for the stand-alone annotation
+			Annotation standAloneAnnotation = this.getStandAloneAnnotation(declaration);
+			if (standAloneAnnotation != null) {
+				return standAloneAnnotation;
+			}
+		}
+		return this.getNestedAnnotation(declaration);
+	}
+
+	/**
+	 * <pre>
+	 * [none] => &#64;Inner
+	 *     or
+	 * &#64;Inner("lorem ipsum") => &#64;Inner
+	 *     or
+	 * &#64;Inner(text="lorem ipsum") => &#64;Inner
+	 *     or
+	 * &#64;Outer(foo={&#64;Inner, &#64;Inner}) => &#64;Outer(foo={&#64;Inner, &#64;Inner, &#64;Inner})
+	 *     or
+	 * &#64;Outer(foo=&#64;Inner) => &#64;Outer(foo={&#64;Inner, &#64;Inner})
+	 *     or
+	 * &#64;Inner => &#64;Outer(foo={&#64;Inner, &#64;Inner})
+	 *     etc.
+	 * </pre>
+	 */
+	public MarkerAnnotation newMarkerAnnotation(ModifiedDeclaration declaration) {
+		return (MarkerAnnotation) this.newAnnotation(MARKER_ANNOTATION_FACTORY, declaration);
+	}
+
+	public SingleMemberAnnotation newSingleMemberAnnotation(ModifiedDeclaration declaration) {
+		return (SingleMemberAnnotation) this.newAnnotation(SINGLE_MEMBER_ANNOTATION_FACTORY, declaration);
+	}
+
+	public NormalAnnotation newNormalAnnotation(ModifiedDeclaration declaration) {
+		return (NormalAnnotation) this.newAnnotation(NORMAL_ANNOTATION_FACTORY, declaration);
+	}
+
+	public void removeAnnotation(ModifiedDeclaration declaration) {
+		if (this.getIndex() == 0) {
+			// check for the stand-alone annotation
+			if (this.standAloneAnnotationIsPresent(declaration)) {
+				this.removeStandAloneAnnotation(declaration);
+				return;
+			}
+		}
+		this.removeNestedAnnotation(declaration);
+		if (this.nestedElementCanBeConvertedToStandAlone(declaration)) {
+			this.convertLastElementAnnotationToStandAloneAnnotation(declaration);
+		}
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		// if the annotation is missing, delegate to the nested annotation adapter
+		Annotation annotation = this.getAnnotation(declaration);
+		return (annotation != null) ? annotation : this.nestedAnnotationAdapter.getAstNode(declaration);
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.getAnnotationName());
+	}
+
+
+	// ********** IndexedDeclarationAnnotationAdapter implementation **********
+
+	public int getIndex() {
+		return this.nestedAnnotationAdapter.getIndex();
+	}
+
+	public void moveAnnotation(int newIndex, ModifiedDeclaration declaration) {
+		int oldIndex = this.getIndex();
+		if (newIndex == oldIndex) {
+			return;
+		}
+
+		Annotation standAloneAnnotation = this.getStandAloneAnnotation(declaration);
+		if (standAloneAnnotation == null) {
+			this.moveNestedAnnotation(newIndex, declaration);
+			if (this.nestedElementCanBeConvertedToStandAlone(declaration)) {
+				this.convertLastElementAnnotationToStandAloneAnnotation(declaration);
+			}
+		} else {
+			if ((oldIndex == 0) && (newIndex == 1)) {
+				// this is one of two situations where we transition from standalone to container
+				this.moveStandAloneAnnotationToContainerAnnotation(standAloneAnnotation, declaration);
+				this.moveNestedAnnotation(newIndex, declaration);
+			} else if (newIndex == 0) {
+				// we are moving a 'null' entry on top of the standalone, so remove it
+				this.removeStandAloneAnnotation(declaration);
+			} else {
+				throw new IllegalStateException("old index = " + oldIndex + "; new index = " + newIndex); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+	}
+
+
+	// ********** internal methods **********
+
+	/**
+	 * build the appropriate new annotation,
+	 * which may require moving the 0th annotation from "stand-alone" to "nested"
+	 */
+	private Annotation newAnnotation(AnnotationFactory annotationFactory, ModifiedDeclaration declaration) {
+		if (this.getIndex() ==  0) {
+			return this.newZeroAnnotation(annotationFactory, declaration);
+		}
+		if (this.zeroNestedAnnotationIsPresent(declaration)) {
+			// manipulate the container annotation - ignore the stand-alone annotation(?)
+			// @Outer(foo=@Inner("zero")) => @Outer(foo={@Inner("zero"), @Inner})
+			//     or
+			// @Outer(foo={@Inner("zero"), @Inner("one")}) => @Outer(foo={@Inner("zero"), @Inner})
+			return annotationFactory.newAnnotation(this.nestedAnnotationAdapter, declaration);
+		}
+
+		// this is one of two situations where we transition from standalone to container
+		this.moveStandAloneAnnotationToContainerAnnotation(declaration);
+		// once the stand-alone annotation is moved to index=0, build the new annotation at index=1
+		return annotationFactory.newAnnotation(this.nestedAnnotationAdapter, declaration);
+	}
+
+	/**
+	 * the index is 0 - build the appropriate new annotation,
+	 * which may be either "stand-alone" or "nested"
+	 */
+	private Annotation newZeroAnnotation(AnnotationFactory annotationFactory, ModifiedDeclaration declaration) {
+		if (this.standAloneAnnotationIsPresent(declaration)) {
+			// replace the stand-alone annotation - ignore the container annotation(?)
+			// @Inner(text="lorem ipsum") => @Inner
+			return annotationFactory.newAnnotation(this.standAloneAnnotationAdapter, declaration);
+		}
+		if (this.containerAnnotationIsPresent(declaration)) {
+			// manipulate the container annotation
+			// @Outer(foo=@Inner(text="lorem ipsum")) => @Outer(foo=@Inner)
+			return annotationFactory.newAnnotation(this.nestedAnnotationAdapter, declaration);
+		}
+		// neither annotation is present - add a new stand-alone annotation
+		return annotationFactory.newAnnotation(this.standAloneAnnotationAdapter, declaration);
+	}
+
+	/**
+	 * move the stand-alone annotation to the container annotation at index=0
+	 */
+	private void moveStandAloneAnnotationToContainerAnnotation(ModifiedDeclaration declaration) {
+		Annotation standAloneAnnotation = this.getStandAloneAnnotation(declaration);
+		if (standAloneAnnotation == null) {
+			throw new IllegalStateException("the stand-alone annotation is missing"); //$NON-NLS-1$
+		}
+		this.moveStandAloneAnnotationToContainerAnnotation(standAloneAnnotation, declaration);
+	}
+
+	/**
+	 * move the specified, non-null, stand-alone annotation to
+	 * the container annotation at index=0
+	 */
+	private void moveStandAloneAnnotationToContainerAnnotation(Annotation standAloneAnnotation, ModifiedDeclaration declaration) {
+		if (standAloneAnnotation.isMarkerAnnotation()) {
+			this.zeroNestedAnnotationAdapter.newMarkerAnnotation(declaration);
+		} else if (standAloneAnnotation.isSingleMemberAnnotation()) {
+			Expression vv = ((SingleMemberAnnotation) standAloneAnnotation).getValue();
+			vv = (Expression) ASTNode.copySubtree(vv.getAST(), vv);
+			this.zeroNestedAnnotationAdapter.newSingleMemberAnnotation(declaration).setValue(vv);
+		} else if (standAloneAnnotation.isNormalAnnotation()) {
+			NormalAnnotation newNA = this.zeroNestedAnnotationAdapter.newNormalAnnotation(declaration);
+			List<MemberValuePair> values = this.values(newNA);
+			for (MemberValuePair pair : this.values((NormalAnnotation) standAloneAnnotation)) {
+				values.add((MemberValuePair) ASTNode.copySubtree(pair.getAST(), pair));
+			}
+		} else {
+			throw new IllegalStateException("unknown annotation type: " + standAloneAnnotation); //$NON-NLS-1$
+		}
+		this.removeStandAloneAnnotation(declaration);
+	}
+
+	/**
+	 * return whether the "nested" annotation container has been reduced to
+	 * a single element (and the array initializer is converted to just
+	 * the single remaining element) and can be further converted to the
+	 * "stand-alone" annotation:
+	 * <pre>
+	 *     &#64;Outer(foo={&#64;Inner("zero"), &#64;Inner("one")}) =>
+	 *     &#64;Outer(foo=&#64;Inner("zero")) =>
+	 *     &#64;Inner("zero")
+	 * </pre>
+	 */
+	private boolean nestedElementCanBeConvertedToStandAlone(ModifiedDeclaration declaration) {
+		Annotation containerAnnotation = this.getContainerAnnotation(declaration);
+		if (containerAnnotation == null) {
+			return false;
+		}
+		if (containerAnnotation.isMarkerAnnotation()) {
+			return false;
+		}
+		if (containerAnnotation.isSingleMemberAnnotation()) {
+			if (this.getElementName().equals(VALUE)) {
+				return (((SingleMemberAnnotation) containerAnnotation).getValue().getNodeType() != ASTNode.ARRAY_INITIALIZER)
+						&& (this.zeroNestedAnnotationAdapter.getAnnotation(declaration) != null);
+			}
+			return false;
+		}
+		if (containerAnnotation.isNormalAnnotation()) {
+			NormalAnnotation na = (NormalAnnotation) containerAnnotation;
+			if (na.values().size() == 0) {
+				return false;  // there are no elements present
+			}
+			if (na.values().size() != 1) {
+				return false;  // there are other elements present - leave them all alone
+			}
+			MemberValuePair pair = (MemberValuePair) na.values().get(0);
+			if (this.getElementName().equals(pair.getName().getFullyQualifiedName())) {
+				return (pair.getValue().getNodeType() != ASTNode.ARRAY_INITIALIZER)
+						&& (this.zeroNestedAnnotationAdapter.getAnnotation(declaration) != null);
+			}
+			return false;
+		}
+		throw new IllegalStateException("unknown annotation type: " + containerAnnotation); //$NON-NLS-1$
+	}
+
+	/**
+	 * move the annotation in the container annotation at index=0
+	 * to the stand-alone annotation
+	 */
+	private void convertLastElementAnnotationToStandAloneAnnotation(ModifiedDeclaration declaration) {
+		Annotation last = this.zeroNestedAnnotationAdapter.getAnnotation(declaration);
+		if (last == null) {
+			throw new IllegalStateException("the last nested annotation is missing"); //$NON-NLS-1$
+		} else if (last.isMarkerAnnotation()) {
+			this.newStandAloneMarkerAnnotation(declaration);
+		} else if (last.isSingleMemberAnnotation()) {
+			Expression vv = ((SingleMemberAnnotation) last).getValue();
+			vv = (Expression) ASTNode.copySubtree(vv.getAST(), vv);
+			this.newStandAloneSingleMemberAnnotation(declaration).setValue(vv);
+		} else if (last.isNormalAnnotation()) {
+			NormalAnnotation newNA = this.newStandAloneNormalAnnotation(declaration);
+			List<MemberValuePair> values = this.values(newNA);
+			for (MemberValuePair pair : this.values((NormalAnnotation) last)) {
+				values.add((MemberValuePair) ASTNode.copySubtree(pair.getAST(), pair));
+			}
+		} else {
+			throw new IllegalStateException("unknown annotation type: " + last); //$NON-NLS-1$
+		}
+		this.zeroNestedAnnotationAdapter.removeAnnotation(declaration);
+	}
+
+	private boolean standAloneAnnotationIsPresent(ModifiedDeclaration declaration) {
+		return this.getStandAloneAnnotation(declaration) != null;
+	}
+
+	private Annotation getStandAloneAnnotation(ModifiedDeclaration declaration) {
+		return this.standAloneAnnotationAdapter.getAnnotation(declaration);
+	}
+
+	private MarkerAnnotation newStandAloneMarkerAnnotation(ModifiedDeclaration declaration) {
+		return this.standAloneAnnotationAdapter.newMarkerAnnotation(declaration);
+	}
+
+	private SingleMemberAnnotation newStandAloneSingleMemberAnnotation(ModifiedDeclaration declaration) {
+		return this.standAloneAnnotationAdapter.newSingleMemberAnnotation(declaration);
+	}
+
+	private NormalAnnotation newStandAloneNormalAnnotation(ModifiedDeclaration declaration) {
+		return this.standAloneAnnotationAdapter.newNormalAnnotation(declaration);
+	}
+
+	private void removeStandAloneAnnotation(ModifiedDeclaration declaration) {
+		this.standAloneAnnotationAdapter.removeAnnotation(declaration);
+	}
+
+	private Annotation getNestedAnnotation(ModifiedDeclaration declaration) {
+		return this.nestedAnnotationAdapter.getAnnotation(declaration);
+	}
+
+	private void moveNestedAnnotation(int newIndex, ModifiedDeclaration declaration) {
+		this.nestedAnnotationAdapter.moveAnnotation(newIndex, declaration);
+	}
+
+	private void removeNestedAnnotation(ModifiedDeclaration declaration) {
+		this.nestedAnnotationAdapter.removeAnnotation(declaration);
+	}
+
+	private boolean containerAnnotationIsPresent(ModifiedDeclaration declaration) {
+		return this.getContainerAnnotation(declaration) != null;
+	}
+
+	private Annotation getContainerAnnotation(ModifiedDeclaration declaration) {
+		return this.nestedAnnotationAdapter.getOuterAnnotationAdapter().getAnnotation(declaration);
+	}
+
+	private boolean zeroNestedAnnotationIsPresent(ModifiedDeclaration declaration) {
+		return this.getZeroNestedAnnotation(declaration) != null;
+	}
+
+	private Annotation getZeroNestedAnnotation(ModifiedDeclaration declaration) {
+		return this.zeroNestedAnnotationAdapter.getAnnotation(declaration);
+	}
+
+	private String getAnnotationName() {
+		return this.nestedAnnotationAdapter.getAnnotationName();
+	}
+
+	private String getElementName() {
+		return this.nestedAnnotationAdapter.getElementName();
+	}
+
+	@SuppressWarnings("unchecked")
+	protected List<MemberValuePair> values(NormalAnnotation na) {
+		return na.values();
+	}
+
+
+	// ********** annotation factories **********
+
+	/**
+	 * define interface that allows us to "re-use" the nasty code in
+	 * #newAnnotation(AnnotationFactory, ModifiedDeclaration)
+	 */
+	private interface AnnotationFactory {
+		Annotation newAnnotation(DeclarationAnnotationAdapter adapter, ModifiedDeclaration declaration);
+	}
+
+	private static final AnnotationFactory MARKER_ANNOTATION_FACTORY = new AnnotationFactory() {
+		public Annotation newAnnotation(DeclarationAnnotationAdapter adapter, ModifiedDeclaration declaration) {
+			return adapter.newMarkerAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return "MarkerAnnotationFactory"; //$NON-NLS-1$
+		}
+	};
+
+	private static final AnnotationFactory SINGLE_MEMBER_ANNOTATION_FACTORY = new AnnotationFactory() {
+		public Annotation newAnnotation(DeclarationAnnotationAdapter adapter, ModifiedDeclaration declaration) {
+			return adapter.newSingleMemberAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return "SingleMemberAnnotationFactory"; //$NON-NLS-1$
+		}
+	};
+
+	private static final AnnotationFactory NORMAL_ANNOTATION_FACTORY = new AnnotationFactory() {
+		public Annotation newAnnotation(DeclarationAnnotationAdapter adapter, ModifiedDeclaration declaration) {
+			return adapter.newNormalAnnotation(declaration);
+		}
+		@Override
+		public String toString() {
+			return "NormalAnnotationFactory"; //$NON-NLS-1$
+		}
+	};
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ConversionDeclarationAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ConversionDeclarationAnnotationElementAdapter.java
new file mode 100644
index 0000000..8a70c22
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ConversionDeclarationAnnotationElementAdapter.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Wrap a declaration annotation element adapter that deals with AST
+ * expressions, converting them to/from various other objects.
+ * T is the type of the object to be passed to and returned by the adapter.
+ */
+public class ConversionDeclarationAnnotationElementAdapter<T>
+	implements DeclarationAnnotationElementAdapter<T>
+{
+	/**
+	 * The wrapped adapter that returns and takes AST expressions.
+	 */
+	private final DeclarationAnnotationElementAdapter<Expression> adapter;
+
+	/**
+	 * The converter that converts AST expressions to other objects
+	 * (e.g. Strings).
+	 */
+	private final ExpressionConverter<T> converter;
+
+
+	// ********** constructors **********
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed.
+	 */
+	public ConversionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, ExpressionConverter<T> converter) {
+		this(new ExpressionDeclarationAnnotationElementAdapter<Expression>(annotationAdapter), converter);
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed.
+	 */
+	public ConversionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, ExpressionConverter<T> converter) {
+		this(new ExpressionDeclarationAnnotationElementAdapter<Expression>(annotationAdapter, elementName), converter);
+	}
+
+	public ConversionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty, ExpressionConverter<T> converter) {
+		this(new ExpressionDeclarationAnnotationElementAdapter<Expression>(annotationAdapter, elementName, removeAnnotationWhenEmpty), converter);
+	}
+
+	public ConversionDeclarationAnnotationElementAdapter(DeclarationAnnotationElementAdapter<Expression> adapter, ExpressionConverter<T> converter) {
+		super();
+		this.adapter = adapter;
+		this.converter = converter;
+	}
+
+
+	// ********** DeclarationAnnotationElementAdapter implementation **********
+
+	public T getValue(ModifiedDeclaration declaration) {
+		Expression expression = this.adapter.getValue(declaration);
+		return this.converter.convert(expression);
+	}
+
+	public void setValue(T value, ModifiedDeclaration declaration) {
+		Expression expression;
+		try {
+			expression = this.converter.convert(value, declaration.getAst());
+		} catch (IllegalArgumentException ex) {
+			// if there is a problem converting the 'value' to an Expression we get this exception
+			return;  // don't set the value if it is "illegal"
+		}
+		this.adapter.setValue(expression, declaration);
+	}
+
+	public Expression getExpression(ModifiedDeclaration declaration) {
+		return this.adapter.getExpression(declaration);
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		return this.adapter.getAstNode(declaration);
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.adapter);
+	}
+
+
+	// ********** factory static methods **********
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed;
+	 * the default expression converter expects string constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<String> forStrings(DeclarationAnnotationAdapter annotationAdapter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, StringExpressionConverter.instance());
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed; the default expression converter expects
+	 * string constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<String> forStrings(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, StringExpressionConverter.instance());
+	}
+
+	/**
+	 * The default expression converter expects string constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<String> forStrings(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, removeAnnotationWhenEmpty, StringExpressionConverter.instance());
+	}
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed;
+	 * the default expression converter expects number constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<Integer> forNumbers(DeclarationAnnotationAdapter annotationAdapter) {
+		return new ConversionDeclarationAnnotationElementAdapter<Integer>(annotationAdapter, NumberIntegerExpressionConverter.instance());
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed; the default expression converter expects
+	 * number constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<Integer> forNumbers(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Integer>(annotationAdapter, elementName, NumberIntegerExpressionConverter.instance());
+	}
+
+	/**
+	 * The default expression converter expects number constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<Integer> forNumbers(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		return new ConversionDeclarationAnnotationElementAdapter<Integer>(annotationAdapter, elementName, removeAnnotationWhenEmpty, NumberIntegerExpressionConverter.instance());
+	}
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed;
+	 * the default expression converter expects boolean constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<Boolean> forBooleans(DeclarationAnnotationAdapter annotationAdapter) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, BooleanExpressionConverter.instance());
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed; the default expression converter expects
+	 * boolean constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<Boolean> forBooleans(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, BooleanExpressionConverter.instance());
+	}
+
+	/**
+	 * The default expression converter expects boolean constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<Boolean> forBooleans(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		return new ConversionDeclarationAnnotationElementAdapter<Boolean>(annotationAdapter, elementName, removeAnnotationWhenEmpty, BooleanExpressionConverter.instance());
+	}
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed;
+	 * the default expression converter expects character constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<String> forCharacters(DeclarationAnnotationAdapter annotationAdapter) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, CharacterStringExpressionConverter.instance());
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed; the default expression converter expects
+	 * character constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<String> forCharacters(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, CharacterStringExpressionConverter.instance());
+	}
+
+	/**
+	 * The default expression converter expects character constant expressions.
+	 */
+	public static ConversionDeclarationAnnotationElementAdapter<String> forCharacters(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		return new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, removeAnnotationWhenEmpty, CharacterStringExpressionConverter.instance());
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/DefaultAnnotationEditFormatter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/DefaultAnnotationEditFormatter.java
new file mode 100644
index 0000000..0f6cfd9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/DefaultAnnotationEditFormatter.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.text.edits.InsertEdit;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * This implementation will clean up some of the nasty Eclipse annotation
+ * formatting (or lack thereof); e.g. arrays of annotations.
+ */
+public final class DefaultAnnotationEditFormatter
+	implements AnnotationEditFormatter
+{
+	private static final DefaultAnnotationEditFormatter INSTANCE = new DefaultAnnotationEditFormatter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static DefaultAnnotationEditFormatter instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private DefaultAnnotationEditFormatter() {
+		super();
+	}
+
+	/**
+	 * TODO
+	 */
+	public void format(IDocument doc, TextEdit editTree) throws MalformedTreeException, BadLocationException {
+		TextEdit[] edits = editTree.getChildren();
+		int len = edits.length;
+		if (len == 0) {
+			return;
+		}
+
+		MultiTextEdit extraEdits = new MultiTextEdit();
+		for (int i = 0; i < len; i++) {
+			TextEdit edit1 = edits[i];
+			if ( ! (edit1 instanceof InsertEdit)) {
+				continue;  // if the edit is not an insert, skip to the next edit
+			}
+			InsertEdit insert1 = (InsertEdit) edit1;
+			int j = i + 1;
+			if (j < len) {
+				TextEdit edit2 = edits[j];
+				if (edit2 instanceof InsertEdit) {
+					InsertEdit insert2 = (InsertEdit) edit2;
+					String text1 = insert1.getText();
+					String text2 = insert2.getText();
+					int offset1 = insert1.getOffset();
+					int offset2 = insert2.getOffset();
+					if (this.stringIsAnnotation(text1) && text2.equals(" ")) {
+						// an annotation was inserted before something on the same line;
+						// replace the trailing space with a newline and appropriate indent
+						extraEdits.addChild(new ReplaceEdit(offset2, 1, this.buildCR(doc, offset2)));
+						i++;  // jump the index past 'edit2'
+						continue;  // go to the next edit
+					}
+					int comma1Length = this.commaLength(text1);
+					if ((comma1Length != 0) && this.stringIsAnnotation(text2)) {
+						// an annotation was inserted in an array initializer on the
+						// same line as the previous array element;
+						// replace the preceding space with a newline and appropriate indent
+						extraEdits.addChild(new ReplaceEdit(offset1 + comma1Length, text1.length() - comma1Length, this.buildCR(doc, offset1)));
+						i++;  // jump the index past 'edit2'
+						continue;  // go to the next edit
+					}
+				}
+			}
+			this.formatArrayInitializer(doc, insert1, extraEdits);
+		}
+		extraEdits.apply(doc, TextEdit.NONE);
+	}
+
+	/**
+	 * If the insert edit is inserting an annotation containing an array of annotations as
+	 * its value then format them nicely.
+	 */
+	private void formatArrayInitializer(IDocument doc, InsertEdit insertEdit, MultiTextEdit extraEdits) throws BadLocationException {
+		String s = insertEdit.getText();
+		if ( ! this.stringIsAnnotation(s)) {
+			return;
+		}
+		int len = s.length();
+		int pos = 1;  // skip '@'
+		while (pos < len) {
+			char c = s.charAt(pos);
+			pos++;  // bump to just past first '('
+			if (c == '(') {
+				break;
+			}
+		}
+		if (pos == len) {
+			return;  // reached end of string
+		}
+		while (pos < len) {
+			char c = s.charAt(pos);
+			pos++;  // bump to just past first '{'
+			if (c == '{') {
+				break;
+			}
+			if (c != ' ') {
+				return;
+			}
+		}
+		if (pos == len) {
+			return;  // reached end of string
+		}
+		// now look for '@' not inside parentheses and put in 
+		// line delimeter and indent string before each
+		int offset = insertEdit.getOffset();
+		String indent = null;
+		int parenDepth = 0;
+		while (pos < len) {
+			switch (s.charAt(pos)) {
+				case '(' :
+					parenDepth++;
+					break;
+				case ')' :
+					parenDepth--;
+					break;
+				case '@' :
+					if (parenDepth == 0) {
+						if (indent == null) {
+							indent = this.buildCR(doc, offset, "\t");  // TODO use tab preference?
+						}
+						extraEdits.addChild(new InsertEdit(offset + pos, indent));
+					}
+					break;
+				case '}' :
+					if (parenDepth == 0) {
+						extraEdits.addChild(new InsertEdit(offset + pos, this.buildCR(doc, offset)));
+					}
+					break;
+			}
+			pos++;
+		}
+	}
+
+	/**
+	 * Build a string containing a line delimeter and indenting characters 
+	 * matching the indent level of the line containing the character offset
+	 * (i.e. the new line's indent matches the current line).
+	 */
+	private String buildCR(IDocument doc, int offset) throws BadLocationException {
+		return this.buildCR(doc, offset, "");
+	}
+
+	private String buildCR(IDocument doc, int offset, String suffix) throws BadLocationException {
+		int line = doc.getLineOfOffset(offset);
+		StringBuilder sb = new StringBuilder();
+		sb.append(doc.getLineDelimiter(line));  // use same CR as current line
+
+		int o = doc.getLineOffset(line);  // match the whitespace of the current line
+		char c = doc.getChar(o++);
+		while ((c == ' ') || (c == '\t')) {
+			sb.append(c);
+			c = doc.getChar(o++);
+		}
+		sb.append(suffix);
+		return sb.toString();
+	}
+
+	/**
+	 * Return whether the specified string is an annotation.
+	 */
+	private boolean stringIsAnnotation(String string) {
+		return (string.length() > 1) && string.charAt(0) == '@';
+	}
+
+	/**
+	 * If the specified string is a single comma, possibly surrounded by
+	 * spaces, return the length of the substring containing the
+	 * initial spaces and the comma.
+	 */
+	private int commaLength(String string) {
+		boolean comma = false;
+		int len = string.length();
+		int result = 0;
+		for (int i = 0; i < len; i++) {
+			switch (string.charAt(i)) {
+				case ' ' :
+					if ( ! comma) {
+						result++;  // space preceding comma
+					}
+					break;
+				case ',' :
+					if (comma) {
+						return 0;  // second comma!
+					}
+					comma = true;
+					result++;
+					break;
+				default:
+					return 0;  // non-comma, non-space char
+			}
+		}
+		return result;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/EnumArrayDeclarationAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/EnumArrayDeclarationAnnotationElementAdapter.java
new file mode 100644
index 0000000..92c8728
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/EnumArrayDeclarationAnnotationElementAdapter.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Wrap a declaration annotation element adapter and simply
+ * add an import for the enums when necessary.
+ */
+public class EnumArrayDeclarationAnnotationElementAdapter
+	implements DeclarationAnnotationElementAdapter<String[]>
+{
+	/**
+	 * The wrapped adapter that returns and takes name strings (enums).
+	 */
+	private final ConversionDeclarationAnnotationElementAdapter<String[]> adapter;
+
+	private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+
+	// ********** constructors **********
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed.
+	 */
+	public EnumArrayDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter) {
+		this(annotationAdapter, VALUE);
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed and remove the array initializer if it is empty.
+	 */
+	public EnumArrayDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		this(annotationAdapter, elementName, true);
+	}
+
+	/**
+	 * The default behavior is to remove the array initializer if it is empty.
+	 */
+	public EnumArrayDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		this(annotationAdapter, elementName, removeAnnotationWhenEmpty, true);
+	}
+
+	public EnumArrayDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty, boolean removeArrayInitializerWhenEmpty) {
+		this(new ConversionDeclarationAnnotationElementAdapter<String[]>(annotationAdapter, elementName, removeAnnotationWhenEmpty, buildExpressionConverter(removeArrayInitializerWhenEmpty)));
+	}
+
+	private static ExpressionConverter<String[]> buildExpressionConverter(boolean removeArrayInitializerWhenEmpty) {
+		return new AnnotationStringArrayExpressionConverter(NameStringExpressionConverter.instance(), removeArrayInitializerWhenEmpty);
+	}
+
+	protected EnumArrayDeclarationAnnotationElementAdapter(ConversionDeclarationAnnotationElementAdapter<String[]> adapter) {
+		super();
+		this.adapter = adapter;
+	}
+
+
+	// ********** DeclarationAnnotationElementAdapter implementation **********
+
+	public String[] getValue(ModifiedDeclaration declaration) {
+		// ignore the adapter's getValue() - we want the expression
+		return this.resolve(this.adapter.getExpression(declaration), declaration);
+	}
+
+	public void setValue(String[] value, ModifiedDeclaration declaration) {
+		this.adapter.setValue(this.convertToSourceCodeNames(value, declaration), declaration);
+	}
+
+	public Expression getExpression(ModifiedDeclaration declaration) {
+		return this.adapter.getExpression(declaration);
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		return this.adapter.getAstNode(declaration);
+	}
+
+
+	// ********** internal methods **********
+
+	/**
+	 * resolve the enums, which can be
+	 *     null
+	 * or
+	 *     {FOO, BAR, BAZ}
+	 * or
+	 *     FOO
+	 */
+	protected String[] resolve(Expression expression, ModifiedDeclaration declaration) {
+		if (expression == null) {
+			return EMPTY_STRING_ARRAY;
+		} else if (expression.getNodeType() == ASTNode.ARRAY_INITIALIZER) {
+			return this.resolveArray((ArrayInitializer) expression, declaration);
+		} else {
+			return this.resolveSingleElement(expression, declaration);
+		}
+	}
+
+	protected String[] resolveArray(ArrayInitializer ai, @SuppressWarnings("unused") ModifiedDeclaration declaration) {
+		List<Expression> expressions = this.expressions(ai);
+		int len = expressions.size();
+		String[] enums = new String[len];
+		for (int i = len; i-- > 0; ) {
+			enums[i] = this.resolveEnum(expressions.get(i));
+		}
+		return enums;
+	}
+
+	protected String[] resolveSingleElement(Expression enumExpression, @SuppressWarnings("unused") ModifiedDeclaration declaration) {
+		return new String[] {this.resolveEnum(enumExpression)};
+	}
+
+	protected String resolveEnum(Expression expression) {
+		return ASTTools.resolveEnum(expression);
+	}
+
+	// minimize scope of suppressd warnings
+	@SuppressWarnings("unchecked")
+	private List<Expression> expressions(ArrayInitializer arrayInitializer) {
+		return arrayInitializer.expressions();
+	}
+
+	/**
+	 * convert the fully-qualified enums to names that can be inserted in source code
+	 * NB: imports may be added as a side-effect :-(
+	 */
+	protected String[] convertToSourceCodeNames(String[] enums, ModifiedDeclaration declaration) {
+		if (enums == null) {
+			return null;
+		}
+		int len = enums.length;
+		String[] sourceCodeNames = new String[len];
+		for (int i = 0; i < len; i++) {
+			sourceCodeNames[i] = this.convertToSourceCodeName(enums[i], declaration);
+		}
+		return sourceCodeNames;
+	}
+
+	protected String convertToSourceCodeName(String enum_, ModifiedDeclaration declaration) {
+		return EnumDeclarationAnnotationElementAdapter.convertToSourceCodeName(enum_, declaration);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/EnumDeclarationAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/EnumDeclarationAnnotationElementAdapter.java
new file mode 100644
index 0000000..c9ccb8d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/EnumDeclarationAnnotationElementAdapter.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Wrap a declaration annotation element adapter and simply
+ * add an import for the enum when necessary.
+ */
+public class EnumDeclarationAnnotationElementAdapter
+	implements DeclarationAnnotationElementAdapter<String>
+{
+	/**
+	 * The wrapped adapter that returns and takes name strings (enums).
+	 */
+	private final ConversionDeclarationAnnotationElementAdapter<String> adapter;
+
+
+	// ********** constructors **********
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed.
+	 */
+	public EnumDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter) {
+		this(annotationAdapter, VALUE);
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed.
+	 */
+	public EnumDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		this(annotationAdapter, elementName, true);
+	}
+
+	public EnumDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		this(new ConversionDeclarationAnnotationElementAdapter<String>(annotationAdapter, elementName, removeAnnotationWhenEmpty, NameStringExpressionConverter.instance()));
+	}
+
+	protected EnumDeclarationAnnotationElementAdapter(ConversionDeclarationAnnotationElementAdapter<String> adapter) {
+		super();
+		this.adapter = adapter;
+	}
+
+
+	// ********** DeclarationAnnotationElementAdapter implementation **********
+
+	public String getValue(ModifiedDeclaration declaration) {
+		return this.resolve(this.adapter.getExpression(declaration));
+	}
+
+	public void setValue(String value, ModifiedDeclaration declaration) {
+		this.adapter.setValue(convertToSourceCodeName(value, declaration), declaration);
+	}
+
+	public Expression getExpression(ModifiedDeclaration declaration) {
+		return this.adapter.getExpression(declaration);
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		return this.adapter.getAstNode(declaration);
+	}
+
+
+	// ********** internal methods **********
+
+	/**
+	 * resolve the enum
+	 */
+	protected String resolve(Expression expression) {
+		return ASTTools.resolveEnum(expression);
+	}
+
+	/**
+	 * convert the fully-qualified enum constant to a static import and the constant's short name, e.g.
+	 *     static import javax.persistence.FetchType.EAGER;
+	 *     return "EAGER"
+	 * if that doesn't work, convert to a normal import and the constant's partially-qualified name, e.g.
+	 *     import javax.persistence.FetchType;
+	 *     return "FetchType.EAGER"
+	 * if that doesn't work, simply return the constant's fully-qualified name, e.g.
+	 *     return "javax.persistence.FetchType.EAGER"
+	 * NB: an import may be added as a side-effect :-(
+	 */
+	protected static String convertToSourceCodeName(String enumConstantName, ModifiedDeclaration declaration) {
+		return (enumConstantName == null) ? null : convertToSourceCodeName_(enumConstantName, declaration);
+	}
+
+	/**
+	 * pre-condition: enum constant name is non-null;
+	 * convert it to its short version if we can add a static import etc.
+	 */
+	protected static String convertToSourceCodeName_(String enumConstantName, ModifiedDeclaration declaration) {
+		if (declaration.addStaticImport(enumConstantName)) {
+			return convertToShortName(enumConstantName);
+		}
+		if (declaration.addImport(convertToTypeName(enumConstantName))) {
+			return convertToPartiallyQualifiedName(enumConstantName);
+		}
+		return enumConstantName;
+	}
+
+	protected static String convertToShortName(String name) {
+		return name.substring(name.lastIndexOf('.') + 1);
+	}
+
+	protected static String convertToTypeName(String name) {
+		return name.substring(0, name.lastIndexOf('.'));
+	}
+
+	protected static String convertToPartiallyQualifiedName(String name) {
+		return name.substring(name.lastIndexOf('.', name.lastIndexOf('.') - 1) + 1);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ExpressionDeclarationAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ExpressionDeclarationAnnotationElementAdapter.java
new file mode 100644
index 0000000..b96a7de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ExpressionDeclarationAnnotationElementAdapter.java
@@ -0,0 +1,362 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Most obvious implementation of the interface.
+ * Assume the element's value is an Expression.
+ */
+public class ExpressionDeclarationAnnotationElementAdapter<E extends Expression>
+	implements DeclarationAnnotationElementAdapter<E>
+{
+	/**
+	 * Adapter used to manipulate the element's annotation.
+	 */
+	private final DeclarationAnnotationAdapter annotationAdapter;
+
+	/**
+	 * The name of the relevant annotation element.
+	 */
+	private final String elementName;
+
+	/**
+	 * Flag to indicate whether the element's annotation is to be
+	 * completely removed if, when the element itself is removed,
+	 * the annotation has no remaining elements.
+	 */
+	private final boolean removeAnnotationWhenEmpty;
+
+
+	// ********** constructors **********
+
+	/**
+	 * The default element name is "value"; the default behavior is to
+	 * remove the annotation when the last element is removed.
+	 */
+	public ExpressionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter) {
+		this(annotationAdapter, VALUE);
+	}
+
+	/**
+	 * The default element name is "value".
+	 */
+	public ExpressionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, boolean removeAnnotationWhenEmpty) {
+		this(annotationAdapter, VALUE, removeAnnotationWhenEmpty);
+	}
+
+	/**
+	 * The default behavior is to remove the annotation when the last
+	 * element is removed.
+	 */
+	public ExpressionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
+		this(annotationAdapter, elementName, true);
+	}
+
+	public ExpressionDeclarationAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, boolean removeAnnotationWhenEmpty) {
+		super();
+		this.annotationAdapter = annotationAdapter;
+		this.elementName = elementName;
+		this.removeAnnotationWhenEmpty = removeAnnotationWhenEmpty;
+	}
+
+
+	// ********** DeclarationAnnotationElementAdapter implementation **********
+
+	public E getValue(ModifiedDeclaration declaration) {
+		// return the expression unmodified
+		return this.getExpression(declaration);
+	}
+
+	public void setValue(E value, ModifiedDeclaration declaration) {
+		this.setValue(value, this.annotationAdapter.getAnnotation(declaration), declaration);
+	}
+
+	public E getExpression(ModifiedDeclaration declaration) {
+		return this.expression(this.annotationAdapter.getAnnotation(declaration));
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		Expression exp = this.getExpression(declaration);
+		return (exp != null) ? exp : this.annotationAdapter.getAstNode(declaration);
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.elementName);
+	}
+
+
+	// ********** expression **********
+
+	/**
+	 * Return the expression value of the *first* annotation element
+	 * with the adapter's element name.
+	 * Return null if the annotation has no such element.
+	 * (An element name of "value" will return the value of a single
+	 * member annotation.)
+	 */
+	protected E expression(Annotation annotation) {
+		if (annotation == null) {
+			return this.expressionNoAnnotation();
+		}
+		if (annotation.isMarkerAnnotation()) {
+			return this.expressionMarkerAnnotation((MarkerAnnotation) annotation);
+		}
+		if (annotation.isSingleMemberAnnotation()) {
+			return this.expressionSingleMemberAnnotation((SingleMemberAnnotation) annotation);
+		}
+		if (annotation.isNormalAnnotation()) {
+			return this.expressionNormalAnnotation((NormalAnnotation) annotation);
+		}
+		throw new IllegalArgumentException("unknown annotation type: " + annotation); //$NON-NLS-1$
+	}
+
+	protected E expressionNoAnnotation() {
+		return null;
+	}
+
+	/**
+	 * Return the expression value of the *first* annotation element
+	 * with the adapter's element name.
+	 * Return null if the annotation has no such element.
+	 */
+	protected E expressionMarkerAnnotation(@SuppressWarnings("unused") MarkerAnnotation annotation) {
+		return null;
+	}
+
+	/**
+	 * Return the expression value of the *first* annotation element
+	 * with the adapter's element name.
+	 * Return null if the annotation has no such element.
+	 */
+	protected E expressionSingleMemberAnnotation(SingleMemberAnnotation annotation) {
+		return this.downcast(this.elementName.equals(VALUE) ? annotation.getValue() : null);
+	}
+
+	@SuppressWarnings("unchecked")
+	private E downcast(Expression e) {
+		return (E) e;
+	}
+
+	/**
+	 * Return the expression value of the *first* annotation element
+	 * with the adapter's element name.
+	 * Return null if the annotation has no such element.
+	 */
+	protected E expressionNormalAnnotation(NormalAnnotation annotation) {
+		MemberValuePair pair = this.memberValuePair(annotation);
+		return this.downcast((pair == null) ? null : pair.getValue());
+	}
+
+
+	// ********** set value **********
+
+	/**
+	 * set non-null, non-empty value
+	 */
+	protected void setValue(Expression value, Annotation annotation, ModifiedDeclaration declaration) {
+		if (value == null) {
+			this.removeElement(annotation, declaration);
+		}
+		else if (annotation == null) {
+			this.setValueNoAnnotation(value, declaration);
+		}
+		else if (annotation.isMarkerAnnotation()) {
+			this.setValueMarkerAnnotation(value, (MarkerAnnotation) annotation, declaration);
+		}
+		else if (annotation.isSingleMemberAnnotation()) {
+			this.setValueSingleMemberAnnotation(value, (SingleMemberAnnotation) annotation, declaration);
+		}
+		else if (annotation.isNormalAnnotation()) {
+			this.setValueNormalAnnotation(value, (NormalAnnotation) annotation, declaration);
+		}
+		else {
+			throw new IllegalArgumentException("unknown annotation type: " + annotation); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * add non-null, non-empty value
+	 */
+	protected void setValueNoAnnotation(Expression value, ModifiedDeclaration declaration) {
+		if (this.elementName.equals(VALUE)) {
+			// @Foo("xxx")
+			this.annotationAdapter.newSingleMemberAnnotation(declaration).setValue(value);
+		} else {
+			// @Foo(bar="xxx")
+			this.addValue(value, this.annotationAdapter.newNormalAnnotation(declaration));
+		}
+	}
+
+	protected void addValue(Expression value, NormalAnnotation annotation) {
+		this.addValue(value, annotation, this.elementName);
+	}
+
+	protected void addValue(Expression value, NormalAnnotation annotation, String annotationElementName) {
+		AST ast = annotation.getAST();
+		MemberValuePair pair = ast.newMemberValuePair();
+		pair.setName(ast.newSimpleName(annotationElementName));
+		pair.setValue(value);
+		List<MemberValuePair> values = this.values(annotation);
+		values.add(pair);
+	}
+	
+	protected void setValueMarkerAnnotation(Expression value, @SuppressWarnings("unused") MarkerAnnotation annotation, ModifiedDeclaration declaration) {
+		// @Foo => @Foo("xxx")
+		//     or
+		// @Foo => @Foo(bar="xxx")
+		this.setValueNoAnnotation(value, declaration);
+	}
+
+	protected void setValueSingleMemberAnnotation(Expression value, SingleMemberAnnotation annotation, ModifiedDeclaration declaration) {
+		if (this.elementName.equals(VALUE)) {
+			// @Foo("yyy") => @Foo("xxx")
+			annotation.setValue(value);
+		} else {
+			// @Foo("yyy") => @Foo(value="yyy", bar="xxx")
+			Expression vv = annotation.getValue();
+			vv = (Expression) ASTNode.copySubtree(vv.getAST(), vv);
+			NormalAnnotation normalAnnotation = this.annotationAdapter.newNormalAnnotation(declaration);
+			this.addValue(vv, normalAnnotation, VALUE);
+			this.addValue(value, normalAnnotation);
+		}
+	}
+
+	protected void setValueNormalAnnotation(Expression value, NormalAnnotation annotation, @SuppressWarnings("unused") ModifiedDeclaration declaration) {
+		MemberValuePair pair = this.memberValuePair(annotation);
+		if (pair == null) {
+			this.addValue(value, annotation);
+		} else {
+			pair.setValue(value);
+		}
+	}
+
+
+	// ********** remove element **********
+
+	protected void removeElement(Annotation annotation, ModifiedDeclaration declaration) {
+		if (annotation == null) {
+			this.removeElementNoAnnotation(declaration);
+		}
+		else if (annotation.isMarkerAnnotation()) {
+			this.removeElementMarkerAnnotation((MarkerAnnotation) annotation, declaration);
+		}
+		else if (annotation.isSingleMemberAnnotation()) {
+			this.removeElementSingleMemberAnnotation((SingleMemberAnnotation) annotation, declaration);
+		}
+		else if (annotation.isNormalAnnotation()) {
+			this.removeElementNormalAnnotation((NormalAnnotation) annotation, declaration);
+		}
+		else {
+			throw new IllegalArgumentException("unknown annotation type: " + annotation); //$NON-NLS-1$
+		}
+	}
+
+	protected void removeElementNoAnnotation(@SuppressWarnings("unused") ModifiedDeclaration declaration) {
+		// the element is already gone (?)
+	}
+
+	protected void removeElementMarkerAnnotation(@SuppressWarnings("unused") MarkerAnnotation annotation, @SuppressWarnings("unused") ModifiedDeclaration declaration) {
+		// the element is already gone (?)
+	}
+
+	protected void removeElementSingleMemberAnnotation(@SuppressWarnings("unused") SingleMemberAnnotation annotation, ModifiedDeclaration declaration) {
+		if (this.elementName.equals(VALUE)) {
+			if (this.removeAnnotationWhenEmpty) {
+				// @Foo("xxx") => 
+				this.annotationAdapter.removeAnnotation(declaration);
+			} else {
+				// @Foo("xxx") => @Foo
+				this.annotationAdapter.newMarkerAnnotation(declaration);
+			}
+		} else {
+			// the [non-'value'] element is already gone (?)
+		}
+	}
+
+	protected void removeElementNormalAnnotation(NormalAnnotation annotation, ModifiedDeclaration declaration) {
+		List<MemberValuePair> values = this.values(annotation);
+		if ((values.size() == 1) && values.get(0).getName().getFullyQualifiedName().equals(this.elementName)) {
+			if (this.removeAnnotationWhenEmpty) {
+				// @Foo(bar="xxx") => 
+				this.annotationAdapter.removeAnnotation(declaration);
+			} else {
+				// @Foo(bar="xxx") => @Foo
+				this.annotationAdapter.newMarkerAnnotation(declaration);
+			}
+		} else {
+			this.removeElement(annotation);
+			if (values.size() == 1) {
+				MemberValuePair pair = values.get(0);
+				if (pair.getName().getFullyQualifiedName().equals(VALUE)) {
+					// @Foo(bar="xxx", value="yyy") => @Foo("yyy")
+					Expression vv = pair.getValue();
+					vv = (Expression) ASTNode.copySubtree(vv.getAST(), vv);
+					this.annotationAdapter.newSingleMemberAnnotation(declaration).setValue(vv);
+				} else {
+					// @Foo(bar="xxx", baz="yyy") => @Foo(baz="yyy")
+				}
+			} else {
+				// @Foo(bar="xxx", baz="yyy", joo="xxx") => @Foo(baz="yyy", joo="xxx")
+			}
+		}
+	}
+
+	/**
+	 * Remove the *first* member value pair from the specified annotation element
+	 * with the adapter's element name.
+	 */
+	protected void removeElement(NormalAnnotation annotation) {
+		for (Iterator<MemberValuePair> stream = this.values(annotation).iterator(); stream.hasNext(); ) {
+			MemberValuePair pair = stream.next();
+			if (pair.getName().getFullyQualifiedName().equals(this.elementName)) {
+				stream.remove();
+			}
+		}
+	}
+
+
+	// ********** convenience methods **********
+
+	/**
+	 * Return the *first* member value pair for the specified annotation element
+	 * with the adapter's element name.
+	 * Return null if the annotation has no such element.
+	 */
+	protected MemberValuePair memberValuePair(NormalAnnotation annotation) {
+		for (MemberValuePair pair : this.values(annotation)) {
+			if (pair.getName().getFullyQualifiedName().equals(this.elementName)) {
+				return pair;
+			}
+		}
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	protected List<MemberValuePair> values(NormalAnnotation na) {
+		return na.values();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/GenericVisitor.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/GenericVisitor.java
new file mode 100644
index 0000000..284d615
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/GenericVisitor.java
@@ -0,0 +1,791 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
+import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;
+import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
+import org.eclipse.jdt.core.dom.ArrayAccess;
+import org.eclipse.jdt.core.dom.ArrayCreation;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.ArrayType;
+import org.eclipse.jdt.core.dom.AssertStatement;
+import org.eclipse.jdt.core.dom.Assignment;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.BlockComment;
+import org.eclipse.jdt.core.dom.BooleanLiteral;
+import org.eclipse.jdt.core.dom.BreakStatement;
+import org.eclipse.jdt.core.dom.CastExpression;
+import org.eclipse.jdt.core.dom.CatchClause;
+import org.eclipse.jdt.core.dom.CharacterLiteral;
+import org.eclipse.jdt.core.dom.ClassInstanceCreation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ConditionalExpression;
+import org.eclipse.jdt.core.dom.ConstructorInvocation;
+import org.eclipse.jdt.core.dom.ContinueStatement;
+import org.eclipse.jdt.core.dom.DoStatement;
+import org.eclipse.jdt.core.dom.EmptyStatement;
+import org.eclipse.jdt.core.dom.EnhancedForStatement;
+import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
+import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.FieldAccess;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ForStatement;
+import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.InfixExpression;
+import org.eclipse.jdt.core.dom.Initializer;
+import org.eclipse.jdt.core.dom.InstanceofExpression;
+import org.eclipse.jdt.core.dom.Javadoc;
+import org.eclipse.jdt.core.dom.LabeledStatement;
+import org.eclipse.jdt.core.dom.LineComment;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MemberRef;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.MethodRef;
+import org.eclipse.jdt.core.dom.MethodRefParameter;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.NullLiteral;
+import org.eclipse.jdt.core.dom.NumberLiteral;
+import org.eclipse.jdt.core.dom.PackageDeclaration;
+import org.eclipse.jdt.core.dom.ParameterizedType;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
+import org.eclipse.jdt.core.dom.PostfixExpression;
+import org.eclipse.jdt.core.dom.PrefixExpression;
+import org.eclipse.jdt.core.dom.PrimitiveType;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.QualifiedType;
+import org.eclipse.jdt.core.dom.ReturnStatement;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
+import org.eclipse.jdt.core.dom.SuperFieldAccess;
+import org.eclipse.jdt.core.dom.SuperMethodInvocation;
+import org.eclipse.jdt.core.dom.SwitchCase;
+import org.eclipse.jdt.core.dom.SwitchStatement;
+import org.eclipse.jdt.core.dom.SynchronizedStatement;
+import org.eclipse.jdt.core.dom.TagElement;
+import org.eclipse.jdt.core.dom.TextElement;
+import org.eclipse.jdt.core.dom.ThisExpression;
+import org.eclipse.jdt.core.dom.ThrowStatement;
+import org.eclipse.jdt.core.dom.TryStatement;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
+import org.eclipse.jdt.core.dom.TypeLiteral;
+import org.eclipse.jdt.core.dom.TypeParameter;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
+import org.eclipse.jdt.core.dom.WildcardType;
+
+/**
+ * copied from org.eclipse.jdt.internal.corext.dom.GenericVisitor
+ */
+public class GenericVisitor extends ASTVisitor {
+
+	public GenericVisitor() {
+		super();
+	}
+
+	public GenericVisitor(boolean visitJavadocTags) {
+		super(visitJavadocTags);
+	}
+
+	// ********** hooks for subclasses **********
+
+	protected boolean visit_(@SuppressWarnings("unused") ASTNode node) {
+		return true;
+	}
+
+	protected void endVisit_(@SuppressWarnings("unused") ASTNode node) {
+		// do nothing
+	}
+
+	// ********** overrides **********
+
+	@Override
+	public boolean visit(AnonymousClassDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ArrayAccess node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ArrayCreation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ArrayInitializer node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ArrayType node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(AssertStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(Assignment node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(Block node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(BooleanLiteral node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(BreakStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(CastExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(CatchClause node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(CharacterLiteral node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ClassInstanceCreation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(CompilationUnit node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ConditionalExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ConstructorInvocation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ContinueStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(DoStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(EmptyStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ExpressionStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(FieldAccess node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(FieldDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ForStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(IfStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ImportDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(InfixExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(InstanceofExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(Initializer node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(Javadoc node) {
+		return (super.visit(node)) ? visit_(node) : false;
+	}
+	@Override
+	public boolean visit(LabeledStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MethodDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MethodInvocation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(NullLiteral node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(NumberLiteral node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(PackageDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ParenthesizedExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(PostfixExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(PrefixExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(PrimitiveType node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(QualifiedName node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ReturnStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SimpleName node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SimpleType node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(StringLiteral node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SuperConstructorInvocation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SuperFieldAccess node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SuperMethodInvocation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SwitchCase node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SwitchStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SynchronizedStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ThisExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ThrowStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TryStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TypeDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TypeDeclarationStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TypeLiteral node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SingleVariableDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(VariableDeclarationExpression node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(VariableDeclarationStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(VariableDeclarationFragment node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(WhileStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(AnnotationTypeDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(AnnotationTypeMemberDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(BlockComment node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(EnhancedForStatement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(EnumConstantDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(EnumDeclaration node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(LineComment node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MarkerAnnotation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MemberRef node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MemberValuePair node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MethodRef node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(MethodRefParameter node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(Modifier node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(NormalAnnotation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(ParameterizedType node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(QualifiedType node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(SingleMemberAnnotation node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TagElement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TextElement node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(TypeParameter node) {
+		return visit_(node);
+	}
+	@Override
+	public boolean visit(WildcardType node) {
+		return visit_(node);
+	}
+
+	@Override
+	public void endVisit(AnonymousClassDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ArrayAccess node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ArrayCreation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ArrayInitializer node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ArrayType node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(AssertStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(Assignment node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(Block node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(BooleanLiteral node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(BreakStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(CastExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(CatchClause node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(CharacterLiteral node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ClassInstanceCreation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(CompilationUnit node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ConditionalExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ConstructorInvocation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ContinueStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(DoStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(EmptyStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ExpressionStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(FieldAccess node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(FieldDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ForStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(IfStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ImportDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(InfixExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(InstanceofExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(Initializer node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(Javadoc node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(LabeledStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MethodDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MethodInvocation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(NullLiteral node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(NumberLiteral node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(PackageDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ParenthesizedExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(PostfixExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(PrefixExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(PrimitiveType node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(QualifiedName node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ReturnStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SimpleName node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SimpleType node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(StringLiteral node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SuperConstructorInvocation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SuperFieldAccess node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SuperMethodInvocation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SwitchCase node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SwitchStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SynchronizedStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ThisExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ThrowStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TryStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TypeDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TypeDeclarationStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TypeLiteral node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SingleVariableDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(VariableDeclarationExpression node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(VariableDeclarationStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(VariableDeclarationFragment node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(WhileStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(AnnotationTypeDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(AnnotationTypeMemberDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(BlockComment node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(EnhancedForStatement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(EnumConstantDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(EnumDeclaration node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(LineComment node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MarkerAnnotation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MemberRef node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MemberValuePair node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MethodRef node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(MethodRefParameter node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(Modifier node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(NormalAnnotation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(ParameterizedType node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(QualifiedType node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(SingleMemberAnnotation node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TagElement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TextElement node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(TypeParameter node) {
+		endVisit_(node);
+	}
+	@Override
+	public void endVisit(WildcardType node) {
+		endVisit_(node);
+	}
+
+}
+
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAttribute.java
new file mode 100644
index 0000000..342aebf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAttribute.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.CommandExecutor;
+
+/**
+ * Combine behavior common to JDTFieldAttribute and JDTMethodAttribute.
+ * Not so sure this is useful....
+ */
+public abstract class JDTAttribute
+	extends JDTMember
+	implements Attribute
+{
+
+	// ********** constructors **********
+
+	protected JDTAttribute(
+			Type declaringType,
+			String name,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		super(declaringType, name, occurrence, compilationUnit, modifySharedDocumentCommandExecutor);
+	}
+
+	protected JDTAttribute(
+			Type declaringType,
+			String name,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		super(declaringType, name, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
+	}
+
+
+	// ********** Member/Attribute implementation **********
+
+	public boolean isField() {
+		return false;
+	}
+
+
+	// ********** internal **********
+
+	protected TypeDeclaration getDeclaringTypeDeclaration(CompilationUnit astRoot) {
+		// assume the declaring type is not an enum or annotation
+		// since they do not have field or method declarations
+		return this.getDeclaringType().getBodyDeclaration(astRoot);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java
new file mode 100644
index 0000000..1c18f29
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.FieldAttribute;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.CommandExecutor;
+
+/**
+ * Adapt and extend a JDT field.
+ * Attribute based on a Java field, e.g.
+ *     private int foo;
+ */
+public class JDTFieldAttribute
+	extends JDTAttribute
+	implements FieldAttribute
+{
+
+	// ********** constructors **********
+
+	public JDTFieldAttribute(
+			Type declaringType,
+			String name,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		this(declaringType, name, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+	}
+	
+	public JDTFieldAttribute(
+			Type declaringType,
+			String name,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		super(declaringType, name, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
+	}
+
+	/**
+	 * constructor for testing
+	 */
+	public JDTFieldAttribute(Type declaringType, String name, int occurrence, ICompilationUnit compilationUnit) {
+		this(declaringType, name, occurrence, compilationUnit, CommandExecutor.Default.instance(), DefaultAnnotationEditFormatter.instance());
+	}
+
+
+	// ********** Member/Attribute/FieldAttribute implementation **********
+
+	public IVariableBinding getBinding(CompilationUnit astRoot) {
+		return this.getFragment(astRoot).resolveBinding();
+	}
+
+	public FieldDeclaration getBodyDeclaration(CompilationUnit astRoot) {
+		return this.getSelectedDeclaration(astRoot, FIELD_DECLARATION_SELECTOR);
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return new ASTNodeTextRange(this.getFragment(astRoot).getName());
+	}
+
+	public String getAttributeName() {
+		return this.getName_();
+	}
+
+	public ITypeBinding getTypeBinding(CompilationUnit astRoot) {
+		return this.getBodyDeclaration(astRoot).getType().resolveBinding();
+	}
+
+	@Override
+	public boolean isField() {
+		return true;
+	}
+
+	public boolean isPersistable(CompilationUnit astRoot) {
+		IVariableBinding binding = this.getBinding(astRoot);
+		return (binding == null) ? false : JPTTools.fieldIsPersistable(new JPTToolsAdapter(binding));
+	}
+
+
+	// ********** internal **********
+
+	protected VariableDeclarationFragment getFragment(CompilationUnit astRoot) {
+		return this.getSelectedDeclaration(astRoot, VARIABLE_DECLARATION_FRAGMENT_SELECTOR);
+	}
+
+	/**
+	 * return either a FieldDeclaration or a VariableDeclarationFragment,
+	 * depending on the specified selector;
+	 * 
+	 * handle multiple fields declared in a single statement:
+	 *     private int foo, bar;
+	 */
+	protected <T extends ASTNode> T getSelectedDeclaration(CompilationUnit astRoot, Selector<T> selector) {
+		String name = this.getName_();
+		int occurrence = this.getOccurrence();
+		int count = 0;
+		for (FieldDeclaration fieldDeclaration : this.getDeclaringTypeFieldDeclarations(astRoot)) {
+			for (VariableDeclarationFragment fragment : fragments(fieldDeclaration)) {
+				if (fragment.getName().getFullyQualifiedName().equals(name)) {
+					count++;
+					if (count == occurrence) {
+						return selector.select(fieldDeclaration, fragment);
+					}
+				}
+			}
+		}
+		// return null if the field is no longer in the source code;
+		// this can happen when the context model has not yet
+		// been synchronized with the resource model but is still
+		// asking for an ASTNode (e.g. during a selection event)
+		return null;
+	}
+
+	protected FieldDeclaration[] getDeclaringTypeFieldDeclarations(CompilationUnit astRoot) {
+		return this.getDeclaringTypeDeclaration(astRoot).getFields();
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	protected static List<VariableDeclarationFragment> fragments(FieldDeclaration fd) {
+		return fd.fragments();
+	}
+
+
+	// ********** Selector **********
+
+	// I'm not quite sure this interface is worth the resulting obfuscation,
+	// but, then, I kept changing both methods, so...  ~bjv
+	protected interface Selector<T extends ASTNode> {
+		T select(FieldDeclaration fieldDeclaration, VariableDeclarationFragment variableDeclarationFragment);
+		String getDescription();
+	}
+
+	protected static final Selector<FieldDeclaration> FIELD_DECLARATION_SELECTOR =
+		new Selector<FieldDeclaration>() {
+			public FieldDeclaration select(FieldDeclaration fieldDeclaration, VariableDeclarationFragment variableDeclarationFragment) {
+				return fieldDeclaration;
+			}
+			public String getDescription() {
+				return "field declaration"; //$NON-NLS-1$
+			}
+			@Override
+			public String toString() {
+				return "FIELD_DECLARATION_SELECTOR"; //$NON-NLS-1$
+			}
+		};
+
+	protected static final Selector<VariableDeclarationFragment> VARIABLE_DECLARATION_FRAGMENT_SELECTOR =
+		new Selector<VariableDeclarationFragment>() {
+			public VariableDeclarationFragment select(FieldDeclaration fieldDeclaration, VariableDeclarationFragment variableDeclarationFragment) {
+				return variableDeclarationFragment;
+			}
+			public String getDescription() {
+				return "variable declaration fragment"; //$NON-NLS-1$
+			}
+			@Override
+			public String toString() {
+				return "VARIABLE_DECLARATION_FRAGMENT_SELECTOR"; //$NON-NLS-1$
+			}
+		};
+
+
+	// ********** JPTTools adapter **********
+
+	/**
+	 * JPTTools needs an adapter so it can work with either an IField
+	 * or an IVariableBinding etc.
+	 */
+	protected static class JPTToolsAdapter implements JPTTools.FieldAdapter {
+		private final IVariableBinding fieldBinding;
+
+		protected JPTToolsAdapter(IVariableBinding fieldBinding) {
+			super();
+			if (fieldBinding == null) {
+				throw new NullPointerException();
+			}
+			this.fieldBinding = fieldBinding;
+		}
+
+		public int getModifiers() {
+			return this.fieldBinding.getModifiers();
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java
new file mode 100644
index 0000000..c7c5ebb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.LocationKind;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.Command;
+import org.eclipse.jpt.utility.CommandExecutor;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * Adapt and extend a JDT member with simplified annotation handling.
+ */
+public abstract class JDTMember
+	implements Member
+{
+	/** this will be null for the primary type */
+	private final Type declaringType;
+
+	/** the member's name (duh) */
+	private final String name;
+
+	/**
+	 * members can occur more than once in non-compiling source;
+	 * count starts at 1; the primary type will have occurrence 1
+	 */
+	private final int occurrence;
+
+	/**
+	 * the compilation unit (file) containing the member;
+	 * used for building an AST when we modify the member
+	 */
+	private final ICompilationUnit compilationUnit;
+
+	/**
+	 * this allows clients to provide a way to modify the compilation unit
+	 * (file) when it is open in an editor and should be modified on the UI
+	 * thread
+	 */
+	private final CommandExecutor modifySharedDocumentCommandExecutor;
+
+	/** this will format the member's annotations a bit */
+	private final AnnotationEditFormatter annotationEditFormatter;
+
+
+	// ********** constructors **********
+	
+	protected JDTMember(
+			Type declaringType,
+			String name,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		this(declaringType, name, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+	}
+
+	protected JDTMember(
+			Type declaringType,
+			String name,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		super();
+		this.declaringType = declaringType;
+		this.name = name;
+		this.occurrence = occurrence;
+		this.compilationUnit = compilationUnit;
+		this.modifySharedDocumentCommandExecutor = modifySharedDocumentCommandExecutor;
+		this.annotationEditFormatter = annotationEditFormatter;
+	}
+
+
+	// ********** Member implementation **********
+
+	public ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot) {
+		return new JDTModifiedDeclaration(this.getBodyDeclaration(astRoot));
+	}
+
+	public ModifiedDeclaration getModifiedDeclaration() {
+		return this.getModifiedDeclaration(this.buildASTRoot());
+	}
+
+	public boolean matches(String memberName, int occur) {
+		return memberName.equals(this.name) && (occur == this.occurrence);
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.name);
+	}
+
+
+	// ********** internal **********
+
+	protected String getName_() {
+		return this.name;
+	}
+
+	protected int getOccurrence() {
+		return this.occurrence;
+	}
+
+	/**
+	 * this will return null for a top-level type
+	 */
+	protected Type getDeclaringType() {
+		return this.declaringType;
+	}
+
+
+	// ********** editing **********
+
+	/**
+	 * Edit the member with the specified editor.
+	 * The editor will be invoked once the member's compilation unit
+	 * is in an editable state.
+	 */
+	public void edit(Editor editor) {
+		try {
+			this.edit_(editor);
+		} catch (JavaModelException ex) {
+			throw new RuntimeException(ex);
+		} catch (BadLocationException ex) {
+			throw new RuntimeException(ex);
+		}
+	}
+
+	/**
+	 * NB: Be careful changing this method.
+	 * Things to look out for:
+	 *     - when editing via the JavaEditor there is no need to create a working copy
+	 *     - when editing without an editor or via a simple text editor, a "working copy" must be created.
+	 *        (at least as far as I can tell  ~kfm)
+	 *     - sharedDocument is only ever false in tests (headless mode).  In the UI, even if the file
+	 *        is not open in an editor, sharedDocument is still true (buffer is not null)
+	 *     - if a working copy is created, then we must discard it
+	 */
+	protected void edit_(Editor editor) throws JavaModelException, BadLocationException {
+		boolean createWorkingCopy = ! this.compilationUnit.isWorkingCopy();
+		if (createWorkingCopy) {
+			this.compilationUnit.becomeWorkingCopy(null);
+		}
+
+		ITextFileBuffer buffer = FileBuffers.getTextFileBufferManager().getTextFileBuffer(this.compilationUnit.getResource().getFullPath(), LocationKind.NORMALIZE);
+		boolean sharedDocument = (buffer != null);  // documents are typically shared when they are already open in an editor
+		IDocument doc = sharedDocument ?
+				buffer.getDocument() :
+				new Document(this.compilationUnit.getBuffer().getContents());
+
+		try {
+			CompilationUnit astRoot = this.buildASTRoot();
+			astRoot.recordModifications();
+	
+			editor.edit(this.getModifiedDeclaration(astRoot));
+	
+			TextEdit edits = astRoot.rewrite(doc, this.compilationUnit.getJavaProject().getOptions(true));
+			if (sharedDocument) {
+				this.modifySharedDocumentCommandExecutor.execute(new ModifySharedDocumentCommand(edits, doc));
+			} else {
+				this.applyEdits(edits, doc);
+			}
+		}
+		finally {
+			if (createWorkingCopy) {
+				//discardWorkingCopy must be called every time becomeWorkingCopy is called.
+				this.compilationUnit.getBuffer().setContents(doc.get());
+				this.compilationUnit.commitWorkingCopy(true, null);  // true="force"
+				this.compilationUnit.discardWorkingCopy();
+			}
+		}
+	}
+
+	/**
+	 * apply the specified edits to the specified document,
+	 * reformatting the document if necessary
+	 */
+	protected void applyEdits(TextEdit edits, IDocument doc) throws MalformedTreeException, BadLocationException {
+		edits.apply(doc, TextEdit.UPDATE_REGIONS);
+		this.annotationEditFormatter.format(doc, edits);
+	}
+
+	protected CompilationUnit buildASTRoot() {
+		return ASTTools.buildASTRoot(this.compilationUnit);
+	}
+
+
+	// ********** modify shared document command class **********
+
+	/**
+	 * simple command that calls back to the member to apply the edits
+	 * in the same way as if the document were not shared
+	 */
+	protected class ModifySharedDocumentCommand implements Command {
+		private final TextEdit edits;
+		private final IDocument doc;
+
+		protected ModifySharedDocumentCommand(TextEdit edits, IDocument doc) {
+			super();
+			this.edits = edits;
+			this.doc = doc;
+		}
+
+		public void execute() {
+			try {
+				JDTMember.this.applyEdits(this.edits, this.doc);
+			} catch (MalformedTreeException ex) {
+				throw new RuntimeException(ex);
+			} catch (BadLocationException ex) {
+				throw new RuntimeException(ex);
+			}
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java
new file mode 100644
index 0000000..4316d6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.MethodAttribute;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.CommandExecutor;
+import org.eclipse.jpt.utility.JavaType;
+import org.eclipse.jpt.utility.MethodSignature;
+import org.eclipse.jpt.utility.internal.NameTools;
+import org.eclipse.jpt.utility.internal.SimpleMethodSignature;
+
+/**
+ * Adapt and extend a JDT method.
+ * Attribute based on a Java property, e.g.
+ *     private int getFoo() {
+ *         return foo;
+ *     }
+ *     private void setFoo(int foo) {
+ *         this.foo = foo;
+ *     }
+ */
+public class JDTMethodAttribute
+	extends JDTAttribute
+	implements MethodAttribute
+{
+	/** we need the parameter types to build the method signature */
+	private final JavaType[] parameterTypes;
+
+
+	// ********** constructors **********
+
+	public static JDTMethodAttribute newInstance(
+			Type declaringType,
+			MethodSignature signature,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		return newInstance(declaringType, signature, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+	}
+
+	public static JDTMethodAttribute newInstance(
+			Type declaringType,
+			MethodSignature signature,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		return new JDTMethodAttribute(declaringType, signature, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
+	}
+
+	public JDTMethodAttribute(
+			Type declaringType,
+			MethodSignature methodSignature,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		this(declaringType, methodSignature, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+	}
+
+	public JDTMethodAttribute(
+			Type declaringType,
+			MethodSignature methodSignature,
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		super(declaringType, methodSignature.getName(), occurrence, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
+		this.parameterTypes = methodSignature.getParameterTypes();
+	}
+
+	/**
+	 * constructor for testing
+	 */
+	public JDTMethodAttribute(Type declaringType, String name, String[] parameterTypeNames, int occurrence, ICompilationUnit compilationUnit) {
+		this(declaringType, new SimpleMethodSignature(name, parameterTypeNames), occurrence, compilationUnit, CommandExecutor.Default.instance(), DefaultAnnotationEditFormatter.instance());
+	}
+
+
+	// ********** Member/Attribute/MethodAttribute implementation **********
+
+	public IMethodBinding getBinding(CompilationUnit astRoot) {
+		return this.getBodyDeclaration(astRoot).resolveBinding();
+	}
+
+	public MethodDeclaration getBodyDeclaration(CompilationUnit astRoot) {
+		int count = 0;
+		for (MethodDeclaration methodDeclaration : this.getDeclaringTypeMethodDeclarations(astRoot)) {
+			if (this.matches(methodDeclaration)) {
+				count++;
+				if (count == this.getOccurrence()) {
+					return methodDeclaration;
+				}
+			}
+		}
+		// return null if the method is no longer in the source code;
+		// this can happen when the context model has not yet
+		// been synchronized with the resource model but is still
+		// asking for an ASTNode (e.g. during a selection event)
+		return null;
+	}
+
+	public boolean matches(MethodSignature signature, int occurrence) {
+		return this.matches(signature) && (occurrence == this.getOccurrence());
+	}
+
+	protected boolean matches(MethodSignature signature) {
+		return signature.getName().equals(this.getName_())
+					&& Arrays.equals(this.parameterTypes, signature.getParameterTypes());
+	}
+
+	protected boolean matches(MethodDeclaration methodDeclaration) {
+		return this.matches(ASTTools.buildMethodSignature(methodDeclaration));
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	protected static List<SingleVariableDeclaration> parameters(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.parameters();
+	}
+
+	@Override
+	public boolean matches(String memberName, int occurrence) {
+		throw new UnsupportedOperationException("Use #matches(MethodSignature, int)."); //$NON-NLS-1$
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return new ASTNodeTextRange(this.getBodyDeclaration(astRoot).getName());
+	}
+
+	/**
+	 * return "foo" for a method named "getFoo" or "isFoo"
+	 */
+	public String getAttributeName() {
+		return NameTools.convertGetterMethodNameToPropertyName(this.getName_());
+	}
+
+	public ITypeBinding getTypeBinding(CompilationUnit astRoot) {
+		IMethodBinding methodBinding = getBodyDeclaration(astRoot).resolveBinding();
+		return (methodBinding == null) ? null : methodBinding.getReturnType();
+	}
+
+	public boolean isPersistable(CompilationUnit astRoot) {
+		IMethodBinding binding = this.getBinding(astRoot);
+		return (binding == null) ? false : JPTTools.methodIsPersistablePropertyGetter(new JPTToolsAdapter(binding));
+	}
+
+
+	// ********** internal **********
+
+	protected MethodDeclaration[] getDeclaringTypeMethodDeclarations(CompilationUnit astRoot) {
+		return this.getDeclaringTypeDeclaration(astRoot).getMethods();
+	}
+
+
+	// ********** JPTTools adapter **********
+
+	/**
+	 * JPTTools needs an adapter so it can work with either an IMethod
+	 * or an IMethodBinding etc.
+	 */
+	protected static class SimpleJPTToolsAdapter
+		implements JPTTools.SimpleMethodAdapter
+	{
+		protected final IMethodBinding methodBinding;
+
+		protected SimpleJPTToolsAdapter(IMethodBinding methodBinding) {
+			super();
+			if (methodBinding == null) {
+				throw new NullPointerException();
+			}
+			this.methodBinding = methodBinding;
+		}
+
+		public int getModifiers() {
+			return this.methodBinding.getModifiers();
+		}
+
+		public String getReturnTypeErasureName() {
+			ITypeBinding returnType = this.methodBinding.getReturnType();
+			return (returnType == null) ? null : returnType.getTypeDeclaration().getErasure().getQualifiedName();
+		}
+
+		public boolean isConstructor() {
+			return this.methodBinding.isConstructor();
+		}
+
+	}
+
+	protected static class JPTToolsAdapter
+		extends SimpleJPTToolsAdapter
+		implements JPTTools.MethodAdapter
+	{
+		protected JPTToolsAdapter(IMethodBinding methodBinding) {
+			super(methodBinding);
+		}
+
+		public String getName() {
+			return this.methodBinding.getName();
+		}
+
+		public int getParametersLength() {
+			return this.methodBinding.getParameterTypes().length;
+		}
+
+		public JPTTools.SimpleMethodAdapter getSibling(String name) {
+			ITypeBinding typeBinding = this.methodBinding.getDeclaringClass();
+			if (typeBinding == null) {
+				return null;
+			}
+			for (IMethodBinding sibling : typeBinding.getDeclaredMethods()) {
+				if ((sibling.getParameterTypes().length == 0)
+						&& sibling.getName().equals(name)) {
+					return new SimpleJPTToolsAdapter(sibling);
+				}
+			}
+			return null;
+		}
+
+		public JPTTools.SimpleMethodAdapter getSibling(String name, String parameterTypeErasureName) {
+			ITypeBinding typeBinding = this.methodBinding.getDeclaringClass();
+			if (typeBinding == null) {
+				return null;
+			}
+			for (IMethodBinding sibling : typeBinding.getDeclaredMethods()) {
+				ITypeBinding[] siblingParmTypes = sibling.getParameterTypes();
+				if ((siblingParmTypes.length == 1)
+						&& sibling.getName().equals(name)
+						&& siblingParmTypes[0].getTypeDeclaration().getErasure().getQualifiedName().equals(parameterTypeErasureName)) {
+					return new SimpleJPTToolsAdapter(sibling);
+				}
+			}
+			return null;
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java
new file mode 100644
index 0000000..96f2c73
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java
@@ -0,0 +1,537 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.BodyDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IExtendedModifier;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
+import org.eclipse.jpt.utility.internal.iterators.SubIteratorWrapper;
+
+/**
+ * Wrap any of the AST nodes that have modifiers (specifically, annotations);
+ * i.e. BodyDeclaration, SingleVariableDeclaration, VariableDeclarationExpression,
+ * and VariableDeclarationStatement.
+ */
+public class JDTModifiedDeclaration
+	implements ModifiedDeclaration
+{
+	private final Adapter adapter;
+
+
+	// ********** constructors **********
+
+	public JDTModifiedDeclaration(Adapter adapter) {
+		super();
+		this.adapter = adapter;
+	}
+
+	public JDTModifiedDeclaration(BodyDeclaration declaration) {
+		this(new BodyDeclarationAdapter(declaration));
+	}
+
+	public JDTModifiedDeclaration(SingleVariableDeclaration declaration) {
+		this(new SingleVariableDeclarationAdapter(declaration));
+	}
+
+	public JDTModifiedDeclaration(VariableDeclarationExpression declaration) {
+		this(new VariableDeclarationExpressionAdapter(declaration));
+	}
+
+	public JDTModifiedDeclaration(VariableDeclarationStatement declaration) {
+		this(new VariableDeclarationStatementAdapter(declaration));
+	}
+
+
+	// ********** annotations **********
+
+	public Annotation getAnnotationNamed(String annotationName) {
+		for (Iterator<Annotation> stream = this.annotations(); stream.hasNext(); ) {
+			Annotation annotation = stream.next();
+			if (this.annotationIsNamed(annotation, annotationName)) {
+				return annotation;
+			}
+		}
+		return null;
+	}
+
+	public void removeAnnotationNamed(String annotationName) {
+		for (Iterator<IExtendedModifier> stream = this.getModifiers().iterator(); stream.hasNext(); ) {
+			IExtendedModifier modifier = stream.next();
+			if (modifier.isAnnotation()) {
+				if (this.annotationIsNamed((Annotation) modifier, annotationName)) {
+					stream.remove();
+					break;
+				}
+			}
+		}
+	}
+
+	public void replaceAnnotationNamed(String oldAnnotationName, Annotation newAnnotation) {
+		List<IExtendedModifier> modifiers = this.getModifiers();
+		for (ListIterator<IExtendedModifier> stream = modifiers.listIterator(); stream.hasNext(); ) {
+			IExtendedModifier modifier = stream.next();
+			if (modifier.isAnnotation()) {
+				if (this.annotationIsNamed((Annotation) modifier, oldAnnotationName)) {
+					stream.set(newAnnotation);
+					return;
+				}
+			}
+		}
+		this.addAnnotation(newAnnotation);
+	}
+
+	/**
+	 * Add the specified annotation to the declaration.
+	 * By convention annotations precede the "standard" (JLS2) modifiers;
+	 * though, technically, they can be interspersed.
+	 */
+	protected void addAnnotation(Annotation annotation) {
+		List<IExtendedModifier> modifiers = this.getModifiers();
+		for (ListIterator<IExtendedModifier> stream = modifiers.listIterator(); stream.hasNext(); ) {
+			if (stream.next().isModifier()) {
+				stream.previous();  // put the annotation *before* the first "standard" (JLS2) modifier
+				stream.add(annotation);
+				return;
+			}
+		}
+		modifiers.add(annotation);  // just tack it on to the end
+	}
+
+	/**
+	 * Return the declaration's annotations.
+	 */
+	protected Iterator<Annotation> annotations() {
+		return new SubIteratorWrapper<IExtendedModifier, Annotation>(this.annotations_());
+	}
+
+	protected Iterator<IExtendedModifier> annotations_() {
+		return new FilteringIterator<IExtendedModifier>(this.getModifiers().iterator()) {
+			@Override
+			protected boolean accept(IExtendedModifier next) {
+				return next.isAnnotation();
+			}
+		};
+	}
+
+
+	// ********** add import **********
+
+	public boolean addImport(String className) {
+		if (className.indexOf('.') == -1) {
+			return true;  // the class is in the default package - no need for import
+		}
+		return this.addImport(className, false);
+	}
+
+	public boolean addStaticImport(String enumConstantName) {
+		int index1 = enumConstantName.indexOf('.');
+		if (index1 == -1) {
+			throw new IllegalArgumentException(enumConstantName);  // shouldn't happen?
+		}
+		int index2 = enumConstantName.indexOf('.', index1 + 1);
+		if (index2 == -1) {
+			return true;  // the enum is in the default package - no need for import
+		}
+		return this.addImport(enumConstantName, true);
+	}
+
+	public boolean addImport(String importName, boolean staticImport) {
+		Boolean include = this.importsInclude(importName, staticImport);
+		if (include != null) {
+			return include.booleanValue();
+		}
+
+		ImportDeclaration importDeclaration = this.getAst().newImportDeclaration();
+		importDeclaration.setName(this.getAst().newName(importName));
+		importDeclaration.setStatic(staticImport);
+		this.getImports().add(importDeclaration);
+		return true;
+	}
+
+	/**
+	 * Just a bit hacky:
+	 *     Return Boolean.TRUE if the import is already present.
+	 *     Return Boolean.FALSE if a colliding import is already present.
+	 *     Return null if a new import may be added.
+	 * This hackery allows us to loop through the imports only once
+	 * (and compose our methods).
+	 * Pre-condition: 'importName' is not in the "default" package (i.e. it *is* qualified)
+	 */
+	protected Boolean importsInclude(String importName, boolean staticImport) {
+		int period = importName.lastIndexOf('.');  // should not be -1
+		String importNameQualifier = importName.substring(0, period);
+		String shortImportName = importName.substring(period + 1);
+		return this.importsInclude(importName, importNameQualifier, shortImportName, staticImport);
+	}
+
+	/**
+	 * pre-calculate the qualifier and short name
+	 */
+	protected Boolean importsInclude(String importName, String importNameQualifier, String shortImportName, boolean staticImport) {
+		for (ImportDeclaration importDeclaration : this.getImports()) {
+			if (importDeclaration.isStatic() == staticImport) {
+				Boolean match = this.importMatches(importDeclaration, importName, importNameQualifier, shortImportName);
+				if (match != null) {
+					return match;
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * we should be able to rely on the JDT model here, since we are looking
+	 * at objects that should not be changing underneath us...
+	 */
+	protected Boolean importMatches(ImportDeclaration importDeclaration, String importName, String importNameQualifier, String shortImportName) {
+		// examples:
+		// 'importName' is "java.util.Date"
+		//     or
+		// 'importName' is "java.lang.annotation.ElementType.TYPE"
+		String idn = importDeclaration.getName().getFullyQualifiedName();
+		if (importName.equals(idn)) {
+			// import java.util.Date; => "Date" will resolve to "java.util.Date"
+			// import static java.lang.annotation.ElementType.TYPE; => "TYPE" will resolve to "java.lang.annotation.ElementType.TYPE"
+			return Boolean.TRUE;
+		}
+
+		String shortIDN = idn.substring(idn.lastIndexOf('.') + 1);
+		if (shortImportName.equals(shortIDN)) {
+			// import java.sql.Date; => ambiguous resolution of "Date"
+			// import static org.foo.Bar.TYPE; => ambiguous resolution of "TYPE"
+			return Boolean.FALSE;
+		}
+
+		if (importDeclaration.isOnDemand()) {
+			if (importNameQualifier.equals(idn)) {
+				// import java.util.*; => "Date" will resolve to "java.util.Date"
+				// import static java.lang.annotation.ElementType.*; => "TYPE" will resolve to "java.lang.annotation.ElementType.TYPE"
+				return Boolean.TRUE;
+			}
+			if (importDeclaration.isStatic()) {
+				if (this.enumResolves(idn, shortImportName)) {
+					// import static org.foo.Bar.*; => ambiguous resolution of "TYPE"
+					return Boolean.FALSE;
+				}
+			} else {
+				if (this.typeResolves(idn + '.' + shortImportName)) {
+					// import java.sql.*; => ambiguous resolution of "Date"
+					return Boolean.FALSE;
+				}
+			}
+		}
+		// no matches - OK to add explicit import
+		return null;
+	}
+
+	protected boolean enumResolves(String enumTypeName, String enumConstantName) {
+		try {
+			return this.enumResolves_(enumTypeName, enumConstantName);
+		} catch (JavaModelException ex) {
+			throw new RuntimeException(ex);
+		}
+	}
+
+	protected boolean enumResolves_(String enumTypeName, String enumConstantName) throws JavaModelException {
+		IType jdtType = this.findType_(enumTypeName);
+		if (jdtType == null) {
+			return false;
+		}
+		if ( ! jdtType.isEnum()) {
+			return false;
+		}
+		for (IField jdtField : jdtType.getFields()) {
+			if (jdtField.isEnumConstant() && jdtField.getElementName().equals(enumConstantName)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	protected boolean typeResolves(String name) {
+		return this.findType(name) != null;
+	}
+
+	protected IType findType(String name) {
+		try {
+			return this.findType_(name);
+		} catch (JavaModelException ex) {
+			throw new RuntimeException(ex);
+		}
+	}
+
+	protected IType findType_(String name) throws JavaModelException {
+		return this.getCompilationUnit().getJavaElement().getJavaProject().findType(name);
+	}
+
+	protected List<ImportDeclaration> getImports() {
+		return this.imports(this.getCompilationUnit());
+	}
+
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	protected List<ImportDeclaration> imports(CompilationUnit astRoot) {
+		return astRoot.imports();
+	}
+
+
+	// ********** annotation name resolution **********
+
+	public boolean annotationIsNamed(Annotation annotation, String name) {
+		return this.getQualifiedName(annotation).equals(name);
+	}
+
+	/**
+	 * Simply return the annotation's unqualified name if we can't "resolve" it.
+	 */
+	protected String getQualifiedName(Annotation annotation) {
+		ITypeBinding typeBinding = annotation.resolveTypeBinding();
+		if (typeBinding != null) {
+			String resolvedName = typeBinding.getQualifiedName();
+			if (resolvedName != null) {
+				return resolvedName;
+			}
+		}
+		// hack(?): check for a matching import because when moving a stand-alone
+		// annotation to its container in CombinationIndexedDeclarationAnnotationAdapter
+		// the container's import is added but then it won't "resolve" upon
+		// subsequent lookups (because the parser hasn't had time to run?)... :-(
+		return this.convertToFullClassName(annotation.getTypeName().getFullyQualifiedName());
+	}
+
+	/**
+	 * If necessary, use the declaration's imports to calculate a guess as to
+	 * the specified name's fully-qualified form.
+	 * Simply return the unqualified name if we can't "resolve" it.
+	 */
+	protected String convertToFullClassName(String name) {
+		// check for fully-qualified name
+		return (name.lastIndexOf('.') != -1) ? name : this.resolveAgainstImports(name, false);
+	}
+
+	/**
+	 * If necessary, use the declaration's imports to calculate a guess as to
+	 * the specified name's fully-qualified form.
+	 * Simply return the unqualified name if we can't "resolve" it.
+	 */
+	protected String convertToFullEnumConstantName(String name) {
+		int index1 = name.indexOf('.');
+		if (index1 == -1) {
+			// short name, e.g. "TYPE"
+			// true = look for static import of enum constant
+			return this.resolveAgainstImports(name, true);
+		}
+
+		int index2 = name.indexOf('.', index1 + 1);
+		if (index2 == -1) {
+			// partially-qualified name, e.g. "ElementType.TYPE"
+			// false = look regular import of enum class, not static import of enum constant
+			return this.resolveAgainstImports(name, false);
+		}
+
+		// fully-qualified name, e.g. "java.lang.annotation.ElementType.TYPE"
+		return name;
+	}
+
+	/**
+	 * Attempt to resolve the specified "short" name against the declaration's
+	 * imports. Return the name unchanged if we can't resolve it (perhaps it is
+	 * in the "default" package).
+	 */
+	protected String resolveAgainstImports(String shortName, boolean static_) {
+		for (ImportDeclaration importDeclaration : this.getImports()) {
+			if (importDeclaration.isStatic() == static_) {
+				String resolvedName = this.resolveAgainstImport(importDeclaration, shortName);
+				if (resolvedName != null) {
+					return resolvedName;
+				}
+			}
+		}
+		return shortName;  // "default" package or unknown
+	}
+
+	/**
+	 * Attempt to resolve the specified "short" name against the specified
+	 * import. Return the resolved name if the import resolves it; otherwise
+	 * return null.
+	 */
+	protected String resolveAgainstImport(ImportDeclaration importDeclaration, String shortName) {
+		String idn = importDeclaration.getName().getFullyQualifiedName();
+		if (importDeclaration.isOnDemand()) {
+			String candidate = idn + '.' + shortName;
+			if (importDeclaration.isStatic()) {
+				if (this.enumResolves(idn, shortName)) {
+					return candidate;
+				}
+			} else {
+				if (this.typeResolves(candidate)) {
+					return candidate;
+				}
+			}
+			// no match
+			return null;
+		}
+
+		// explicit import - see whether its end matches 'shortName'
+		int period = idn.length() - shortName.length() - 1;
+		if (period < 1) {
+			// something must precede period
+			return null;
+		}
+		if ((idn.charAt(period) == '.') && idn.endsWith(shortName)) {
+			return idn;  // probable exact match
+		}
+		return null;
+	}
+
+
+	// ********** miscellaneous methods **********
+
+	public ASTNode getDeclaration() {
+		return this.adapter.getDeclaration();
+	}
+
+	/**
+	 * Return the declaration's list of modifiers.
+	 * Element type: org.eclipse.jdt.core.dom.IExtendedModifier
+	 */
+	protected List<IExtendedModifier> getModifiers() {
+		return this.adapter.getModifiers();
+	}
+
+	public AST getAst() {
+		return this.getDeclaration().getAST();
+	}
+
+	protected CompilationUnit getCompilationUnit() {
+		return (CompilationUnit) this.getDeclaration().getRoot();
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.adapter.toString());
+	}
+
+
+	// ********** declaration adapter interface and implementations **********
+
+	/**
+	 * Define common protocol among the various "declarations".
+	 */
+	public interface Adapter {
+
+		/**
+		 * Return the adapted "declaration".
+		 */
+		ASTNode getDeclaration();
+
+		/**
+		 * Return the "declaration"'s list of modifiers.
+		 * Element type: org.eclipse.jdt.core.dom.IExtendedModifier
+		 */
+		List<IExtendedModifier> getModifiers();
+
+	}
+
+	public static class BodyDeclarationAdapter implements Adapter {
+		private final BodyDeclaration declaration;
+		public BodyDeclarationAdapter(BodyDeclaration declaration) {
+			super();
+			this.declaration = declaration;
+		}
+		public ASTNode getDeclaration() {
+			return this.declaration;
+		}
+		@SuppressWarnings("unchecked")
+		public List<IExtendedModifier> getModifiers() {
+			return this.declaration.modifiers();
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this, this.declaration.toString());
+		}
+	}
+
+	public static class SingleVariableDeclarationAdapter implements Adapter {
+		private final SingleVariableDeclaration declaration;
+		public SingleVariableDeclarationAdapter(SingleVariableDeclaration declaration) {
+			super();
+			this.declaration = declaration;
+		}
+		public ASTNode getDeclaration() {
+			return this.declaration;
+		}
+		@SuppressWarnings("unchecked")
+		public List<IExtendedModifier> getModifiers() {
+			return this.declaration.modifiers();
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this, this.declaration.toString());
+		}
+	}
+
+	public static class VariableDeclarationExpressionAdapter implements Adapter {
+		private final VariableDeclarationExpression declaration;
+		public VariableDeclarationExpressionAdapter(VariableDeclarationExpression declaration) {
+			super();
+			this.declaration = declaration;
+		}
+		public ASTNode getDeclaration() {
+			return this.declaration;
+		}
+		@SuppressWarnings("unchecked")
+		public List<IExtendedModifier> getModifiers() {
+			return this.declaration.modifiers();
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this, this.declaration.toString());
+		}
+	}
+
+	public static class VariableDeclarationStatementAdapter implements Adapter {
+		private final VariableDeclarationStatement declaration;
+		public VariableDeclarationStatementAdapter(VariableDeclarationStatement declaration) {
+			super();
+			this.declaration = declaration;
+		}
+		public ASTNode getDeclaration() {
+			return this.declaration;
+		}
+		@SuppressWarnings("unchecked")
+		public List<IExtendedModifier> getModifiers() {
+			return this.declaration.modifiers();
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this, this.declaration.toString());
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTTools.java
new file mode 100644
index 0000000..bf1e566
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTTools.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+* Copyright (c) 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
+import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+
+/**
+ * Convenience methods for dealing with JDT core
+ */
+public final class JDTTools
+{
+
+	public static boolean packageFragmentRootIsSourceFolder(IPackageFragmentRoot pfr) {
+		try {
+			return packageFragmentRootIsSourceFolder_(pfr);
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return false;
+		}
+	}
+
+	protected static boolean packageFragmentRootIsSourceFolder_(IPackageFragmentRoot pfr) throws JavaModelException {
+		return pfr.exists() && (pfr.getKind() == IPackageFragmentRoot.K_SOURCE);		
+	}
+
+	//TODO move this method to JpaProject once API freeze is over
+	public static Iterable<IPackageFragmentRoot> getJavaSourceFolders(IJavaProject javaProject) {
+		try {
+			return new FilteringIterable<IPackageFragmentRoot>(
+					getPackageFragmentRoots(javaProject),
+					SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER
+				);
+		} catch (JavaModelException ex) {
+			JptCorePlugin.log(ex);
+			return EmptyIterable.instance();
+		}
+	}
+
+	/**
+	 * This returns the first package fragment root found on this project.
+	 * I am not completely sure why, but the JavaTypeCompletionProcessor works with this.
+	 */
+	//TODO move this method to JpaProject once API freeze is over
+	public static IPackageFragmentRoot getCodeCompletionContextRoot(IJavaProject javaProject) {
+		try {
+			return javaProject.getPackageFragmentRoots()[0];
+		}
+		catch (JavaModelException e) {
+			JptCorePlugin.log(e);
+			return null;
+		}
+	}
+
+	protected static Iterable<IPackageFragmentRoot> getJavaSourceFolders_(IJavaProject javaProject) throws JavaModelException {
+		return new FilteringIterable<IPackageFragmentRoot>(
+				getPackageFragmentRoots(javaProject),
+				SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER
+			);
+	}
+
+	protected static final Filter<IPackageFragmentRoot> SOURCE_PACKAGE_FRAGMENT_ROOT_FILTER =
+		new Filter<IPackageFragmentRoot>() {
+			public boolean accept(IPackageFragmentRoot pfr) {
+				try {
+					return this.accept_(pfr);
+				} catch (JavaModelException ex) {
+					return false;
+				}
+			}
+			private boolean accept_(IPackageFragmentRoot pfr) throws JavaModelException {
+				return packageFragmentRootIsSourceFolder_(pfr);
+			}
+		};
+
+	protected static Iterable<IPackageFragmentRoot> getPackageFragmentRoots(IJavaProject javaProject) throws JavaModelException {
+		return new ArrayIterable<IPackageFragmentRoot>(javaProject.getPackageFragmentRoots());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java
new file mode 100644
index 0000000..f3438cf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.Type;
+import org.eclipse.jpt.utility.CommandExecutor;
+
+/**
+ * Adapt and extend a JDT type.
+ */
+public class JDTType
+	extends JDTMember
+	implements Type
+{
+
+	/**
+	 * constructor for the compilation unit's primary type
+	 */
+	public JDTType(
+			TypeDeclaration typeDeclaration,  // exclude annotations and enums
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		this(typeDeclaration, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+	}
+
+	/**
+	 * constructor for the compilation unit's primary type
+	 */
+	public JDTType(
+			TypeDeclaration typeDeclaration,  // exclude annotations and enums
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		this(null, typeDeclaration, 1, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
+	}
+
+	/**
+	 * constructor for nested types
+	 */
+	public JDTType(
+			Type declaringType,
+			TypeDeclaration typeDeclaration,  // exclude annotations and enums
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor) {
+		this(declaringType, typeDeclaration, occurrence, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+	}
+
+	/**
+	 * constructor for nested types
+	 */
+	public JDTType(
+			Type declaringType,
+			TypeDeclaration typeDeclaration,  // exclude annotations and enums
+			int occurrence,
+			ICompilationUnit compilationUnit,
+			CommandExecutor modifySharedDocumentCommandExecutor,
+			AnnotationEditFormatter annotationEditFormatter) {
+		super(declaringType, typeDeclaration.getName().getFullyQualifiedName(), occurrence, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
+	}
+
+	/**
+	 * constructor for testing
+	 */
+	public JDTType(Type declaringType, String name, int occurrence, ICompilationUnit compilationUnit) {
+		super(declaringType, name, occurrence, compilationUnit, CommandExecutor.Default.instance(), DefaultAnnotationEditFormatter.instance());
+	}
+
+
+	// ********** Member/Type implementation **********
+
+	public ITypeBinding getBinding(CompilationUnit astRoot) {
+		TypeDeclaration td = this.getBodyDeclaration(astRoot);
+		return (td == null) ? null : td.resolveBinding();
+	}
+
+	/**
+	 * find the type's body declaration in the specified AST
+	 */
+	public TypeDeclaration getBodyDeclaration(CompilationUnit astRoot) {
+		Type declaringType = this.getDeclaringType();
+		if (declaringType == null) {
+			return this.getTopLevelTypeDeclaration(astRoot);
+		}
+		TypeDeclaration typeDeclaration = declaringType.getBodyDeclaration(astRoot);
+		// the type declaration can be null when the source is completely hosed
+		return (typeDeclaration == null) ? null : this.getNestedTypeDeclaration(typeDeclaration);
+	}
+
+	public boolean isPersistable(CompilationUnit astRoot) {
+		ITypeBinding binding = this.getBinding(astRoot);
+		return (binding == null) ? false : JPTTools.typeIsPersistable(new JPTToolsAdapter(binding));
+	}
+
+	public TextRange getNameTextRange(CompilationUnit astRoot) {
+		return new ASTNodeTextRange(this.getBodyDeclaration(astRoot).getName());
+	}
+
+	public TypeDeclaration[] getTypes(CompilationUnit astRoot) {
+		return this.getBodyDeclaration(astRoot).getTypes();
+	}
+
+	public FieldDeclaration[] getFields(CompilationUnit astRoot) {
+		return this.getBodyDeclaration(astRoot).getFields();
+	}
+
+	public MethodDeclaration[] getMethods(CompilationUnit astRoot) {
+		return this.getBodyDeclaration(astRoot).getMethods();
+	}
+
+
+	// ********** internal **********
+
+	/**
+	 * return the first top-level type in the specified AST with a matching name
+	 */
+	protected TypeDeclaration getTopLevelTypeDeclaration(CompilationUnit astRoot) {
+		return this.getTypeDeclaration(types(astRoot));
+	}
+
+	protected TypeDeclaration getTypeDeclaration(List<AbstractTypeDeclaration> typeDeclarations) {
+		return this.getTypeDeclaration(typeDeclarations.toArray(new AbstractTypeDeclaration[typeDeclarations.size()]));
+	}
+
+	/**
+	 * return the nested type with a matching name and occurrence
+	 */
+	protected TypeDeclaration getNestedTypeDeclaration(TypeDeclaration declaringTypeDeclaration) {
+		return this.getTypeDeclaration(declaringTypeDeclaration.getTypes());
+	}
+
+	/**
+	 * return the type declaration corresponding to the type from the specified
+	 * set of type declarations (match name and occurrence)
+	 */
+	protected TypeDeclaration getTypeDeclaration(AbstractTypeDeclaration[] typeDeclarations) {
+		String name = this.getName_();
+		int occurrence = this.getOccurrence();
+		int count = 0;
+		for (AbstractTypeDeclaration typeDeclaration : typeDeclarations) {
+			if (typeDeclaration.getName().getFullyQualifiedName().equals(name)) {
+				count++;
+				if (count == occurrence) {
+					return (typeDeclaration.getNodeType() == ASTNode.TYPE_DECLARATION) ? (TypeDeclaration) typeDeclaration : null;
+				}
+			}
+		}
+		// return null if the type is no longer in the source code;
+		// this can happen when the context model has not yet
+		// been synchronized with the resource model but is still
+		// asking for an ASTNode (e.g. during a selection event)
+		return null;
+	}
+
+	/**
+	 * we only instantiate a single top-level, non-enum, non-annotation
+	 * type per compilation unit (i.e. a class or interface); and, since
+	 * enums and annotations can only be top-level types (i.e. they cannot
+	 * be nested within another type) we will always have TypeDeclarations
+	 * in the CompilationUnit
+	 */
+	// minimize scope of suppressed warnings
+	@SuppressWarnings("unchecked")
+	protected static List<AbstractTypeDeclaration> types(CompilationUnit astRoot) {
+		return astRoot.types();
+	}
+
+
+	// ********** JPT tools adapter **********
+
+	protected static class JPTToolsAdapter implements JPTTools.TypeAdapter {
+		private final ITypeBinding typeBinding;
+		protected JPTToolsAdapter(ITypeBinding typeBinding) {
+			super();
+			if (typeBinding == null) {
+				throw new NullPointerException();
+			}
+			this.typeBinding = typeBinding;
+		}
+
+		public int getModifiers() {
+			return this.typeBinding.getModifiers();
+		}
+
+		public boolean isAnnotation() {
+			return this.typeBinding.isAnnotation();
+		}
+
+		public boolean isAnonymous() {
+			return this.typeBinding.isAnonymous();
+		}
+
+		public boolean isArray() {
+			return this.typeBinding.isArray();
+		}
+
+		public boolean isEnum() {
+			return this.typeBinding.isEnum();
+		}
+
+		public boolean isInterface() {
+			return this.typeBinding.isInterface();
+		}
+
+		public boolean isLocal() {
+			return this.typeBinding.isLocal();
+		}
+
+		public boolean isMember() {
+			return this.typeBinding.isMember();
+		}
+
+		public boolean isPrimitive() {
+			return this.typeBinding.isPrimitive();
+		}
+	
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JPTTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JPTTools.java
new file mode 100644
index 0000000..73b19d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JPTTools.java
@@ -0,0 +1,341 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.lang.reflect.Modifier;
+import java.util.Iterator;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * Convenience methods for JPA-related queries concerning JDT objects.
+ */
+public class JPTTools {
+
+	// ********** type **********
+
+	/**
+	 * Return whether the specified type can be "persisted", i.e. marked as
+	 * Entity, MappedSuperclass, Embeddable
+	 */
+	// TODO check for no-arg constructor (or should that just be validation?)
+	// TODO move other checks to validation (e.g. 'final', 'static')?
+	public static boolean typeIsPersistable(TypeAdapter typeAdapter) {
+		if (typeAdapter.isInterface()) {
+			return false;
+		}
+		if (typeAdapter.isAnnotation()) {
+			return false;
+		}
+		if (typeAdapter.isEnum()) {
+			return false;
+		}
+		if (typeAdapter.isLocal()) {
+			return false;
+		}
+		if (typeAdapter.isAnonymous()) {
+			return false;
+		}
+		if (typeAdapter.isPrimitive()) {
+			return false;  // should never get here(?)
+		}
+		if (typeAdapter.isArray()) {
+			return false;  // should never get here(?)
+		}
+		int modifiers = typeAdapter.getModifiers();
+		if (typeAdapter.isMember()) {
+			if ( ! Modifier.isStatic(modifiers)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Queries needed to calculate whether a type is "persistable".
+	 * Adapted to ITypeBinding and IType.
+	 */
+	public interface TypeAdapter {
+		int getModifiers();
+		boolean isAnnotation();
+		boolean isAnonymous();
+		boolean isArray();
+		boolean isEnum();
+		boolean isInterface();
+		boolean isLocal();
+		boolean isMember();
+		boolean isPrimitive();
+	}
+
+
+	// ********** field **********
+
+	/**
+	 * Return whether the specified field may be "persisted".
+	 * According to the spec, "All non-transient instance variables that are not 
+	 * annotated with the Transient annotation are persistent."
+	 */
+	public static boolean fieldIsPersistable(FieldAdapter fieldAdapter) {
+		int modifiers = fieldAdapter.getModifiers();
+		if (Modifier.isStatic(modifiers)) {
+			return false;
+		}
+		if (Modifier.isTransient(modifiers)) {
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Queries needed to calculate whether a field is "persistable".
+	 * Adapted to IVariableBinding and IField.
+	 */
+	public interface FieldAdapter {
+		/**
+		 * Return the field's modifiers. We use these to check whether the
+		 * field is static or transient.
+		 */
+		int getModifiers();
+	}
+
+
+	// ********** method **********
+
+	/**
+	 * Return whether the specified method is a "getter" method that
+	 * represents a property that may be "persisted".
+	 */
+	public static boolean methodIsPersistablePropertyGetter(MethodAdapter methodAdapter) {
+		if (methodHasInvalidModifiers(methodAdapter)) {
+			return false;
+		}
+		if (methodAdapter.isConstructor()) {
+			return false;
+		}
+
+		String returnTypeName = methodAdapter.getReturnTypeErasureName();
+		if (returnTypeName == null) {
+			return false;  // DOM method bindings can have a null name
+		}
+		if (returnTypeName.equals("void")) { //$NON-NLS-1$
+			return false;
+		}
+		if (methodHasParameters(methodAdapter)) {
+			return false;
+		}
+
+		String name = methodAdapter.getName();
+		int beginIndex = 0;
+		boolean booleanGetter = false;
+		if (name.startsWith("is")) { //$NON-NLS-1$
+			if (returnTypeName.equals("boolean")) { //$NON-NLS-1$
+				beginIndex = 2;
+			} else {
+				return false;
+			}
+		} else if (name.startsWith("get")) { //$NON-NLS-1$
+			beginIndex = 3;
+			if (returnTypeName.equals("boolean")) { //$NON-NLS-1$
+				booleanGetter = true;
+			}
+		} else {
+			return false;
+		}
+
+		String capitalizedAttributeName = name.substring(beginIndex);
+		// if the type has both methods:
+		//     boolean isProperty()
+		//     boolean getProperty()
+		// then #isProperty() takes precedence and we ignore #getProperty();
+		// but only having #getProperty() is OK too
+		// (see the JavaBeans spec 1.01)
+		if (booleanGetter && methodHasValidSiblingIsMethod(methodAdapter, capitalizedAttributeName)) {
+			return false;  // since the type also defines #isProperty(), ignore #getProperty()
+		}
+		return methodHasValidSiblingSetMethod(methodAdapter, capitalizedAttributeName, returnTypeName);
+	}
+
+	/**
+	 * Return whether the method's modifiers prevent it
+	 * from being a getter or setter for a "persistent" property.
+	 */
+	private static boolean methodHasInvalidModifiers(SimpleMethodAdapter methodAdapter) {
+		int modifiers = methodAdapter.getModifiers();
+		if (Modifier.isStatic(modifiers)) {
+			return true;
+		}
+		if (Modifier.isFinal(modifiers)) {
+			return true;
+		}
+		if ( ! (Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers))) {
+			return true;
+		}
+		return false;
+	}
+
+	private static boolean methodHasParameters(MethodAdapter methodAdapter) {
+		return methodAdapter.getParametersLength() != 0;
+	}
+
+	/**
+	 * Return whether the method has a sibling "is" method for the specified
+	 * property and that method is valid for a "persistable" property.
+	 * Pre-condition: the method is a "boolean getter" (e.g. 'public boolean getProperty()');
+	 * this prevents us from returning true when the method itself is an
+	 * "is" method.
+	 */
+	private static boolean methodHasValidSiblingIsMethod(MethodAdapter methodAdapter, String capitalizedAttributeName) {
+		SimpleMethodAdapter isMethodAdapter = methodAdapter.getSibling("is" + capitalizedAttributeName); //$NON-NLS-1$
+		return methodIsValidSibling(isMethodAdapter, "boolean"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Return whether the method has a sibling "set" method
+	 * and that method is valid for a "persistable" property.
+	 */
+	private static boolean methodHasValidSiblingSetMethod(MethodAdapter methodAdapter, String capitalizedAttributeName, String parameterTypeErasureName) {
+		SimpleMethodAdapter setMethodAdapter = methodAdapter.getSibling("set" + capitalizedAttributeName, parameterTypeErasureName); //$NON-NLS-1$
+		return methodIsValidSibling(setMethodAdapter, "void"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Return whether the specified method is a valid sibling with the
+	 * specified return type.
+	 */
+	private static boolean methodIsValidSibling(SimpleMethodAdapter methodAdapter, String returnTypeName) {
+		if (methodAdapter == null) {
+			return false;
+		}
+		if (methodHasInvalidModifiers(methodAdapter)) {
+			return false;
+		}
+		if (methodAdapter.isConstructor()) {
+			return false;
+		}
+		String rtName = methodAdapter.getReturnTypeErasureName();
+		if (rtName == null) {
+			return false;  // DOM method bindings can have a null name
+		}
+		return rtName.equals(returnTypeName);
+	}
+
+	/**
+	 * Queries needed to calculate whether a method is "persistable".
+	 * Adapted to IMethodBinding and IMethod.
+	 */
+	public interface SimpleMethodAdapter {
+		/**
+		 * Return the method's modifiers.
+		 * We use these to check whether the method is static, final, etc.
+		 */
+		int getModifiers();
+
+		/**
+		 * Return the name of the method's return type erasure.
+		 * We use this to check for
+		 *   - boolean getters
+		 *   - void return types
+		 *   - matching getters and setters
+		 */
+		String getReturnTypeErasureName();
+
+		/**
+		 * Return whether the method is a constructor.
+		 */
+		boolean isConstructor();
+	}
+
+	/**
+	 * Queries needed to calculate whether a method is "persistable".
+	 * Adapted to IMethodBinding and IMethod.
+	 */
+	public interface MethodAdapter extends SimpleMethodAdapter {
+		/**
+		 * Return the method's name.
+		 * We use this to determine
+		 *   - whether the method is a "getter"
+		 *   - the property name implied by the getter's name
+		 */
+		String getName();
+
+		/**
+		 * Return the number of paramters declared by the method.
+		 * We use this to determine whether the method is a "getter".
+		 */
+		int getParametersLength();
+
+		/**
+		 * Return the method's "sibling" with the specified name and no parameters.
+		 * We use this to find an "is" boolean getter that would take precedence
+		 * over a "get" boolean getter.
+		 */
+		SimpleMethodAdapter getSibling(String name);
+
+		/**
+		 * Return the method's "sibling" with the specified name and single parameter.
+		 * We use this to find a matching "setter" for a possible "getter".
+		 */
+		SimpleMethodAdapter getSibling(String name, String parameterTypeErasureName);
+	}
+
+
+	// ********** Access type **********
+
+	/**
+	 * Return the AccessType currently implied by the Java source code
+	 * or class file:
+	 *     - if only Fields are annotated => FIELD
+	 *     - if only Properties are annotated => PROPERTY
+	 *     - if both Fields and Properties are annotated => FIELD
+	 *     - if nothing is annotated
+	 *     		- and fields exist => FIELD
+	 *     		- and properties exist, but no fields exist => PROPERTY
+	 *     		- and neither fields nor properties exist => null at this level (FIELD in the context model)
+	 */
+	public static AccessType buildAccess(JavaResourcePersistentType jrpType) {
+		boolean hasPersistableFields = false;
+		for (Iterator<JavaResourcePersistentAttribute> stream = jrpType.persistableFields(); stream.hasNext(); ) {
+			hasPersistableFields = true;
+			if (stream.next().isAnnotated()) {
+				// any field is annotated => FIELD
+				return AccessType.FIELD;
+			}
+		}
+
+		boolean hasPersistableProperties = false;
+		for (Iterator<JavaResourcePersistentAttribute> stream = jrpType.persistableProperties(); stream.hasNext(); ) {
+			hasPersistableProperties = true;
+			if (stream.next().isAnnotated()) {
+				// none of the fields are annotated and a getter is annotated => PROPERTY
+				return AccessType.PROPERTY;
+			}
+		}
+
+		if (hasPersistableProperties && ! hasPersistableFields) {
+			return AccessType.PROPERTY;
+		}
+
+		// if no annotations exist, access is null at the resource model level
+		return null;
+	}
+
+
+	// ********** suppressed constructor **********
+
+	/**
+	 * Suppress default constructor, ensuring non-instantiability.
+	 */
+	private JPTTools() {
+		super();
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationAdapter.java
new file mode 100644
index 0000000..5b92fa5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationAdapter.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * Adapt a member and a declaration annotation adapter.
+ */
+public class MemberAnnotationAdapter extends AbstractAnnotationAdapter {
+
+
+	// ********** constructor **********
+
+	public MemberAnnotationAdapter(Member member, DeclarationAnnotationAdapter daa) {
+		super(member, daa);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationElementAdapter.java
new file mode 100644
index 0000000..89f854f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationElementAdapter.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+ /**
+ * Adapt a member and a declaration annotation element adapter.
+ */
+public class MemberAnnotationElementAdapter<T>
+	implements AnnotationElementAdapter<T>
+{
+	private final Member member;
+	private final DeclarationAnnotationElementAdapter<T> daea;
+
+
+	// ********** constructor **********
+
+	public MemberAnnotationElementAdapter(Member member, DeclarationAnnotationElementAdapter<T> daea) {
+		super();
+		this.member = member;
+		this.daea = daea;
+	}
+
+
+	// ********** AnnotationElementAdapter implementation **********
+
+	public T getValue() {
+		return this.daea.getValue(this.member.getModifiedDeclaration());
+	}
+
+	public T getValue(CompilationUnit astRoot) {
+		return this.daea.getValue(this.member.getModifiedDeclaration(astRoot));
+	}
+
+	public void setValue(T value) {
+		this.edit(this.buildSetValueEditor(value));
+	}
+
+	public Expression getExpression(CompilationUnit astRoot) {
+		return this.daea.getExpression(this.member.getModifiedDeclaration(astRoot));
+	}
+
+	public ASTNode getAstNode(CompilationUnit astRoot) {
+		return this.daea.getAstNode(this.member.getModifiedDeclaration(astRoot));
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.daea);
+	}
+
+
+	// ********** internal methods **********
+
+	protected void edit(Member.Editor editor) {
+		this.member.edit(editor);
+	}
+
+	protected Member.Editor buildSetValueEditor(T value) {
+		return new SetValueEditor<T>(value, this.daea);
+	}
+
+
+	// ********** member classes **********
+
+	protected static class SetValueEditor<T> implements Member.Editor {
+		private final DeclarationAnnotationElementAdapter<T> daea;
+		private final T value;
+
+		SetValueEditor(T value, DeclarationAnnotationElementAdapter<T> daea) {
+			super();
+			this.value = value;
+			this.daea = daea;
+		}
+		public void edit(ModifiedDeclaration declaration) {
+			this.daea.setValue(this.value, declaration);
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberIndexedAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberIndexedAnnotationAdapter.java
new file mode 100644
index 0000000..aceeb48
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberIndexedAnnotationAdapter.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Adapt a member and an indexed declaration annotation adapter.
+ */
+public class MemberIndexedAnnotationAdapter
+	extends AbstractAnnotationAdapter
+	implements IndexedAnnotationAdapter
+{
+	private final IndexedDeclarationAnnotationAdapter idaa;
+
+
+	// ********** constructor **********
+
+	public MemberIndexedAnnotationAdapter(Member member, IndexedDeclarationAnnotationAdapter idaa) {
+		super(member, idaa);
+		this.idaa = idaa;
+	}
+
+
+	// ********** IndexedAnnotationAdapter implementation **********
+
+	public int getIndex() {
+		return this.idaa.getIndex();
+	}
+
+	public void moveAnnotation(int newIndex) {
+		this.edit(this.buildMoveAnnotationEditor(newIndex));
+	}
+
+
+	// ********** factory methods **********
+
+	protected Member.Editor buildMoveAnnotationEditor(int newIndex) {
+		return new MoveAnnotationEditor(this.idaa, newIndex);
+	}
+
+
+	// ********** member classes **********
+
+	protected static class MoveAnnotationEditor implements Member.Editor {
+		private final IndexedDeclarationAnnotationAdapter idaa;
+		private int index;
+
+		MoveAnnotationEditor(IndexedDeclarationAnnotationAdapter idaa, int index) {
+			super();
+			this.idaa = idaa;
+			this.index = index;
+		}
+		public void edit(ModifiedDeclaration declaration) {
+			this.idaa.moveAnnotation(this.index, declaration);
+		}
+		@Override
+		public String toString() {
+			return StringTools.buildToStringFor(this);
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NameStringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NameStringExpressionConverter.java
new file mode 100644
index 0000000..56fd65a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NameStringExpressionConverter.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a name to/from a string representation of a name/identifier
+ * (e.g. "com.xxx.Foo.VALUE1" or "value").
+ */
+public final class NameStringExpressionConverter
+	extends AbstractExpressionConverter<String>
+{
+	private static final ExpressionConverter<String> INSTANCE = new NameStringExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<String> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NameStringExpressionConverter() {
+		super();
+	}
+
+	@Override
+	protected Name convertObject(String string, AST ast) {
+		return ast.newName(string);
+	}
+
+	@Override
+	protected String convertExpression(Expression expression) {
+		switch (expression.getNodeType()) {
+			case ASTNode.QUALIFIED_NAME:
+			case ASTNode.SIMPLE_NAME:
+				return ((Name) expression).getFullyQualifiedName();
+			default:
+				return null;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NestedDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NestedDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..2b991a7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NestedDeclarationAnnotationAdapter.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Manipulate an annotation that is embedded as an element within
+ * another annotation, e.g.
+ * <pre>
+ *     &#64;Outer(foo=&#64;Inner)
+ *     private int id;
+ *         outerAnnotationAdapter = AnnotationAdapter<&#64;Outer>
+ *         elementName = "foo"
+ *         annotationName = "Inner"
+ * </pre>
+ */
+public class NestedDeclarationAnnotationAdapter extends AbstractNestedDeclarationAnnotationAdapter {
+
+
+	// ********** constructors **********
+
+	/**
+	 * default element name is "value";
+	 * default behavior is to remove the outer annotation when it is empty
+	 */
+	public NestedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter outerAnnotationAdapter, String annotationName) {
+		super(outerAnnotationAdapter, annotationName);
+	}
+
+	/**
+	 * default behavior is to remove the outer annotation when it is empty
+	 */
+	public NestedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter outerAnnotationAdapter, String elementName, String annotationName) {
+		super(outerAnnotationAdapter, elementName, annotationName);
+	}
+
+	public NestedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter outerAnnotationAdapter, String elementName, String annotationName, boolean removeOuterAnnotationWhenEmpty) {
+		super(outerAnnotationAdapter, elementName, annotationName, removeOuterAnnotationWhenEmpty);
+	}
+
+
+	// ********** AbstractNestedDeclarationAnnotationAdapter implementation **********
+
+	@Override
+	protected Annotation getAnnotation(Expression value) {
+		return this.annotationValue(value);
+	}
+
+	@Override
+	protected Expression buildNewInnerExpression(Annotation inner) {
+		return inner;
+	}
+
+	/**
+	 * the annotation is the expression itself, so the annotation cannot be
+	 * "removed" from itself - return 'false'
+	 */
+	@Override
+	protected boolean removeAnnotation(ModifiedDeclaration declaration, Annotation outer, Expression value) {
+		return false;
+	}
+
+	/**
+	 * <pre>
+	 * &#64;Outer("lorem ipsum") => &#64;Outer(&#64;Inner)
+	 * </pre>
+	 */
+	@Override
+	protected void modifyAnnotationValue(SingleMemberAnnotation outer, Annotation inner) {
+		// replace(?) the current element value
+		outer.setValue(inner);
+	}
+
+	/**
+	 * Simply set the pair's value.
+	 */
+	@Override
+	protected void modifyMemberValuePair(MemberValuePair pair, Annotation inner) {
+		pair.setValue(inner);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..8f39485
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapter.java
@@ -0,0 +1,334 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.MemberValuePair;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Manipulate an annotation that is embedded in an element array within
+ * another annotation, e.g.
+ * <pre>
+ *     &#64;Outer(foo={&#64;Inner("zero"), &#64;Inner("one"), &#64;Inner("two")})
+ *     private int id;
+ *         outerAnnotationAdapter = AnnotationAdapter<&#64;Outer>
+ *         elementName = "foo"
+ *         index = 0-2
+ *         annotationName = "Inner"
+ * </pre>
+ */
+public class NestedIndexedDeclarationAnnotationAdapter
+	extends AbstractNestedDeclarationAnnotationAdapter
+	implements IndexedDeclarationAnnotationAdapter
+{
+	private int index;
+
+
+	// ********** constructors **********
+
+	/**
+	 * default element name is "value";
+	 * default behavior is to remove the outer annotation when it is empty
+	 */
+	public NestedIndexedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter annotationAdapter, int index, String annotationName) {
+		super(annotationAdapter, annotationName);
+		this.index = index;
+	}
+
+	/**
+	 * default behavior is to remove the outer annotation when it is empty
+	 */
+	public NestedIndexedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, int index, String annotationName) {
+		super(annotationAdapter, elementName, annotationName);
+		this.index = index;
+	}
+
+	public NestedIndexedDeclarationAnnotationAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName, int index, String annotationName, boolean removeOuterAnnotationWhenEmpty) {
+		super(annotationAdapter, elementName, annotationName, removeOuterAnnotationWhenEmpty);
+		this.index = index;
+	}
+
+
+	// ********** AbstractNestedDeclarationAnnotationAdapter implementation **********
+
+	@Override
+	protected Annotation getAnnotation(Expression value) {
+		if (value.getNodeType() == ASTNode.ARRAY_INITIALIZER) {
+			return this.annotation((ArrayInitializer) value);
+		}
+		return (this.index == 0) ? this.annotationValue(value) : null;
+	}
+
+	@Override
+	protected Expression buildNewInnerExpression(Annotation inner) {
+		return (this.index == 0) ? inner : (Expression) this.buildNewInnerArrayInitializer(inner);
+	}
+
+	@Override
+	protected boolean removeAnnotation(ModifiedDeclaration declaration, Annotation outer, Expression value) {
+		if (value.getNodeType() == ASTNode.ARRAY_INITIALIZER) {
+			this.removeAnnotation(declaration, outer, (ArrayInitializer) value);
+			return true;
+		}
+		// if our index is greater than zero, but we don't have an array,
+		// then the annotation must already be gone
+		return (this.index != 0);
+	}
+
+	/**
+	 * <pre>
+	 * &#64;Outer({&#64;Inner(0), &#64;Inner(1)}) => &#64;Outer({&#64;Inner(0), &#64;Inner(1), &#64;Inner(2)})
+	 *     or
+	 * &#64;Outer("lorem ipsum") => &#64;Outer(&#64;Inner(0))
+	 *     or
+	 * &#64;Outer(&#64;Inner(0)) => &#64;Outer({&#64;Inner(0), &#64;Inner(1)})
+	 * </pre>
+	 */
+	@Override
+	protected void modifyAnnotationValue(SingleMemberAnnotation outer, Annotation inner) {
+		this.modifyExpression(outer, SINGLE_MEMBER_ANNOTATION_EXPRESSION_PROVIDER, inner);
+	}
+
+	/**
+	 * <pre>
+	 * &#64;Outer(text="lorem ipsum") => &#64;Outer(text="lorem ipsum", foo=&#64;Inner(0))
+	 *     or
+	 * &#64;Outer(foo={&#64;Inner(0), &#64;Inner(1)}) => &#64;Outer(foo={&#64;Inner(0), &#64;Inner(1), &#64;Inner(2)})
+	 *     or
+	 * &#64;Outer(foo="lorem ipsum") => &#64;Outer(foo=&#64;Inner(0))
+	 *     or
+	 * &#64;Outer(foo=&#64;NotInner) => &#64;Outer(foo=&#64;Inner(0))
+	 *     or
+	 * &#64;Outer(foo=&#64;Inner(0)) => &#64;Outer(foo={&#64;Inner(0), &#64;Inner(1)})
+	 * </pre>
+	 */
+	@Override
+	protected void modifyMemberValuePair(MemberValuePair pair, Annotation inner) {
+		this.modifyExpression(pair, MEMBER_VALUE_PAIR_EXPRESSION_PROVIDER, inner);
+	}
+
+
+	// ********** IndexedDeclarationAnnotationAdapter implementation **********
+
+	public int getIndex() {
+		return this.index;
+	}
+
+	/**
+	 * Move the annotation to the specified index, leaving its original
+	 * position cleared out.
+	 */
+	public void moveAnnotation(int newIndex, ModifiedDeclaration declaration) {
+		int oldIndex = this.index;
+		if (newIndex == oldIndex) {
+			return;
+		}
+
+		Annotation original = this.getAnnotation(declaration);
+		if (original == null) {
+			this.index = newIndex;
+			this.removeAnnotation(declaration);  // clear out the new location (?)
+		} else {
+			Annotation copy = (Annotation) ASTNode.copySubtree(original.getAST(), original);
+			this.index = newIndex;
+			this.addAnnotation(declaration, copy);  // install the copy in the new location
+			this.index = oldIndex;
+			this.removeAnnotation(declaration);  // go back and clear out the original location (AFTER the move)
+			this.index = newIndex;
+		}
+	}
+
+
+	// ********** internal methods **********
+
+	/**
+	 * Return the adapter's annotation from the specified array initializer.
+	 */
+	private Annotation annotation(ArrayInitializer value) {
+		List<Expression> expressions = this.expressions(value);
+		return (this.index >= expressions.size()) ? null : this.annotationValue(expressions.get(this.index));
+	}
+
+	/**
+	 * Build a new array initializer to hold the specified annotation,
+	 * padding it with 'null' literals as necessary
+	 */
+	private ArrayInitializer buildNewInnerArrayInitializer(Annotation inner) {
+		ArrayInitializer ai = inner.getAST().newArrayInitializer();
+		this.addInnerToExpressions(inner, this.expressions(ai));
+		return ai;
+	}
+
+	/**
+	 * Add the specified annotation to the specified array initializer,
+	 * padding it with 'null' literals as necessary
+	 */
+	private void addInnerToExpressions(Annotation inner, List<Expression> expressions) {
+		if (expressions.size() > this.index) {
+			throw new IllegalStateException("expressions size is greater than index - size: " + expressions.size() + " - index: " + this.index); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		while (expressions.size() < this.index) {
+			expressions.add(inner.getAST().newNullLiteral());
+		}
+		expressions.add(inner);
+	}
+
+	/**
+	 * Remove the adapter's annotation from the specified array initializer.
+	 */
+	private void removeAnnotation(ModifiedDeclaration declaration, Annotation outer, ArrayInitializer value) {
+		List<Expression> expressions = this.expressions(value);
+		if (this.index >= expressions.size()) {
+			return;  // avoid IndexOutOfBoundsException(?)
+		}
+		Annotation inner = this.annotationValue(expressions.get(this.index));
+		if (inner == null) {
+			return;
+		}
+		if ( ! this.nameMatches(declaration, inner)) {
+			return;
+		}
+		if (this.index == (expressions.size() - 1)) {
+			expressions.remove(this.index);
+		} else {
+			expressions.set(this.index, value.getAST().newNullLiteral());
+		}
+		this.trimExpressions(declaration, outer, expressions);
+	}
+
+	/**
+	 * Strip all the null literals off the end of the specified list of expressions
+	 * and normalize the specified outer annotation.
+	 */
+	private void trimExpressions(ModifiedDeclaration declaration, Annotation outer, List<Expression> expressions) {
+		// start at the end of the list
+		for (int i = expressions.size(); i-- > 0; ) {
+			if (expressions.get(i).getNodeType() == ASTNode.NULL_LITERAL) {
+				expressions.remove(i);
+			} else {
+				break;  // stop with the first non-null literal encountered
+			}
+		}
+		switch (expressions.size()) {
+			case 0:
+				this.removeElementAndNormalize(declaration, outer);
+				break;
+			case 1:
+				this.convertArrayToLastRemainingExpression(outer, expressions.get(0));
+				break;
+			default:
+				break;
+		}
+	}
+
+	/**
+	 * When there is only a single element in an array initializer, convert the
+	 * expression to be just the single element; e.g.
+	 * <pre>
+	 *     &#64;Foo(xxx={"abc"}) => &#64;Foo(xxx="abc")
+	 * or
+	 *     &#64;Foo({"abc"}) => &#64;Foo("abc")
+	 * </pre>
+	 */
+	private void convertArrayToLastRemainingExpression(Annotation outer, Expression lastValue) {
+		lastValue = (Expression) ASTNode.copySubtree(lastValue.getAST(), lastValue);
+		if (outer.isNormalAnnotation()) {
+			this.memberValuePair((NormalAnnotation) outer).setValue(lastValue);
+		} else if (outer.isSingleMemberAnnotation()) {
+			((SingleMemberAnnotation) outer).setValue(lastValue);
+		} else {
+			throw new IllegalArgumentException("unexpected annotation type: " + outer); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Manipulate the specified expression appropriately.
+	 * If it is an array initializer, add the specified annotation to it.
+	 * If it is not, replace the expression or convert it into an array
+	 * initializer.
+	 */
+	private void modifyExpression(ASTNode node, ExpressionProvider expProvider, Annotation inner) {
+		Expression value = expProvider.getExpression(node);
+		if (value.getNodeType() == ASTNode.ARRAY_INITIALIZER) {
+			// ignore the other entries in the array initializer(?) - they may not be matching Annotations...
+			List<Expression> expressions = this.expressions((ArrayInitializer) value);
+			if (this.index >= expressions.size()) {
+				this.addInnerToExpressions(inner, expressions);
+			} else {
+				expressions.set(this.index, inner);
+			}
+		} else {
+			if (this.index == 0) {
+				// replace whatever was there before
+				expProvider.setExpression(node, inner);
+			} else {
+				// convert to an array
+				ArrayInitializer ai = inner.getAST().newArrayInitializer();
+				List<Expression> expressions = this.expressions(ai);
+				expressions.add((Expression) ASTNode.copySubtree(value.getAST(), value));
+				this.addInnerToExpressions(inner, expressions);
+				expProvider.setExpression(node, ai);
+			}
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	protected List<Expression> expressions(ArrayInitializer ai) {
+		return ai.expressions();
+	}
+
+
+	// ********** expression providers **********
+
+	/**
+	 * define interface that allows us to "re-use" the code in
+	 * #modifyExpression(ASTNode, ExpressionProvider, Annotation)
+	 */
+	private interface ExpressionProvider {
+		Expression getExpression(ASTNode node);
+		void setExpression(ASTNode node, Expression expression);
+	}
+
+	private static final ExpressionProvider MEMBER_VALUE_PAIR_EXPRESSION_PROVIDER = new ExpressionProvider() {
+		public Expression getExpression(ASTNode node) {
+			return ((MemberValuePair) node).getValue();
+		}
+		public void setExpression(ASTNode node, Expression expression) {
+			((MemberValuePair) node).setValue(expression);
+		}
+		@Override
+		public String toString() {
+			return "MemberValuePairExpressionProvider"; //$NON-NLS-1$
+		}
+	};
+
+	private static final ExpressionProvider SINGLE_MEMBER_ANNOTATION_EXPRESSION_PROVIDER = new ExpressionProvider() {
+		public Expression getExpression(ASTNode node) {
+			return ((SingleMemberAnnotation) node).getValue();
+		}
+		public void setExpression(ASTNode node, Expression expression) {
+			((SingleMemberAnnotation) node).setValue(expression);
+		}
+		@Override
+		public String toString() {
+			return "SingleMemberAnnotationExpressionProvider"; //$NON-NLS-1$
+		}
+	};
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullAnnotationEditFormatter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullAnnotationEditFormatter.java
new file mode 100644
index 0000000..3c632f3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullAnnotationEditFormatter.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
+
+public final class NullAnnotationEditFormatter
+	implements AnnotationEditFormatter
+{
+
+	private static final NullAnnotationEditFormatter INSTANCE = new NullAnnotationEditFormatter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static AnnotationEditFormatter instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NullAnnotationEditFormatter() {
+		super();
+	}
+
+	public void format(IDocument doc, TextEdit editTree) throws MalformedTreeException, BadLocationException {
+		// no formatting
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..d81448c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullDeclarationAnnotationAdapter.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Behaviorless implementation.
+ */
+public final class NullDeclarationAnnotationAdapter
+	implements IndexedDeclarationAnnotationAdapter
+{
+
+	// singleton
+	private static final NullDeclarationAnnotationAdapter INSTANCE = new NullDeclarationAnnotationAdapter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static IndexedDeclarationAnnotationAdapter instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NullDeclarationAnnotationAdapter() {
+		super();
+	}
+
+
+	// ********** DeclarationAnnotationAdapter implementation **********
+
+	public Annotation getAnnotation(ModifiedDeclaration declaration) {
+		return null;
+	}
+
+	public MarkerAnnotation newMarkerAnnotation(ModifiedDeclaration declaration) {
+		return null;
+	}
+
+	public SingleMemberAnnotation newSingleMemberAnnotation(ModifiedDeclaration declaration) {
+		return null;
+	}
+
+	public NormalAnnotation newNormalAnnotation(ModifiedDeclaration declaration) {
+		return null;
+	}
+
+	public void removeAnnotation(ModifiedDeclaration declaration) {
+		// do nothing
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		return declaration.getDeclaration();
+	}
+
+
+	// ********** IndexedDeclarationAnnotationAdapter implementation **********
+
+	public int getIndex() {
+		return -1;
+	}
+
+	public void moveAnnotation(int newIndex, ModifiedDeclaration declaration) {
+		// do nothing
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullDeclarationAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullDeclarationAnnotationElementAdapter.java
new file mode 100644
index 0000000..c53a695
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullDeclarationAnnotationElementAdapter.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Behaviorless implementation.
+ */
+public class NullDeclarationAnnotationElementAdapter<T>
+	implements DeclarationAnnotationElementAdapter<T>
+{
+
+	// singleton
+	@SuppressWarnings("unchecked")
+	private static final DeclarationAnnotationElementAdapter INSTANCE
+			= new NullDeclarationAnnotationElementAdapter();
+
+	/**
+	 * Return the singleton.
+	 */
+	@SuppressWarnings("unchecked")
+	public static <S> DeclarationAnnotationElementAdapter<S> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NullDeclarationAnnotationElementAdapter() {
+		super();
+	}
+
+	public T getValue(ModifiedDeclaration declaration) {
+		return null;
+	}
+
+	public void setValue(T value, ModifiedDeclaration declaration) {
+		// do nothing
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		return declaration.getDeclaration();
+	}
+
+	public Expression getExpression(ModifiedDeclaration declaration) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullExpressionConverter.java
new file mode 100644
index 0000000..803b983
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NullExpressionConverter.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * No conversion.
+ */
+public final class NullExpressionConverter
+	implements ExpressionConverter<Expression>
+{
+
+	// singleton
+	private static final ExpressionConverter<Expression> INSTANCE = new NullExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<Expression> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NullExpressionConverter() {
+		super();
+	}
+
+	public Expression convert(Expression expression, AST ast) {
+		return expression;
+	}
+
+	public Expression convert(Expression expression) {
+		return expression;
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NumberIntegerExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NumberIntegerExpressionConverter.java
new file mode 100644
index 0000000..526e1fe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/NumberIntegerExpressionConverter.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.NumberLiteral;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a number literal to/from an Integer
+ * (e.g. 5).
+ */
+public final class NumberIntegerExpressionConverter
+	extends AbstractExpressionConverter<Integer>
+{
+	private static final ExpressionConverter<Integer> INSTANCE = new NumberIntegerExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<Integer> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private NumberIntegerExpressionConverter() {
+		super();
+	}
+	
+	@Override
+	protected NumberLiteral convertObject(Integer integer, AST ast) {
+		return ast.newNumberLiteral(integer.toString());
+	}
+
+	@Override
+	protected Integer convertExpression(Expression expression) {
+		Object value = expression.resolveConstantExpressionValue();
+		return (value instanceof Integer) ? ((Integer) value) : null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/PrimitiveTypeStringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/PrimitiveTypeStringExpressionConverter.java
new file mode 100644
index 0000000..3f99906
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/PrimitiveTypeStringExpressionConverter.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.PrimitiveType;
+import org.eclipse.jdt.core.dom.TypeLiteral;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a type literal to/from a string representation of a primitive type
+ * (e.g. "int").
+ */
+public final class PrimitiveTypeStringExpressionConverter
+	extends AbstractExpressionConverter<String>
+{
+	private static final ExpressionConverter<String> INSTANCE = new PrimitiveTypeStringExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<String> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private PrimitiveTypeStringExpressionConverter() {
+		super();
+	}
+
+	@Override
+	protected TypeLiteral convertObject(String string, AST ast) {
+		org.eclipse.jdt.core.dom.Type type = ast.newPrimitiveType(PrimitiveType.toCode(string));
+		TypeLiteral typeLiteral = ast.newTypeLiteral();
+		typeLiteral.setType(type);
+		return typeLiteral;
+	}
+
+	@Override
+	protected String convertExpression(Expression expression) {
+		if (expression.getNodeType() == ASTNode.TYPE_LITERAL) {
+			org.eclipse.jdt.core.dom.Type type = ((TypeLiteral) expression).getType();
+			if (type.getNodeType() == ASTNode.PRIMITIVE_TYPE) {
+				return ((PrimitiveType) type).getPrimitiveTypeCode().toString();
+			}
+		}
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java
new file mode 100644
index 0000000..44c2753
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Wrap another annotation element adapter and short-circuit the
+ * #setValue method if the value has not changed.
+ */
+public class ShortCircuitAnnotationElementAdapter<T>
+	implements AnnotationElementAdapter<T>
+{
+	/** the wrapped adapter */
+	private final AnnotationElementAdapter<T> adapter;
+
+
+	// ********** constructor **********
+
+	public ShortCircuitAnnotationElementAdapter(Member member, DeclarationAnnotationElementAdapter<T> daea) {
+		this(new MemberAnnotationElementAdapter<T>(member, daea));
+	}
+
+	public ShortCircuitAnnotationElementAdapter(AnnotationElementAdapter<T> adapter) {
+		super();
+		this.adapter = adapter;
+	}
+
+
+	// ********** AnnotationElementAdapter implementation **********
+
+	public T getValue() {
+		return this.adapter.getValue();
+	}
+
+	public T getValue(CompilationUnit astRoot) {
+		return this.adapter.getValue(astRoot);
+	}
+
+	public void setValue(T value) {
+		this.setValue(this.adapter.getValue(), value);
+	}
+
+	public Expression getExpression(CompilationUnit astRoot) {
+		return this.adapter.getExpression(astRoot);
+	}
+
+	public ASTNode getAstNode(CompilationUnit astRoot) {
+		return this.adapter.getAstNode(astRoot);
+	}
+
+	@Override
+	public String toString() {
+		return StringTools.buildToStringFor(this, this.adapter);
+	}
+
+
+	// ********** internal methods **********
+
+	/**
+	 * set the adapter's value to the specified new value if it
+	 * is different from the specified old value
+	 */
+	protected void setValue(T oldValue, T newValue) {
+		if (oldValue == null) {
+			if (newValue == null) {  // null => null
+				// do nothing
+			} else {  // null => object
+				this.adapter.setValue(newValue);
+			}
+		} else {
+			if (newValue == null) {  // object => null
+				this.adapter.setValue(null);
+			} else {  // object => object
+				if (this.valuesAreEqual(oldValue, newValue)) {
+					// do nothing
+				} else {
+					this.adapter.setValue(newValue);
+				}
+			}
+		}
+	}
+
+	/**
+	 * both values are non-null when this method is called
+	 */
+	protected boolean valuesAreEqual(T oldValue, T newValue) {
+		return newValue.equals(oldValue);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java
new file mode 100644
index 0000000..01952fe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.Arrays;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * Wrap another annotation element adapter and short-circuit the
+ * #setValue method if the value has not changed. Overrides #valuesAreEqual()
+ * to check equality on arrays
+ */
+public class ShortCircuitArrayAnnotationElementAdapter<T>
+	extends ShortCircuitAnnotationElementAdapter<T[]>
+{
+	// ********** constructor **********
+
+	public ShortCircuitArrayAnnotationElementAdapter(Member member, DeclarationAnnotationElementAdapter<T[]> daea) {
+		super(member, daea);
+	}
+
+	public ShortCircuitArrayAnnotationElementAdapter(AnnotationElementAdapter<T[]> adapter) {
+		super(adapter);
+	}
+
+
+	// ********** AnnotationElementAdapter implementation **********
+
+	@Override
+	protected boolean valuesAreEqual(T[] oldValue, T[] newValue) {
+		return Arrays.equals(newValue, oldValue);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/SimpleDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/SimpleDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..16a6574
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/SimpleDeclarationAnnotationAdapter.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+
+/**
+ * Manipulate an annotation with a specific name, e.g.
+ * <pre>
+ *     &#64;Foo
+ *     private int id;
+ * </pre>
+ * 
+ * NB:
+ * If the declaration contains more than one annotation with the same
+ * name, the adapter will correspond to the first annotation with the specified
+ * name. (Also note that the compiler will not allow a declaration to be
+ * modified by multiple annotations with the same name, i.e. of the same type;
+ * so if there *are* multiple annotations of the same type, there are bigger
+ * problems to worry about than which annotation the adapter manipulates.)
+ */
+public class SimpleDeclarationAnnotationAdapter extends AbstractDeclarationAnnotationAdapter {
+
+
+	// ********** constructors **********
+
+	public SimpleDeclarationAnnotationAdapter(String annotationName) {
+		super(annotationName);
+	}
+
+
+	// ********** DeclarationAnnotationAdapter implementation **********
+
+	public Annotation getAnnotation(ModifiedDeclaration declaration) {
+		return declaration.getAnnotationNamed(this.getAnnotationName());
+	}
+
+	public void removeAnnotation(ModifiedDeclaration declaration) {
+		declaration.removeAnnotationNamed(this.getAnnotationName());
+	}
+
+	@Override
+	protected void addAnnotation(ModifiedDeclaration declaration, Annotation annotation) {
+		declaration.replaceAnnotationNamed(this.getAnnotationName(), annotation);
+	}
+
+	public ASTNode getAstNode(ModifiedDeclaration declaration) {
+		// if the annotation is missing, return the declaration
+		Annotation annotation = this.getAnnotation(declaration);
+		return (annotation != null) ? annotation : declaration.getDeclaration();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/SimpleTypeStringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/SimpleTypeStringExpressionConverter.java
new file mode 100644
index 0000000..f622562
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/SimpleTypeStringExpressionConverter.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.TypeLiteral;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a type literal to/from a string representation of a simple type
+ * (e.g. "java.lang.Object").
+ */
+public final class SimpleTypeStringExpressionConverter
+	extends AbstractExpressionConverter<String>
+{
+	private static final ExpressionConverter<String> INSTANCE = new SimpleTypeStringExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<String> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private SimpleTypeStringExpressionConverter() {
+		super();
+	}
+
+	@Override
+	protected TypeLiteral convertObject(String string, AST ast) {
+		Name name = ast.newName(string);
+		org.eclipse.jdt.core.dom.Type type = ast.newSimpleType(name);
+		TypeLiteral typeLiteral = ast.newTypeLiteral();
+		typeLiteral.setType(type);
+		return typeLiteral;
+	}
+
+	@Override
+	protected String convertExpression(Expression expression) {
+		if (expression.getNodeType() == ASTNode.TYPE_LITERAL) {
+			org.eclipse.jdt.core.dom.Type type = ((TypeLiteral) expression).getType();
+			if (type.getNodeType() == ASTNode.SIMPLE_TYPE) {
+				return ((SimpleType) type).getName().getFullyQualifiedName();
+			}
+		}
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/StringArrayExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/StringArrayExpressionConverter.java
new file mode 100644
index 0000000..35751f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/StringArrayExpressionConverter.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert an array initializer to/from an array of strings (e.g. {"text0", "text1"}).
+ * 
+ * Do NOT use this class for converting array initializers in annotation elements.
+ * Java5 has a bit of syntactic sugar that allows a single-element array
+ * initializer to not have curly braces. This converter will return null if it encounters
+ * anything other than an array initializer.
+ * 
+ * Invalid entries in the array initializer will result in null elements in the
+ * resulting string array. This allows clients to manipulate elements at
+ * the appropriate index.
+ */
+public class StringArrayExpressionConverter
+	extends AbstractExpressionConverter<String[]>
+{
+	private final ExpressionConverter<String> elementConverter;
+	private final boolean removeArrayInitializerWhenEmpty;
+
+	private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+
+	/**
+	 * The default behavior is to remove the array initializer if it is empty.
+	 */
+	public StringArrayExpressionConverter(ExpressionConverter<String> elementConverter) {
+		this(elementConverter, true);
+	}
+
+	public StringArrayExpressionConverter(ExpressionConverter<String> elementConverter, boolean removeArrayInitializerWhenEmpty) {
+		super();
+		this.elementConverter = elementConverter;
+		this.removeArrayInitializerWhenEmpty = removeArrayInitializerWhenEmpty;
+	}
+
+	@Override
+	/*
+	 * this method is 'public' so it can be called by
+	 * AnnotationStringArrayExpressionConverter
+	 */
+	public ArrayInitializer convertObject(String[] strings, AST ast) {
+		if ((strings.length == 0) && this.removeArrayInitializerWhenEmpty) {
+			return null;
+		}
+		ArrayInitializer arrayInitializer = ast.newArrayInitializer();
+		List<Expression> expressions = this.expressions(arrayInitializer);
+		for (String string : strings) {
+			expressions.add(this.elementConverter.convert(string, ast));
+		}
+		return arrayInitializer;
+	}
+
+	@SuppressWarnings("unchecked")
+	private List<Expression> expressions(ArrayInitializer arrayInitializer) {
+		return arrayInitializer.expressions();
+	}
+
+	/*
+	 * this method is 'public' so it can be called by
+	 * AnnotationStringArrayExpressionConverter
+	 */
+	@Override
+	public String[] convertNull() {
+		return EMPTY_STRING_ARRAY;
+	}
+
+	@Override
+	protected String[] convertExpression(Expression expression) {
+		return (expression.getNodeType() == ASTNode.ARRAY_INITIALIZER) ?
+				this.convertArrayInitializer((ArrayInitializer) expression)
+			:
+				EMPTY_STRING_ARRAY;
+	}
+
+	/*
+	 * this method is 'public' so it can be called by
+	 * AnnotationStringArrayExpressionConverter
+	 */
+	public String[] convertArrayInitializer(ArrayInitializer arrayInitializer) {
+		List<Expression> expressions = this.downcastExpressions(arrayInitializer);
+		int len = expressions.size();
+		String[] strings = new String[len];
+		for (int i = len; i-- > 0; ) {
+			strings[i] = this.elementConverter.convert(expressions.get(i));
+		}
+		return strings;
+	}
+
+	@SuppressWarnings("unchecked")
+	private List<Expression> downcastExpressions(ArrayInitializer arrayInitializer) {
+		return arrayInitializer.expressions();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/StringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/StringExpressionConverter.java
new file mode 100644
index 0000000..b5fee1e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/StringExpressionConverter.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a string literal to/from a string (e.g. "text").
+ */
+public final class StringExpressionConverter
+	extends AbstractExpressionConverter<String>
+{
+	private static final ExpressionConverter<String> INSTANCE = new StringExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<String> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private StringExpressionConverter() {
+		super();
+	}
+
+	@Override
+	protected StringLiteral convertObject(String string, AST ast) {
+		StringLiteral stringLiteral = ast.newStringLiteral();
+		stringLiteral.setLiteralValue(string);
+		return stringLiteral;
+	}
+
+	@Override
+	protected String convertExpression(Expression expression) {
+		Object value = expression.resolveConstantExpressionValue();
+		return (value instanceof String) ? (String) value : null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/TypeStringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/TypeStringExpressionConverter.java
new file mode 100644
index 0000000..4ca6248
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/TypeStringExpressionConverter.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.PrimitiveType;
+import org.eclipse.jdt.core.dom.TypeLiteral;
+import org.eclipse.jpt.core.utility.jdt.ExpressionConverter;
+
+/**
+ * Convert a type literal to/from a string representation of a 
+ * simple type (e.g. "java.lang.Object") or primitive type (e.g. "int").
+ */
+public final class TypeStringExpressionConverter
+	extends AbstractExpressionConverter<String>
+{
+	private static final ExpressionConverter<String> INSTANCE = new TypeStringExpressionConverter();
+
+	/**
+	 * Return the singleton.
+	 */
+	public static ExpressionConverter<String> instance() {
+		return INSTANCE;
+	}
+
+	/**
+	 * Ensure single instance.
+	 */
+	private TypeStringExpressionConverter() {
+		super();
+	}
+
+	@Override
+	protected TypeLiteral convertObject(String string, AST ast) {
+		if (PrimitiveType.toCode(string) != null) {
+			return (TypeLiteral) PrimitiveTypeStringExpressionConverter.instance().convert(string, ast);
+		}
+		return (TypeLiteral) SimpleTypeStringExpressionConverter.instance().convert(string, ast);
+	}
+
+	@Override
+	protected String convertExpression(Expression expression) {
+		String name = SimpleTypeStringExpressionConverter.instance().convert(expression);
+		return name != null ? name : PrimitiveTypeStringExpressionConverter.instance().convert(expression);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/BooleanTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/BooleanTranslator.java
new file mode 100644
index 0000000..46ebb2e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/BooleanTranslator.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.translators;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+public class BooleanTranslator
+	extends Translator
+{
+	public BooleanTranslator(String domPathAndNames, EStructuralFeature structuralFeature) {
+		super(domPathAndNames, structuralFeature, BOOLEAN_FEATURE | BOOLEAN_LOWERCASE);
+	}
+	
+	public BooleanTranslator(String domPathAndNames, EStructuralFeature structuralFeature, int style) {
+		super(domPathAndNames, structuralFeature, BOOLEAN_FEATURE | BOOLEAN_LOWERCASE | style);
+	}
+	
+	@Override
+	public Object convertStringToValue(String string, EObject owner) {
+		return Boolean.valueOf(string);
+	}
+	
+	@Override
+	public String convertValueToString(Object value, EObject owner) {
+		return ((Boolean) value).toString();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/EmptyTagBooleanTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/EmptyTagBooleanTranslator.java
new file mode 100644
index 0000000..8ee27fe
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/EmptyTagBooleanTranslator.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.translators;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * This translator is to be used for empty xml tags that correspond
+ * to a boolean attribute in the emf model.  
+ * cascade-persist is an example from the orm.xsd:
+ * 
+ * 	<persistence-unit-defaults>
+ * 		<cascade-persist/>        
+ * 	</persistence-unit-defaults>  ==>  cascadePersist == true
+ * 
+ * vs.
+ * 
+ * 	<persistence-unit-defaults>  
+ * 	</persistence-unit-defaults>  ==>  cascadePersist == false
+ * 
+ */
+public class EmptyTagBooleanTranslator
+	extends Translator
+{
+	public EmptyTagBooleanTranslator(String domPathAndNames, EStructuralFeature structuralFeature) {
+		super(domPathAndNames, structuralFeature, EMPTY_TAG | BOOLEAN_FEATURE);
+	}
+
+	public EmptyTagBooleanTranslator(String domPathAndNames, EStructuralFeature structuralFeature, int style) {
+		super(domPathAndNames, structuralFeature, style | EMPTY_TAG | BOOLEAN_FEATURE);
+	}
+	
+	@Override
+	public Object getMOFValue(EObject mofObject) {
+		// I am overriding this method.  This is so the tag will be removed when 
+		// the value is false.
+		// I'm not sure if this is a bug in the ecore or maybe in the translators, 
+		// but I really don't think that we should have to depend on the boolean
+		// being "unset" to remove the tag.
+		Boolean value = (Boolean) super.getMOFValue(mofObject);
+		return (value == null) ? null : value.booleanValue() ? value : null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/EnumeratedValueTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/EnumeratedValueTranslator.java
new file mode 100644
index 0000000..e0f3551
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/EnumeratedValueTranslator.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.translators;
+
+import java.util.Iterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+public abstract class EnumeratedValueTranslator
+	extends Translator
+{
+	public EnumeratedValueTranslator(String domPathAndNames, EStructuralFeature structuralFeature) {
+		super(domPathAndNames, structuralFeature);
+	}
+	
+	public EnumeratedValueTranslator(String domPathAndNames, EStructuralFeature structuralFeature, int style) {
+		super(domPathAndNames, structuralFeature, style);
+	}
+	
+	
+	protected abstract Iterator enumeratedObjectValues();
+	
+	@Override
+	public Object convertStringToValue(String string, EObject owner) {
+		for (Object each : CollectionTools.iterable(enumeratedObjectValues())) {
+			if (each.toString().equals(string)) {
+				return each;
+			}
+		}
+		return null;
+	}
+	
+	@Override
+	public String convertValueToString(Object value, EObject owner) {
+		return value.toString();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/SimpleRootTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/SimpleRootTranslator.java
new file mode 100644
index 0000000..6f01afb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/SimpleRootTranslator.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.translators;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.wst.common.internal.emf.resource.RootTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * Root translator that contains a list of child translators and no special
+ * behavior.
+ */
+public class SimpleRootTranslator
+	extends RootTranslator
+{
+	protected Translator[] children;
+
+	public SimpleRootTranslator(String domPathAndNames, EClass eClass) {
+		super(domPathAndNames, eClass);
+	}
+
+	public SimpleRootTranslator(String domPathAndNames, EClass eClass, Translator[] children) {
+		super(domPathAndNames, eClass);
+		this.children = children;
+	}
+
+	/**
+	 * Widen method access to 'public'.
+	 */
+	@Override
+	public Translator[] getChildren() {
+		return this.children;
+	}
+
+	protected Translator[] getChildren_() {
+		return (this.children == null) ? EMPTY_TRANSLATOR_ARRAY : this.children;
+	}
+	protected static final Translator[] EMPTY_TRANSLATOR_ARRAY = new Translator[0];
+
+	/**
+	 * Set the translator's children.
+	 * Return the translator.
+	 */
+	public void setChildren(Translator[] children) {
+		this.children = children;
+	}
+
+	/**
+	 * Add the specified translator to the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleRootTranslator addChild(Translator translator) {
+		this.children = ArrayTools.add(this.getChildren_(), translator);
+		return this;
+	}
+
+	/**
+	 * Add the specified translators to the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleRootTranslator addChildren(Translator[] translators) {
+		this.children = ArrayTools.addAll(this.getChildren_(), translators);
+		return this;
+	}
+
+	/**
+	 * Remove the specified translator from the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleRootTranslator removeChild(Translator translator) {
+		this.children = ArrayTools.remove(this.children, translator);
+		return this;
+	}
+
+	/**
+	 * Remove the specified translators from the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleRootTranslator removeChildren(Translator[] translators) {
+		this.children = ArrayTools.removeAll(this.children, (Object[]) translators);
+		return this;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/SimpleTranslator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/SimpleTranslator.java
new file mode 100644
index 0000000..9b465cf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/translators/SimpleTranslator.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.translators;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorPath;
+
+/**
+ * Translator that contains a list of child translators and no special
+ * behavior.
+ */
+public class SimpleTranslator
+	extends Translator
+{
+	protected Translator[] children;
+
+
+	// ********** constructors **********
+
+	public SimpleTranslator(String domPathAndNames, EClass eClass) {
+		super(domPathAndNames, eClass);
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature) {
+		super(domPathAndNames, eStructuralFeature);
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, Translator[] children) {
+		super(domPathAndNames, eStructuralFeature);
+		this.children = children;
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, EClass eClass) {
+		super(domPathAndNames, eStructuralFeature, eClass);
+	}
+	
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, EClass eClass, Translator[] children) {
+		super(domPathAndNames, eStructuralFeature, eClass);
+		this.children = children;
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, TranslatorPath translatorPath) {
+		super(domPathAndNames, eStructuralFeature, translatorPath);
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, TranslatorPath[] translatorPaths) {
+		super(domPathAndNames, eStructuralFeature, translatorPaths);
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, int style) {
+		super(domPathAndNames, eStructuralFeature, style);
+	}
+	
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature aFeature, int style, EClass eClass, Translator[] children) {
+		this(domPathAndNames, aFeature, style);
+		setEMFClass(eClass);
+		this.children = children;
+	}
+
+	public SimpleTranslator(String domPathAndNames, EStructuralFeature eStructuralFeature, int style, Translator[] children) {
+		super(domPathAndNames, eStructuralFeature, style);
+		this.children = children;
+	}
+
+
+	// ********** children **********
+
+	/**
+	 * Widen method access to 'public'.
+	 */
+	@Override
+	public Translator[] getChildren() {
+		return this.children;
+	}
+
+	protected Translator[] getChildren_() {
+		return (this.children == null) ? EMPTY_TRANSLATOR_ARRAY : this.children;
+	}
+	protected static final Translator[] EMPTY_TRANSLATOR_ARRAY = new Translator[0];
+
+	/**
+	 * Set the translator's children.
+	 * Return the translator.
+	 */
+	public void setChildren(Translator[] children) {
+		this.children = children;
+	}
+
+	/**
+	 * Add the specified translator to the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleTranslator addChild(Translator translator) {
+		this.children = ArrayTools.add(this.getChildren_(), translator);
+		return this;
+	}
+
+	/**
+	 * Add the specified translators to the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleTranslator addChildren(Translator[] translators) {
+		this.children = ArrayTools.addAll(this.getChildren_(), translators);
+		return this;
+	}
+
+	/**
+	 * Remove the specified translator from the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleTranslator removeChild(Translator translator) {
+		this.children = ArrayTools.remove(this.children, translator);
+		return this;
+	}
+
+	/**
+	 * Remove the specified translators from the translator's list of children.
+	 * Return the translator for method chaining.
+	 */
+	public SimpleTranslator removeChildren(Translator[] translators) {
+		this.children = ArrayTools.removeAll(this.children, (Object[]) translators);
+		return this;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/DefaultJpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/DefaultJpaValidationMessages.java
new file mode 100644
index 0000000..2136e52
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/DefaultJpaValidationMessages.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.validation;
+
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.core.Message;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+public class DefaultJpaValidationMessages {
+
+	private static String[] DEFAULT_PARMS = new String[0];
+	private static TextRange DEFAULT_TEXT_RANGE = TextRange.Empty.instance();
+	
+	public static IMessage buildMessage(
+			int defaultSeverity, String messageId, Object targetObject) {
+		return buildMessage(defaultSeverity, messageId, DEFAULT_PARMS, targetObject);
+	}
+	
+	public static IMessage buildMessage(
+			int defaultSeverity, String messageId, String[] parms, Object targetObject) {
+		return buildMessage(defaultSeverity, messageId, parms, targetObject, DEFAULT_TEXT_RANGE);
+	}
+	
+	public static IMessage buildMessage(
+			int defaultSeverity, String messageId, Object targetObject, TextRange textRange) {
+		return buildMessage(defaultSeverity, messageId, DEFAULT_PARMS, targetObject, textRange);
+	}
+	
+	public static IMessage buildMessage(
+			int defaultSeverity, String messageId, String[] parms, Object targetObject, TextRange textRange) {
+		
+		//determine whether default severity should be overridden
+		int severity = defaultSeverity;
+		int severityPreference = JpaValidationPreferences.getProblemSeverityPreference(targetObject, messageId);
+		if (severityPreference!=JpaValidationPreferences.NO_SEVERITY_PREFERENCE){
+			severity = severityPreference;
+		}
+		IMessage message = new Message(JpaValidationMessages.BUNDLE_NAME, severity, messageId, parms, targetObject);
+		if (textRange == null) {
+			//log an exception and then continue without setting location information
+			//At least the user will still get the validation message and will
+			//be able to see other validation messages with valid textRanges
+			JptCorePlugin.log(new IllegalArgumentException("Null text range for message ID: " + messageId)); //$NON-NLS-1$
+		}
+		else {
+			message.setLineNo(textRange.getLineNumber());
+			message.setOffset(textRange.getOffset());
+			message.setLength(textRange.getLength());
+		}
+		return message;
+	}
+	
+	
+	private DefaultJpaValidationMessages() {
+		super();
+		throw new UnsupportedOperationException();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaHelper.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaHelper.java
new file mode 100644
index 0000000..7789238
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaHelper.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.validation;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jpt.core.JpaNode;
+
+public class JpaHelper extends org.eclipse.wst.validation.internal.operations.WorkbenchContext {
+
+	@Override
+	public IResource getResource(Object obj) {
+		return ((JpaNode) obj).getResource();
+	}
+
+	/*
+	 * This is used when no line number is set.  We generally use line numbers.
+	 * Therefore, when this is called, we will use the default location, i.e.
+	 * null.
+	 */
+	@Override
+	public String getLocation(Object object) {
+		return null;
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationDescriptionMessages.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationDescriptionMessages.java
new file mode 100644
index 0000000..b93e76f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationDescriptionMessages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.validation;
+
+import org.eclipse.osgi.util.NLS;
+
+public class JpaValidationDescriptionMessages {
+	
+	public static String DOES_NOT_MATCH_JOIN_TABLE;
+	public static String DOES_NOT_MATCH_COLLECTION_TABLE;
+	public static String NOT_VALID_FOR_THIS_ENTITY;
+	
+	public static String ATTRIBUTE_DESC;
+	public static String VIRTUAL_ATTRIBUTE_DESC;
+
+	
+	private static final String BUNDLE_NAME = "jpa_validation_description"; //$NON-NLS-1$
+	private static final Class<?> BUNDLE_CLASS = JpaValidationDescriptionMessages.class;
+	static {
+		NLS.initializeMessages(BUNDLE_NAME, BUNDLE_CLASS);
+	}
+
+	private JpaValidationDescriptionMessages() {
+		throw new UnsupportedOperationException();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
new file mode 100644
index 0000000..d559a91
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationMessages.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.validation;
+
+@SuppressWarnings("nls")
+public interface JpaValidationMessages {
+
+	public static final String BUNDLE_NAME = "jpa_validation";
+	
+	public static final String PROJECT_NO_CONNECTION = "PROJECT_NO_CONNECTION";
+	public static final String PROJECT_INVALID_CONNECTION = "PROJECT_INVALID_CONNECTION";
+	public static final String PROJECT_INACTIVE_CONNECTION = "PROJECT_INACTIVE_CONNECTION";
+	public static final String PROJECT_NO_PERSISTENCE_XML = "PROJECT_NO_PERSISTENCE_XML";
+	public static final String PROJECT_MULTIPLE_PERSISTENCE_XML = "PROJECT_MULTIPLE_PERSISTENCE_XML";
+	public static final String XML_VERSION_NOT_LATEST = "XML_VERSION_NOT_LATEST";
+	public static final String PERSISTENCE_XML_INVALID_CONTENT = "PERSISTENCE_XML_INVALID_CONTENT";
+	public static final String PERSISTENCE_XML_UNSUPPORTED_CONTENT = "PERSISTENCE_XML_UNSUPPORTED_CONTENT";
+	public static final String PERSISTENCE_NO_PERSISTENCE_UNIT = "PERSISTENCE_NO_PERSISTENCE_UNIT";
+	public static final String PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS = "PERSISTENCE_MULTIPLE_PERSISTENCE_UNITS";
+	public static final String PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE = "PERSISTENCE_UNIT_UNSPECIFIED_MAPPING_FILE";
+	public static final String PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT = "PERSISTENCE_UNIT_UNSUPPORTED_MAPPING_FILE_CONTENT";
+	public static final String PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE = "PERSISTENCE_UNIT_NONEXISTENT_MAPPING_FILE";
+	public static final String PERSISTENCE_UNIT_INVALID_MAPPING_FILE = "PERSISTENCE_UNIT_INVALID_MAPPING_FILE";
+	public static final String PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE = "PERSISTENCE_UNIT_DUPLICATE_MAPPING_FILE";
+	public static final String PERSISTENCE_UNIT_UNSPECIFIED_CLASS = "PERSISTENCE_UNIT_UNSPECIFIED_CLASS";
+	public static final String PERSISTENCE_UNIT_NONEXISTENT_CLASS = "PERSISTENCE_UNIT_NONEXISTENT_CLASS";
+	public static final String PERSISTENCE_UNIT_INVALID_CLASS = "PERSISTENCE_UNIT_INVALID_CLASS";
+	public static final String PERSISTENCE_UNIT_DUPLICATE_CLASS = "PERSISTENCE_UNIT_DUPLICATE_CLASS";
+	public static final String PERSISTENCE_UNIT_REDUNDANT_CLASS = "PERSISTENCE_UNIT_REDUNDANT_CLASS";
+	public static final String PERSISTENCE_UNIT_DUPLICATE_JAR_FILE = "PERSISTENCE_UNIT_DUPLICATE_JAR_FILE";
+	public static final String PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE = "PERSISTENCE_UNIT_UNSPECIFIED_JAR_FILE";
+	public static final String PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING = "PERSISTENCE_UNIT_JAR_FILE_DEPLOYMENT_PATH_WARNING";
+	public static final String PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE = "PERSISTENCE_UNIT_NONEXISTENT_JAR_FILE";
+	public static final String GENERATOR_DUPLICATE_NAME = "GENERATOR_DUPLICATE_NAME";
+	public static final String QUERY_DUPLICATE_NAME = "QUERY_DUPLICATE_NAME";
+	public static final String MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_DEFAULTS = "MAPPING_FILE_EXTRANEOUS_PERSISTENCE_UNIT_DEFAULTS";
+	public static final String PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT = "PERSISTENT_TYPE_MAPPED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT";
+	public static final String PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT = "PERSISTENT_TYPE_ANNOTATED_BUT_NOT_INCLUDED_IN_PERSISTENCE_UNIT";
+	public static final String PERSISTENT_TYPE_UNSPECIFIED_CLASS = "PERSISTENT_TYPE_UNSPECIFIED_CLASS";
+	public static final String PERSISTENT_TYPE_UNRESOLVED_CLASS = "PERSISTENT_TYPE_UNRESOLVED_CLASS";
+	public static final String TYPE_MAPPING_PK_REDEFINED_ID_CLASS = "TYPE_MAPPING_PK_REDEFINED_ID_CLASS";
+	public static final String TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE = "TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE";
+	public static final String TYPE_MAPPING_ID_CLASS_REDEFINED = "TYPE_MAPPING_ID_CLASS_REDEFINED";
+	public static final String TYPE_MAPPING_ID_CLASS_REQUIRED = "TYPE_MAPPING_ID_CLASS_REQUIRED";
+	public static final String TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED = "TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED";
+	public static final String TYPE_MAPPING_MULTIPLE_EMBEDDED_ID = "TYPE_MAPPING_MULTIPLE_EMBEDDED_ID";
+	public static final String TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID = "TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID";
+	public static final String TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE = "TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE";
+	public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH";
+	public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH";
+	public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH";
+	public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY";
+	public static final String TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE = "TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE";
+	public static final String ENTITY_NON_ROOT_ID_CLASS_SPECIFIED = "ENTITY_NON_ROOT_ID_CLASS_SPECIFIED";
+	public static final String ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED = "ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED";
+	public static final String ENTITY_NO_PK = "ENTITY_NO_PK";
+	public static final String ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE = "ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE";
+	public static final String ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE = "ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE";
+	public static final String ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED = "ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED";
+	public static final String ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED = "ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED";
+	public static final String ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED = "ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED";
+	public static final String ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED = "ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED";
+	public static final String PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME = "PERSISTENT_ATTRIBUTE_UNSPECIFIED_NAME";
+	public static final String PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME = "PERSISTENT_ATTRIBUTE_UNRESOLVED_NAME";
+	public static final String PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED = "PERSISTENT_ATTRIBUTE_INHERITED_ATTRIBUTES_NOT_SUPPORTED";
+	public static final String PERSISTENT_ATTRIBUTE_FINAL_FIELD = "PERSISTENT_ATTRIBUTE_FINAL_FIELD";
+	public static final String PERSISTENT_ATTRIBUTE_PUBLIC_FIELD = "PERSISTENT_ATTRIBUTE_PUBLIC_FIELD";
+	public static final String PERSISTENT_ATTRIBUTE_INVALID_MAPPING = "PERSISTENT_ATTRIBUTE_INVALID_MAPPING";
+	public static final String MAPPING_UNRESOLVED_MAPPED_BY = "MAPPING_UNRESOLVED_MAPPED_BY";
+	public static final String MAPPING_INVALID_MAPPED_BY = "MAPPING_INVALID_MAPPED_BY";
+	public static final String MAPPING_MAPPED_BY_ON_BOTH_SIDES = "MAPPING_MAPPED_BY_ON_BOTH_SIDES";
+	public static final String ID_MAPPING_UNRESOLVED_GENERATOR_NAME = "ID_MAPPING_UNRESOLVED_GENERATOR_NAME";
+	public static final String ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED = "ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED";
+	public static final String EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED = "EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED";
+	public static final String ATTRIBUTE_OVERRIDE_MAPPED_BY_RELATIONSHIP_AND_SPECIFIED = "ATTRIBUTE_OVERRIDE_MAPPED_BY_RELATIONSHIP_AND_SPECIFIED";
+	public static final String TABLE_UNRESOLVED_CATALOG = "TABLE_UNRESOLVED_CATALOG";
+	public static final String TABLE_UNRESOLVED_SCHEMA = "TABLE_UNRESOLVED_SCHEMA";
+	public static final String TABLE_UNRESOLVED_NAME = "TABLE_UNRESOLVED_NAME";
+	public static final String SECONDARY_TABLE_UNRESOLVED_CATALOG = "SECONDARY_TABLE_UNRESOLVED_CATALOG";
+	public static final String SECONDARY_TABLE_UNRESOLVED_SCHEMA = "SECONDARY_TABLE_UNRESOLVED_SCHEMA";
+	public static final String SECONDARY_TABLE_UNRESOLVED_NAME = "SECONDARY_TABLE_UNRESOLVED_NAME";
+	public static final String JOIN_TABLE_UNRESOLVED_CATALOG = "JOIN_TABLE_UNRESOLVED_CATALOG";
+	public static final String JOIN_TABLE_UNRESOLVED_SCHEMA = "JOIN_TABLE_UNRESOLVED_SCHEMA";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_CATALOG";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_SCHEMA";
+	public static final String JOIN_TABLE_UNRESOLVED_NAME = "JOIN_TABLE_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_JOIN_TABLE_UNRESOLVED_NAME";
+	public static final String COLUMN_UNRESOLVED_TABLE = "COLUMN_UNRESOLVED_TABLE";
+	public static final String COLUMN_UNRESOLVED_NAME = "COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_TABLE = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_TABLE";
+	public static final String JOIN_COLUMN_UNRESOLVED_NAME = "JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String INVERSE_JOIN_COLUMN_UNRESOLVED_NAME = "INVERSE_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	
+	public static final String GENERATED_VALUE_UNRESOLVED_GENERATOR = "GENERATED_VALUE_UNRESOLVED_GENERATOR";
+	public static final String PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_UNRESOLVED_REFERENCED_COLUMN_NAME";
+	public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	public static final String VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS = "VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS";
+	
+	public static final String NO_JPA_PROJECT = "NO_JPA_PROJECT";
+	public static final String TARGET_ENTITY_NOT_DEFINED = "TARGET_ENTITY_NOT_DEFINED";
+	public static final String VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED = "VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED";
+	public static final String TARGET_ENTITY_IS_NOT_AN_ENTITY = "TARGET_ENTITY_IS_NOT_AN_ENTITY";
+	public static final String VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY = "VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY";
+	public static final String DISCRIMINATOR_COLUMN_UNRESOLVED_NAME = "DISCRIMINATOR_COLUMN_UNRESOLVED_NAME";
+	public static final String ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM = "ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM";
+	public static final String ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM = "ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM";
+	public static final String TARGET_NOT_AN_EMBEDDABLE = "TARGET_NOT_AN_EMBEDDABLE";
+	
+	public static final String COLUMN_TABLE_NOT_VALID="COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
+	public static final String JOIN_COLUMN_TABLE_NOT_VALID = "JOIN_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_JOIN_COLUMN_TABLE_NOT_VALID";
+	public static final String INVERSE_JOIN_COLUMN_TABLE_NOT_VALID = "INVERSE_JOIN_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_INVERSE_JOIN_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID = "VIRTUAL_ATTRIBUTE_ASSOCIATION_OVERRIDE_JOIN_COLUMN_TABLE_NOT_VALID";
+
+	//JPA 2.0 validation messages
+	public static final String MAPS_ID_VALUE_NOT_SPECIFIED = "MAPS_ID_VALUE_NOT_SPECIFIED";
+	public static final String MAPS_ID_VALUE_NOT_RESOLVED = "MAPS_ID_VALUE_NOT_RESOLVED";
+	public static final String MAPS_ID_VALUE_INVALID = "MAPS_ID_VALUE_INVALID";
+	public static final String ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED = "ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED";
+	public static final String ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED = "ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED";
+	public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED";
+	public static final String ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED = "ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED";
+	public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_MAP_KEY_CLASS_NOT_DEFINED";
+	public static final String ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE = "ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE";
+	public static final String VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE = "VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE";
+	public static final String MAP_KEY_COLUMN_UNRESOLVED_NAME="MAP_KEY_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME="VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_UNRESOLVED_NAME";
+	public static final String COLLECTION_TABLE_UNRESOLVED_CATALOG = "COLLECTION_TABLE_UNRESOLVED_CATALOG";
+	public static final String COLLECTION_TABLE_UNRESOLVED_SCHEMA = "COLLECTION_TABLE_UNRESOLVED_SCHEMA";
+	public static final String VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG = "VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_CATALOG";
+	public static final String VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA = "VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_SCHEMA";
+	public static final String COLLECTION_TABLE_UNRESOLVED_NAME = "COLLECTION_TABLE_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_COLLECTION_TABLE_UNRESOLVED_NAME";
+	public static final String ORDER_COLUMN_UNRESOLVED_NAME = "ORDER_COLUMN_UNRESOLVED_NAME";
+	public static final String VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME = "VIRTUAL_ATTRIBUTE_ORDER_COLUMN_UNRESOLVED_NAME";
+
+	public static final String VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_MAP_KEY_ATTRIBUTE_OVERRIDE_COLUMN_TABLE_NOT_VALID";
+	public static final String MAP_KEY_COLUMN_TABLE_NOT_VALID="MAP_KEY_COLUMN_TABLE_NOT_VALID";
+	public static final String VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID="VIRTUAL_ATTRIBUTE_MAP_KEY_COLUMN_TABLE_NOT_VALID";
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java
new file mode 100644
index 0000000..3057930
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidationPreferences.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.validation;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jpt.core.IResourcePart;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.osgi.service.prefs.BackingStoreException;
+
+//TODO:  Probably want to merge the behavior in this class into JptCorePlugin
+public class JpaValidationPreferences {
+
+	/*
+	 * prefix for all preference strings.  This is only used internally.
+	 * Clients of get*LevelProblemPrefernce() and set*LevelProblemPreference 
+	 * should not include the prefix.
+	 */
+	private static final String PROBLEM_PREFIX = "problem."; //$NON-NLS-1$
+
+	public static final String ERROR = "error"; //$NON-NLS-1$
+	public static final String WARNING = "warning"; //$NON-NLS-1$
+	public static final String INFO = "info"; //$NON-NLS-1$
+	public static final String IGNORE = "ignore"; //$NON-NLS-1$
+
+	static final int NO_SEVERITY_PREFERENCE = -1;
+
+	public static final String WORKSPACE_PREFERENCES_OVERRIDEN = "workspace_preferences_overriden"; //$NON-NLS-1$
+
+	/**
+	 * Returns only the severity level of a given problem preference.  This does not
+	 * include information on whether the problem is ignored.  See isProblemIgnored.
+	 * @return an IMessage severity level
+	 */
+	public static int getProblemSeverityPreference(Object targetObject, String messageId) {
+		IProject project = getProject(targetObject);
+		String problemPreference = getPreference(project, messageId);
+		
+		if (problemPreference == null){
+			return NO_SEVERITY_PREFERENCE;
+		} else if (problemPreference.equals(ERROR)){
+			return IMessage.HIGH_SEVERITY;
+		} else if (problemPreference.equals(WARNING)){
+			return IMessage.NORMAL_SEVERITY;
+		} else if (problemPreference.equals(INFO)){
+			return IMessage.LOW_SEVERITY;
+		}
+		return NO_SEVERITY_PREFERENCE;
+	}
+
+	private static IProject getProject(Object targetObject) {
+		IAdaptable target = (IAdaptable)targetObject;
+		IResource resource = ((IResourcePart) target.getAdapter(IResourcePart.class)).getResource();
+		IProject project = resource.getProject();
+		return project;
+	}
+
+	/**
+	 * Returns whether or not this problem should be ignored based on project or
+	 * workspace preferences
+	 */
+	public static boolean isProblemIgnored(IProject project, String messageId){
+		String problemPreference = getPreference(project, messageId);
+		if (problemPreference != null && problemPreference.equals(IGNORE)){
+			return true;
+		}
+		return false;
+	}
+
+	private static String getPreference(IProject project, String messageId) {
+		String problemPreference = null;
+		problemPreference = getProjectLevelProblemPreference(project, messageId);
+		//if severity is still null, check the workspace preferences
+		if (problemPreference == null) {
+			problemPreference = getWorkspaceLevelProblemPreference(messageId);
+		}
+		return problemPreference;
+	}
+
+	/**
+	 * Returns the String value of the problem preference from the project preferences
+	 */
+	public static String getProjectLevelProblemPreference(IProject project, String messageId){
+		return getPreference(JptCorePlugin.getProjectPreferences(project), messageId);
+	}
+
+	public static void setProjectLevelProblemPreference(IProject project, String messageId, String problemPreference) {
+		IEclipsePreferences projectPreferences = JptCorePlugin.getProjectPreferences(project);
+		setPreference(projectPreferences, messageId, problemPreference);
+		flush(projectPreferences);
+	}
+
+	/**
+	 * Returns the String value of the problem preference from the workspace preferences
+	 */
+	public static String getWorkspaceLevelProblemPreference(String messageId){
+		return getPreference(JptCorePlugin.getWorkspacePreferences(), messageId);
+	}
+
+	public static void setWorkspaceLevelProblemPreference(String messageId, String problemPreference) {
+		IEclipsePreferences workspacePreferences = JptCorePlugin.getWorkspacePreferences();
+		setPreference(workspacePreferences, messageId, problemPreference);
+		flush(workspacePreferences);
+	}
+
+	private static String getPreference(IEclipsePreferences preferences, String messageId) {
+		return preferences.get(appendProblemPrefix(messageId), null);
+	}
+
+	private static void setPreference(IEclipsePreferences preferences, String messageId, String problemPreference) {
+		if (problemPreference == null){
+			preferences.remove(appendProblemPrefix(messageId));
+		}
+		else {
+			preferences.put(appendProblemPrefix(messageId), problemPreference);
+		}
+	}
+
+	private static String appendProblemPrefix(String messageId) {
+		return PROBLEM_PREFIX + messageId;
+	}
+
+	public static void flush(IEclipsePreferences prefs) {
+		try {
+			prefs.flush();
+		} catch(BackingStoreException ex) {
+			JptCorePlugin.log(ex);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java
new file mode 100644
index 0000000..7224849
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/validation/JpaValidator.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.validation;
+
+import java.util.Iterator;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jpt.core.IResourcePart;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+import org.eclipse.wst.validation.AbstractValidator;
+import org.eclipse.wst.validation.ValidationResult;
+import org.eclipse.wst.validation.ValidationState;
+import org.eclipse.wst.validation.ValidatorMessage;
+import org.eclipse.wst.validation.internal.ValConstants;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IProjectValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+
+/**
+ * This class is referenced in the JPA extension for the
+ * WTP validator extension point.
+ */
+public class JpaValidator extends AbstractValidator implements IValidator {
+
+	public JpaValidator() {
+		super();
+	}
+
+	
+	// ********** IValidator implementation **********
+
+	public void validate(IValidationContext context, IReporter reporter) {
+		validate(reporter, project(context));
+	}
+	
+	public void cleanup(IReporter reporter) {
+		// nothing to do
+	}
+	
+	
+	// **************** AbstractValidator impl *********************************
+	
+	@Override
+	public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
+		if (resource.getType() != IResource.FILE)
+			return null;
+		ValidationResult result = new ValidationResult();
+		IReporter reporter = result.getReporter(monitor);
+		IProject project = resource.getProject();
+		try {
+			clearMarkers(project);
+		}
+		catch (CoreException ce) {
+			JptCorePlugin.log(ce);
+		}
+		result.setSuspendValidation(project);
+		validate(reporter, project);
+		return result;
+	}
+	
+	
+	// **************** internal conv. *****************************************
+	
+	private void clearMarkers(IProject project) throws CoreException {
+		IMarker[] markers = project.findMarkers(ValConstants.ProblemMarker, true, IResource.DEPTH_INFINITE);
+		String valId = JptCorePlugin.VALIDATOR_ID;
+		for (IMarker marker : markers) {
+			String id = marker.getAttribute(ValidatorMessage.ValidationId, null);
+			if (valId.equals(id)) marker.delete();
+		}
+	}
+	
+	private void validate(IReporter reporter, IProject project) {
+		reporter.removeAllMessages(this);
+		
+		for (Iterator<IMessage> stream = this.validationMessages(reporter, project); stream.hasNext(); ) {
+			IMessage message = stream.next();
+			// check to see if the message should be ignored based on preferences
+			if (!JpaValidationPreferences.isProblemIgnored(project, message.getId())){
+				reporter.addMessage(this, adjustMessage(message));
+			}
+		}
+	}
+	
+	private IProject project(IValidationContext context) {
+		return ((IProjectValidationContext) context).getProject();
+	}
+	
+	private Iterator<IMessage> validationMessages(IReporter reporter, IProject project) {
+		JpaProject jpaProject = JptCorePlugin.getJpaProject(project);
+		if (jpaProject != null) {
+			return jpaProject.validationMessages(reporter);
+		}
+		return new SingleElementIterator<IMessage>(
+			DefaultJpaValidationMessages.buildMessage(
+			IMessage.HIGH_SEVERITY,
+			JpaValidationMessages.NO_JPA_PROJECT,
+			project
+		));
+	}
+	
+	private IMessage adjustMessage(IMessage message) {
+		IAdaptable targetObject = (IAdaptable) message.getTargetObject();
+		IResource targetResource = ((IResourcePart) targetObject.getAdapter(IResourcePart.class)).getResource();
+		message.setTargetObject(targetResource);
+		if (message.getLineNumber() == IMessage.LINENO_UNSET) {
+			message.setAttribute(IMarker.LOCATION, " ");
+		}
+		return message;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/JpaFactory2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/JpaFactory2_0.java
new file mode 100644
index 0000000..57bdc33
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/JpaFactory2_0.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2;
+
+import org.eclipse.jpt.core.JpaDataSource;
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaBaseColumn;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.MetamodelSourceType;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCacheableHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaCollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaDerivedIdentity2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaEmbeddedMapping2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderColumn2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrderable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovable2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaOrphanRemovalHolder2_0;
+import org.eclipse.jpt.core.jpa2.context.java.JavaSingleRelationshipMapping2_0;
+import org.eclipse.jpt.db.DatabaseIdentifierAdapter;
+
+/**
+ * JPA 2.0 factory
+ *<p> 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * @see org.eclipse.jpt.core.internal.jpa2.GenericJpaFactory2_0
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaFactory2_0
+	extends JpaFactory
+{
+	
+	// ********** Core Model **********
+
+	/**
+	 * Return an identifier adapter that can be used to convert database
+	 * identifiers to names and vice versa, respecting the <code>delimited-identifiers</code>
+	 * in <code>persistence.xml</code>.
+	 */
+	DatabaseIdentifierAdapter buildDatabaseIdentifierAdapter(JpaDataSource dataSource);
+
+	MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType sourceType);
+
+	
+	// ********** Java Context Model **********
+	
+	//overloaded because the 2.0 JPA spec supports association overrides on an embedded mapping while the 1.0 spec did not
+	JavaAssociationOverrideContainer buildJavaAssociationOverrideContainer(JavaEmbeddedMapping2_0 parent, JavaAssociationOverrideContainer.Owner owner);
+	
+	JavaDerivedIdentity2_0 buildJavaDerivedIdentity(JavaSingleRelationshipMapping2_0 parent);
+	
+	JavaElementCollectionMapping2_0 buildJavaElementCollectionMapping2_0(JavaPersistentAttribute parent);
+	
+	JavaCacheable2_0 buildJavaCacheable(JavaCacheableHolder2_0 parent);
+	
+	JavaOrphanRemovable2_0 buildJavaOrphanRemoval(JavaOrphanRemovalHolder2_0 parent);
+	
+	JavaOrderColumn2_0 buildJavaOrderColumn(JavaOrderable2_0 parent, JavaNamedColumn.Owner owner);
+	
+	JavaCollectionTable2_0 buildJavaCollectionTable(JavaElementCollectionMapping2_0 parent);
+
+	JavaColumn buildJavaMapKeyColumn(JavaJpaContextNode parent, JavaBaseColumn.Owner owner);
+	
+	JavaOrderable2_0 buildJavaOrderable(JavaAttributeMapping parent, Orderable.Owner owner);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/JpaProject2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/JpaProject2_0.java
new file mode 100644
index 0000000..8137241
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/JpaProject2_0.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.jpa2.resource.java.JavaResourcePersistentType2_0;
+
+/**
+ * JPA 2.0 project.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaProject2_0
+	extends JpaProject, MetamodelSynchronizer
+{
+
+	// ********** Canonical Metamodel **********
+
+	/**
+	 * ID string used when metamodelSourceFolderName property is changed.
+	 * @see #addPropertyChangeListener(String, org.eclipse.jpt.utility.model.listener.PropertyChangeListener)
+	 */
+	String METAMODEL_SOURCE_FOLDER_NAME_PROPERTY = "metamodelSourceFolderName"; //$NON-NLS-1$
+
+	/**
+	 * Return the name of the folder that holds the generated Canonical
+	 * Metamodel.
+	 */
+	String getMetamodelSourceFolderName();
+
+	/**
+	 * Set the name of the folder that holds the generated Canonical
+	 * Metamodel.
+	 */
+	void setMetamodelSourceFolderName(String metamodelSourceFolderName);
+
+	/**
+	 * Return the package fragment root that holds the generated Canonical
+	 * Metamodel.
+	 */
+	IPackageFragmentRoot getMetamodelPackageFragmentRoot();
+
+	/**
+	 * Return a list of the names of the Java source folders. (These
+	 * can be used to hold the generated Canonical Metamodel.)
+	 */
+	Iterable<String> getJavaSourceFolderNames();
+
+	/**
+	 * Return the JPA project's generated metamodel Java resource persistent
+	 * top-level types.
+	 * @see org.eclipse.jpt.core.internal.resource.java.source.SourcePersistentType#isGeneratedMetamodel(IPackageFragmentRoot)
+	 */
+	Iterable<JavaResourcePersistentType2_0> getGeneratedMetamodelTopLevelTypes();
+
+	/**
+	 * Return the top-level generated metamodel Java resource persistent type
+	 * in the specified file. Return null if any of the following is true:<ul>
+	 * <li>the file is not a Java source file
+	 * <li>the top-level Java class is not annotated with the appropriate
+	 *     <code>javax.annotation.Generated</code> annotation
+	 * <li>neither the top-level Java class nor any of its nested classes
+	 *     is annotated with the appropriate
+	 *     <code>javax.persistence.metamodel.StaticMetamodel</code> annotation
+	 * <ul>
+	 */
+	JavaResourcePersistentType2_0 getGeneratedMetamodelTopLevelType(IFile file);
+
+
+	// ********** construction config **********
+
+	/**
+	 * The settings used to construct a JPA 2.0 project.
+	 */
+	interface Config extends JpaProject.Config {
+
+		/**
+		 * Return the name of the folder that holds the generated Canonical
+		 * Metamodel. Return null if the Canonical Metamodel is not to be
+		 * generated.
+		 */
+		String getMetamodelSourceFolderName();
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/MappingKeys2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/MappingKeys2_0.java
new file mode 100644
index 0000000..2a8a27d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/MappingKeys2_0.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+@SuppressWarnings("nls")
+public interface MappingKeys2_0 {
+
+	String ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY = "elementCollection";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/MetamodelSynchronizer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/MetamodelSynchronizer.java
new file mode 100644
index 0000000..d3a1290
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/MetamodelSynchronizer.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2;
+
+import java.io.Serializable;
+
+/**
+ * JPA 2.0 Canonical Metamodel synchronizer.
+ * <p>
+ * Notes:
+ * <ul><li>
+ * When a JPA project is first created (e.g. when the user adds the JPA
+ * Facet to a Faceted project or when a workspace containing a JPA project is
+ * opened), if it is configured to generate the
+ * Canonical Metamodel (i.e. its metamodel source folder is non-null), it will
+ * first discover what metamodel classes are already present in the metamodel
+ * source folder. Any class appropriately annotated with
+ * <code>javax.persistence.metamodel.StaticMetamodel</code>
+ * and <code>javax.annotation.Generated</code>
+ * will be added to the Canonical Metamodel
+ * (see {@link org.eclipse.jpt.core.internal.resource.java.source.SourcePersistentType#isGeneratedMetamodel()}).
+ * Once the JPA project's context model is constructed, a new Canonical
+ * Metamodel is generated and merged with the classes already present in the
+ * metamodel source folder.
+ * </li><li>
+ * When a JPA project's metamodel source folder setting is cleared, the Canonical
+ * Metamodel is cleared from the context model, but the generated source files are
+ * left in place.
+ * </li><li>
+ * When a JPA project's metamodel source folder is set to a non-null value,
+ * like when a JPA project is first created, the resulting Canonical Metamodel
+ * will be merged with whatever is already present in the folder.
+ * </li></ul>
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MetamodelSynchronizer {
+
+	void initializeMetamodel();
+
+	void synchronizeMetamodel();
+
+	void disposeMetamodel();
+
+
+	/**
+	 * Singleton implemetation of the metamodel synchronizer interface that
+	 * does nothing. (Not sure we need this....)
+	 */
+	final class Null implements MetamodelSynchronizer, Serializable {
+		public static final MetamodelSynchronizer INSTANCE = new Null();
+		public static MetamodelSynchronizer instance() {
+			return INSTANCE;
+		}
+		// ensure single instance
+		private Null() {
+			super();
+		}
+		public void initializeMetamodel() {
+			// do nothing
+		}
+		public void synchronizeMetamodel() {
+			// do nothing
+		}
+		public void disposeMetamodel() {
+			// do nothing
+		}
+		@Override
+		public String toString() {
+			return "MetamodelSynchronizer.Null";  //$NON-NLS-1$
+		}
+		private static final long serialVersionUID = 1L;
+		private Object readResolve() {
+			// replace this object with the singleton
+			return INSTANCE;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AssociationOverrideRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AssociationOverrideRelationshipReference2_0.java
new file mode 100644
index 0000000..46cdce3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AssociationOverrideRelationshipReference2_0.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AssociationOverride;
+import org.eclipse.jpt.core.context.AssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.RelationshipReference;
+
+/**
+ * An <code>AssociationOverrideRelationshipReference2_0</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinColumnJoiningStrategy} or
+ * {@link JoinTableJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see AssociationOverride
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AssociationOverrideRelationshipReference2_0 
+	extends 
+		AssociationOverrideRelationshipReference,
+		JoinTableEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AttributeMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AttributeMapping2_0.java
new file mode 100644
index 0000000..08773fb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AttributeMapping2_0.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AttributeMapping;
+import org.eclipse.jpt.utility.internal.iterables.ArrayIterable;
+
+/**
+ * JPA 2.0 attribute mapping
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AttributeMapping2_0
+	extends AttributeMapping
+{
+	/**
+	 * Return the Canonical Metamodel field corresponding to the mapping.
+	 * Return null if the mapping is not to be part of the Canonical Metamodel.
+	 */
+	MetamodelField getMetamodelField();
+
+	/**
+	 * Return the name of the mapping's type as used in the Canonical Metamodel.
+	 */
+	String getMetamodelTypeName();
+
+	@SuppressWarnings("nls")
+	Iterable<String> STANDARD_METAMODEL_FIELD_MODIFIERS =
+		new ArrayIterable<String>(new String[] { "public", "static", "volatile" });
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AttributeOverride2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AttributeOverride2_0.java
new file mode 100644
index 0000000..036cd3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/AttributeOverride2_0.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AttributeOverride;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AttributeOverride2_0
+	extends AttributeOverride
+{
+	/**
+	 * Property string associated with changes to the mapped by relationship
+	 */
+	final String MAPPED_BY_RELATIONSHIP_PROPERTY = "mappedByRelationship";
+	
+	/**
+	 * Return whether this attribute override is mapped by a relationship 
+	 * (i.e. a relationship maps this attribute override, possibly in an entity overriding
+	 *  an id or an embedded id overriding any attribute)
+	 * N.B. - This might be several relationships (erroneously, of course)
+	 */
+	boolean isMappedByRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Cacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Cacheable2_0.java
new file mode 100644
index 0000000..436c918
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Cacheable2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Cacheable2_0
+	extends JpaContextNode
+{
+	boolean isCacheable();
+	
+	boolean isDefaultCacheable();
+		String DEFAULT_CACHEABLE_PROPERTY = "defaultCacheable"; //$NON-NLS-1$
+	
+	Boolean getSpecifiedCacheable();
+	void setSpecifiedCacheable(Boolean newSpecifiedCacheable);
+		String SPECIFIED_CACHEABLE_PROPERTY = "specifiedCacheable"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CacheableHolder2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CacheableHolder2_0.java
new file mode 100644
index 0000000..2b14b7f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CacheableHolder2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.JpaNode;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface CacheableHolder2_0
+	extends JpaNode
+{
+	Cacheable2_0 getCacheable();
+	
+	boolean calculateDefaultCacheable();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Cascade2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Cascade2_0.java
new file mode 100644
index 0000000..8339d6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Cascade2_0.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.Cascade;
+
+/**
+ * 1:m, m:m, element collection are all collection mappings.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Cascade2_0
+	extends Cascade
+{	
+	boolean isDetach();
+	void setDetach(boolean value);
+		String DETACH_PROPERTY = "detach"; //$NON-NLS-1$	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CollectionMapping2_0.java
new file mode 100644
index 0000000..95f3995
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CollectionMapping2_0.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AttributeOverrideContainer;
+import org.eclipse.jpt.core.context.CollectionMapping;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+
+/**
+ * 1:m, m:m, element collection are all collection mappings.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface CollectionMapping2_0
+	extends CollectionMapping
+{
+
+	// **************** map key class **************************************
+	
+	String getMapKeyClass();
+
+	String getSpecifiedMapKeyClass();
+	void setSpecifiedMapKeyClass(String value);
+		String SPECIFIED_MAP_KEY_CLASS_PROPERTY = "specifiedMapKeyClass"; //$NON-NLS-1$
+
+	String getDefaultMapKeyClass();
+		String DEFAULT_MAP_KEY_CLASS_PROPERTY = "defaultMapKeyClass"; //$NON-NLS-1$
+
+	/**
+	 * Return the char to be used for browsing or creating the map key class IType.
+	 * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
+	 */
+	char getMapKeyClassEnclosingTypeSeparator();
+
+	/**
+	 * If the attribute type is not a map or if the map key class is a basic type this will return null.
+	 */
+	Embeddable getResolvedMapKeyEmbeddable();
+		String RESOLVED_MAP_KEY_EMBEDDABLE_PROPERTY = "resolvedMapKeyEmbeddable"; //$NON-NLS-1$
+
+	/**
+	 * If the attribute type is not a map or if the map key class is a basic type this will return null.
+	 */
+	Entity getResolvedMapKeyEntity();
+		String RESOLVED_MAP_KEY_ENTITY_PROPERTY = "resolvedMapKeyEntity"; //$NON-NLS-1$
+
+
+	// **************** key column **************************************
+
+	/**
+	 * Return the map key column for this collection mapping.
+	 */
+	Column getMapKeyColumn();
+
+	AttributeOverrideContainer getMapKeyAttributeOverrideContainer();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CollectionTable2_0.java
new file mode 100644
index 0000000..5d92938
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/CollectionTable2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.ReferenceTable;
+
+/**
+ * Used by ElementCollection mappings.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface CollectionTable2_0
+	extends ReferenceTable
+{
+	ElementCollectionMapping2_0 getParent();
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/DerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/DerivedIdentity2_0.java
new file mode 100644
index 0000000..4304074
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/DerivedIdentity2_0.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface DerivedIdentity2_0
+	extends JpaContextNode
+{
+	SingleRelationshipMapping2_0 getMapping();
+	
+	/**
+	 * String associated with changes to the predominant strategy property
+	 */
+	final static String PREDOMINANT_DERIVED_IDENTITY_STRATEGY_PROPERTY = 
+		"predominantDerivedIdentityStrategy";  //$NON-NLS-1$
+	
+	/**
+	 * Return the predominant joining strategy, this should not be null
+	 */
+	DerivedIdentityStrategy2_0 getPredominantDerivedIdentityStrategy();
+	
+	/**
+	 * Return whether there is no derived identity strategy
+	 */
+	boolean usesNullDerivedIdentityStrategy();
+	
+	/**
+	 * Sets it so that there is no derived identity strategy.  This will unset all other strategies.
+	 */
+	void setNullDerivedIdentityStrategy();
+	
+	/**
+	 * Return the aggregate (never null) id strategy
+	 */
+	IdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy();
+	
+	/**
+	 * Return whether id is the strategy currently used by this object
+	 */
+	boolean usesIdDerivedIdentityStrategy();
+	
+	/**
+	 * Sets the id derived identity strategy.  This will unset all other strategies.
+	 */
+	void setIdDerivedIdentityStrategy();
+	
+	/**
+	 * Unsets the id derived identity strategy.
+	 * This will not set any other strategy, so whichever other strategy is present (or the null strategy) 
+	 * will apply at that point.
+	 */
+	void unsetIdDerivedIdentityStrategy();
+	
+	/**
+	 * Return the aggregate (never null) maps id derived identity strategy
+	 */
+	MapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy();
+	
+	/**
+	 * Return whether maps id is the strategy currently used by this object
+	 */
+	boolean usesMapsIdDerivedIdentityStrategy();
+	
+	/**
+	 * Sets the maps id derived identity strategy.  This will unset all other strategies.
+	 */
+	void setMapsIdDerivedIdentityStrategy();
+	
+	/**
+	 * Unsets the maps id derived identity strategy.
+	 * This will not set any other strategy, so whichever other strategy is present (or the null strategy) 
+	 * will apply at that point.
+	 */
+	void unsetMapsIdDerivedIdentityStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/DerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/DerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..3253754
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/DerivedIdentityStrategy2_0.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface DerivedIdentityStrategy2_0
+	extends JpaContextNode
+{
+	/**
+	 * Return the mapping that employs this strategy
+	 */
+	SingleRelationshipMapping2_0 getMapping();
+	
+	/**
+	 * Return the derived identity container
+	 */
+	DerivedIdentity2_0 getDerivedIdentity();
+	
+	/**
+	 * Return whether the strategy is specified on the resource model
+	 */
+	boolean isSpecified();
+	
+	/**
+	 * Add this strategy to the relationship reference
+	 */
+	void addStrategy();
+	
+	/**
+	 * Remove this strategy from the relationship reference
+	 */
+	void removeStrategy();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ElementCollectionMapping2_0.java
new file mode 100644
index 0000000..65da465
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ElementCollectionMapping2_0.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AssociationOverrideContainer;
+import org.eclipse.jpt.core.context.AttributeOverrideContainer;
+import org.eclipse.jpt.core.context.Column;
+import org.eclipse.jpt.core.context.ConvertibleMapping;
+import org.eclipse.jpt.core.context.Embeddable;
+import org.eclipse.jpt.core.context.Entity;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ElementCollectionMapping2_0
+	extends AttributeMapping2_0, CollectionMapping2_0, ConvertibleMapping
+{
+	/**
+	 * Return the entity that owns the mapping. This is
+	 * just a convenience method that calls getTypeMapping() and returns
+	 * null if it is not an Entity
+	 */
+	Entity getEntity();
+	
+	// **************** target class **************************************
+	
+	String getTargetClass();
+
+	String getSpecifiedTargetClass();
+	void setSpecifiedTargetClass(String value);
+		String SPECIFIED_TARGET_CLASS_PROPERTY = "specifiedTargetClass"; //$NON-NLS-1$
+
+	String getDefaultTargetClass();
+		String DEFAULT_TARGET_CLASS_PROPERTY = "defaultTargetClass"; //$NON-NLS-1$
+
+	/**
+	 * If the target class is a basic type this will return null.
+	 */
+	Embeddable getResolvedTargetEmbeddable();
+		String RESOLVED_TARGET_EMBEDDABLE_PROPERTY = "resolvedTargetEmbeddable"; //$NON-NLS-1$
+
+	/**
+	 * Return the char to be used for browsing or creating the target class IType.
+	 * @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
+	 */
+	char getTargetClassEnclosingTypeSeparator();
+
+
+	// **************** collection table **************************************
+
+	/**
+	 * Return the collection table for this element collection mapping.
+	 * This will not be null.
+	 */
+	CollectionTable2_0 getCollectionTable();
+
+
+	// **************** value column **************************************
+
+	/**
+	 * Return the value column for this element collection mapping.
+	 */
+	Column getValueColumn();
+
+
+	// ******************* overrides **************************************
+	AttributeOverrideContainer getValueAttributeOverrideContainer();
+
+	AssociationOverrideContainer getValueAssociationOverrideContainer();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/EmbeddedIdMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/EmbeddedIdMapping2_0.java
new file mode 100644
index 0000000..92034d8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/EmbeddedIdMapping2_0.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.EmbeddedIdMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface EmbeddedIdMapping2_0
+	extends EmbeddedIdMapping
+{
+	/**
+	 * Property string associated with changes to the mapped by relationship
+	 */
+	final String MAPPED_BY_RELATIONSHIP_PROPERTY = "mappedByRelationship";
+	
+	/**
+	 * Return whether this id is mapped by a relationship (i.e. a relationship maps this embedded id)
+	 * N.B. - This might be several relationships (erroneously, of course)
+	 */
+	boolean isMappedByRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/EmbeddedMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/EmbeddedMapping2_0.java
new file mode 100644
index 0000000..1334d82
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/EmbeddedMapping2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AssociationOverrideContainer;
+import org.eclipse.jpt.core.context.EmbeddedMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+ public interface EmbeddedMapping2_0
+	extends EmbeddedMapping
+{
+	AssociationOverrideContainer getAssociationOverrideContainer();
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/IdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/IdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..b173b32
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/IdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface IdDerivedIdentityStrategy2_0
+	extends DerivedIdentityStrategy2_0
+{
+	/**
+	 * String associated with changes to the value property of this object
+	 */
+	public static final String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Return whether this object uses a derived id
+	 */
+	boolean getValue();
+	
+	/**
+	 * Set whether this object uses a derived id
+	 */
+	void setValue(boolean newValue);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/IdMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/IdMapping2_0.java
new file mode 100644
index 0000000..0cf39d9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/IdMapping2_0.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.IdMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface IdMapping2_0
+	extends IdMapping
+{
+	/**
+	 * Property string associated with changes to the mapped by relationship
+	 */
+	final String MAPPED_BY_RELATIONSHIP_PROPERTY = "mappedByRelationship";
+	
+	/**
+	 * Return whether this id is mapped by a relationship (i.e. a relationship maps this id)
+	 * N.B. - This might be several relationships (erroneously, of course)
+	 */
+	boolean isMappedByRelationship();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/JpaRootContextNode2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/JpaRootContextNode2_0.java
new file mode 100644
index 0000000..1125ca1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/JpaRootContextNode2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.jpa2.MetamodelSynchronizer;
+
+/**
+ * Root of the Dali JPA 2.0 context model.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaRootContextNode2_0
+	extends JpaRootContextNode, MetamodelSynchronizer
+{
+	// nothing yet...
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/LockModeType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/LockModeType2_0.java
new file mode 100644
index 0000000..63a94db
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/LockModeType2_0.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+/**
+ * LockMode Type
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public enum LockModeType2_0 {
+
+	READ(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.READ,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.READ
+		),
+	WRITE(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.WRITE,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.WRITE
+		),
+	OPTIMISTIC(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.OPTIMISTIC,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.OPTIMISTIC
+		),
+	OPTIMISTIC_FORCE_INCREMENT(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.OPTIMISTIC_FORCE_INCREMENT,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.OPTIMISTIC_FORCE_INCREMENT
+		),
+	PESSIMISTIC_READ(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.PESSIMISTIC_READ,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.PESSIMISTIC_READ
+		),
+	PESSIMISTIC_WRITE(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.PESSIMISTIC_WRITE,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.PESSIMISTIC_WRITE
+		),
+	PESSIMISTIC_FORCE_INCREMENT(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.PESSIMISTIC_FORCE_INCREMENT,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.PESSIMISTIC_FORCE_INCREMENT
+		),
+	NONE(
+		org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0.NONE,
+		org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0.NONE
+		);
+
+
+	private org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType;
+	private org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType;
+
+	LockModeType2_0(org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType, org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType) {
+		if (javaLockModeType == null) {
+			throw new NullPointerException();
+		}
+		if (ormLockModeType == null) {
+			throw new NullPointerException();
+		}
+		this.javaLockModeType = javaLockModeType;
+		this.ormLockModeType = ormLockModeType;
+	}
+
+	public org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0 getJavaLockModeType() {
+		return this.javaLockModeType;
+	}
+
+	public org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 getOrmLockModeType() {
+		return this.ormLockModeType;
+	}
+
+
+	// ********** static methods **********
+
+	public static LockModeType2_0 fromJavaResourceModel(org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType) {
+		return (javaLockModeType == null) ? null : fromJavaResourceModel_(javaLockModeType);
+	}
+
+	private static LockModeType2_0 fromJavaResourceModel_(org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0 javaLockModeType) {
+		for (LockModeType2_0 lockModeType : LockModeType2_0.values()) {
+			if (lockModeType.getJavaLockModeType() == javaLockModeType) {
+				return lockModeType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0 toJavaResourceModel(LockModeType2_0 lockModeType) {
+		return (lockModeType == null) ? null : lockModeType.getJavaLockModeType();
+	}
+
+
+	public static LockModeType2_0 fromOrmResourceModel(org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType) {
+		return (ormLockModeType == null) ? null : fromOrmResourceModel_(ormLockModeType);
+	}
+
+	private static LockModeType2_0 fromOrmResourceModel_(org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 ormLockModeType) {
+		for (LockModeType2_0 lockModeType : LockModeType2_0.values()) {
+			if (lockModeType.getOrmLockModeType() == ormLockModeType) {
+				return lockModeType;
+			}
+		}
+		return null;
+	}
+
+	public static org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 toOrmResourceModel(LockModeType2_0 lockModeType) {
+		return (lockModeType == null) ? null : lockModeType.getOrmLockModeType();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToManyMapping2_0.java
new file mode 100644
index 0000000..6dc15a7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToManyMapping2_0.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+* Copyright (c) 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.ManyToManyMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ManyToManyMapping2_0
+	extends ManyToManyMapping, CollectionMapping2_0
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToOneMapping2_0.java
new file mode 100644
index 0000000..35ae4f9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToOneMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.ManyToOneMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ManyToOneMapping2_0
+	extends ManyToOneMapping, SingleRelationshipMapping2_0
+{
+	ManyToOneRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..47ef365
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/ManyToOneRelationshipReference2_0.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.ManyToOneRelationshipReference;
+
+
+/**
+ * Represents the {@link RelationshipReference} of a 2.0 {@link ManyToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ManyToOneRelationshipReference2_0
+	extends ManyToOneRelationshipReference, JoinTableEnabledRelationshipReference
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java
new file mode 100644
index 0000000..9f6beea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MappingFilePersistenceUnitDefaults2_0.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.MappingFilePersistenceUnitDefaults;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MappingFilePersistenceUnitDefaults2_0
+	extends MappingFilePersistenceUnitDefaults
+{
+	boolean isDelimitedIdentifiers();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..f81c12f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MapsIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.AttributeMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapsIdDerivedIdentityStrategy2_0
+	extends DerivedIdentityStrategy2_0
+{
+	/**
+	 * String associated with changes to the specified value property of this object
+	 */
+	public static final String SPECIFIED_VALUE_PROPERTY = "specified-value"; //$NON-NLS-1$
+	
+	/**
+	 * Return the specified value (the id which has been specified in code)
+	 * Will return null if no value is specified
+	 */
+	String getSpecifiedValue();
+	
+	/**
+	 * Set the specified value (the id to specify in code)
+	 */
+	void setSpecifiedValue(String newValue);
+	
+	/**
+	 * Return whether a default value is ever used (in some cases, there can be no default)
+	 */
+	boolean usesDefaultValue();
+	
+	/**
+	 * String associated with changes to the default value property of this object
+	 */
+	public static final String DEFAULT_VALUE_PROPERTY = "default-value"; //$NON-NLS-1$
+	
+	/**
+	 * Return the default value (the id which would be used in the absence of a specified value)
+	 */
+	String getDefaultValue();
+	
+	/**
+	 * Return the specfied value, or in absence of that, the default value
+	 */
+	String getValue();
+	
+	/**
+	 * Return a sorted iterator of possible value choices
+	 */
+	Iterable<String> getSortedValueChoices();
+	
+	/**
+	 * Return a resolved attribute mapping, which may be a mapping on the entity, or a mapping
+	 * within an embeddable mapping on the entity
+	 */
+	AttributeMapping getResolvedAttributeMappingValue();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MetamodelField.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MetamodelField.java
new file mode 100644
index 0000000..de3728b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MetamodelField.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+/**
+ * JPA 2.0 Canonical Metamodel field corresponding to a persistent attribute.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MetamodelField {
+
+	Iterable<String> getModifiers();
+
+	String getTypeName();
+
+	Iterable<String> getTypeArgumentNames();
+
+	String getName();
+
+	String DEFAULT_TYPE_NAME = java.lang.Object.class.getName();  // ???
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MetamodelSourceType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MetamodelSourceType.java
new file mode 100644
index 0000000..f94469b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/MetamodelSourceType.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.ListIterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.context.PersistentAttribute;
+import org.eclipse.jpt.core.context.PersistentType;
+import org.eclipse.jpt.core.utility.BodySourceWriter;
+
+import com.ibm.icu.text.Collator;
+
+/**
+ * JPA 2.0 metamodel source type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MetamodelSourceType {
+
+	/**
+	 * Return the source type's name.
+	 */
+	String getName();
+
+	/**
+	 * Return whether the source type is "managed" (i.e. persistent).
+	 */
+	boolean isManaged();
+
+	/**
+	 * Return the source type's super type.
+	 */
+	PersistentType getSuperPersistentType();
+
+	/**
+	 * Return the source type's attributes.
+	 */
+	<T extends PersistentAttribute> ListIterator<T> attributes();
+
+	/**
+	 * Return the file generated as a result of the metamodel synchronization.
+	 */
+	IFile getMetamodelFile();
+
+	/**
+	 * Return the source type's JPA project.
+	 */
+	JpaProject getJpaProject();
+
+	/**
+	 * Synchronize the source type's metamodel, using the specified member type
+	 * tree.
+	 */
+	void synchronizeMetamodel(Map<String, Collection<MetamodelSourceType>> memberTypeTree);
+
+	/**
+	 * Print the body of the source type's metamodel class on the specified
+	 * writer, using the specified member type tree.
+	 */
+	void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree);
+
+
+	/**
+	 * {@link Comparator} that can be used to compare source types.
+	 */
+	Comparator<MetamodelSourceType> COMPARATOR =
+			new Comparator<MetamodelSourceType>() {
+				public int compare(MetamodelSourceType type1, MetamodelSourceType type2) {
+					return Collator.getInstance().compare(type1.getName(), type2.getName());
+				}
+			};
+
+
+	/**
+	 * This interface is used by the source type to synchronize the metamodel
+	 * as required by changes to the context model.
+	 */
+	interface Synchronizer {
+		/**
+		 * Return the file generated as a result of the metamodel synchronization.
+		 */
+		IFile getFile();
+
+		/**
+		 * Synchronize the metamodel with the current state of the source
+		 * type, using the specified member type tree.
+		 */
+		void synchronize(Map<String, Collection<MetamodelSourceType>> memberTypeTree);
+
+		/**
+		 * Print the body of the metamodel class on the specified writer,
+		 * using the specified member type tree.
+		 */
+		void printBodySourceOn(BodySourceWriter pw, Map<String, Collection<MetamodelSourceType>> memberTypeTree);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/NamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/NamedQuery2_0.java
new file mode 100644
index 0000000..dd4eabc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/NamedQuery2_0.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.NamedQuery;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface NamedQuery2_0
+	extends NamedQuery
+{
+	/**
+	 * Return the specified lockMode if present, otherwise return the default
+	 * lockMode.
+	 */
+	LockModeType2_0 getLockMode();
+	LockModeType2_0 getSpecifiedLockMode();
+	void setSpecifiedLockMode(LockModeType2_0 lockMode);
+		String SPECIFIED_LOCK_MODE_PROPERTY = "specifiedLockMode"; //$NON-NLS-1$
+	LockModeType2_0 getDefaultLockMode();
+		String DEFAULT_LOCK_MODE_PROPERTY = "defaultLockMode"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToManyMapping2_0.java
new file mode 100644
index 0000000..b63b185
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToManyMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.OneToManyMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OneToManyMapping2_0
+	extends OneToManyMapping, CollectionMapping2_0
+{
+	OneToManyRelationshipReference2_0 getRelationshipReference();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToManyRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToManyRelationshipReference2_0.java
new file mode 100644
index 0000000..9661fdb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToManyRelationshipReference2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.OneToManyRelationshipReference;
+
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link OneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OneToManyRelationshipReference2_0
+	extends OneToManyRelationshipReference, 
+		JoinColumnEnabledRelationshipReference
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToOneMapping2_0.java
new file mode 100644
index 0000000..0d010cf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToOneMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.OneToOneMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OneToOneMapping2_0
+	extends OneToOneMapping, SingleRelationshipMapping2_0
+{
+	OneToOneRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..55d6225
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OneToOneRelationshipReference2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.OneToOneRelationshipReference;
+
+/**
+ * Represents the {@link RelationshipReference} of a 2.0 {@link OneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OneToOneRelationshipReference2_0
+	extends OneToOneRelationshipReference, JoinTableEnabledRelationshipReference
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrderColumn2_0.java
new file mode 100644
index 0000000..5e7dccd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrderColumn2_0.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.NamedColumn;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrderColumn2_0
+	extends NamedColumn
+{
+	
+	boolean isNullable();
+	
+	boolean isDefaultNullable();
+		String DEFAULT_NULLABLE_PROPERTY = "defaultNullable"; //$NON-NLS-1$
+		boolean DEFAULT_NULLABLE = true;
+	Boolean getSpecifiedNullable();
+	void setSpecifiedNullable(Boolean newSpecifiedNullable);
+		String SPECIFIED_NULLABLE_PROPERTY = "specifiedNullable"; //$NON-NLS-1$
+
+
+	boolean isInsertable();
+	
+	boolean isDefaultInsertable();
+		String DEFAULT_INSERTABLE_PROPERTY = "defaultInsertable"; //$NON-NLS-1$
+		boolean DEFAULT_INSERTABLE = true;
+	Boolean getSpecifiedInsertable();
+	void setSpecifiedInsertable(Boolean newSpecifiedInsertable);
+		String SPECIFIED_INSERTABLE_PROPERTY = "specifiedInsertable"; //$NON-NLS-1$
+	
+	
+	boolean isUpdatable();
+	
+	boolean isDefaultUpdatable();
+		String DEFAULT_UPDATABLE_PROPERTY = "defaultUpdatable"; //$NON-NLS-1$
+		boolean DEFAULT_UPDATABLE = true;
+	Boolean getSpecifiedUpdatable();
+	void setSpecifiedUpdatable(Boolean newSpecifiedUpdatable);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Orderable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Orderable2_0.java
new file mode 100644
index 0000000..a979b39
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/Orderable2_0.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.db.Table;
+
+/**
+ * Multi-valued (1:m, m:m) relationship mappings support ordering.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Orderable2_0
+	extends Orderable
+{
+	
+	boolean isOrderColumnOrdering();
+	void setOrderColumnOrdering(boolean value);
+		String ORDER_COLUMN_ORDERING_PROPERTY = "orderColumnOrdering"; //$NON-NLS-1$
+	
+	OrderColumn2_0 getOrderColumn();
+	
+	String getDefaultTableName();
+	
+	/**
+	 * interface allowing Orderable2_0 to be used in multiple places
+	 */
+	interface Owner extends Orderable.Owner {
+		/**
+		 * Return the name of the table which the column belongs to
+		 */
+		String getTableName();
+		
+		Table getDbTable(String tableName);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrphanRemovable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrphanRemovable2_0.java
new file mode 100644
index 0000000..321fa06
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrphanRemovable2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrphanRemovable2_0
+	extends JpaContextNode
+{
+	boolean isOrphanRemoval();
+
+	boolean isDefaultOrphanRemoval();
+		String DEFAULT_ORPHAN_REMOVAL_PROPERTY = "defaultOrphanRemoval"; //$NON-NLS-1$
+		boolean DEFAULT_ORPHAN_REMOVAL = false;
+
+	Boolean getSpecifiedOrphanRemoval();
+	void setSpecifiedOrphanRemoval(Boolean newSpecifiedOrphanRemoval);
+		String SPECIFIED_ORPHAN_REMOVAL_PROPERTY = "specifiedOrphanRemoval"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrphanRemovalHolder2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrphanRemovalHolder2_0.java
new file mode 100644
index 0000000..ac61f5e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/OrphanRemovalHolder2_0.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.JpaNode;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrphanRemovalHolder2_0
+	extends JpaNode
+{
+	OrphanRemovable2_0 getOrphanRemoval();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/PersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/PersistentAttribute2_0.java
new file mode 100644
index 0000000..88da656
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/PersistentAttribute2_0.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.PersistentAttribute;
+
+/**
+ * JPA 2.0 persistent attribute (field or property)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistentAttribute2_0
+	extends PersistentAttribute
+{
+	/**
+	 * Return the name of the container type to be used in the metamodel field
+	 * declaration corresponding to the attribute's mapping.
+	 */
+	String getMetamodelContainerFieldTypeName();
+
+	/**
+	 * Return the name of the container map key type to be used in the
+	 * metamodel field declaration corresponding to the attribute's mapping.
+	 * Return null if the attribute's type is not {@link java.util.Map}.
+	 */
+	String getMetamodelContainerFieldMapKeyTypeName();
+
+	/**
+	 * Return the attribute's type name for the metamodel.
+	 */
+	String getMetamodelTypeName();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/PersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/PersistentType2_0.java
new file mode 100644
index 0000000..6170a1b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/PersistentType2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.PersistentType;
+
+/**
+ * JPA 2.0 context persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistentType2_0
+	extends PersistentType, MetamodelSourceType
+{
+	/**
+	 * Return the name of the persistent type's "declaring type".
+	 * Return <code>null</code> if the persistent type is a top-level type.
+	 * The declaring type may or may not be a persistent type.
+	 */
+	String getDeclaringTypeName();
+		String DECLARING_TYPE_NAME_PROPERTY = "declaringTypeName"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/SequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/SequenceGenerator2_0.java
new file mode 100644
index 0000000..2052a24
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/SequenceGenerator2_0.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.SequenceGenerator;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface SequenceGenerator2_0
+	extends SequenceGenerator
+{
+	// ********** catalog **********
+
+	/**
+	 * Return the specified catalog if present, otherwise return the default
+	 * catalog.
+	 */
+	String getCatalog();
+	String getSpecifiedCatalog();
+	void setSpecifiedCatalog(String value);
+		String SPECIFIED_CATALOG_PROPERTY = "specifiedCatalog"; //$NON-NLS-1$
+	String getDefaultCatalog();
+		String DEFAULT_CATALOG_PROPERTY = "defaultCatalog"; //$NON-NLS-1$
+
+
+	// ********** schema **********
+	/**
+	 * Return the specified schema if present, otherwise return the default
+	 * schema.
+	 */
+	String getSchema();
+	String getSpecifiedSchema();
+	void setSpecifiedSchema(String value);
+		String SPECIFIED_SCHEMA_PROPERTY = "specifiedSchema"; //$NON-NLS-1$
+	String getDefaultSchema();
+		String DEFAULT_SCHEMA_PROPERTY = "defaultSchema"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/SingleRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/SingleRelationshipMapping2_0.java
new file mode 100644
index 0000000..2225d0f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/SingleRelationshipMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context;
+
+import org.eclipse.jpt.core.context.SingleRelationshipMapping;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface SingleRelationshipMapping2_0
+	extends SingleRelationshipMapping
+{
+	DerivedIdentity2_0 getDerivedIdentity();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaAssociationOverrideRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaAssociationOverrideRelationshipReference2_0.java
new file mode 100644
index 0000000..31b4387
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaAssociationOverrideRelationshipReference2_0.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaAssociationOverride;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.AssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+
+/**
+ * An <code>AssociationOverrideRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinColumnJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaAssociationOverrideRelationshipReference2_0 
+	extends AssociationOverrideRelationshipReference2_0, JavaJpaContextNode
+{
+	JavaAssociationOverride getAssociationOverride();
+	
+	JavaJoinTableInAssociationOverrideJoiningStrategy2_0 getJoinTableJoiningStrategy();
+
+	void initialize(AssociationOverrideAnnotation associationOverride);
+	
+	void update(AssociationOverrideAnnotation associationOverride);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCacheable2_0.java
new file mode 100644
index 0000000..a6883ac
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCacheable2_0.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.Cacheable2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCacheable2_0
+	extends JavaJpaContextNode, Cacheable2_0
+
+{
+	/**
+	 * Initialize model without throwing any events
+	 */
+	void initialize(JavaResourcePersistentType jrpt);
+	
+	/**
+	 * Update model, throwing events as necessary
+	 */
+	void update(JavaResourcePersistentType jrpt);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCacheableHolder2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCacheableHolder2_0.java
new file mode 100644
index 0000000..c72bfc5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCacheableHolder2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.CacheableHolder2_0;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCacheableHolder2_0
+	extends CacheableHolder2_0, JavaJpaContextNode
+{
+	JavaCacheable2_0 getCacheable();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCascade2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCascade2_0.java
new file mode 100644
index 0000000..b16cbe4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCascade2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaCascade;
+import org.eclipse.jpt.core.jpa2.context.Cascade2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCascade2_0
+	extends JavaCascade, Cascade2_0
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCollectionMapping2_0.java
new file mode 100644
index 0000000..3241504
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCollectionMapping2_0.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.jpa2.context.CollectionMapping2_0;
+
+/**
+ * 1:m, m:m, element collection are all collection mappings.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCollectionMapping2_0
+	extends CollectionMapping2_0, JavaAttributeMapping
+{
+	
+	JavaAttributeOverrideContainer getMapKeyAttributeOverrideContainer();
+
+	/**
+	 * If the map key class is specified, this will return it fully qualified. If not
+	 * specified, it returns the default map key class, which is always fully qualified
+	 */
+	String getFullyQualifiedMapKeyClass();
+		String FULLY_QUALIFIED_MAP_KEY_CLASS_PROPERTY = "fullyQualifiedMapKeyClass"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCollectionTable2_0.java
new file mode 100644
index 0000000..7c6920b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaCollectionTable2_0.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.java.JavaJoinColumn;
+import org.eclipse.jpt.core.context.java.JavaReferenceTable;
+import org.eclipse.jpt.core.context.java.JavaUniqueConstraint;
+import org.eclipse.jpt.core.jpa2.context.CollectionTable2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+
+/**
+ * Java collection table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaCollectionTable2_0
+	extends CollectionTable2_0, JavaReferenceTable
+{
+	void initialize(CollectionTable2_0Annotation collectionTableAnnotation);
+
+	void update(CollectionTable2_0Annotation collectionTableAnnotation);
+
+	// ********** covariant overrides **********
+
+	ListIterator<JavaJoinColumn> joinColumns();
+
+	JavaJoinColumn getDefaultJoinColumn();
+
+	ListIterator<JavaJoinColumn> specifiedJoinColumns();
+
+	JavaJoinColumn addSpecifiedJoinColumn(int index);
+
+	ListIterator<JavaUniqueConstraint> uniqueConstraints();
+
+	JavaUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaDerivedIdentity2_0.java
new file mode 100644
index 0000000..6e2ef6c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaDerivedIdentity2_0.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentity2_0;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+
+/**
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaDerivedIdentity2_0
+	extends DerivedIdentity2_0, JavaJpaContextNode
+{
+	JavaSingleRelationshipMapping2_0 getMapping();
+	
+	void initialize();
+	
+	void update();
+	
+	void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaElementCollectionMapping2_0.java
new file mode 100644
index 0000000..85e9fbf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaElementCollectionMapping2_0.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaColumn;
+import org.eclipse.jpt.core.jpa2.context.ElementCollectionMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaElementCollectionMapping2_0
+	extends JavaCollectionMapping2_0, ElementCollectionMapping2_0
+{
+	JavaCollectionTable2_0 getCollectionTable();
+	
+	CollectionTable2_0Annotation getCollectionTableAnnotation();
+	
+	JavaColumn getValueColumn();
+
+	JavaAttributeOverrideContainer getValueAttributeOverrideContainer();
+	
+	JavaAssociationOverrideContainer getValueAssociationOverrideContainer();
+
+	/**
+	 * If the target class is specified, this will return it fully qualified. If not
+	 * specified, it returns the default target class, which is always fully qualified
+	 */
+	String getFullyQualifiedTargetClass();
+		String FULLY_QUALIFIED_TARGET_CLASS_PROPERTY = "fullyQualifiedTargetClass"; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaEmbeddedMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaEmbeddedMapping2_0.java
new file mode 100644
index 0000000..c908abc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaEmbeddedMapping2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.java.JavaEmbeddedMapping;
+import org.eclipse.jpt.core.jpa2.context.EmbeddedMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaEmbeddedMapping2_0
+	extends JavaEmbeddedMapping, EmbeddedMapping2_0
+{
+	JavaAssociationOverrideContainer getAssociationOverrideContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..4f0b2c0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.IdDerivedIdentityStrategy2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaIdDerivedIdentityStrategy2_0
+	extends JavaJpaContextNode, IdDerivedIdentityStrategy2_0
+{
+	/**
+	 * Initialize model without throwing any events
+	 */
+	void initialize();
+	
+	/**
+	 * Update model, throwing events as necessary
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaJoinTableInAssociationOverrideJoiningStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaJoinTableInAssociationOverrideJoiningStrategy2_0.java
new file mode 100644
index 0000000..d1ad0f7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaJoinTableInAssociationOverrideJoiningStrategy2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaJoinTableInAssociationOverrideJoiningStrategy2_0 
+	extends JavaJpaContextNode, JavaJoinTableJoiningStrategy
+{
+	
+	void initialize(AssociationOverride2_0Annotation associationOverride);
+	
+	void update(AssociationOverride2_0Annotation associationOverride);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToManyMapping2_0.java
new file mode 100644
index 0000000..a80d5f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToManyMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+* Copyright (c) 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaManyToManyMapping;
+import org.eclipse.jpt.core.jpa2.context.ManyToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToMany2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaManyToManyMapping2_0
+	extends JavaManyToManyMapping, JavaRelationshipMapping2_0, ManyToManyMapping2_0, JavaCollectionMapping2_0
+{
+	ManyToMany2_0Annotation getMappingAnnotation();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToOneMapping2_0.java
new file mode 100644
index 0000000..b0f1037
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToOneMapping2_0.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaManyToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.ManyToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.ManyToOne2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaManyToOneMapping2_0
+	extends JavaManyToOneMapping, ManyToOneMapping2_0, JavaSingleRelationshipMapping2_0
+{
+	ManyToOne2_0Annotation getMappingAnnotation();
+	
+	JavaManyToOneRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..0fd1274
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaManyToOneRelationshipReference2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaManyToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.ManyToOneRelationshipReference2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaManyToOneRelationshipReference2_0
+	extends 
+		JavaManyToOneRelationshipReference,
+		ManyToOneRelationshipReference2_0,
+		JavaJoinTableEnabledRelationshipReference
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..7b1965a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaMapsIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.MapsIdDerivedIdentityStrategy2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaMapsIdDerivedIdentityStrategy2_0
+	extends JavaJpaContextNode, MapsIdDerivedIdentityStrategy2_0
+{
+	/**
+	 * Initialize model without throwing any events
+	 */
+	void initialize();
+	
+	/**
+	 * Update model, throwing events as necessary
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaNamedQuery2_0.java
new file mode 100644
index 0000000..cf8339b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaNamedQuery2_0.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaNamedQuery;
+import org.eclipse.jpt.core.jpa2.context.NamedQuery2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaNamedQuery2_0
+	extends NamedQuery2_0, JavaNamedQuery
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToManyMapping2_0.java
new file mode 100644
index 0000000..8b46198
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToManyMapping2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaOneToManyMapping;
+import org.eclipse.jpt.core.jpa2.context.OneToManyMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToMany2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOneToManyMapping2_0
+	extends JavaOneToManyMapping, JavaRelationshipMapping2_0, OneToManyMapping2_0, JavaCollectionMapping2_0
+{
+	OneToMany2_0Annotation getMappingAnnotation();
+	
+	JavaOneToManyRelationshipReference2_0 getRelationshipReference();
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToManyRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToManyRelationshipReference2_0.java
new file mode 100644
index 0000000..861384e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToManyRelationshipReference2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaOneToManyRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.OneToManyRelationshipReference2_0;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link JavaOneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOneToManyRelationshipReference2_0
+	extends 
+		JavaOneToManyRelationshipReference, 
+		JavaJoinColumnEnabledRelationshipReference, 
+		OneToManyRelationshipReference2_0
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToOneMapping2_0.java
new file mode 100644
index 0000000..d12722e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToOneMapping2_0.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaOneToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.OneToOneMapping2_0;
+import org.eclipse.jpt.core.jpa2.resource.java.OneToOne2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOneToOneMapping2_0
+	extends JavaOneToOneMapping, OneToOneMapping2_0, JavaSingleRelationshipMapping2_0
+{
+	OneToOne2_0Annotation getMappingAnnotation();
+	
+	JavaOneToOneRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..a4c26ad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOneToOneRelationshipReference2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.java.JavaOneToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.OneToOneRelationshipReference2_0;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link JavaOneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOneToOneRelationshipReference2_0
+	extends 
+		JavaOneToOneRelationshipReference,
+		OneToOneRelationshipReference2_0,
+		JavaJoinTableEnabledRelationshipReference
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrderColumn2_0.java
new file mode 100644
index 0000000..6bfee02
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrderColumn2_0.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaNamedColumn;
+import org.eclipse.jpt.core.jpa2.context.OrderColumn2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOrderColumn2_0
+	extends OrderColumn2_0, JavaNamedColumn
+{
+	void initialize(JavaResourcePersistentAttribute resource);
+	
+	/**
+	 * Update the JavaColumn context model object to match the ColumnAnnotation 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(JavaResourcePersistentAttribute resource);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrderable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrderable2_0.java
new file mode 100644
index 0000000..d25afe6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrderable2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaOrderable;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+
+/**
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOrderable2_0
+	extends Orderable2_0, JavaOrderable
+{
+	JavaOrderColumn2_0 getOrderColumn();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrphanRemovable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrphanRemovable2_0.java
new file mode 100644
index 0000000..edf2e66
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrphanRemovable2_0.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.OrphanRemovable2_0;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOrphanRemovable2_0
+	extends JavaJpaContextNode, OrphanRemovable2_0
+{
+	/**
+	 * Initialize model without throwing any events
+	 */
+	void initialize(JavaResourcePersistentAttribute jrpa);
+	
+	/**
+	 * Update model, throwing events as necessary
+	 */
+	void update(JavaResourcePersistentAttribute jrpa);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java
new file mode 100644
index 0000000..fc498e0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaOrphanRemovalHolder2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.jpa2.context.OrphanRemovalHolder2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaOrphanRemovalHolder2_0
+	extends OrphanRemovalHolder2_0, JavaJpaContextNode
+{
+	JavaOrphanRemovable2_0 getOrphanRemoval();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaPersistentAttribute2_0.java
new file mode 100644
index 0000000..08b3465
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaPersistentAttribute2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.PersistentAttribute2_0;
+
+/**
+ * JPA 2.0 context Java persistent attribute (field or property)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaPersistentAttribute2_0
+	extends JavaPersistentAttribute, PersistentAttribute2_0
+{
+	// nothing yet...
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaPersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaPersistentType2_0.java
new file mode 100644
index 0000000..4c26fd7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaPersistentType2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.jpa2.context.PersistentType2_0;
+
+/**
+ * JPA 2.0 context Java persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaPersistentType2_0
+	extends JavaPersistentType, PersistentType2_0
+{
+	// nothing yet...
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaRelationshipMapping2_0.java
new file mode 100644
index 0000000..5195415
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaRelationshipMapping2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaRelationshipMapping;
+import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaRelationshipMapping2_0
+	extends JavaRelationshipMapping
+{
+	RelationshipMapping2_0Annotation getMappingAnnotation();
+	
+	JavaCascade2_0 getCascade();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java
new file mode 100644
index 0000000..2f34861
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/java/JavaSingleRelationshipMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaSingleRelationshipMapping;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaSingleRelationshipMapping2_0
+	extends JavaSingleRelationshipMapping, JavaRelationshipMapping2_0, SingleRelationshipMapping2_0
+{
+	JavaDerivedIdentity2_0 getDerivedIdentity();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmAssociationOverrideRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmAssociationOverrideRelationshipReference2_0.java
new file mode 100644
index 0000000..ef4980e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmAssociationOverrideRelationshipReference2_0.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.JoinColumnJoiningStrategy;
+import org.eclipse.jpt.core.context.RelationshipMapping;
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverride;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.AssociationOverrideRelationshipReference2_0;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+/**
+ * An <code>AssociationOverrideRelationshipReference</code> is a type of 
+ * {@link RelationshipReference} that may utilize a 
+ * {@link JoinColumnJoiningStrategy}
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @see RelationshipMapping
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmAssociationOverrideRelationshipReference2_0 
+	extends 
+		OrmAssociationOverrideRelationshipReference,
+		AssociationOverrideRelationshipReference2_0, 
+		XmlContextNode
+{
+	OrmAssociationOverride getAssociationOverride();
+	
+	OrmJoinTableInAssociationOverrideJoiningStrategy2_0 getJoinTableJoiningStrategy();
+
+	void update(XmlAssociationOverride xao);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCacheable2_0.java
new file mode 100644
index 0000000..3a3729a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCacheable2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.Cacheable2_0;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmCacheable2_0
+	extends XmlContextNode, Cacheable2_0
+{	
+	/**
+	 * Update model, throwing events as necessary
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCacheableHolder2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCacheableHolder2_0.java
new file mode 100644
index 0000000..1619265
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCacheableHolder2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.CacheableHolder2_0;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmCacheableHolder2_0
+	extends CacheableHolder2_0, XmlContextNode
+{
+	OrmCacheable2_0 getCacheable();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCascade2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCascade2_0.java
new file mode 100644
index 0000000..e63364e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCascade2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmCascade;
+import org.eclipse.jpt.core.jpa2.context.Cascade2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmCascade2_0
+	extends OrmCascade, Cascade2_0
+{
+	void initializeFrom(Cascade2_0 oldCascade);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCollectionMapping2_0.java
new file mode 100644
index 0000000..ae312b8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCollectionMapping2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.jpa2.context.CollectionMapping2_0;
+
+/**
+ * 1:m, m:m, element collection are all collection mappings.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmCollectionMapping2_0
+	extends CollectionMapping2_0, OrmAttributeMapping
+{
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCollectionTable2_0.java
new file mode 100644
index 0000000..38264e3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmCollectionTable2_0.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import java.util.ListIterator;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumn;
+import org.eclipse.jpt.core.context.orm.OrmReferenceTable;
+import org.eclipse.jpt.core.context.orm.OrmUniqueConstraint;
+import org.eclipse.jpt.core.jpa2.context.CollectionTable2_0;
+
+/**
+ * orm.xml collection table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmCollectionTable2_0
+	extends CollectionTable2_0, OrmReferenceTable
+{
+	void update();
+		
+	void initializeFrom(CollectionTable2_0 oldCollectionTable);
+
+	// ********** covariant overrides **********
+	
+	ListIterator<OrmJoinColumn> joinColumns();
+
+	OrmJoinColumn getDefaultJoinColumn();
+	
+	ListIterator<OrmJoinColumn> specifiedJoinColumns();
+
+	OrmJoinColumn addSpecifiedJoinColumn(int index);
+	
+	ListIterator<OrmUniqueConstraint> uniqueConstraints();
+	
+	OrmUniqueConstraint addUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmDerivedIdentity2_0.java
new file mode 100644
index 0000000..7302582
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmDerivedIdentity2_0.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.DerivedIdentity2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmDerivedIdentity2_0
+	extends DerivedIdentity2_0, XmlContextNode
+{
+	OrmSingleRelationshipMapping2_0 getMapping();
+
+	OrmMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy();
+	
+	OrmIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy();
+	
+	void initializeFrom(OrmDerivedIdentity2_0 oldDerivedIdentity);
+	
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java
new file mode 100644
index 0000000..c91e4b4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmElementCollectionMapping2_0.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAttributeOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmColumn;
+import org.eclipse.jpt.core.jpa2.context.ElementCollectionMapping2_0;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmElementCollectionMapping2_0
+	extends OrmCollectionMapping2_0, ElementCollectionMapping2_0
+{
+	OrmCollectionTable2_0 getCollectionTable();
+
+	XmlElementCollection getResourceAttributeMapping();
+
+	OrmColumn getValueColumn();
+
+	OrmAttributeOverrideContainer getValueAttributeOverrideContainer();
+
+	OrmAssociationOverrideContainer getValueAssociationOverrideContainer();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java
new file mode 100644
index 0000000..30876cc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmEmbeddedMapping2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmEmbeddedMapping;
+import org.eclipse.jpt.core.jpa2.context.EmbeddedMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmEmbeddedMapping2_0
+	extends OrmEmbeddedMapping, EmbeddedMapping2_0
+{
+	OrmAssociationOverrideContainer getAssociationOverrideContainer();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..ec1cf88
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.IdDerivedIdentityStrategy2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmIdDerivedIdentityStrategy2_0 
+	extends XmlContextNode, IdDerivedIdentityStrategy2_0
+{
+	OrmSingleRelationshipMapping2_0 getMapping();
+	
+	void initializeFrom(OrmIdDerivedIdentityStrategy2_0 oldStrategy);
+	
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmJoinTableInAssociationOverrideJoiningStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmJoinTableInAssociationOverrideJoiningStrategy2_0.java
new file mode 100644
index 0000000..dcbf259
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmJoinTableInAssociationOverrideJoiningStrategy2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverride;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmJoinTableInAssociationOverrideJoiningStrategy2_0 
+	extends XmlContextNode, OrmJoinTableJoiningStrategy
+{
+	void update(XmlAssociationOverride resourceAssociationOverride);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToManyMapping2_0.java
new file mode 100644
index 0000000..2cc2068
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToManyMapping2_0.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+* Copyright (c) 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmManyToManyMapping;
+import org.eclipse.jpt.core.jpa2.context.ManyToManyMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmManyToManyMapping2_0
+	extends OrmManyToManyMapping, ManyToManyMapping2_0
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToOneMapping2_0.java
new file mode 100644
index 0000000..0efc564
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToOneMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmManyToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.ManyToOneMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmManyToOneMapping2_0
+	extends OrmManyToOneMapping, ManyToOneMapping2_0, OrmSingleRelationshipMapping2_0
+{
+	OrmManyToOneRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..d40f199
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmManyToOneRelationshipReference2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmManyToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.ManyToOneRelationshipReference2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmManyToOneRelationshipReference2_0
+	extends 
+		OrmManyToOneRelationshipReference,
+		ManyToOneRelationshipReference2_0,
+		OrmJoinTableEnabledRelationshipReference
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java
new file mode 100644
index 0000000..48b2535
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmMapsIdDerivedIdentityStrategy2_0.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.MapsIdDerivedIdentityStrategy2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmMapsIdDerivedIdentityStrategy2_0
+	extends XmlContextNode, MapsIdDerivedIdentityStrategy2_0
+{
+	void initializeFrom(OrmMapsIdDerivedIdentityStrategy2_0 oldStrategy);
+	
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmNamedQuery2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmNamedQuery2_0.java
new file mode 100644
index 0000000..5ce46d2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmNamedQuery2_0.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmNamedQuery;
+import org.eclipse.jpt.core.jpa2.context.NamedQuery2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmNamedQuery2_0
+	extends OrmNamedQuery, NamedQuery2_0
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToManyMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToManyMapping2_0.java
new file mode 100644
index 0000000..b3e1159
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToManyMapping2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmOneToManyMapping;
+import org.eclipse.jpt.core.jpa2.context.OneToManyMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOneToManyMapping2_0
+	extends OrmOneToManyMapping, OneToManyMapping2_0
+{
+	OrmOneToManyRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToManyRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToManyRelationshipReference2_0.java
new file mode 100644
index 0000000..820ad16
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToManyRelationshipReference2_0.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinColumnEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmOneToManyRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.OneToManyRelationshipReference2_0;
+
+/**
+ * Represents the {@link RelationshipReference} of an {@link OrmOneToManyMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOneToManyRelationshipReference2_0
+	extends 
+	OrmOneToManyRelationshipReference, 
+	OrmJoinColumnEnabledRelationshipReference, 
+	OneToManyRelationshipReference2_0
+{
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToOneMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToOneMapping2_0.java
new file mode 100644
index 0000000..f193471
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToOneMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmOneToOneMapping;
+import org.eclipse.jpt.core.jpa2.context.OneToOneMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOneToOneMapping2_0
+	extends OrmOneToOneMapping, OneToOneMapping2_0, OrmSingleRelationshipMapping2_0
+{
+	OrmOneToOneRelationshipReference2_0 getRelationshipReference();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToOneRelationshipReference2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToOneRelationshipReference2_0.java
new file mode 100644
index 0000000..b3a5611
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOneToOneRelationshipReference2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.RelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmJoinTableEnabledRelationshipReference;
+import org.eclipse.jpt.core.context.orm.OrmOneToOneRelationshipReference;
+import org.eclipse.jpt.core.jpa2.context.OneToOneRelationshipReference2_0;
+
+/**
+ * Represents the {@link RelationshipReference} of a {@link JavaOneToOneMapping}
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOneToOneRelationshipReference2_0
+	extends 
+		OrmOneToOneRelationshipReference,
+		OneToOneRelationshipReference2_0,
+		OrmJoinTableEnabledRelationshipReference
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrderColumn2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrderColumn2_0.java
new file mode 100644
index 0000000..02b875e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrderColumn2_0.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmNamedColumn;
+import org.eclipse.jpt.core.jpa2.context.OrderColumn2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOrderColumn2_0
+	extends OrderColumn2_0, OrmNamedColumn
+{
+	void initialize(XmlOrderable_2_0 orderable);
+
+	/**
+	 * Update the OrmOrderColumn2_0 context model object to match the XmlOrderable2_0 
+	 * resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
+	 */
+	void update(XmlOrderable_2_0 orderable);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrderable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrderable2_0.java
new file mode 100644
index 0000000..ed33af4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrderable2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmOrderable;
+import org.eclipse.jpt.core.jpa2.context.Orderable2_0;
+
+/**
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOrderable2_0
+	extends Orderable2_0, OrmOrderable
+{
+	OrmAttributeMapping getParent();
+
+	OrmOrderColumn2_0 getOrderColumn();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrphanRemovable2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrphanRemovable2_0.java
new file mode 100644
index 0000000..5cf44f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrphanRemovable2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.OrphanRemovable2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOrphanRemovable2_0
+	extends XmlContextNode, OrphanRemovable2_0
+{	
+	/**
+	 * Update model, throwing events as necessary
+	 */
+	void update();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java
new file mode 100644
index 0000000..130df31
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmOrphanRemovalHolder2_0.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.XmlContextNode;
+import org.eclipse.jpt.core.jpa2.context.OrphanRemovalHolder2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmOrphanRemovalHolder2_0
+	extends OrphanRemovalHolder2_0, XmlContextNode
+{
+	OrmOrphanRemovable2_0 getOrphanRemoval();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java
new file mode 100644
index 0000000..9d6fff8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistenceUnitDefaults2_0.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistenceUnitDefaults;
+import org.eclipse.jpt.core.jpa2.context.MappingFilePersistenceUnitDefaults2_0;
+
+/**
+ * Context <code>orm.xml</code> persistence unit defaults.
+ * Context model corresponding to the
+ * XML resource model {@link XmlPersistenceUnitDefaults},
+ * which corresponds to the <code>persistence-unit-defaults</code> element
+ * in the <code>orm.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmPersistenceUnitDefaults2_0
+	extends MappingFilePersistenceUnitDefaults2_0, OrmPersistenceUnitDefaults
+{
+	boolean isDelimitedIdentifiers();
+	void setDelimitedIdentifiers(boolean value);
+		String DELIMITED_IDENTIFIERS_PROPERTY = "delimitedIdentifiers"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistentAttribute2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistentAttribute2_0.java
new file mode 100644
index 0000000..dc145e9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistentAttribute2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.jpa2.context.PersistentAttribute2_0;
+
+/**
+ * JPA 2.0 context orm persistent attribute (field or property)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmPersistentAttribute2_0
+	extends OrmPersistentAttribute, PersistentAttribute2_0
+{
+	// nothing yet...
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistentType2_0.java
new file mode 100644
index 0000000..16447ae
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmPersistentType2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmPersistentType;
+import org.eclipse.jpt.core.jpa2.context.PersistentType2_0;
+
+/**
+ * JPA 2.0 context <code>orm.xml</code> persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmPersistentType2_0
+	extends OrmPersistentType, PersistentType2_0
+{
+	// nothing yet
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmSequenceGenerator2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmSequenceGenerator2_0.java
new file mode 100644
index 0000000..c7deb1a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmSequenceGenerator2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmSequenceGenerator;
+import org.eclipse.jpt.core.jpa2.context.SequenceGenerator2_0;
+
+/**
+ * JPA 2.0 context <code>orm.xml</code> sequence generator.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmSequenceGenerator2_0
+	extends SequenceGenerator2_0, OrmSequenceGenerator
+{
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java
new file mode 100644
index 0000000..e92f61a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmSingleRelationshipMapping2_0.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.orm.OrmSingleRelationshipMapping;
+import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmSingleRelationshipMapping2_0
+	extends OrmSingleRelationshipMapping, SingleRelationshipMapping2_0
+{
+	public OrmDerivedIdentity2_0 getDerivedIdentity();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java
new file mode 100644
index 0000000..bfc292a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/orm/OrmXml2_0ContextNodeFactory.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.orm;
+
+import org.eclipse.jpt.core.context.Orderable;
+import org.eclipse.jpt.core.context.orm.OrmAssociationOverrideContainer;
+import org.eclipse.jpt.core.context.orm.OrmAttributeMapping;
+import org.eclipse.jpt.core.context.orm.OrmNamedColumn;
+import org.eclipse.jpt.core.context.orm.OrmPersistentAttribute;
+import org.eclipse.jpt.core.context.orm.OrmTypeMapping;
+import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
+import org.eclipse.jpt.core.jpa2.context.java.JavaElementCollectionMapping2_0;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrmXml2_0ContextNodeFactory
+	extends OrmXmlContextNodeFactory
+{
+	// ********** ORM Context Model **********
+	
+	//overloaded because the 2.0 JPA spec supports association overrides on an embedded mapping while the 1.0 spec did not
+	OrmAssociationOverrideContainer buildOrmAssociationOverrideContainer(
+			OrmEmbeddedMapping2_0 parent, 
+			OrmAssociationOverrideContainer.Owner owner);
+	
+	OrmDerivedIdentity2_0 buildOrmDerivedIdentity(
+			OrmSingleRelationshipMapping2_0 parent, XmlSingleRelationshipMapping_2_0 resource);
+	
+	OrmElementCollectionMapping2_0 buildOrmElementCollectionMapping2_0(
+			OrmPersistentAttribute parent, XmlElementCollection resourceMapping);
+	
+	XmlElementCollection buildVirtualXmlElementCollection2_0(
+			OrmTypeMapping ormTypeMapping, JavaElementCollectionMapping2_0 javaMapping);
+	
+	OrmCacheable2_0 buildOrmCacheable(OrmCacheableHolder2_0 parent, XmlCacheable_2_0 resource);
+	
+	OrmOrphanRemovable2_0 buildOrmOrphanRemoval(OrmOrphanRemovalHolder2_0 parent, XmlOrphanRemovable_2_0 resource);
+	
+	OrmOrderable2_0 buildOrmOrderable(OrmAttributeMapping parent, Orderable.Owner owner);
+	
+	OrmOrderColumn2_0 buildOrmOrderColumn(OrmOrderable2_0 parent, OrmNamedColumn.Owner owner);
+	
+	OrmCollectionTable2_0 buildOrmCollectionTable(OrmElementCollectionMapping2_0 parent, XmlCollectionTable resource);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/Persistence2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/Persistence2_0.java
new file mode 100644
index 0000000..f7bcddf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/Persistence2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.jpa2.MetamodelSynchronizer;
+
+/**
+ * The <code>persistence</code> element in the JPA 2.0 <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Persistence2_0
+	extends Persistence, MetamodelSynchronizer
+{
+	// nothing yet...
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/PersistenceUnit2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/PersistenceUnit2_0.java
new file mode 100644
index 0000000..bc407cc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/PersistenceUnit2_0.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.jpa2.MetamodelSynchronizer;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitProperties;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.SharedCacheMode;
+import org.eclipse.jpt.core.jpa2.context.persistence.options.ValidationMode;
+
+/**
+ * JPA 2.0 <code>persistence-unit</code>
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistenceUnit2_0
+	extends PersistenceUnit, MetamodelSynchronizer
+{
+	// ********** shared cache mode **********
+
+	/** 
+	 * Return the persistence unit's shared cache mode,
+	 * whether specified or defaulted.
+	 */
+	SharedCacheMode getSharedCacheMode();
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * specified shared cache mode
+	 */
+	String SPECIFIED_SHARED_CACHE_MODE_PROPERTY = "specifiedSharedCacheMode"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's specified shared cache mode.
+	 */
+	SharedCacheMode getSpecifiedSharedCacheMode();
+
+	/** 
+	 * Set the persistence unit's specified shared cache mode.
+	 */
+	void setSpecifiedSharedCacheMode(SharedCacheMode sharedCacheMode);
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * default shared cache mode (not typically changed).
+	 */
+	String DEFAULT_SHARED_CACHE_MODE_PROPERTY = "defaultSharedCacheMode"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's default shared cache mode.
+	 */
+	SharedCacheMode getDefaultSharedCacheMode();
+
+	boolean calculateDefaultCacheable();
+
+	// ********** validation mode **********
+
+	/** 
+	 * Return the persistence unit's validation mode,
+	 * whether specified or defaulted.
+	 */
+	ValidationMode getValidationMode();
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * specified validation mode
+	 */
+	String SPECIFIED_VALIDATION_MODE_PROPERTY = "specifiedValidationMode"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's specified validation mode.
+	 */
+	ValidationMode getSpecifiedValidationMode();
+
+	/** 
+	 * Set the persistence unit's specified validation mode.
+	 */
+	void setSpecifiedValidationMode(ValidationMode validationMode);
+
+	/**
+	 * String constant associated with changes to the persistence unit's 
+	 * default validation mode (not typically changed).
+	 */
+	String DEFAULT_VALIDATION_MODE_PROPERTY = "defaultValidationMode"; //$NON-NLS-1$
+
+	/** 
+	 * Return the persistence unit's default validation mode.
+	 */
+	ValidationMode getDefaultValidationMode();
+	
+	ValidationMode DEFAULT_VALIDATION_MODE = ValidationMode.AUTO;
+
+	// ********** properties **********
+
+	PersistenceUnitProperties getConnection();
+
+	PersistenceUnitProperties getOptions();
+
+	// ********** ORM persistence unit defaults **********
+
+	/**
+	 * String constant associated with changes to the persistence unit's
+	 * default "delimited identifiers" flag.
+	 */
+	String DEFAULT_DELIMITED_IDENTIFIERS_PROPERTY = "defaultDelimitedIdentifiers"; //$NON-NLS-1$
+
+	/**
+	 * Return the default "delimited identifiers" flag from the first persistence unit defaults
+	 * found in the persistence unit's list of mapping files.
+	 */
+	boolean getDefaultDelimitedIdentifiers();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/PersistenceXml2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/PersistenceXml2_0.java
new file mode 100644
index 0000000..28815f8
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/PersistenceXml2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceXml;
+import org.eclipse.jpt.core.jpa2.MetamodelSynchronizer;
+
+/**
+ * JPA 2.0 <code>persistence.xml</code> file.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface PersistenceXml2_0
+	extends PersistenceXml, MetamodelSynchronizer
+{
+	// nothing yet...
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/connection/JpaConnection2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/connection/JpaConnection2_0.java
new file mode 100644
index 0000000..0b9223c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/connection/JpaConnection2_0.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence.connection;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitProperties;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaConnection2_0
+	extends PersistenceUnitProperties
+{		
+	String getDefaultDriver();
+	String getDriver();
+	void setDriver(String newDriver);
+		static final String DRIVER_PROPERTY = "driver"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_JDBC_DRIVER = "javax.persistence.jdbc.driver"; //$NON-NLS-1$
+		static final String DEFAULT_JDBC_DRIVER = ""; //$NON-NLS-1$
+		
+	String getDefaultUrl();
+	String getUrl();
+	void setUrl(String newUrl);
+		static final String URL_PROPERTY = "url"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_JDBC_URL = "javax.persistence.jdbc.url"; //$NON-NLS-1$
+		static final String DEFAULT_JDBC_URL = ""; //$NON-NLS-1$
+		
+	String getDefaultUser();
+	String getUser();
+	void setUser(String newUser);
+		static final String USER_PROPERTY = "user"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_JDBC_USER = "javax.persistence.jdbc.user"; //$NON-NLS-1$
+		static final String DEFAULT_JDBC_USER = ""; //$NON-NLS-1$
+		
+	String getDefaultPassword();
+	String getPassword();
+	void setPassword(String newPassword);
+		static final String PASSWORD_PROPERTY = "password"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_JDBC_PASSWORD = "javax.persistence.jdbc.password"; //$NON-NLS-1$
+		static final String DEFAULT_JDBC_PASSWORD = ""; //$NON-NLS-1$
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/JpaOptions2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/JpaOptions2_0.java
new file mode 100644
index 0000000..469a7b2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/JpaOptions2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence.options;
+
+import org.eclipse.jpt.core.context.persistence.PersistenceUnitProperties;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JpaOptions2_0
+	extends PersistenceUnitProperties
+{
+	Integer getDefaultLockTimeout();
+	Integer getLockTimeout();
+	void setLockTimeout(Integer newLockTimeout);
+		static final String LOCK_TIMEOUT_PROPERTY = "lockTimeout"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_LOCK_TIMEOUT = "javax.persistence.lock.timeout"; //$NON-NLS-1$
+		static final Integer DEFAULT_LOCK_TIMEOUT = Integer.valueOf(5);
+
+	Integer getDefaultQueryTimeout();
+	Integer getQueryTimeout();
+	void setQueryTimeout(Integer newQueryTimeout);
+		static final String QUERY_TIMEOUT_PROPERTY = "queryTimeout"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_QUERY_TIMEOUT = "javax.persistence.query.timeout"; //$NON-NLS-1$
+		static final Integer DEFAULT_QUERY_TIMEOUT = Integer.valueOf(5);
+
+	String getDefaultValidationGroupPrePersist();
+	String getValidationGroupPrePersist();
+	void setValidationGroupPrePersist(String newValidationGroupPrePersist);
+		static final String VALIDATION_GROUP_PRE_PERSIST_PROPERTY = "validationGroupPrePersist"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_VALIDATION_GROUP_PRE_PERSIST = "javax.persistence.validation.group.pre-persist"; //$NON-NLS-1$
+		static final String DEFAULT_VALIDATION_GROUP_PRE_PERSIST = "Default"; //$NON-NLS-1$
+
+	String getDefaultValidationGroupPreUpdate();
+	String getValidationGroupPreUpdate();
+	void setValidationGroupPreUpdate(String newValidationGroupPreUpdate);
+		static final String VALIDATION_GROUP_PRE_UPDATE_PROPERTY = "validationGroupPreUpdate"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_VALIDATION_GROUP_PRE_UPDATE = "javax.persistence.validation.group.pre-update"; //$NON-NLS-1$
+		static final String DEFAULT_VALIDATION_GROUP_PRE_UPDATE = "Default"; //$NON-NLS-1$
+
+	String getDefaultValidationGroupPreRemove();
+	String getValidationGroupPreRemove();
+	void setValidationGroupPreRemove(String newValidationGroupPreRemove);
+		static final String VALIDATION_GROUP_PRE_REMOVE_PROPERTY = "validationGroupPreRemove"; //$NON-NLS-1$
+		// Property key
+		static final String PERSISTENCE_VALIDATION_GROUP_PRE_REMOVE = "javax.persistence.validation.group.pre-remove"; //$NON-NLS-1$
+		static final String DEFAULT_VALIDATION_GROUP_PRE_REMOVE = ""; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/SharedCacheMode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/SharedCacheMode.java
new file mode 100644
index 0000000..0ea73f0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/SharedCacheMode.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence.options;
+
+import org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public enum SharedCacheMode 
+{
+	ALL,
+	NONE,
+	ENABLE_SELECTIVE,
+	DISABLE_SELECTIVE,
+	UNSPECIFIED; 
+	
+
+	public static SharedCacheMode fromXmlResourceModel(XmlPersistenceUnitCachingType_2_0 sharedCacheMode) {
+		if (sharedCacheMode == null) {
+			return null;
+		}
+		switch (sharedCacheMode) {
+			case ALL:
+				return ALL;
+			case NONE:
+				return NONE;
+			case ENABLE_SELECTIVE:
+				return ENABLE_SELECTIVE;
+			case DISABLE_SELECTIVE:
+				return DISABLE_SELECTIVE;
+			case UNSPECIFIED:
+				return UNSPECIFIED;
+			default:
+				throw new IllegalArgumentException("unknown validation mode: " + sharedCacheMode); //$NON-NLS-1$
+		}
+	}
+	
+	public static XmlPersistenceUnitCachingType_2_0 toXmlResourceModel(SharedCacheMode sharedCacheMode) {
+		if (sharedCacheMode == null) {
+			return null;
+		}
+		switch (sharedCacheMode) {
+			case ALL:
+				return XmlPersistenceUnitCachingType_2_0.ALL;
+			case NONE:
+				return XmlPersistenceUnitCachingType_2_0.NONE;
+			case ENABLE_SELECTIVE:
+				return XmlPersistenceUnitCachingType_2_0.ENABLE_SELECTIVE;
+			case DISABLE_SELECTIVE:
+				return XmlPersistenceUnitCachingType_2_0.DISABLE_SELECTIVE;
+			case UNSPECIFIED:
+				return XmlPersistenceUnitCachingType_2_0.UNSPECIFIED;
+			default:
+				throw new IllegalArgumentException("unknown shared cache mode: " + sharedCacheMode); //$NON-NLS-1$
+		}
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/ValidationMode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/ValidationMode.java
new file mode 100644
index 0000000..d3b08c6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/context/persistence/options/ValidationMode.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.context.persistence.options;
+
+import org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public enum ValidationMode 
+{
+	AUTO(XmlPersistenceUnitValidationModeType_2_0.AUTO),
+	CALLBACK(XmlPersistenceUnitValidationModeType_2_0.CALLBACK),
+	NONE(XmlPersistenceUnitValidationModeType_2_0.NONE); 
+
+	private XmlPersistenceUnitValidationModeType_2_0 xmlEnumValue;
+
+	ValidationMode(XmlPersistenceUnitValidationModeType_2_0 xmlEnumValue) {
+		if (xmlEnumValue == null) {
+			throw new NullPointerException();
+		}
+		this.xmlEnumValue = xmlEnumValue;
+	}
+
+	public XmlPersistenceUnitValidationModeType_2_0 getXmlEnumValue() {
+		return this.xmlEnumValue;
+	}
+	
+	
+	// ********** static methods **********
+
+	public static ValidationMode fromXmlResourceModel(XmlPersistenceUnitValidationModeType_2_0 xmlValidationMode) {
+		return (xmlValidationMode == null) ? null : fromXmlResourceModel_(xmlValidationMode);
+	}
+
+	private static ValidationMode fromXmlResourceModel_(XmlPersistenceUnitValidationModeType_2_0 xmlValidationMode) {
+		for (ValidationMode validationMode : ValidationMode.values()) {
+			if (validationMode.getXmlEnumValue().equals(xmlValidationMode)) {
+				return validationMode;
+			}
+		}
+		return null;
+	}
+
+	public static XmlPersistenceUnitValidationModeType_2_0 toXmlResourceModel(ValidationMode validationMode) {
+		return (validationMode == null) ? null : validationMode.getXmlEnumValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/Access2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/Access2_0Annotation.java
new file mode 100644
index 0000000..ca47cf6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/Access2_0Annotation.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.AccessType;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.Access
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Access2_0Annotation
+	extends Annotation
+{
+	
+	String ANNOTATION_NAME = JPA2_0.ACCESS;
+	
+	/**
+	 * Corresponds to the 'value' element of the Access annotation.
+	 * Returns null if the element does not exist in Java.
+	 */
+	AccessType getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the Access annotation.
+	 * Set to null to remove the element.
+	 */
+	void setValue(AccessType access);
+	
+	/**
+	 * Return the {@link TextRange} for the 'value' element.  If the element 
+	 * does not exist return the {@link TextRange} for the Access annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/AssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/AssociationOverride2_0Annotation.java
new file mode 100644
index 0000000..35e61f5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/AssociationOverride2_0Annotation.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.AssociationOverride
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface AssociationOverride2_0Annotation
+	extends AssociationOverrideAnnotation
+{
+	
+	/**
+	 * Corresponds to the 'joinTable' element of the AssociationOverride annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	JoinTableAnnotation getJoinTable();
+		String JOIN_TABLE_PROPERTY = "joinTable"; //$NON-NLS-1$
+
+	JoinTableAnnotation getNonNullJoinTable();
+
+	/**
+	 * Add the 'joinTable' element to the AssociationOverride annotation.
+	 */
+	JoinTableAnnotation addJoinTable();
+	
+	/**
+	 * Remove the 'joinTable' element from the AssociationOverride annotation.
+	 */
+	void removeJoinTable();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/Cacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/Cacheable2_0Annotation.java
new file mode 100644
index 0000000..a5ad182
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/Cacheable2_0Annotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.Cacheable
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface Cacheable2_0Annotation
+	extends Annotation
+{	
+	String ANNOTATION_NAME = JPA2_0.CACHEABLE;
+	
+	/**
+	 * Corresponds to the 'value' element of the Cacheable annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the Cacheable annotation.
+	 * Set to null to remove the element.
+	 */
+	void setValue(Boolean value);
+	
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the Cacheable annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/CollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/CollectionTable2_0Annotation.java
new file mode 100644
index 0000000..1e785f6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/CollectionTable2_0Annotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.ReferenceTableAnnotation;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.CollectionTable
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface CollectionTable2_0Annotation 
+	extends ReferenceTableAnnotation
+{
+	String ANNOTATION_NAME = JPA2_0.COLLECTION_TABLE;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ElementCollection2_0Annotation.java
new file mode 100644
index 0000000..e850473
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ElementCollection2_0Annotation.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.FetchType;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.ElementCollection
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ElementCollection2_0Annotation 
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA2_0.ELEMENT_COLLECTION;
+
+	/**
+	 * Corresponds to the 'targetClass' element of the element collection
+	 * annotation.
+	 * Return null if the element does not exist in Java.
+	 * Return the portion of the value preceding ".class".
+	 * <pre>
+	 *     &#64;ElementCollection(targetClass=Employee.class)
+	 * </pre>
+	 * will return "Employee"
+	 */
+	String getTargetClass();	
+		String TARGET_CLASS_PROPERTY = "targetClass"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'targetClass' element of the element collection
+	 * annotation.
+	 * Set to null to remove the element.
+	 */
+	void setTargetClass(String targetClass);
+	
+	/**
+	 * Return the {@link TextRange} for the 'targetClass' element. If the element 
+	 * does not exist return the {@link TextRange} for the element collection annotation.
+	 */
+	TextRange getTargetClassTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return the fully-qualified target class name as resolved by the AST's bindings.
+	 * <pre>
+	 *     &#64;ElementCollection(targetClass=Employee.class)
+	 * </pre>
+	 * will return "model.Employee" if there is an import for model.Employee.
+	 * @return
+	 */
+	String getFullyQualifiedTargetClassName();
+		String FULLY_QUALIFIED_TARGET_CLASS_NAME_PROPERTY = "fullyQualifiedTargetClassName"; //$NON-NLS-1$
+
+
+	/**
+	 * Corresponds to the 'fetch' element of the element collection annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	FetchType getFetch();
+		String FETCH_PROPERTY = "fetch"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'fetch' element of the element collection annotation.
+	 * Set to null to remove the element.
+	 */
+	void setFetch(FetchType fetch);
+	
+	/**
+	 * Return the {@link TextRange} for the 'fetch' element. If the element 
+	 * does not exist return the {@link TextRange} for the element collection annotation.
+	 */
+	TextRange getFetchTextRange(CompilationUnit astRoot);
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/GeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/GeneratedAnnotation.java
new file mode 100644
index 0000000..382a063
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/GeneratedAnnotation.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import java.util.ListIterator;
+
+import org.eclipse.jpt.core.resource.java.Annotation;
+
+/**
+ * Corresponds to the Java 6 annotation
+ * <code>javax.annotation.Generated</code>
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface GeneratedAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = "javax.annotation.Generated";  // requires JRE 1.6 //$NON-NLS-1$
+	String VALUE_ELEMENT_NAME = "value"; //$NON-NLS-1$
+	String DATE_ELEMENT_NAME = "date"; //$NON-NLS-1$
+	String COMMENTS_ELEMENT_NAME = "comments"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 * Return <code>null</code> if the element does not exist in the annotation.
+	 */
+	ListIterator<String> values();
+		String VALUES_LIST = "values"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	int valuesSize();
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	String getValue(int index);
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	void addValue(String value);
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	void addValue(int index, String value);
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	void moveValue(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	void removeValue(String value);
+
+	/**
+	 * Corresponds to the <code>value<code> element of the <code>Generated</code>
+	 * annotation.
+	 */
+	void removeValue(int index);
+
+	/**
+	 * Corresponds to the <code>date</code> element of the <code>Generated</code>
+	 * annotation.
+	 * Return <code>null</code> if the element does not exist in the annotation.
+	 */
+	String getDate();
+		String DATE_PROPERTY = "date"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the <code>date</code> element of the <code>Generated</code>
+	 * annotation.
+	 * Set to <code>null</code> to remove the element.
+	 */
+	void setDate(String date);
+
+	/**
+	 * Corresponds to the <code>comments</code> element of the <code>Generated</code>
+	 * annotation.
+	 * Return <code>null</code> if the element does not exist in the annotation.
+	 */
+	String getComments();
+		String COMMENTS_PROPERTY = "comments"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the <code>comments</code> element of the <code>Generated</code>
+	 * annotation.
+	 * Set to <code>null</code> to remove the element.
+	 */
+	void setComments(String comments);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/JPA2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/JPA2_0.java
new file mode 100644
index 0000000..ebd0614
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/JPA2_0.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.JPA;
+
+/**
+ * JPA 2.0 Java-related stuff (annotations etc.)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+@SuppressWarnings("nls")
+public interface JPA2_0 
+{
+	// JPA package
+	String PACKAGE = "javax.persistence";
+	String PACKAGE_ = PACKAGE + '.';
+
+
+	// ********** API **********
+
+	// JPA 2.0 annotations
+	String ACCESS = PACKAGE_ + "Access";
+		String ACCESS__VALUE = "value";
+
+	// ASSOCIATION_OVERRIDE
+		String ASSOCIATION_OVERRIDE__JOIN_TABLE = "joinTable";
+
+	String CACHEABLE = PACKAGE_ + "Cacheable";
+		String CACHEABLE__VALUE = "value";
+		
+	String CASCADE_TYPE__DETACH = JPA.CASCADE_TYPE_ + "DETACH";
+
+	String COLLECTION_TABLE = PACKAGE_ + "CollectionTable";
+		String COLLECTION_TABLE__NAME = "name";
+		String COLLECTION_TABLE__SCHEMA = "schema";
+		String COLLECTION_TABLE__CATALOG = "catalog";
+		String COLLECTION_TABLE__JOIN_COLUMNS = "joinColumns";
+		String COLLECTION_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
+	
+	String ELEMENT_COLLECTION = PACKAGE_ + "ElementCollection";
+		String ELEMENT_COLLECTION__FETCH = "fetch";
+		String ELEMENT_COLLECTION__TARGET_CLASS = "targetClass";
+
+	String MAP_KEY_CLASS = PACKAGE_ + "MapKeyClass";
+		String MAP_KEY_CLASS__VALUE = "value";
+	
+	String MAP_KEY_COLUMN = PACKAGE_ + "MapKeyColumn";
+		String MAP_KEY_COLUMN__NAME = "name";
+		String MAP_KEY_COLUMN__UNIQUE = "unique";
+		String MAP_KEY_COLUMN__NULLABLE = "nullable";
+		String MAP_KEY_COLUMN__INSERTABLE = "insertable";
+		String MAP_KEY_COLUMN__UPDATABLE = "updatable";
+		String MAP_KEY_COLUMN__COLUMN_DEFINITION = "columnDefinition";
+		String MAP_KEY_COLUMN__TABLE = "table";
+		String MAP_KEY_COLUMN__LENGTH = "length";
+		String MAP_KEY_COLUMN__PRECISION = "precision";
+		String MAP_KEY_COLUMN__SCALE = "scale";
+
+	String MAP_KEY_ENUMERATED = PACKAGE_ + "MapKeyEnumerated";
+		String MAP_KEY_ENUMERATED__VALUE = "value";
+		
+	String MAP_KEY_JOIN_COLUMN = PACKAGE_ + "MapKeyJoinColumn";
+		String MAP_KEY_JOIN_COLUMN__NAME = "name";
+		String MAP_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
+		String MAP_KEY_JOIN_COLUMN__UNIQUE = "unique";
+		String MAP_KEY_JOIN_COLUMN__NULLABLE = "nullable";
+		String MAP_KEY_JOIN_COLUMN__INSERTABLE = "insertable";
+		String MAP_KEY_JOIN_COLUMN__UPDATABLE = "updatable";
+		String MAP_KEY_JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
+		String MAP_KEY_JOIN_COLUMN__TABLE = "table";
+		
+	String MAP_KEY_JOIN_COLUMNS = PACKAGE_ + "MapKeyJoinColumns";
+		String MAP_KEY_JOIN_COLUMNS__VALUE = "value";
+
+	String MAP_KEY_TEMPORAL = PACKAGE_ + "MapKeyTemporal";
+		String MAP_KEY_TEMPORAL__VALUE = "value";
+
+	String MAPS_ID = PACKAGE_ + "MapsId";
+		String MAPS_ID__VALUE = "value";
+
+	// NAMED_QUERY
+		String NAMED_QUERY__LOCK_MODE = "lockMode";
+
+	// ONE_TO_MANY
+		String ONE_TO_MANY__ORPHAN_REMOVAL = "orphanRemoval";
+
+	// ONE_TO_ONE
+		String ONE_TO_ONE__ORPHAN_REMOVAL = "orphanRemoval";
+
+	String ORDER_COLUMN = PACKAGE_ + "OrderColumn";
+		String ORDER_COLUMN__NAME = "name";
+		String ORDER_COLUMN__NULLABLE = "nullable";
+		String ORDER_COLUMN__INSERTABLE = "insertable";
+		String ORDER_COLUMN__UPDATABLE = "updatable";
+		String ORDER_COLUMN__COLUMN_DEFINITION = "columnDefinition";
+
+	// SEQUENCE_GENERATOR
+		String SEQUENCE_GENERATOR__CATALOG = "catalog";
+		String SEQUENCE_GENERATOR__SCHEMA = "schema";
+
+
+	// JPA 2.0 enums
+	String ACCESS_TYPE = PACKAGE_ + "AccessType";
+		String ACCESS_TYPE_ = ACCESS_TYPE + '.';
+		String ACCESS_TYPE__FIELD = ACCESS_TYPE_ + "FIELD";
+		String ACCESS_TYPE__PROPERTY = ACCESS_TYPE_ + "PROPERTY";
+
+	String LOCK_MODE_TYPE = PACKAGE_ + "LockModeType";
+		String LOCK_MODE_TYPE_ = LOCK_MODE_TYPE + '.';
+		String LOCK_MODE_TYPE__READ = LOCK_MODE_TYPE_ + "READ";
+		String LOCK_MODE_TYPE__WRITE = LOCK_MODE_TYPE_ + "WRITE";
+		String LOCK_MODE_TYPE__OPTIMISTIC = LOCK_MODE_TYPE_ + "OPTIMISTIC";
+		String LOCK_MODE_TYPE__OPTIMISTIC_FORCE_INCREMENT = LOCK_MODE_TYPE_ + "OPTIMISTIC_FORCE_INCREMENT";
+		String LOCK_MODE_TYPE__PESSIMISTIC_READ = LOCK_MODE_TYPE_ + "PESSIMISTIC_READ";
+		String LOCK_MODE_TYPE__PESSIMISTIC_WRITE = LOCK_MODE_TYPE_ + "PESSIMISTIC_WRITE";
+		String LOCK_MODE_TYPE__PESSIMISTIC_FORCE_INCREMENT = LOCK_MODE_TYPE_ + "PESSIMISTIC_FORCE_INCREMENT";
+		String LOCK_MODE_TYPE__NONE = LOCK_MODE_TYPE_ + "NONE";
+
+	// JPA 2.0 metamodel
+	String METAMODEL_PACKAGE = PACKAGE_ + "metamodel";
+	String METAMODEL_PACKAGE_ = METAMODEL_PACKAGE + '.';
+
+	String STATIC_METAMODEL = METAMODEL_PACKAGE_ + "StaticMetamodel";
+		String STATIC_METAMODEL__VALUE = "value";
+
+	String SINGULAR_ATTRIBUTE = METAMODEL_PACKAGE_ + "SingularAttribute";
+
+	String COLLECTION_ATTRIBUTE = METAMODEL_PACKAGE_ + "CollectionAttribute";
+	String LIST_ATTRIBUTE = METAMODEL_PACKAGE_ + "ListAttribute";
+	String MAP_ATTRIBUTE = METAMODEL_PACKAGE_ + "MapAttribute";
+	String SET_ATTRIBUTE = METAMODEL_PACKAGE_ + "SetAttribute";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/JavaResourcePersistentType2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/JavaResourcePersistentType2_0.java
new file mode 100644
index 0000000..b00ba0b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/JavaResourcePersistentType2_0.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
+
+/**
+ * JPA 2.0 Java source code or binary persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface JavaResourcePersistentType2_0
+	extends JavaResourcePersistentType
+{
+
+	// ********** metamodel **********
+
+	/**
+	 * Return the <code>javax.annotation.Generated</code> annotation.
+	 */
+	GeneratedAnnotation getGeneratedAnnotation();
+
+	/**
+	 * Return whether the type is a metamodel top-level type generated in the
+	 * specified source folder.
+	 */
+	boolean isGeneratedMetamodelTopLevelType(IPackageFragmentRoot sourceFolder);
+
+	/**
+	 * Return whether the type is a generated metamodel top-level type.
+	 * The type is generated and either it or one of its nested types is a
+	 * metamodel type.
+	 */
+	boolean isGeneratedMetamodelTopLevelType();
+
+	/**
+	 * Return whether the type is a metamodel type.
+	 */
+	boolean isMetamodel();
+
+	/**
+	 * The value used to tag a generated type:
+	 * <pre>
+	 * &#64;javax.annotation.Generated(value="Dali", date="2009-11-23T13:56:06.171-0500")
+	 * </pre>
+	 */
+	String METAMODEL_GENERATED_ANNOTATION_VALUE = "Dali"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/LockModeType_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/LockModeType_2_0.java
new file mode 100644
index 0000000..c03bb3b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/LockModeType_2_0.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+
+/**
+ * Corresponds to the JPA 2.0 enum
+ * javax.persistence.LockModeType
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public enum LockModeType_2_0 {
+
+	READ(JPA2_0.LOCK_MODE_TYPE__READ),
+	WRITE(JPA2_0.LOCK_MODE_TYPE__WRITE),
+	OPTIMISTIC(JPA2_0.LOCK_MODE_TYPE__OPTIMISTIC),
+	OPTIMISTIC_FORCE_INCREMENT(JPA2_0.LOCK_MODE_TYPE__OPTIMISTIC_FORCE_INCREMENT),
+	PESSIMISTIC_READ(JPA2_0.LOCK_MODE_TYPE__PESSIMISTIC_READ),
+	PESSIMISTIC_WRITE(JPA2_0.LOCK_MODE_TYPE__PESSIMISTIC_WRITE),
+	PESSIMISTIC_FORCE_INCREMENT(JPA2_0.LOCK_MODE_TYPE__PESSIMISTIC_FORCE_INCREMENT),
+	NONE(JPA2_0.LOCK_MODE_TYPE__NONE);
+
+
+	private String javaAnnotationValue;
+
+	LockModeType_2_0(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static LockModeType_2_0 fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static LockModeType_2_0 fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (LockModeType_2_0 lockModeType : LockModeType_2_0.values()) {
+			if (lockModeType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return lockModeType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(LockModeType_2_0 lockModeType) {
+		return (lockModeType == null) ? null : lockModeType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ManyToMany2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ManyToMany2_0Annotation.java
new file mode 100644
index 0000000..0ed9d31
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ManyToMany2_0Annotation.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+* Copyright (c) 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.ManyToManyAnnotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ManyToMany2_0Annotation
+	extends ManyToManyAnnotation, RelationshipMapping2_0Annotation
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ManyToOne2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ManyToOne2_0Annotation.java
new file mode 100644
index 0000000..10acfe7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/ManyToOne2_0Annotation.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+* Copyright (c) 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ManyToOne2_0Annotation
+	extends ManyToOneAnnotation, RelationshipMapping2_0Annotation
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyClass2_0Annotation.java
new file mode 100644
index 0000000..94d11ad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyClass2_0Annotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.MapKeyClass
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapKeyClass2_0Annotation 
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA2_0.MAP_KEY_CLASS;
+
+	/**
+	 * Corresponds to the 'value' element of the MapKeyClass annotation.
+	 * Return null if the element does not exist in Java.
+	 * Return the portion of the value preceding ".class".
+	 * <pre>
+	 *     &#64;MapKeyClass(value=Employee.class)
+	 * </pre>
+	 * will return "Employee"
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'value' element of the MapKeyClass annotation.
+	 * Set to null to remove the element.
+	 * This will also remove the MapKeyClass annotation itself.
+	 */
+	void setValue(String value);
+
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the IdClass annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return the fully-qualified MapKeyClass name as resolved by the AST's bindings.
+	 * <pre>
+	 *     &#64;IdClass(Employee.class)
+	 * </pre>
+	 * will return "model.Employee" if there is an import for model.Employee.
+	 */
+	String getFullyQualifiedClassName();
+		String FULLY_QUALIFIED_CLASS_NAME_PROPERTY = "fullyQualifiedClassName"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java
new file mode 100644
index 0000000..e552856
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyColumn2_0Annotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.MapKeyColumn
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapKeyColumn2_0Annotation 
+	extends ColumnAnnotation
+{
+	String ANNOTATION_NAME = JPA2_0.MAP_KEY_COLUMN;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java
new file mode 100644
index 0000000..592a145
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyEnumerated2_0Annotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.MapKeyEnumerated
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapKeyEnumerated2_0Annotation
+	extends EnumeratedAnnotation
+{
+	String ANNOTATION_NAME = JPA2_0.MAP_KEY_ENUMERATED;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java
new file mode 100644
index 0000000..db2a43e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyJoinColumn2_0Annotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.BaseJoinColumnAnnotation;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.MapKeyJoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapKeyJoinColumn2_0Annotation
+	extends BaseJoinColumnAnnotation
+{
+	String ANNOTATION_NAME = JPA2_0.MAP_KEY_JOIN_COLUMN;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyJoinColumns2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyJoinColumns2_0Annotation.java
new file mode 100644
index 0000000..7937a8c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyJoinColumns2_0Annotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.MapKeyJoinColumns
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapKeyJoinColumns2_0Annotation
+	extends ContainerAnnotation<NestableMapKeyJoinColumnAnnotation>
+{
+	String ANNOTATION_NAME = JPA2_0.MAP_KEY_JOIN_COLUMNS;
+
+	String MAP_KEY_JOIN_COLUMNS_LIST = "mapKeyJoinColumns"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java
new file mode 100644
index 0000000..bc7396a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapKeyTemporal2_0Annotation.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.MapKeyTemporal
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapKeyTemporal2_0Annotation
+	extends TemporalAnnotation
+{
+	String ANNOTATION_NAME = JPA2_0.MAP_KEY_TEMPORAL;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapsId2_0Annotation.java
new file mode 100644
index 0000000..6e34f37
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/MapsId2_0Annotation.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.MapsId
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface MapsId2_0Annotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA2_0.MAPS_ID;
+	
+	/**
+	 * Corresponds to the 'value' element of the MapsId annotation.
+	 * Returns null if the element does not exist in Java.
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the MapsId annotation.
+	 * Set to null to remove the element.
+	 */
+	void setValue(String newValue);
+	
+	/**
+	 * Return the {@link TextRange} for the 'value' element.  If the element 
+	 * does not exist return the {@link TextRange} for the MapsId annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+	
+	/**
+	 * Return whether the specified position touches the 'value' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean valueTouches(int pos, CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/NamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/NamedQuery2_0Annotation.java
new file mode 100644
index 0000000..73bb8aa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/NamedQuery2_0Annotation.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.NamedQuery
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface NamedQuery2_0Annotation
+	extends NamedQueryAnnotation
+{
+	// ********** lockMode **********
+	/**
+	 * Corresponds to the 'lockMode' element of the NamedQuery annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	LockModeType_2_0 getLockMode();
+		String LOCK_MODE_PROPERTY = "lockMode"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'lockMode' element of the NamedQuery annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the NamedQuery annotation will be removed as well.
+	 */
+	void setLockMode(LockModeType_2_0 lockMode);
+
+	/**
+	 * Return the {@link TextRange} for the 'lockMode' element. If the element 
+	 * does not exist return the {@link TextRange} for the NamedQuery annotation.
+	 */
+	TextRange getLockModeTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'lockMode' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean lockModeTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/NestableMapKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/NestableMapKeyJoinColumnAnnotation.java
new file mode 100644
index 0000000..a099578
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/NestableMapKeyJoinColumnAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.MapKeyJoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface NestableMapKeyJoinColumnAnnotation
+	extends MapKeyJoinColumn2_0Annotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OneToMany2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OneToMany2_0Annotation.java
new file mode 100644
index 0000000..856ddec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OneToMany2_0Annotation.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OneToMany2_0Annotation
+	extends OneToManyAnnotation, OrphanRemovable2_0Annotation, RelationshipMapping2_0Annotation
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OneToOne2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OneToOne2_0Annotation.java
new file mode 100644
index 0000000..769a524
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OneToOne2_0Annotation.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OneToOne2_0Annotation
+	extends OneToOneAnnotation, OrphanRemovable2_0Annotation, RelationshipMapping2_0Annotation
+{}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OrderColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OrderColumn2_0Annotation.java
new file mode 100644
index 0000000..ae46d2a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OrderColumn2_0Annotation.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.OrderColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrderColumn2_0Annotation
+	extends NamedColumnAnnotation
+{
+	
+	String ANNOTATION_NAME = JPA2_0.ORDER_COLUMN;
+	
+	/**
+	 * Corresponds to the 'nullable' element of the OrderColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getNullable();
+		String NULLABLE_PROPERTY = "nullable"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'nullable' element of the OrderColumn annotation.
+	 * Set to null to remove the element.
+	 */
+	void setNullable(Boolean nullable);
+
+	/**
+	 * Return the {@link TextRange} for the 'nullable' element. If the element
+	 * does not exist return the {@link TextRange} for the OrderColumn annotation.
+	 */
+	TextRange getNullableTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'insertable' element of the OrderColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getInsertable();
+		String INSERTABLE_PROPERTY = "insertable"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'insertable' element of the OrderColumn annotation.
+	 * Set to null to remove the element.
+	 */
+	void setInsertable(Boolean insertable);
+
+	/**
+	 * Return the {@link TextRange} for the 'insertable' element. If the element
+	 * does not exist return the {@link TextRange} for the OrderColumn annotation.
+	 */
+	TextRange getInsertableTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'updatable' element of the OrderColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getUpdatable();
+		String UPDATABLE_PROPERTY = "updatable"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'updatable' element of the OrderColumn annotation.
+	 * Set to null to remove the element.
+	 */
+	void setUpdatable(Boolean updatable);
+
+	/**
+	 * Return the {@link TextRange} for the 'updatable' element. If the element
+	 * does not exist return the {@link TextRange} for the OrderColumn annotation.
+	 */
+	TextRange getUpdatableTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OrphanRemovable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OrphanRemovable2_0Annotation.java
new file mode 100644
index 0000000..c9a9e78
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/OrphanRemovable2_0Annotation.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface OrphanRemovable2_0Annotation
+{
+	// ********** orphan removal **********
+	/**
+	 * Corresponds to the orphanRemoval element of the OneToMany annotation.
+	 * Returns null if the orphanRemoval element does not exist in java.
+	 */
+	Boolean getOrphanRemoval();
+		String ORPHAN_REMOVAL_PROPERTY = "orphanRemoval"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the orphanRemoval element of the OneToMany annotation.
+	 * Set to null to remove the orphanRemoval element.
+	 */
+	void setOrphanRemoval(Boolean orphanRemoval);
+
+	/**
+	 * Return the {@link TextRange} for the orphanRemoval element.  If the orphanRemoval element 
+	 * does not exist return the {@link TextRange} for the OneToMany annotation.
+	 */
+	TextRange getOrphanRemovalTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java
new file mode 100644
index 0000000..7afcf1c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/RelationshipMapping2_0Annotation.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.RelationshipMappingAnnotation;
+
+/**
+ * Common protocol among 2.0
+ *     javax.persistence.ManyToOne
+ *     javax.persistence.ManyToMany
+ *     javax.persistence.OneToMany
+ *     javax.persistence.OneToOne
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface RelationshipMapping2_0Annotation
+	extends RelationshipMappingAnnotation
+{
+
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	boolean isCascadeDetach();	
+		String CASCADE_DETACH_PROPERTY = "cascadeDetach"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	void setCascadeDetach(boolean detach);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java
new file mode 100644
index 0000000..84aa062
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/SequenceGenerator2_0Annotation.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+* 
+* Contributors:
+*     Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * javax.persistence.SequenceGenerator
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface SequenceGenerator2_0Annotation
+	extends SequenceGeneratorAnnotation
+{
+	// ********** catalog **********
+	/**
+	 * Corresponds to the 'catalog' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getCatalog();
+		String CATALOG_PROPERTY = "catalog"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'catalog' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setCatalog(String catalog);
+
+	/**
+	 * Return the {@link TextRange} for the 'catalog' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getCatalogTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'catalog' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean catalogTouches(int pos, CompilationUnit astRoot);
+
+
+	// ********** schema **********
+
+	/**
+	 * Corresponds to the 'schema' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getSchema();
+		String SCHEMA_PROPERTY = "schema"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'schema' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setSchema(String schema);
+
+	/**
+	 * Return the {@link TextRange} for the 'schema' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getSchemaTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'schema' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean schemaTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/StaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/StaticMetamodelAnnotation.java
new file mode 100644
index 0000000..fdb3c27
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/jpa2/resource/java/StaticMetamodelAnnotation.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.jpa2.resource.java;
+
+import org.eclipse.jpt.core.resource.java.Annotation;
+
+/**
+ * Corresponds to the JPA 2.0 annotation
+ * <code>javax.persistence.metamodel.StaticMetamodel</code>
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface StaticMetamodelAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA2_0.STATIC_METAMODEL;
+
+	/**
+	 * Corresponds to the <code>value</code> element of the <code>StaticMetamodel</code> annotation.
+	 * Return <code>null</code> if the element does not exist in Java.
+	 * Return the portion of the value preceding <code>".class"</code>.
+	 * <pre>
+	 *     &#64;StaticMetamodel(value=Employee.class)
+	 * </pre>
+	 * will return <code>"Employee"</code>.
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the <code>value</code> element of the <code>StaticMetamodel</code> annotation.
+	 * Set to <code>null</code> to remove the element.
+	 */
+	void setValue(String value);
+	
+	/**
+	 * Return the <code>StaticMetamodel</code>'s fully-qualified class name as resolved by
+	 * the AST's bindings.
+	 * <pre>
+	 *     &#64;StaticMetamodel(Employee.class)
+	 * </pre>
+	 * will return <code>"model.Employee"</code> if there is an import for <code>model.Employee</code>.
+	 */
+	String getFullyQualifiedClassName();
+		String FULLY_QUALIFIED_CLASS_NAME_PROPERTY = "fullyQualifiedClassName"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/AbstractXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/AbstractXmlResourceProvider.java
new file mode 100644
index 0000000..803764e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/AbstractXmlResourceProvider.java
@@ -0,0 +1,371 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.jem.util.emf.workbench.FlexibleProjectResourceSet;
+import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
+import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.utility.internal.ListenerList;
+import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
+import org.eclipse.wst.common.componentcore.internal.impl.PlatformURLModuleConnection;
+import org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry;
+import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
+import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider;
+import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
+import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorImpl;
+import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public abstract class AbstractXmlResourceProvider
+	implements JpaXmlResourceProvider, ResourceStateInputProvider, ResourceStateValidator
+{
+	protected IProject project;
+	
+	protected URI fileUri;
+	
+	protected JpaXmlResource resource;
+	
+	protected IContentType contentType;
+	
+	protected final ResourceAdapter resourceAdapter = new ResourceAdapter();
+	
+	protected final ListenerList<JpaXmlResourceProviderListener> listenerList = new ListenerList<JpaXmlResourceProviderListener>(JpaXmlResourceProviderListener.class);
+	
+	protected ResourceStateValidator stateValidator;
+	
+	
+	/**
+	 * Create a new AbstractResourceModelProvider for the given project and 
+	 * resourcePath.  The resourcePath may be either a) an absolute platform 
+	 * resource path (e.g. "MyProject/src/META-INF/foobar.xml") or b) a relative 
+	 * deploy path (e.g. "META-INF/foobar.xml".)  In either case, 
+	 * {@link #buildFileUri(IPath)} will attempt to build an absolutely pathed 
+	 * URI for the given path.
+	 */
+	public AbstractXmlResourceProvider(IProject project, IPath resourcePath, IContentType contentType) {
+		super();
+		this.project = project;
+		this.fileUri = buildFileUri(resourcePath);
+		this.contentType = contentType;
+	}
+	
+	protected URI buildFileUri(IPath resourcePath) {
+		URI resourceUri = null;
+		
+		if (resourcePath.isAbsolute()) {
+			resourceUri = URI.createPlatformResourceURI(resourcePath.toString(), false);
+		}
+		else {
+			resourceUri = getModuleURI(URI.createURI(resourcePath.toString()));
+		}
+		
+		URIConverter uriConverter = getResourceSet().getURIConverter();
+		return uriConverter.normalize(resourceUri);
+	}
+	
+	/**
+	 * Return the resource, if it exists.  If no file exists for this resource, 
+	 * this will return a stub resource.  You must call #createResource() to 
+	 * create the file on the file system.
+	 */
+	public JpaXmlResource getXmlResource() {
+		if (this.resource == null) {
+			JpaXmlResource newResource = (JpaXmlResource) WorkbenchResourceHelper.getOrCreateResource(this.fileUri, getResourceSet());
+			//EMF caches resources based on URI.  If the resource has changed content types (say the schema was changed
+			//from orm to eclipselink-orm), then the resource will be of the wrong type and we need to create a new one.
+			if (newResource.getContentType().equals(this.contentType)) {
+				this.resource = newResource;
+			}
+			else {
+				this.createResourceAndLoad();
+			}
+		}
+		return this.resource;
+	}
+	
+	protected JpaXmlResource createResourceAndLoad() {
+		this.resource = createResource();
+		this.loadResource();
+		return this.resource;
+	}
+	
+	protected JpaXmlResource createResource() {
+		Resource.Factory resourceFactory = 
+			WTPResourceFactoryRegistry.INSTANCE.getFactory(this.fileUri, this.contentType.getDefaultDescription());
+		return (JpaXmlResource) ((FlexibleProjectResourceSet) getResourceSet()).createResource(this.fileUri, resourceFactory);		
+	}
+	
+	protected void loadResource() {
+		try {
+			this.resource.load(((FlexibleProjectResourceSet) getResourceSet()).getLoadOptions());
+		}
+		catch (IOException e) {
+			JptCorePlugin.log(e);
+		}
+	}
+	
+	protected void createResourceAndUnderlyingFile(Object config) {
+		this.resource = createResource();
+		if (this.resource.fileExists()) { //always possible that the file already exists when the jpa facet is added
+			loadResource();
+		}
+		else {
+			populateRoot(config);
+			try {
+				this.resource.saveIfNecessary(); //this writes out the file
+			}
+			catch (Exception e) {
+				JptCorePlugin.log(e);
+			}
+		}
+	}
+	
+	/**
+	 * This will actually create the underlying file and the JpaXmlResource that corresponds to it.
+	 * It also populates the root of the file.
+	 * @param config - A configuration object used to specify options for creation of the resource
+	 */
+	public JpaXmlResource createFileAndResource(final Object config) throws CoreException {
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) {
+				createResourceAndUnderlyingFile(config);
+			}
+		};
+		workspace.run(runnable, this.project, IWorkspace.AVOID_UPDATE, null);
+		return this.resource;	
+	}
+	
+	protected URI getModuleURI(URI uri) {
+		URI moduleuri = ModuleURIUtil.fullyQualifyURI(this.project);
+		IPath requestPath = new Path(moduleuri.path()).append(new Path(uri.path()));
+		URI resourceURI = URI.createURI(PlatformURLModuleConnection.MODULE_PROTOCOL + requestPath.toString());
+		return resourceURI;
+	}
+	
+	/**
+	 * Used to optionally fill in the root information of a resource if it does not 
+	 * exist as a file
+	 */
+	protected void populateRoot(Object config) {
+		//TODO potentially call resource.populateRoot() instead of the resourceProvider doing this
+	}
+	
+
+	/**
+	 * minimize the scope of the suppressed warnings
+	 */
+	protected EList<EObject> getResourceContents() {
+		return this.resource.getContents();
+	}
+
+	public void addListener(JpaXmlResourceProviderListener listener) {
+		if (this.listenerList.isEmpty()) {
+			engageResource();
+		}
+		this.listenerList.add(listener);
+	}
+	
+	public void removeListener(JpaXmlResourceProviderListener listener) {
+		this.listenerList.remove(listener);
+		if (this.listenerList.isEmpty()) {
+			disengageResource();
+		}
+	}
+	
+	private void engageResource() {
+		if (this.resource != null) {
+			this.resource.eAdapters().add(this.resourceAdapter);
+		}
+ 	}
+	
+	private void disengageResource() {
+		if (this.resource != null) {
+			this.resource.eAdapters().remove(this.resourceAdapter);
+		}
+	}
+	
+	protected ProjectResourceSet getResourceSet() {
+		return (ProjectResourceSet) WorkbenchResourceHelperBase.getResourceSet(project);
+	}
+	
+	public IProject getProject() {
+		return this.project;
+	}
+	
+	protected void resourceIsLoadedChanged(Resource aResource, boolean oldValue, boolean newValue) {
+		if ( ! this.listenerList.isEmpty()) {
+			int eventType= newValue ? JpaXmlResourceProviderEvent.RESOURCE_LOADED : JpaXmlResourceProviderEvent.RESOURCE_UNLOADED;
+			JpaXmlResourceProviderEvent evt = new JpaXmlResourceProviderEvent(this, eventType);
+			notifyListeners(evt);
+		}
+	}
+	
+	protected void notifyListeners(JpaXmlResourceProviderEvent event) {
+		NotifyRunner notifier = new NotifyRunner(event); 
+		for (JpaXmlResourceProviderListener listener : this.listenerList.getListeners()) {
+			notifier.setListener(listener);
+			SafeRunner.run(notifier);
+		}
+	}
+	
+	public IStatus validateEdit(Object context) {
+		IWorkspace work = ResourcesPlugin.getWorkspace();
+		IFile file = WorkbenchResourceHelper.getFile(this.resource);
+		if (file != null) {
+			IFile[] files = { file };
+			if (context == null) {
+				context = IWorkspace.VALIDATE_PROMPT;
+			}
+			return work.validateEdit(files, context);
+		} 
+		return Status.OK_STATUS;
+	}	
+	
+	// **************** ResourceStateValidator impl ****************************
+	
+	public ResourceStateValidator getStateValidator() {
+		if (this.stateValidator == null) {
+			this.stateValidator = createStateValidator();
+		}
+		return this.stateValidator;
+	}
+	
+	private ResourceStateValidator createStateValidator() {
+		return new ResourceStateValidatorImpl(this);
+	}
+	
+	public void checkActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
+		getStateValidator().checkActivation(presenter);	
+	}
+	
+	public void lostActivation(ResourceStateValidatorPresenter presenter) throws CoreException {
+		getStateValidator().lostActivation(presenter);	
+	}
+	
+	public IStatus validateState(ResourceStateValidatorPresenter presenter) throws CoreException {
+		if (presenter == null) {
+			return Status.OK_STATUS;
+		}
+		return getStateValidator().validateState(presenter);
+	}
+	
+	public boolean checkSave(ResourceStateValidatorPresenter presenter) throws CoreException {
+		return getStateValidator().checkSave(presenter);
+	}
+	
+	public boolean checkReadOnly() {
+		return getStateValidator().checkReadOnly();
+	}
+	
+	
+	// **************** ResourceStateInputProvider impl ************************
+	
+	public boolean isDirty() {	
+		return this.resource.isModified();
+	}
+	
+	@SuppressWarnings("unchecked")
+	public List getNonResourceFiles() {
+		return Collections.emptyList();
+	}
+	
+	@SuppressWarnings("unchecked")
+	public List getNonResourceInconsistentFiles() {
+		return Collections.emptyList();
+	}
+	
+	@SuppressWarnings("unchecked")
+	public List getResources() {
+		return Collections.singletonList(getXmlResource());
+	}
+	
+	@SuppressWarnings("unchecked")
+	public void cacheNonResourceValidateState(List roNonResourceFiles) {
+		// do nothing
+	}
+	
+	
+	// **************** member classes *****************************************
+	
+	protected class ResourceAdapter extends AdapterImpl {
+		@Override
+		public void notifyChanged(Notification notification) {
+			if ( notification.getEventType() == Notification.SET && notification.getFeatureID(null) == Resource.RESOURCE__IS_LOADED) {
+				resourceIsLoadedChanged((Resource) notification.getNotifier(), notification.getOldBooleanValue(), notification.getNewBooleanValue());
+			}
+		}
+	}
+	
+	
+	public static class NotifyRunner implements ISafeRunnable 
+	{
+		private final JpaXmlResourceProviderEvent event;
+		
+		private JpaXmlResourceProviderListener listener;
+		
+		
+		public NotifyRunner(JpaXmlResourceProviderEvent event) {
+			Assert.isNotNull(event);
+			this.event = event;
+		}
+		
+		
+		public void setListener(JpaXmlResourceProviderListener listener) {
+			this.listener = listener;
+		}
+		
+		public void run() throws Exception {
+			if (listener != null) {
+				listener.modelChanged(event);
+			}
+		}
+		
+		public void handleException(Throwable exception) { 
+			JptCorePlugin.log(exception);
+		}
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProvider.java
new file mode 100644
index 0000000..9f0ca0d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProvider.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JpaXmlResourceProvider
+{
+	JpaXmlResource getXmlResource();
+	
+	IStatus validateEdit(Object context);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProviderEvent.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProviderEvent.java
new file mode 100644
index 0000000..afeb867
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProviderEvent.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public class JpaXmlResourceProviderEvent
+{
+	public final static int RESOURCE_LOADED = 0x1;
+	
+	public final static int RESOURCE_UNLOADED = 0x2;
+	
+	
+	private JpaXmlResourceProvider modelProvider;
+	
+	private int type;
+	
+	
+	public JpaXmlResourceProviderEvent(JpaXmlResourceProvider modelProvider, int eventType) {
+		super();
+		this.modelProvider = modelProvider;
+		this.type = eventType;
+	}
+	
+	
+	public JpaXmlResourceProvider getModelProvider() {
+		return modelProvider;
+	}
+	
+	public int getType() {
+		return type;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProviderListener.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProviderListener.java
new file mode 100644
index 0000000..07f4d14
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/JpaXmlResourceProviderListener.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource;
+
+import java.util.EventListener;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JpaXmlResourceProviderListener
+	extends EventListener
+{
+	public void modelChanged(JpaXmlResourceProviderEvent event);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AccessType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AccessType.java
new file mode 100644
index 0000000..e139450
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AccessType.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+
+/**
+ * Corresponds to the JPA 2.0 enum
+ * javax.persistence.AccessType
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+// TODO move to jpa2 package? currently intertwined with 1.0 code...
+public enum AccessType {
+
+	FIELD(JPA2_0.ACCESS_TYPE__FIELD),
+	PROPERTY(JPA2_0.ACCESS_TYPE__PROPERTY);
+
+
+	private String javaAnnotationValue;
+
+	AccessType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static AccessType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static AccessType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (AccessType accessType : AccessType.values()) {
+			if (accessType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return accessType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(AccessType accessType) {
+		return (accessType == null) ? null : accessType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/Annotation.java
new file mode 100644
index 0000000..b28b635
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/Annotation.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+/**
+ * Common Java resource annotation behavior
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface Annotation
+	extends JavaResourceNode
+{
+	/**
+	 * Return the annotation's fully qualified name, as opposed to the value of
+	 * the annotation's 'name' element. For example:
+	 *     @com.foo.Bar(name="Thomas")
+	 * #getAnnotationName() will return "com.foo.Bar".
+	 * In typical subclasses, #getName() would return "Thomas".
+	 * @see JPA
+	 */
+	String getAnnotationName();
+
+	/**
+	 * Return the corresponding JDT DOM annotation from the specified
+	 * AST compilation unit.
+	 */
+	org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot);
+
+	/**
+	 * Create and add the corresponding Java annotation to the JDT DOM.
+	 */
+	void newAnnotation();
+
+	/**
+	 * Remove the corresponding Java annotation from the JDT DOM.
+	 */
+	void removeAnnotation();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationContainer.java
new file mode 100644
index 0000000..be4b5ab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationContainer.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+/**
+ * Common behavior for all annotation "containers".
+ * This interface is used mainly in
+ * {@link org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools}.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface AnnotationContainer<T extends NestableAnnotation>
+{
+	/**
+	 * Return the corresponding JDT DOM annotation from the specified
+	 * AST compilation unit. Used as a starting point when traversing the AST.
+	 */
+	org.eclipse.jdt.core.dom.Annotation getAstAnnotation(CompilationUnit astRoot);
+
+	/**
+	 * Return the name of the container annotation's element that is used
+	 * to indicate the nested annotations (typically "value").
+	 * Used when traversing the AST.
+	 */
+	String getElementName();
+
+	/**
+	 * Return the name of the nested annotations held by the container.
+	 * Used when traversing the AST.
+	 */
+	String getNestedAnnotationName();
+
+	/**
+	 * Return the nested annotations held by the container.
+	 */
+	Iterable<T> getNestedAnnotations();
+
+	/**
+	 * Return the number of nested annotations held by the container.
+	 */
+	int getNestedAnnotationsSize();
+
+	/**
+	 * Add a nested annotation to the container
+	 * without firing change notification.
+	 */
+	T addNestedAnnotation();
+
+	/**
+	 * The specified nested annotation was added to the container at the
+	 * specified index; notify interested parties.
+	 */
+	void syncAddNestedAnnotation(org.eclipse.jdt.core.dom.Annotation astAnnotation);
+
+	/**
+	 * Move the nested annotation at the specified source index in the
+	 * container to the specified target index without firing change notification.
+	 * Return the moved nested annotation.
+	 */
+	T moveNestedAnnotation(int targetIndex, int sourceIndex);
+
+	/**
+	 * Remove the nested annotation at the specified index from the
+	 * container without firing change notification.
+	 */
+	T removeNestedAnnotation(int index);
+
+	/**
+	 * Remove the nested annotations starting at the specified index from the
+	 * container; notify interested parties.
+	 */
+	void syncRemoveNestedAnnotations(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java
new file mode 100644
index 0000000..fe2149d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * Used to build Annotations discovered in the Java source code.
+ * To provide new AnnotationDefinitions, create a new JpaPlatform
+ * by implementing JpaPlatform and/or extending GenericJpaPlatform.
+ * 
+ * @see Annotation
+ * @see org.eclipse.jpt.core.JpaPlatform
+ * @see org.eclipse.jpt.core.internal.GenericJpaPlatform
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface AnnotationDefinition
+{
+	/**
+	 * Return the name of the annotation the definition will build in the
+	 * various #build...(...) methods.
+	 */
+	String getAnnotationName();
+	
+	/**
+	 * Build and return an annotation for the specified member.
+	 */
+	Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member);
+	
+	/**
+	 * Build and return an annotation for the specified JDT annotation
+	 * on the specified member.
+	 */
+	Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation);
+	
+	/**
+	 * Build and return a "null" annotation for the specified member.
+	 * Only certain annotations are required to have "null" implementations;
+	 * typically the annotations with reasonably complex default behavior.
+	 * The "null" annotation is used by the corresponding default context model.
+	 * The "null" annotation simplifies the context model code, allowing the
+	 * context model to simply set various bits of state (e.g. 'name') and the
+	 * "null" annotation will create a new "real" annotation and forward the
+	 * new state to it. This reduces the number of null checks in the context
+	 * model (hopefully).
+	 */
+	Annotation buildNullAnnotation(JavaResourcePersistentMember parent);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AssociationOverrideAnnotation.java
new file mode 100644
index 0000000..b4de2ad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AssociationOverrideAnnotation.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.AssociationOverride
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface AssociationOverrideAnnotation
+	extends OverrideAnnotation
+{
+	String ANNOTATION_NAME = JPA.ASSOCIATION_OVERRIDE;
+
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 * Return an empty iterator if the element does not exist in Java.
+	 */
+	ListIterator<JoinColumnAnnotation> joinColumns();
+		String JOIN_COLUMNS_LIST = "joinColumns"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 */
+	int joinColumnsSize();
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 */
+	JoinColumnAnnotation joinColumnAt(int index);
+	
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 */
+	int indexOfJoinColumn(JoinColumnAnnotation joinColumn);
+	
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 */
+	JoinColumnAnnotation addJoinColumn(int index);
+	
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 */
+	void moveJoinColumn(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the AssociationOverride annotation.
+	 */
+	void removeJoinColumn(int index);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AssociationOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AssociationOverridesAnnotation.java
new file mode 100644
index 0000000..ecdfe84
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AssociationOverridesAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.AssociationOverrides
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface AssociationOverridesAnnotation
+	extends ContainerAnnotation<NestableAssociationOverrideAnnotation>
+{
+	String ANNOTATION_NAME = JPA.ASSOCIATION_OVERRIDES;
+
+	String ASSOCIATION_OVERRIDES_LIST = "associationOverides"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AttributeOverrideAnnotation.java
new file mode 100644
index 0000000..85dbcb2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AttributeOverrideAnnotation.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.AttributeOverride
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface AttributeOverrideAnnotation
+	extends OverrideAnnotation
+{
+	String ANNOTATION_NAME = JPA.ATTRIBUTE_OVERRIDE;
+
+
+	/**
+	 * Corresponds to the 'column' element of the AttributeOverride annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	ColumnAnnotation getColumn();
+		String COLUMN_PROPERTY = "column"; //$NON-NLS-1$
+
+	ColumnAnnotation getNonNullColumn();
+
+	/**
+	 * Add the 'column' element to the AttributeOverride annotation.
+	 */
+	ColumnAnnotation addColumn();
+
+	/**
+	 * Remove the 'column' element from the AttributeOverride annotation.
+	 */
+	void removeColumn();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AttributeOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AttributeOverridesAnnotation.java
new file mode 100644
index 0000000..526208e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AttributeOverridesAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.AttributeOverrides
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface AttributeOverridesAnnotation
+	extends ContainerAnnotation<NestableAttributeOverrideAnnotation>
+{
+	String ANNOTATION_NAME = JPA.ATTRIBUTE_OVERRIDES;
+
+	String ATTRIBUTE_OVERRIDES_LIST = "attributeOverrides"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseColumnAnnotation.java
new file mode 100644
index 0000000..677417c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseColumnAnnotation.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among
+ *     javax.persistence.Column
+ *     javax.persistence.JoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface BaseColumnAnnotation
+	extends NamedColumnAnnotation
+{
+	/**
+	 * Corresponds to the 'unique' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getUnique();
+		String UNIQUE_PROPERTY = "unique"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'unique' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setUnique(Boolean unique);
+
+	/**
+	 * Return the {@link TextRange} for the 'unique' element. If the element
+	 * does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getUniqueTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'nullable' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getNullable();
+		String NULLABLE_PROPERTY = "nullable"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'nullable' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setNullable(Boolean nullable);
+
+	/**
+	 * Return the {@link TextRange} for the 'nullable' element. If the element
+	 * does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getNullableTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'insertable' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getInsertable();
+		String INSERTABLE_PROPERTY = "insertable"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'insertable' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setInsertable(Boolean insertable);
+
+	/**
+	 * Return the {@link TextRange} for the 'insertable' element. If the element
+	 * does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getInsertableTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'updatable' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getUpdatable();
+		String UPDATABLE_PROPERTY = "updatable"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'updatable' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setUpdatable(Boolean updatable);
+
+	/**
+	 * Return the {@link TextRange} for the 'updatable' element. If the element
+	 * does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getUpdatableTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'table' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getTable();
+		String TABLE_PROPERTY = "table"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'table' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setTable(String table);
+
+	/**
+	 * Return the {@link TextRange} for the 'table' element. If the element
+	 * does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getTableTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'table' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean tableTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseJoinColumnAnnotation.java
new file mode 100644
index 0000000..e2afac3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseJoinColumnAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among
+ *     javax.persistence.JoinColumn
+ *     javax.persistence.MapKeyJoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface BaseJoinColumnAnnotation
+	extends BaseColumnAnnotation
+{
+
+	/**
+	 * Corresponds to the 'referencedColumnName' element of the JoinColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getReferencedColumnName();
+		String REFERENCED_COLUMN_NAME_PROPERTY = "referencedColumnName"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'referencedColumnName' element of the JoinColumn annotation.
+	 * Set to null to remove the element.
+	 */
+	void setReferencedColumnName(String referencedColumnName);
+
+	/**
+	 * Return the {@link TextRange} for the 'referencedColumnName' element. If element
+	 * does not exist return the {@link TextRange} for the JoinColumn annotation.
+	 */
+	TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'referencedColumnName' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseNamedQueryAnnotation.java
new file mode 100644
index 0000000..0ba120a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseNamedQueryAnnotation.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among:
+ *     javax.persistence.NamedQuery
+ *     javax.persistence.NamedNativeQuery
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface BaseNamedQueryAnnotation
+	extends Annotation
+{
+	/**
+	 * Corresponds to the 'name' element of the *Query annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getName();	
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'name' element of the *Query annotation.
+	 * Set to null to remove the element.
+	 */
+	void setName(String name);
+	
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If element
+	 * does not exist return the {@link TextRange} for the *Query annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'query' element of the *Query annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getQuery();	
+		String QUERY_PROPERTY = "query"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'query' element of the *Query annotation.
+	 * Set to null to remove the element.
+	 */
+	void setQuery(String query);
+	
+	/**
+	 * Return the {@link TextRange} for the 'query' element. If element
+	 * does not exist return the {@link TextRange} for the *Query annotation.
+	 */
+	TextRange getQueryTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 * Return an empty iterator if the element does not exist in Java.
+	 */
+	ListIterator<QueryHintAnnotation> hints();
+		String HINTS_LIST = "hints"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 */
+	int hintsSize();
+
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 */
+	QueryHintAnnotation hintAt(int index);
+	
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 */
+	int indexOfHint(QueryHintAnnotation hint);
+	
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 */
+	QueryHintAnnotation addHint(int index);
+	
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 */
+	void moveHint(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the 'hints' element of the *Query annotation.
+	 */
+	void removeHint(int index);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseTableAnnotation.java
new file mode 100644
index 0000000..a59881c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BaseTableAnnotation.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among:
+ *     javax.persistence.Table
+ *     javax.persistence.JoinTable
+ *     javax.persistence.SecondaryTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface BaseTableAnnotation
+	extends Annotation
+{
+	
+	/**
+	 * Return true if the table annotation exists in Java, false if it does not.
+	 */
+	boolean isSpecified();
+	
+	/**
+	 * Corresponds to the 'name' element of the *Table annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'name' element of the *Table annotation.
+	 * Set to null to remove the element.
+	 */
+	void setName(String name);
+		
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If the element 
+	 * does not exist return the {@link TextRange} for the *Table annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'name' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean nameTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'schema' element of the *Table annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getSchema();
+		String SCHEMA_PROPERTY = "schema"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'schema' element of the *Table annotation.
+	 * Set to null to remove the element.
+	 */
+	void setSchema(String schema);
+	
+	/**
+	 * Return the {@link TextRange} for the 'schema' element. If the element 
+	 * does not exist return the {@link TextRange} for the *Table annotation.
+	 */
+	TextRange getSchemaTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'schema' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean schemaTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'catalog' element of the *Table annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getCatalog();
+		String CATALOG_PROPERTY = "catalog"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'catalog' element of the *Table annotation.
+	 * Set to null to remove the element.
+	 */
+	void setCatalog(String catalog);
+
+	/**
+	 * Return the {@link TextRange} for the 'catalog' element. If the element 
+	 * does not exist return the {@link TextRange} for the *Table annotation.
+	 */
+	TextRange getCatalogTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'catalog' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean catalogTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 * Return an empty iterator if the element does not exist in Java.
+	 */
+	ListIterator<UniqueConstraintAnnotation> uniqueConstraints();
+		String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 */
+	int uniqueConstraintsSize();
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 */
+	UniqueConstraintAnnotation uniqueConstraintAt(int index);
+	
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 */
+	int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint);
+	
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 */
+	UniqueConstraintAnnotation addUniqueConstraint(int index);
+	
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 */
+	void moveUniqueConstraint(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the *Table annotation.
+	 */
+	void removeUniqueConstraint(int index);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BasicAnnotation.java
new file mode 100644
index 0000000..4222b63
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/BasicAnnotation.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Basic
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface BasicAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.BASIC;
+
+	/**
+	 * Corresponds to the 'fetch' element of the Basic annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	FetchType getFetch();
+		String FETCH_PROPERTY = "fetch"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'fetch' element of the Basic annotation.
+	 * Set to null to remove the element.
+	 */
+	void setFetch(FetchType fetch);
+
+	/**
+	 * Return the {@link TextRange} for the 'fetch' element. If the element 
+	 * does not exist return the {@link TextRange} for the Basic annotation.
+	 */
+	TextRange getFetchTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'optional' element of the Basic annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getOptional();
+		String OPTIONAL_PROPERTY = "optional"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'optional' element of the Basic annotation.
+	 * Set to null to remove the element.
+	 */
+	void setOptional(Boolean optional);
+
+	/**
+	 * Return the {@link TextRange} for the 'optional' element.  If the element 
+	 * does not exist return the {@link TextRange} for the Basic annotation.
+	 */
+	TextRange getOptionalTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/CascadeType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/CascadeType.java
new file mode 100644
index 0000000..3b20066
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/CascadeType.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
+import org.eclipse.jpt.utility.internal.ArrayTools;
+
+/**
+ * Corresponds to the JPA 1.0/2.0 enum
+ * javax.persistence.CascadeType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public enum CascadeType {
+
+	ALL(JPA.CASCADE_TYPE__ALL),
+	PERSIST(JPA.CASCADE_TYPE__PERSIST),
+	MERGE(JPA.CASCADE_TYPE__MERGE),
+	REMOVE(JPA.CASCADE_TYPE__REMOVE),
+	REFRESH(JPA.CASCADE_TYPE__REFRESH),
+	DETACH(JPA2_0.CASCADE_TYPE__DETACH); //added in JPA 2.0
+
+
+	private String javaAnnotationValue;
+
+	CascadeType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static CascadeType[] fromJavaAnnotationValues(Object[] javaAnnotationValues) {
+		if (javaAnnotationValues == null) {
+			return EMPTY_CASCADE_TYPE_ARRAY;
+		}
+		if (javaAnnotationValues.length == 0) {
+			return EMPTY_CASCADE_TYPE_ARRAY;
+		}
+		//nulls will exist if there is a typo in one of the enums
+		javaAnnotationValues = ArrayTools.removeAllOccurrences(javaAnnotationValues, null);
+		int len = javaAnnotationValues.length;
+		CascadeType[] cascadeTypes = new CascadeType[len];
+		for (int i = 0; i < len; i++) {
+			cascadeTypes[i] = fromJavaAnnotationValue(javaAnnotationValues[i]);
+		}
+		return cascadeTypes;
+	}
+	private static final CascadeType[] EMPTY_CASCADE_TYPE_ARRAY = new CascadeType[0];
+
+	public static CascadeType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static CascadeType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (CascadeType cascadeType : CascadeType.values()) {
+			if (cascadeType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return cascadeType;
+			}
+		}
+		return null;
+	}
+
+	public static String[] toJavaAnnotationValues(CascadeType[] cascadeTypes) {
+		if (cascadeTypes == null) {
+			return EMPTY_STRING_ARRAY;
+		}
+		int len = cascadeTypes.length;
+		if (len == 0) {
+			return EMPTY_STRING_ARRAY;
+		}
+
+		String[] javaAnnotationValues = new String[len];
+		for (int i = 0; i < len; i++) {
+			javaAnnotationValues[i] = toJavaAnnotationValue(cascadeTypes[i]);
+		}
+		return javaAnnotationValues;
+	}
+	private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+	public static String toJavaAnnotationValue(CascadeType cascadeType) {
+		return (cascadeType == null) ? null : cascadeType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ColumnAnnotation.java
new file mode 100644
index 0000000..6d53f84
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ColumnAnnotation.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Column
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface ColumnAnnotation
+	extends BaseColumnAnnotation
+{
+	String ANNOTATION_NAME = JPA.COLUMN;
+
+	/**
+	 * Corresponds to the 'length' element of the Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Integer getLength();
+		String LENGTH_PROPERTY = "length"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'length' element of the Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setLength(Integer length);
+
+	/**
+	 * Return the {@link TextRange} for the 'length' element. If element
+	 * does not exist return the {@link TextRange} for the Column annotation.
+	 */
+	TextRange getLengthTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'precision' element of the Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Integer getPrecision();
+		String PRECISION_PROPERTY = "precision"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'precision' element of the Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setPrecision(Integer precision);
+
+	/**
+	 * Return the {@link TextRange} for the 'precision' element. If element
+	 * does not exist return the {@link TextRange} for the Column annotation.
+	 */
+	TextRange getPrecisionTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'scale' element of the Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Integer getScale();
+		String SCALE_PROPERTY = "scale"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'scale' element of the Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setScale(Integer scale);
+
+	/**
+	 * Return the {@link TextRange} for the 'scale' element. If element
+	 * does not exist return the {@link TextRange} for the Column annotation.
+	 */
+	TextRange getScaleTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ContainerAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ContainerAnnotation.java
new file mode 100644
index 0000000..8d4a8bd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ContainerAnnotation.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Common behavior for all "container" annotations.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface ContainerAnnotation<T extends NestableAnnotation>
+	extends Annotation, AnnotationContainer<T>
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorColumnAnnotation.java
new file mode 100644
index 0000000..45dad35
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorColumnAnnotation.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.DiscriminatorColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface DiscriminatorColumnAnnotation
+	extends NamedColumnAnnotation
+{
+	String ANNOTATION_NAME = JPA.DISCRIMINATOR_COLUMN;
+
+	/**
+	 * Corresponds to the 'discriminatorType' element of the DiscriminatorColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	DiscriminatorType getDiscriminatorType();
+		String DISCRIMINATOR_TYPE_PROPERTY = "discriminatorType"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'discriminatorType' element of the DiscriminatorColumn annotation.
+	 * Set the to null to remove the element.
+	 */
+	void setDiscriminatorType(DiscriminatorType discriminatorType);
+
+
+	/**
+	 * Corresponds to the 'length' element of the DiscriminatorColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Integer getLength();
+		String LENGTH_PROPERTY = "length"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'length' element of the DiscriminatorColumn annotation.
+	 * Set the to null to remove the element.
+	 */
+	void setLength(Integer length);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorType.java
new file mode 100644
index 0000000..379ad27
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorType.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA enum
+ * javax.persistence.DiscriminatorType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum DiscriminatorType {
+
+	STRING(JPA.DISCRIMINATOR_TYPE__STRING),
+	CHAR(JPA.DISCRIMINATOR_TYPE__CHAR),
+	INTEGER(JPA.DISCRIMINATOR_TYPE__INTEGER);
+
+
+	private String javaAnnotationValue;
+
+	DiscriminatorType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static DiscriminatorType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static DiscriminatorType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (DiscriminatorType discriminatorType : DiscriminatorType.values()) {
+			if (discriminatorType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return discriminatorType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(DiscriminatorType discriminatorType) {
+		return (discriminatorType == null) ? null : discriminatorType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorValueAnnotation.java
new file mode 100644
index 0000000..1daa24a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/DiscriminatorValueAnnotation.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.DiscriminatorValue
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface DiscriminatorValueAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.DISCRIMINATOR_VALUE;
+
+	/**
+	 * Corresponds to the 'value' element of the DiscriminatorValue annotation.
+	 * Return null if the element does not exist in the annotation.
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the DiscriminatorValue annotation.
+	 */
+	void setValue(String value);
+
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element
+	 * does not exist return the {@link TextRange} for the DiscriminatorValue annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddableAnnotation.java
new file mode 100644
index 0000000..6b36ce5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddableAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Embeddable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface EmbeddableAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.EMBEDDABLE;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddedAnnotation.java
new file mode 100644
index 0000000..09d32ad
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddedAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Embedded
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface EmbeddedAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.EMBEDDED;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddedIdAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddedIdAnnotation.java
new file mode 100644
index 0000000..2530c9e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EmbeddedIdAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.EmbeddedId
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface EmbeddedIdAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.EMBEDDED_ID;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EntityAnnotation.java
new file mode 100644
index 0000000..6a24311
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EntityAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Entity
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface EntityAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.ENTITY;
+
+	/**
+	 * Corresponds to the 'name' element of the Entity annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'name' element of the Entity annotation.
+	 * Set to null to remove the element.
+	 */
+	void setName(String name);
+
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If the element 
+	 * does not exist return the {@link TextRange} for the Entity annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EnumType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EnumType.java
new file mode 100644
index 0000000..5220dd3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EnumType.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA enum
+ * javax.persistence.EnumType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum EnumType {
+
+	ORDINAL(JPA.ENUM_TYPE__ORDINAL),
+	STRING(JPA.ENUM_TYPE__STRING);
+
+
+	private String javaAnnotationValue;
+
+	EnumType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static EnumType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static EnumType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (EnumType enumType : EnumType.values()) {
+			if (enumType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return enumType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(EnumType enumType) {
+		return (enumType == null) ? null : enumType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EnumeratedAnnotation.java
new file mode 100644
index 0000000..7b7ab85
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/EnumeratedAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Enumerated
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface EnumeratedAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.ENUMERATED;
+
+	/**
+	 * Corresponds to the 'value' element of the Enumerated annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	EnumType getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the Enumerated annotation.
+	 * Set to null to remove the element.
+	 */
+	void setValue(EnumType value);
+		
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the Enumerated annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/FetchType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/FetchType.java
new file mode 100644
index 0000000..c9bc5cb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/FetchType.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA enum
+ * javax.persistence.FetchType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum FetchType {
+
+	EAGER(JPA.FETCH_TYPE__EAGER),
+	LAZY(JPA.FETCH_TYPE__LAZY);
+
+
+	private String javaAnnotationValue;
+
+	FetchType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static FetchType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static FetchType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (FetchType fetchType : FetchType.values()) {
+			if (fetchType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return fetchType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(FetchType fetchType) {
+		return (fetchType == null) ? null : fetchType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GeneratedValueAnnotation.java
new file mode 100644
index 0000000..5c5b95f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GeneratedValueAnnotation.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.GeneratedValue
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface GeneratedValueAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.GENERATED_VALUE;
+
+	/**
+	 * Corresponds to the 'strategy' element of the GeneratedValue annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	GenerationType getStrategy();
+		String STRATEGY_PROPERTY = "strategy"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'strategy' element of the GeneratedValue annotation.
+	 * Set to null to remove the element.
+	 */
+	void setStrategy(GenerationType strategy);
+
+	/**
+	 * Return the {@link TextRange} for the 'strategy' element. If the element 
+	 * does not exist return the {@link TextRange} for the GeneratedValue annotation.
+	 */
+	TextRange getStrategyTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'generator' element of the GeneratedValue annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getGenerator();
+		String GENERATOR_PROPERTY = "generator"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'generator' element of the GeneratedValue annotation.
+	 * Set to null to remove the element.
+	 */
+	void setGenerator(String generator);
+
+	/**
+	 * Return the {@link TextRange} for the 'generator' element. If the element 
+	 * does not exist return the {@link TextRange} for the GeneratedValue annotation.
+	 */
+	TextRange getGeneratorTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'generator' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean generatorTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GenerationType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GenerationType.java
new file mode 100644
index 0000000..8977b6f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GenerationType.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA enum
+ * javax.persistence.GenerationType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum GenerationType {
+
+	TABLE(JPA.GENERATION_TYPE__TABLE),
+	SEQUENCE(JPA.GENERATION_TYPE__SEQUENCE),
+	IDENTITY(JPA.GENERATION_TYPE__IDENTITY),
+	AUTO(JPA.GENERATION_TYPE__AUTO);
+
+
+	private String javaAnnotationValue;
+
+	GenerationType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static GenerationType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static GenerationType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (GenerationType generationType : GenerationType.values()) {
+			if (generationType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return generationType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(GenerationType generationType) {
+		return (generationType == null) ? null : generationType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GeneratorAnnotation.java
new file mode 100644
index 0000000..c7ae630
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/GeneratorAnnotation.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among
+ *     javax.persistence.SequenceGenerator
+ *     javax.persistence.TableGenerator
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface GeneratorAnnotation
+	extends Annotation
+{
+	/**
+	 * Corresponds to the 'name' element of the *Generator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'name' element of the *Generator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the *Generator annotation will be removed as well.
+	 */
+	void setName(String name);
+
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If the element 
+	 * does not exist return the {@link TextRange} for the *Generator annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'initialValue' element of the *Generator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Integer getInitialValue();
+		String INITIAL_VALUE_PROPERTY = "initialValue"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'initialValue' element of the *Generator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the *Generator annotation will be removed as well.
+	 */
+	void setInitialValue(Integer initialValue);
+
+	/**
+	 * Return the {@link TextRange} for the 'initialValue' element. If the element 
+	 * does not exist return the {@link TextRange} for the *Generator annotation.
+	 */
+	TextRange getInitialValueTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'allocationSize' element of the *Generator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Integer getAllocationSize();
+		String ALLOCATION_SIZE_PROPERTY = "allocationSize"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'allocationSize' element of the *Generator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the *Generator annotation will be removed as well.
+	 */
+	void setAllocationSize(Integer allocationSize);
+
+	/**
+	 * Return the {@link TextRange} for the 'allocationSize' element. If the element 
+	 * does not exist return the {@link TextRange} for the *Generator annotation.
+	 */
+	TextRange getAllocationSizeTextRange(CompilationUnit astRoot);
+
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/IdAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/IdAnnotation.java
new file mode 100644
index 0000000..65ce3fc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/IdAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Id
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface IdAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.ID;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/IdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/IdClassAnnotation.java
new file mode 100644
index 0000000..f03c447
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/IdClassAnnotation.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * This interface corresponds to the JPA annotation
+ * javax.persistence.IdClass
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface IdClassAnnotation
+	extends Annotation
+{
+	final String ANNOTATION_NAME = JPA.ID_CLASS;
+
+	/**
+	 * Corresponds to the 'value' element of the IdClass annotation.
+	 * Return null if the element does not exist in Java.
+	 * Return the portion of the value preceding ".class".
+	 * <pre>
+	 *     &#64;IdClass(value=Employee.class)
+	 * </pre>
+	 * will return "Employee"
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'value' element of the IdClass annotation.
+	 * Set to null to remove the element.
+	 * This will also remove the IdClass annotation itself.
+	 */
+	void setValue(String value);
+
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the IdClass annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return the fully-qualified IdClass name as resolved by the AST's bindings.
+	 * <pre>
+	 *     &#64;IdClass(Employee.class)
+	 * </pre>
+	 * will return "model.Employee" if there is an import for model.Employee.
+	 */
+	String getFullyQualifiedClassName();
+		String FULLY_QUALIFIED_CLASS_NAME_PROPERTY = "fullyQualifiedClassName"; //$NON-NLS-1$
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/InheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/InheritanceAnnotation.java
new file mode 100644
index 0000000..b5e2a8d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/InheritanceAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Inheritance
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface InheritanceAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.INHERITANCE;
+
+	/**
+	 * Corresponds to the 'strategy' element of the Inheritance annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	InheritanceType getStrategy();
+		String STRATEGY_PROPERTY = "strategy"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'strategy' element of the Inheritance annotation.
+	 * Set to null to remove the element.
+	 */
+	void setStrategy(InheritanceType strategy);
+
+	/**
+	 * Return the {@link TextRange} for the 'strategy' element. If the element 
+	 * does not exist return the {@link TextRange} for the Inheritance annotation.
+	 */
+	TextRange getStrategyTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/InheritanceType.java
new file mode 100644
index 0000000..5d6b984
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/InheritanceType.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA enum
+ * javax.persistence.InheritanceType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum InheritanceType {
+
+	SINGLE_TABLE(JPA.INHERITANCE_TYPE__SINGLE_TABLE),
+	JOINED(JPA.INHERITANCE_TYPE__JOINED),
+	TABLE_PER_CLASS(JPA.INHERITANCE_TYPE__TABLE_PER_CLASS);
+
+
+	private String javaAnnotationValue;
+
+	InheritanceType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static InheritanceType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static InheritanceType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (InheritanceType inheritanceType : InheritanceType.values()) {
+			if (inheritanceType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return inheritanceType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(InheritanceType inheritanceType) {
+		return (inheritanceType == null) ? null : inheritanceType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JPA.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JPA.java
new file mode 100644
index 0000000..39bf5be
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JPA.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * JPA Java-related stuff (annotations etc.)
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+@SuppressWarnings("nls")
+public interface JPA {
+
+	// JPA package
+	String PACKAGE = "javax.persistence";
+	String PACKAGE_ = PACKAGE + '.';
+
+
+	// ********** API **********
+
+	// JPA annotations
+	String ASSOCIATION_OVERRIDE = PACKAGE_ + "AssociationOverride";
+		String ASSOCIATION_OVERRIDE__NAME = "name";
+		String ASSOCIATION_OVERRIDE__JOIN_COLUMNS = "joinColumns";
+	String ASSOCIATION_OVERRIDES = PACKAGE_ + "AssociationOverrides";
+		String ASSOCIATION_OVERRIDES__VALUE = "value";
+	String ATTRIBUTE_OVERRIDE = PACKAGE_ + "AttributeOverride";
+		String ATTRIBUTE_OVERRIDE__NAME = "name";
+		String ATTRIBUTE_OVERRIDE__COLUMN = "column";
+	String ATTRIBUTE_OVERRIDES = PACKAGE_ + "AttributeOverrides";
+		String ATTRIBUTE_OVERRIDES__VALUE = "value";
+	String BASIC = PACKAGE_ + "Basic";
+		String BASIC__FETCH = "fetch";
+		String BASIC__OPTIONAL = "optional";
+	String COLUMN = PACKAGE_ + "Column";
+		String COLUMN__NAME = "name";
+		String COLUMN__UNIQUE = "unique";
+		String COLUMN__NULLABLE = "nullable";
+		String COLUMN__INSERTABLE = "insertable";
+		String COLUMN__UPDATABLE = "updatable";
+		String COLUMN__COLUMN_DEFINITION = "columnDefinition";
+		String COLUMN__TABLE = "table";
+		String COLUMN__LENGTH = "length";
+		String COLUMN__PRECISION = "precision";
+		String COLUMN__SCALE = "scale";
+	String COLUMN_RESULT = PACKAGE_ + "ColumnResult";
+		String COLUMN_RESULT__NAME = "name";
+	String DISCRIMINATOR_COLUMN = PACKAGE_ + "DiscriminatorColumn";
+		String DISCRIMINATOR_COLUMN__NAME = "name";
+		String DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = "discriminatorType";
+		String DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = "columnDefinition";
+		String DISCRIMINATOR_COLUMN__LENGTH = "length";
+	String DISCRIMINATOR_VALUE = PACKAGE_ + "DiscriminatorValue";
+		String DISCRIMINATOR_VALUE__VALUE = "value";
+	String EMBEDDABLE = PACKAGE_ + "Embeddable";
+	String EMBEDDED = PACKAGE_ + "Embedded";
+	String EMBEDDED_ID = PACKAGE_ + "EmbeddedId";
+	String ENTITY = PACKAGE_ + "Entity";
+		String ENTITY__NAME = "name";
+	String ENTITY_LISTENERS = PACKAGE_ + "EntityListeners";
+		String ENTITY_LISTENERS__VALUE = "value";
+	String ENTITY_RESULT = PACKAGE_ + "EntityResult";
+		String ENTITY_RESULT__ENTITY_CLASS = "entityClass";
+		String ENTITY_RESULT__FIELDS = "fields";
+		String ENTITY_RESULT__DISCRIMINATOR_COLUMN = "discriminatorColumn";
+	String ENUMERATED = PACKAGE_ + "Enumerated";
+		String ENUMERATED__VALUE = "value";
+	String EXCLUDE_DEFAULT_LISTENERS = PACKAGE_ + "ExcludeDefaultListeners";
+	String EXCLUDE_SUPERCLASS_LISTENERS = PACKAGE_ + "ExcludeSuperclassListeners";
+	String FIELD_RESULT = PACKAGE_ + "FieldResult";
+		String FIELD_RESULT__NAME = "name";
+		String FIELD_RESULT__COLUMN = "column";
+	String FLUSH_MODE = PACKAGE_ + "FlushMode";
+		String FLUSH_MODE__VALUE = "value";
+	String GENERATED_VALUE = PACKAGE_ + "GeneratedValue";
+		String GENERATED_VALUE__STRATEGY = "strategy";
+		String GENERATED_VALUE__GENERATOR = "generator";
+	String ID = PACKAGE_ + "Id";
+	String ID_CLASS = PACKAGE_ + "IdClass";
+		String ID_CLASS__VALUE = "value";
+	String INHERITANCE = PACKAGE_ + "Inheritance";
+		String INHERITANCE__STRATEGY = "strategy";
+	String JOIN_COLUMN = PACKAGE_ + "JoinColumn";
+		String JOIN_COLUMN__NAME = "name";
+		String JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
+		String JOIN_COLUMN__UNIQUE = "unique";
+		String JOIN_COLUMN__NULLABLE = "nullable";
+		String JOIN_COLUMN__INSERTABLE = "insertable";
+		String JOIN_COLUMN__UPDATABLE = "updatable";
+		String JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
+		String JOIN_COLUMN__TABLE = "table";
+	String JOIN_COLUMNS = PACKAGE_ + "JoinColumns";
+		String JOIN_COLUMNS__VALUE = "value";
+	String JOIN_TABLE = PACKAGE_ + "JoinTable";
+		String JOIN_TABLE__NAME = "name";
+		String JOIN_TABLE__CATALOG = "catalog";
+		String JOIN_TABLE__SCHEMA = "schema";
+		String JOIN_TABLE__JOIN_COLUMNS = "joinColumns";
+		String JOIN_TABLE__INVERSE_JOIN_COLUMNS = "inverseJoinColumns";
+		String JOIN_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
+	String LOB = PACKAGE_ + "Lob";
+	String MANY_TO_MANY = PACKAGE_ + "ManyToMany";
+		String MANY_TO_MANY__TARGET_ENTITY = "targetEntity";
+		String MANY_TO_MANY__CASCADE = "cascade";
+		String MANY_TO_MANY__FETCH = "fetch";
+		String MANY_TO_MANY__MAPPED_BY = "mappedBy";
+	String MANY_TO_ONE = PACKAGE_ + "ManyToOne";
+		String MANY_TO_ONE__TARGET_ENTITY = "targetEntity";
+		String MANY_TO_ONE__CASCADE = "cascade";
+		String MANY_TO_ONE__FETCH = "fetch";
+		String MANY_TO_ONE__OPTIONAL = "optional";
+	String MAP_KEY = PACKAGE_ + "MapKey";
+		String MAP_KEY__NAME = "name";
+	String MAPPED_SUPERCLASS = PACKAGE_ + "MappedSuperclass";
+	String NAMED_NATIVE_QUERIES = PACKAGE_ + "NamedNativeQueries";
+		String NAMED_NATIVE_QUERIES__VALUE = "value";
+	String NAMED_NATIVE_QUERY = PACKAGE_ + "NamedNativeQuery";
+		String NAMED_NATIVE_QUERY__NAME = "name";
+		String NAMED_NATIVE_QUERY__QUERY = "query";
+		String NAMED_NATIVE_QUERY__HINTS = "hints";
+		String NAMED_NATIVE_QUERY__RESULT_CLASS = "resultClass";
+		String NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = "resultSetMapping";
+	String NAMED_QUERIES = PACKAGE_ + "NamedQueries";
+		String NAMED_QUERIES__VALUE = "value";
+	String NAMED_QUERY = PACKAGE_ + "NamedQuery";
+		String NAMED_QUERY__NAME = "name";
+		String NAMED_QUERY__QUERY = "query";
+		String NAMED_QUERY__HINTS = "hints";
+	String ONE_TO_MANY = PACKAGE_ + "OneToMany";
+		String ONE_TO_MANY__TARGET_ENTITY = "targetEntity";
+		String ONE_TO_MANY__CASCADE = "cascade";
+		String ONE_TO_MANY__FETCH = "fetch";
+		String ONE_TO_MANY__MAPPED_BY = "mappedBy";
+	String ONE_TO_ONE = PACKAGE_ + "OneToOne";
+		String ONE_TO_ONE__TARGET_ENTITY = "targetEntity";
+		String ONE_TO_ONE__CASCADE = "cascade";
+		String ONE_TO_ONE__FETCH = "fetch";
+		String ONE_TO_ONE__OPTIONAL = "optional";
+		String ONE_TO_ONE__MAPPED_BY = "mappedBy";
+	String ORDER_BY = PACKAGE_ + "OrderBy";
+		String ORDER_BY__VALUE = "value";
+	String PERSISTENCE_CONTEXT = PACKAGE_ + "PersistenceContext";
+		String PERSISTENCE_CONTEXT__NAME = "name";
+		String PERSISTENCE_CONTEXT__UNIT_NAME = "unitName";
+		String PERSISTENCE_CONTEXT__TYPE = "type";
+	String PERSISTENCE_CONTEXTS = PACKAGE_ + "PersistenceContexts";
+		String PERSISTENCE_CONTEXTS__VALUE = "value";
+	String PERSISTENCE_UNIT = PACKAGE_ + "XmlPersistenceUnit";
+		String PERSISTENCE_UNIT__NAME = "name";
+		String PERSISTENCE_UNIT__UNIT_NAME = "unitName";
+	String PERSISTENCE_UNITS = PACKAGE_ + "PersistenceUnits";
+		String PERSISTENCE_UNITS__VALUE = "value";
+	String POST_LOAD = PACKAGE_ + "PostLoad";
+	String POST_PERSIST = PACKAGE_ + "PostPersist";
+	String POST_REMOVE = PACKAGE_ + "PostRemove";
+	String POST_UPDATE = PACKAGE_ + "PostUpdate";
+	String PRE_PERSIST = PACKAGE_ + "PrePersist";
+	String PRE_REMOVE = PACKAGE_ + "PreRemove";
+	String PRE_UPDATE = PACKAGE_ + "PreUpdate";
+	String PRIMARY_KEY_JOIN_COLUMN = PACKAGE_ + "PrimaryKeyJoinColumn";
+		String PRIMARY_KEY_JOIN_COLUMN__NAME = "name";
+		String PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = "referencedColumnName";
+		String PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = "columnDefinition";
+	String PRIMARY_KEY_JOIN_COLUMNS = PACKAGE_ + "PrimaryKeyJoinColumns";
+		String PRIMARY_KEY_JOIN_COLUMNS__VALUE = "value";
+	String QUERY_HINT = PACKAGE_ + "QueryHint";
+		String QUERY_HINT__NAME = "name";
+		String QUERY_HINT__VALUE = "value";
+	String SECONDARY_TABLE = PACKAGE_ + "SecondaryTable";
+		String SECONDARY_TABLE__NAME = "name";
+		String SECONDARY_TABLE__CATALOG = "catalog";
+		String SECONDARY_TABLE__SCHEMA = "schema";
+		String SECONDARY_TABLE__PK_JOIN_COLUMNS = "pkJoinColumns";
+		String SECONDARY_TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
+	String SECONDARY_TABLES = PACKAGE_ + "SecondaryTables";
+		String SECONDARY_TABLES__VALUE = "value";
+	String SEQUENCE_GENERATOR = PACKAGE_ + "SequenceGenerator";
+		String SEQUENCE_GENERATOR__NAME = "name";
+		String SEQUENCE_GENERATOR__SEQUENCE_NAME = "sequenceName";
+		String SEQUENCE_GENERATOR__INITIAL_VALUE = "initialValue";
+		String SEQUENCE_GENERATOR__ALLOCATION_SIZE = "allocationSize";
+	String SQL_RESULT_SET_MAPPING = PACKAGE_ + "SqlResultSetMapping";
+		String SQL_RESULT_SET_MAPPING__NAME = "name";
+		String SQL_RESULT_SET_MAPPING__ENTITIES = "entities";
+		String SQL_RESULT_SET_MAPPING__COLUMNS = "columns";
+	String TABLE = PACKAGE_ + "Table";
+		String TABLE__NAME = "name";
+		String TABLE__CATALOG = "catalog";
+		String TABLE__SCHEMA = "schema";
+		String TABLE__UNIQUE_CONSTRAINTS = "uniqueConstraints";
+	String TABLE_GENERATOR = PACKAGE_ + "TableGenerator";
+		String TABLE_GENERATOR__NAME = "name";
+		String TABLE_GENERATOR__TABLE = "table";
+		String TABLE_GENERATOR__CATALOG = "catalog";
+		String TABLE_GENERATOR__SCHEMA = "schema";
+		String TABLE_GENERATOR__PK_COLUMN_NAME = "pkColumnName";
+		String TABLE_GENERATOR__VALUE_COLUMN_NAME = "valueColumnName";
+		String TABLE_GENERATOR__PK_COLUMN_VALUE = "pkColumnValue";
+		String TABLE_GENERATOR__INITIAL_VALUE = "initialValue";
+		String TABLE_GENERATOR__ALLOCATION_SIZE = "allocationSize";
+		String TABLE_GENERATOR__UNIQUE_CONSTRAINTS = "uniqueConstraints";
+	String TEMPORAL = PACKAGE_ + "Temporal";
+		String TEMPORAL__VALUE = "value";
+	String TRANSIENT = PACKAGE_ + "Transient";
+	String UNIQUE_CONSTRAINT = PACKAGE_ + "UniqueConstraint";
+		String UNIQUE_CONSTRAINT__COLUMN_NAMES = "columnNames";
+	String VERSION = PACKAGE_ + "Version";
+
+	// JPA enums
+	String CASCADE_TYPE = PACKAGE_ + "CascadeType";
+		String CASCADE_TYPE_ = CASCADE_TYPE + '.';
+		String CASCADE_TYPE__ALL = CASCADE_TYPE_ + "ALL";
+		String CASCADE_TYPE__MERGE = CASCADE_TYPE_ + "MERGE";
+		String CASCADE_TYPE__PERSIST = CASCADE_TYPE_ + "PERSIST";
+		String CASCADE_TYPE__REFRESH = CASCADE_TYPE_ + "REFRESH";
+		String CASCADE_TYPE__REMOVE = CASCADE_TYPE_ + "REMOVE";
+
+	String DISCRIMINATOR_TYPE = PACKAGE_ + "DiscriminatorType";
+		String DISCRIMINATOR_TYPE_ = DISCRIMINATOR_TYPE + '.';
+		String DISCRIMINATOR_TYPE__CHAR = DISCRIMINATOR_TYPE_ + "CHAR";
+		String DISCRIMINATOR_TYPE__INTEGER = DISCRIMINATOR_TYPE_ + "INTEGER";
+		String DISCRIMINATOR_TYPE__STRING = DISCRIMINATOR_TYPE_ + "STRING";
+
+	String ENUM_TYPE = PACKAGE_ + "EnumType";
+		String ENUM_TYPE_ = ENUM_TYPE + '.';
+		String ENUM_TYPE__ORDINAL = ENUM_TYPE_ + "ORDINAL";
+		String ENUM_TYPE__STRING = ENUM_TYPE_ + "STRING";
+
+	String FETCH_TYPE = PACKAGE_ + "FetchType";
+		String FETCH_TYPE_ = FETCH_TYPE + '.';
+		String FETCH_TYPE__EAGER = FETCH_TYPE_ + "EAGER";
+		String FETCH_TYPE__LAZY = FETCH_TYPE_ + "LAZY";
+
+	String FLUSH_MODE_TYPE = PACKAGE_ + "FlushModeType";
+		String FLUSH_MODE_TYPE_ = FLUSH_MODE_TYPE + '.';
+		String FLUSH_MODE_TYPE__AUTO = FLUSH_MODE_TYPE_ + "AUTO";
+		String FLUSH_MODE_TYPE__COMMIT = FLUSH_MODE_TYPE_ + "COMMIT";
+
+	String GENERATION_TYPE = PACKAGE_ + "GenerationType";
+		String GENERATION_TYPE_ = GENERATION_TYPE + '.';
+		String GENERATION_TYPE__AUTO = GENERATION_TYPE_ + "AUTO";
+		String GENERATION_TYPE__IDENTITY = GENERATION_TYPE_ + "IDENTITY";
+		String GENERATION_TYPE__SEQUENCE = GENERATION_TYPE_ + "SEQUENCE";
+		String GENERATION_TYPE__TABLE = GENERATION_TYPE_ + "TABLE";
+
+	String INHERITANCE_TYPE = PACKAGE_ + "InheritanceType";
+		String INHERITANCE_TYPE_ = INHERITANCE_TYPE + '.';
+		String INHERITANCE_TYPE__JOINED = INHERITANCE_TYPE_ + "JOINED";
+		String INHERITANCE_TYPE__SINGLE_TABLE = INHERITANCE_TYPE_ + "SINGLE_TABLE";
+		String INHERITANCE_TYPE__TABLE_PER_CLASS = INHERITANCE_TYPE_ + "TABLE_PER_CLASS";
+
+	String PERSISTENCE_CONTEXT_TYPE = PACKAGE_ + "PersistenceContextType";
+		String PERSISTENCE_CONTEXT_TYPE_ = PERSISTENCE_CONTEXT_TYPE + '.';
+		String PERSISTENCE_CONTEXT_TYPE__EXTENDED = PERSISTENCE_CONTEXT_TYPE_ + "EXTENDED";
+		String PERSISTENCE_CONTEXT_TYPE__TRANSACTION = PERSISTENCE_CONTEXT_TYPE_ + "TRANSACTION";
+
+	String TEMPORAL_TYPE = PACKAGE_ + "TemporalType";
+		String TEMPORAL_TYPE_ = TEMPORAL_TYPE + '.';
+		String TEMPORAL_TYPE__DATE = TEMPORAL_TYPE_ + "DATE";
+		String TEMPORAL_TYPE__TIME = TEMPORAL_TYPE_ + "TIME";
+		String TEMPORAL_TYPE__TIMESTAMP = TEMPORAL_TYPE_ + "TIMESTAMP";
+
+	// JPA interfaces
+	String ENTITY_MANAGER = PACKAGE_ + "EntityManager";
+	String ENTITY_MANAGER_FACTORY = PACKAGE_ + "EntityManagerFactory";
+	String ENTITY_TRANSACTION = PACKAGE_ + "EntityTransaction";
+	String INSTRUMENTABLE_CLASS_LOADER = PACKAGE_ + "InstrumentableClassLoader";
+	String QUERY = PACKAGE_ + "Query";
+
+	// JPA classes
+	String PERSISTENCE = PACKAGE_ + "XmlPersistence";
+
+	// JPA exceptions
+	String NON_UNIQUE_RESULT_EXCEPTION = PACKAGE_ + "NonUniqueResultException";
+	String OBJECT_NOT_FOUND_EXCEPTION = PACKAGE_ + "ObjectNotFoundException";
+	String PERSISTENCE_EXCEPTION = PACKAGE_ + "PersistenceException";
+
+
+	// ********** SPI **********
+
+	// JPA SPI package
+	String SPI_PACKAGE = PACKAGE_ + "spi";
+	String SPI_PACKAGE_ = SPI_PACKAGE + '.';
+
+	// JPA SPI interfaces
+	String ENTITY_MANAGER_FACTORY_PROVIDER = SPI_PACKAGE_ + "EntityManagerFactoryProvider";
+	String PERSISTENCE_INFO = SPI_PACKAGE_ + "PersistenceInfo";
+	String PERSISTENCE_PROVIDER = SPI_PACKAGE_ + "PersistenceProvider";
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceClassFile.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceClassFile.java
new file mode 100644
index 0000000..68b71ae
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceClassFile.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+
+/**
+ * Java class file
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaResourceClassFile
+	extends JavaResourceNode
+{
+	/**
+	 * Return the class file's persistent type.
+	 */
+	JavaResourcePersistentType getPersistentType();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceCompilationUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceCompilationUnit.java
new file mode 100644
index 0000000..356e047
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceCompilationUnit.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.utility.CommandExecutor;
+
+/**
+ * Dali resource for JDT compilation unit.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JavaResourceCompilationUnit
+	extends JavaResourceNode.Root
+{
+	/**
+	 * Return the corresponding JDT compilation unit.
+	 */
+	ICompilationUnit getCompilationUnit();
+
+	/**
+	 * Return the JPA project's annotation formatter. This is used to make any
+	 * manipulated annotations reasonably readable after being written to the
+	 * Java source file.
+	 */
+	AnnotationEditFormatter getAnnotationEditFormatter();
+
+	/**
+	 * This allows the resource model to modify the Java source code on the
+	 * UI thread when it is executing on another thread.
+	 */
+	CommandExecutor getModifySharedDocumentCommandExecutor();
+
+	/**
+	 * Resolve type information that could be dependent on other files being
+	 * added/removed.
+	 */
+	void resolveTypes();
+
+	/**
+	 * Something in Java has changed (typically either the compilation unit's
+	 * source code or the Java classpath); synchronize the compilation unit's
+	 * state with the Java source code etc.
+	 */
+	void synchronizeWithJavaSource();
+
+	/**
+	 * Build an AST for the compilation unit with its bindings resolved.
+	 */
+	CompilationUnit buildASTRoot();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceNode.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceNode.java
new file mode 100644
index 0000000..552a88b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceNode.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.JpaAnnotationProvider;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.model.Model;
+
+/**
+ * Common interface for Java resource nodes (source code or binary).
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaResourceNode
+	extends Model
+{
+
+	/**
+	 * Return the Eclipse file that contains the Java resource node
+	 * (typically either a Java source code file or a JAR).
+	 */
+	IFile getFile();
+
+	/**
+	 * Return the root of the Java resource containment hierarchy
+	 * (typically either a compilation unit or a package fragment root).
+	 */
+	Root getRoot();
+
+	/**
+	 * Return the [source] node's root (the compilation unit).
+	 */
+	// TODO get rid of this method...?
+	JavaResourceCompilationUnit getJavaResourceCompilationUnit();
+
+	/**
+	 * Return the [source] node's text range in the compilation unit's file.
+	 */
+	TextRange getTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Initialize the [source] node from the specified AST.
+	 */
+	void initialize(CompilationUnit astRoot);
+
+	/**
+	 * Synchronize the [source] node with the specified AST.
+	 */
+	void synchronizeWith(CompilationUnit astRoot);
+
+
+	/**
+	 * Root of Java resource model containment hierarchy.
+	 */
+	interface Root extends JavaResourceNode, JpaResourceModel {
+
+		/**
+		 * Return the root's Java resource persistent types.
+		 */
+		Iterator<JavaResourcePersistentType> persistentTypes();
+			String PERSISTENT_TYPES_COLLECTION = "persistentTypes"; //$NON-NLS-1$
+
+		/**
+		 * Called (via a hook in change notification) whenever anything in the
+		 * Java resource model changes. Forwarded to listeners.
+		 */
+		void resourceModelChanged();
+
+		/**
+		 * Return the annotation provider that supplies the annotations found
+		 * in the Java resource model.
+		 */
+		JpaAnnotationProvider getAnnotationProvider();
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePackageFragment.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePackageFragment.java
new file mode 100644
index 0000000..1a2d4d7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePackageFragment.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+
+/**
+ * Java package fragment
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaResourcePackageFragment
+	extends JavaResourceNode
+{
+	/**
+	 * Return the package fragment's class files that contain "persistable" types.
+	 */
+	Iterator<JavaResourceClassFile> classFiles();
+		String CLASS_FILES_COLLECTION = "classFiles"; //$NON-NLS-1$
+
+	/**
+	 * Return the size of the package fragment's class files.
+	 */
+	int classFilesSize();
+
+	/**
+	 * Return the package fragment's Java persistent types.
+	 * Return only the files that are annotated with JPA annotations.
+	 */
+	Iterator<JavaResourcePersistentType> persistedTypes();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePackageFragmentRoot.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePackageFragmentRoot.java
new file mode 100644
index 0000000..6b9db9c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePackageFragmentRoot.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+
+/**
+ * Java package fragement root
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface JavaResourcePackageFragmentRoot
+	extends JavaResourceNode.Root
+{
+	/**
+	 * Return the package fragment root's package fragments.
+	 */
+	Iterator<JavaResourcePackageFragment> packageFragments();
+		String PACKAGE_FRAGMENTS_COLLECTION = "packageFragments"; //$NON-NLS-1$
+
+	/**
+	 * Return the size of the package fragment root's package fragments.
+	 */
+	int packageFragmentsSize();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentAttribute.java
new file mode 100644
index 0000000..f06e950
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentAttribute.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+import java.util.ListIterator;
+import org.eclipse.jpt.utility.MethodSignature;
+
+/**
+ * Java source code or binary persistent attribute (field or property)
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+//TODO handle:
+//  @Basic
+//  private String foo, bar;
+public interface JavaResourcePersistentAttribute
+	extends JavaResourcePersistentMember
+{
+	/**
+	 * The Java resource persistent attribute's name does not change.
+	 */
+	String getName();
+	
+	/**
+	 * Return a null annotation for the specified annotation name.
+	 * Return null if the specified annotation name is null.
+	 * The corresponding AnnotationDefinition must implement #buildNullAnnotation()
+	 * {@link AnnotationDefinition#buildNullAnnotation(JavaResourcePersistentMember,
+	 * org.eclipse.jpt.core.utility.jdt.Member)}
+	 */
+	Annotation buildNullAnnotation(String annotationName);
+	
+	/**
+	 * Whether the Java resource persistent attribute is a field does not change.
+	 */
+	boolean isField();
+
+	/**
+	 * Whether the Java resource persistent attribute is a property does not change.
+	 */
+	boolean isProperty();
+
+	/**
+	 * Return the access type explicitly specified by the javax.persistence.Access annotation.
+	 * Return null if the Access annotation is not present. 
+	 * For JPA 1.0 this is always going to return null; Access annotation is not supported in 1.0.
+	 */
+	AccessType getSpecifiedAccess();
+
+	/**
+	 * Return whether the attribute's type implements or extends the specified
+	 * type.
+	 */
+	boolean typeIsSubTypeOf(String typeName);
+
+	/**
+	 * Return whether the attribute's type is a "variable" primitive type
+	 * (i.e. any primitive type except 'void').
+	 */
+	boolean typeIsVariablePrimitive();
+
+	/**
+	 * Return whether the Java resource persistent attribute is for the specified
+	 * method.
+	 */
+	boolean isFor(MethodSignature methodSignature, int occurrence);
+
+	/**
+	 * @see java.lang.reflect.Modifier
+	 */
+	int getModifiers();
+		String MODIFIERS_PROPERTY = "modifiers"; //$NON-NLS-1$
+
+	/**
+	 * Return the resolved, qualified name of the attribute's type
+	 * (e.g. "java.util.Collection" or "byte[]").
+	 * If the type is an array, this name will include the appropriate number
+	 * of bracket pairs.
+	 * This name will not include the type's generic type arguments
+	 * (e.g. "java.util.Collection<java.lang.String>" will only return
+	 * "java.util.Collection").
+	 * @see #typeTypeArgumentNames()
+	 */
+	String getTypeName();
+		String TYPE_NAME_PROPERTY = "typeName"; //$NON-NLS-1$
+
+	/**
+	 * Return whether the attribute type is an interface.
+	 */
+	boolean typeIsInterface();
+		String TYPE_IS_INTERFACE_PROPERTY = "typeIsInterface"; //$NON-NLS-1$
+
+	/**
+	 * Return whether the attribute type is an enum.
+	 */
+	boolean typeIsEnum();
+		String TYPE_IS_ENUM_PROPERTY = "typeIsEnum"; //$NON-NLS-1$
+
+	/**
+	 * Return the names of the attribute type's superclasses.
+	 */
+	ListIterator<String> typeSuperclassNames();
+		String TYPE_SUPERCLASS_NAMES_LIST = "typeSuperclassNames"; //$NON-NLS-1$
+
+	/**
+	 * Return the names of the attribute type's interfaces.
+	 */
+	Iterator<String> typeInterfaceNames();
+		String TYPE_INTERFACE_NAMES_COLLECTION = "typeInterfaceNames"; //$NON-NLS-1$
+
+	/**
+	 * Return the names of the attribute type's type arguments.
+	 * The name for any argument that is an array will contain the appropriate
+	 * number of bracket pairs.
+	 * The names will not include any further generic type arguments.
+	 */
+	ListIterator<String> typeTypeArgumentNames();
+		String TYPE_TYPE_ARGUMENT_NAMES_LIST = "typeTypeArgumentNames"; //$NON-NLS-1$
+
+	int typeTypeArgumentNamesSize();
+
+	String getTypeTypeArgumentName(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java
new file mode 100644
index 0000000..ca62080
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Java source code or binary persistent member.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaResourcePersistentMember
+	extends JavaResourceNode
+{
+	// ********** annotations **********
+	
+	/**
+	 * String associated with changes to the "annotations" collection
+	 */
+	String ANNOTATIONS_COLLECTION = "annotations"; //$NON-NLS-1$
+	
+	/**
+	 * Return the member's annotations in the order that they appear.
+	 * Do not return duplicate annotations as this error is handled by the Java
+	 * compiler.
+	 */
+	Iterator<Annotation> annotations();
+	
+	/**
+	 * Return the number of annotations.
+	 */
+	int annotationsSize();
+	
+	/**
+	 * Return the annotation with the specified name.
+	 * Return the first if there are duplicates in the source code.
+	 */
+	Annotation getAnnotation(String annotationName);
+	
+	/**
+	 * Return the specified annotation.
+	 * Return the first if there are duplicates in the source code.
+	 * Do not return null, but a Null Object instead if no annotation
+	 * with the specified name exists in the source code.
+	 */
+	Annotation getNonNullAnnotation(String annotationName);
+	
+	/**
+	 * Return the nestable annotations with the specified name in the order that
+	 * they appear.
+	 * If nestable and container annotations are both specified on the
+	 * member directly, return only the nestable annotations specified within
+	 * the container annotation.
+	 */
+	// TODO tie the singular and plural annotations together so we can generate
+	// a validation error when both are specified
+	Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName);
+	
+	/**
+	 * Add an annotation with the specified name.
+	 * Return the newly-created annotation.
+	 */
+	Annotation addAnnotation(String annotationName);
+	
+	/**
+	 * Add a new nestable annotation with the specified name.
+	 * Create a new container annotation if necessary and add the nestable
+	 * annotation to it.
+	 * If both the nestable annotation and the container annotation already
+	 * exist, then add to the container annotation, leaving the existing
+	 * nestable annotation alone.
+	 * If only the nestable annotation exists, then create the new container
+	 * annotation and move the existing nestable annotation to it along with
+	 * the new one. If neither annotation exists, then create a new nestable
+	 * annotation.
+	 */
+	NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName);
+	
+	/**
+	 * Move the nestable annotation found in the specified container
+	 * annotation at the specified source index to the specified target index.
+	 */
+	void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName);
+	
+	/**
+	 * Remove the specified annotation.
+	 */
+	void removeAnnotation(String annotationName);
+	
+	/**
+	 * Remove the specified nestable annotation from the container annotation at the specified
+	 * index.
+	 * If there is no container, assume the index is zero and this does the same as 
+	 * {@link #removeAnnotation(String)}
+	 */
+	void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName);
+	
+	/**
+	 * Sets the specified primary annotation as the first annotation, and removes all known 
+	 * annotations (i.e. does not remove non-persistence annotations) which are not included
+	 * in the supporting annotations.
+	 */
+	Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames);
+	
+	
+	// ********** queries **********
+	
+	/**
+	 * Return whether the underlying JDT member is persistable according to
+	 * the JPA spec.
+	 */
+	boolean isPersistable();
+		String PERSISTABLE_PROPERTY = "persistable"; //$NON-NLS-1$
+		
+	/**
+	 * Return whether the underlying JDT member is currently annotated with any recognized
+	 * annotations.
+	 */
+	boolean isAnnotated();
+	
+	/**
+	 * Return whether the Java resource persistent member is for the specified
+	 * member.
+	 */
+	boolean isFor(String memberName, int occurrence);
+	
+	/**
+	 * Return the text range for the member's name.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+	
+	
+	// ********** behavior **********
+	
+	/**
+	 * Resolve type information that could be dependent on changes elsewhere
+	 * in the workspace.
+	 */
+	void resolveTypes(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentType.java
new file mode 100644
index 0000000..14db847
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentType.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+
+/**
+ * Java source code or binary persistent type.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JavaResourcePersistentType
+	extends JavaResourcePersistentMember
+{
+	/**
+	 * Return the unqualified (short) type name.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Return the fully qualified type name.
+	 */
+	String getQualifiedName();
+		String QUALIFIED_NAME_PROPERTY = "qualifiedName"; //$NON-NLS-1$
+
+	/**
+	 * Return the fully qualified name of the type's superclass.
+	 */
+	String getSuperclassQualifiedName();
+		String SUPERCLASS_QUALIFIED_NAME_PROPERTY = "superclassQualifiedName"; //$NON-NLS-1$
+
+	/**
+	 * Return the name of the type's "declaring type".
+	 * Return <code>null</code> if the type is a top-level type.
+	 */
+	String getDeclaringTypeName();
+		String DECLARING_TYPE_NAME_PROPERTY = "declaringTypeName"; //$NON-NLS-1$
+	
+	/**
+	 * Return whether the type is abstract.
+	 */
+	boolean isAbstract();
+		String ABSTRACT_PROPERTY = "abstract"; //$NON-NLS-1$
+
+	/**
+	 * Return the type's access type ("field" or "property").
+	 */
+	AccessType getAccess();
+		String ACCESS_PROPERTY = "access"; //$NON-NLS-1$
+	
+	/**
+	 * Return whether the type is annotated with any annotations that determine whether and 
+	 * how the type is persisted
+	 */
+	boolean isMapped();
+	
+	/**
+	 * Return whether the type has any attributes that have JPA annotations
+	 * on them (which can be used to infer the type's access type).
+	 */
+	boolean hasAnyAnnotatedAttributes();
+
+
+	// ********** types **********
+
+	/**
+	 * Return the immediately nested types (children).
+	 */
+	Iterator<JavaResourcePersistentType> types();
+		String TYPES_COLLECTION = "types"; //$NON-NLS-1$
+
+	/**
+	 * Return all the types; the type itself, its children, its grandchildren,
+	 * etc.
+	 */
+	Iterator<JavaResourcePersistentType> allTypes();
+
+	/**
+	 * Return the immediately nested persistable types.
+	 */
+	Iterator<JavaResourcePersistentType> persistableTypes();
+
+
+	// ********** fields **********
+
+	/**
+	 * Return the type's fields.
+	 */
+	Iterator<JavaResourcePersistentAttribute> fields();
+		String FIELDS_COLLECTION = "fields"; //$NON-NLS-1$
+
+	/**
+	 * Return the type's persistable fields.
+	 */
+	Iterator<JavaResourcePersistentAttribute> persistableFields();
+
+	/**
+	 * A convenience method that returns the persistableFields that also
+	 * have the Access annotation with a value of FIELD
+	 */
+	Iterator<JavaResourcePersistentAttribute> persistableFieldsWithSpecifiedFieldAccess();
+
+
+	// ********** methods **********
+
+	/**
+	 * Return the type's methods. This returns *all* methods from the JDT Type
+	 */
+	Iterator<JavaResourcePersistentAttribute> methods();
+		String METHODS_COLLECTION = "methods"; //$NON-NLS-1$
+
+	/**
+	 * Return the type's persistable properties.  This returns only the getter methods
+	 * that match the JavaBeans criteria for JPA, hence the name properties instead of methods
+	 */
+	Iterator<JavaResourcePersistentAttribute> persistableProperties();
+
+	/**
+	 * A convenience method that returns the persistableProperties that also
+	 * have the Access annotation with a value of PROPERTY
+	 */
+	Iterator<JavaResourcePersistentAttribute> persistablePropertiesWithSpecifiedPropertyAccess();
+
+
+	// ********** attributes **********
+
+	/**
+	 * Return the type's persistable fields and properties.
+	 */
+	Iterator<JavaResourcePersistentAttribute> persistableAttributes();
+	
+	/**
+	 * Return the persistable properties and/or fields given the non-null specified access type
+	 */
+	Iterator<JavaResourcePersistentAttribute> persistableAttributes(AccessType specifiedAccess);
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentTypeCache.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentTypeCache.java
new file mode 100644
index 0000000..46822d0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentTypeCache.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IType;
+
+/**
+ * Java persistent type cache - used to hold "external" types
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JavaResourcePersistentTypeCache
+	extends JavaResourceNode.Root
+{
+
+	/**
+	 * Return the size of the cache's persistent types.
+	 */
+	int persistentTypesSize();
+
+	/**
+	 * Add a Java resource persistent type for the specified JDT type to the
+	 * cache. Return the new type.
+	 */
+	JavaResourcePersistentType addPersistentType(IType jdtType);
+
+	/**
+	 * Remove all the persistent types associated with the specified JAR file.
+	 * Return whether any persistent types were removed.
+	 */
+	boolean removePersistentTypes(IFile jarFile);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinColumnAnnotation.java
new file mode 100644
index 0000000..807ae5d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinColumnAnnotation.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.JoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JoinColumnAnnotation
+	extends BaseJoinColumnAnnotation
+{
+	String ANNOTATION_NAME = JPA.JOIN_COLUMN;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinColumnsAnnotation.java
new file mode 100644
index 0000000..a3b9372
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinColumnsAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.JoinColumns
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface JoinColumnsAnnotation
+	extends ContainerAnnotation<NestableJoinColumnAnnotation>
+{
+	String ANNOTATION_NAME = JPA.JOIN_COLUMNS;
+
+	String JOIN_COLUMNS_LIST = "joinColumns"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinTableAnnotation.java
new file mode 100644
index 0000000..b484b2a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JoinTableAnnotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.JoinTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface JoinTableAnnotation
+	extends ReferenceTableAnnotation
+{
+	String ANNOTATION_NAME = JPA.JOIN_TABLE;
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 * Return an empty iterator if the element does not exist in Java.
+	 */
+	ListIterator<JoinColumnAnnotation> inverseJoinColumns();
+		String INVERSE_JOIN_COLUMNS_LIST = "inverseJoinColumns"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 */
+	int inverseJoinColumnsSize();
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 */
+	JoinColumnAnnotation inverseJoinColumnAt(int index);
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 */
+	int indexOfInverseJoinColumn(JoinColumnAnnotation joinColumn);
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 */
+	JoinColumnAnnotation addInverseJoinColumn(int index);
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 */
+	void moveInverseJoinColumn(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the 'inverseJoinColumns' element of the JoinTable annotation.
+	 */
+	void removeInverseJoinColumn(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/LobAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/LobAnnotation.java
new file mode 100644
index 0000000..958be2a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/LobAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Lob
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface LobAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.LOB;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ManyToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ManyToManyAnnotation.java
new file mode 100644
index 0000000..cca8668
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ManyToManyAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.ManyToMany
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface ManyToManyAnnotation 
+	extends OwnableRelationshipMappingAnnotation
+{
+	String ANNOTATION_NAME = JPA.MANY_TO_MANY;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ManyToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ManyToOneAnnotation.java
new file mode 100644
index 0000000..bed6b6b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ManyToOneAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.ManyToOne
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface ManyToOneAnnotation
+	extends RelationshipMappingAnnotation
+{
+	String ANNOTATION_NAME = JPA.MANY_TO_ONE;
+	
+	/**
+	 * Corresponds to the optional element of the ManyToOne annotation.
+	 * Returns null if the optional element does not exist in java.
+	 */
+	Boolean getOptional();
+	
+	/**
+	 * Corresponds to the optional element of the ManyToOne annotation.
+	 * Set to null to remove the optional element.
+	 */
+	void setOptional(Boolean optional);
+		String OPTIONAL_PROPERTY = "optional"; //$NON-NLS-1$
+
+	/**
+	 * Return the {@link TextRange} for the optional element.  If the optional element 
+	 * does not exist return the {@link TextRange} for the ManyToOne annotation.
+	 */
+	TextRange getOptionalTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/MapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/MapKeyAnnotation.java
new file mode 100644
index 0000000..2ee414c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/MapKeyAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.MapKey
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface MapKeyAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.MAP_KEY;
+
+	/**
+	 * Corresponds to the 'name' element of the MapKey annotation.
+	 * Returns null if the element does not exist in Java.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'name' element of the MapKey annotation.
+	 * Set to null to remove the element.
+	 */
+	void setName(String name);
+
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If the element 
+	 * does not exist return the {@link TextRange} for the MapKey annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'name' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean nameTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/MappedSuperclassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/MappedSuperclassAnnotation.java
new file mode 100644
index 0000000..4b20714
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/MappedSuperclassAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.MappedSuperclass
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface MappedSuperclassAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.MAPPED_SUPERCLASS;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedColumnAnnotation.java
new file mode 100644
index 0000000..05354cb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedColumnAnnotation.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among
+ *     javax.persistence.Column
+ *     javax.persistence.JoinColumn
+ *     javax.persistence.DiscriminatorColumn
+ *     javax.persistence.PrimaryKeyJoinColumn.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface NamedColumnAnnotation
+	extends Annotation
+{
+	/**
+	 * Return true if the annotation exists in Java, false if it does not.
+	 */
+	boolean isSpecified();
+
+	/**
+	 * Corresponds to the 'name' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'name' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setName(String name);
+		
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If the element
+	 * does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'name' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean nameTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'columnDefinition' element of the *Column annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getColumnDefinition();
+		String COLUMN_DEFINITION_PROPERTY = "columnDefinition"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'columnDefinition' element of the *Column annotation.
+	 * Set to null to remove the element.
+	 */
+	void setColumnDefinition(String columnDefinition);
+
+	/**
+	 * Return the {@link TextRange} for the 'columnDefinition' element. If the
+	 * element does not exist return the {@link TextRange} for the *Column annotation.
+	 */
+	TextRange getColumnDefinitionTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedNativeQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedNativeQueriesAnnotation.java
new file mode 100644
index 0000000..d352ce9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedNativeQueriesAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.NamedNativeQueries
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface NamedNativeQueriesAnnotation
+	extends ContainerAnnotation<NestableNamedNativeQueryAnnotation>
+{
+	String ANNOTATION_NAME = JPA.NAMED_NATIVE_QUERIES;
+
+	String NAMED_NATIVE_QUERIES_LIST = "namedNativeQueries"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedNativeQueryAnnotation.java
new file mode 100644
index 0000000..9909ffb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedNativeQueryAnnotation.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.NamedNativeQuery
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface NamedNativeQueryAnnotation
+	extends BaseNamedQueryAnnotation
+{
+	String ANNOTATION_NAME = JPA.NAMED_NATIVE_QUERY;
+
+	/**
+	 * Corresponds to the 'resultClass' element of the NamedNativeQuery annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getResultClass();
+		String RESULT_CLASS_PROPERTY = "resultClass"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'resultClass' element of the NamedNativeQuery annotation.
+	 * Set to null to remove the element.
+	 */
+	void setResultClass(String resultClass);
+
+	/**
+	 * Return the {@link TextRange} for the 'resultClass' element. If element
+	 * does not exist return the {@link TextRange} for the NamedNativeQuery annotation.
+	 */
+	TextRange getResultClassTextRange(CompilationUnit astRoot);
+
+	String getFullyQualifiedResultClassName();
+		String FULLY_QUALIFIED_RESULT_CLASS_NAME_PROPERTY = "fullyQualifiedResultClassName"; //$NON-NLS-1$
+
+
+	/**
+	 * Corresponds to the 'resultSetMapping' element of the NamedNativeQuery annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getResultSetMapping();
+		String RESULT_SET_MAPPING_PROPERTY = "resultSetMapping"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'resultSetMapping' element of the NamedNativeQuery annotation.
+	 * Set to null to remove the element.
+	 */
+	void setResultSetMapping(String resultSetMapping);
+
+	/**
+	 * Return the {@link TextRange} for the 'resultSetMapping' element. If element
+	 * does not exist return the {@link TextRange} for the NamedNativeQuery annotation.
+	 */
+	TextRange getResultSetMappingTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedQueriesAnnotation.java
new file mode 100644
index 0000000..9f2ac81
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedQueriesAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.NamedQueries
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface NamedQueriesAnnotation
+	extends ContainerAnnotation<NestableNamedQueryAnnotation>
+{
+	String ANNOTATION_NAME = JPA.NAMED_QUERIES;
+
+	String NAMED_QUERIES_LIST = "namedQueries"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedQueryAnnotation.java
new file mode 100644
index 0000000..9b681de
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NamedQueryAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.NamedQuery
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.0
+ */
+public interface NamedQueryAnnotation
+	extends NestableNamedQueryAnnotation
+{
+	String ANNOTATION_NAME = JPA.NAMED_QUERY;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAnnotation.java
new file mode 100644
index 0000000..57dbfc5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAnnotation.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Interface for dealing with annotations that can be "nested" within other
+ * annotations, typically within arrays.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface NestableAnnotation
+	extends Annotation
+{
+	// currently using this when the NestableAnnotation is moved from
+	// stand-alone to nested or from nested to stand-alone;
+	// not the greatest, since you have to make sure to call all setter methods
+	void initializeFrom(NestableAnnotation oldAnnotation);
+
+	/**
+	 * Move the annotation to the specified index within its container annotation.
+	 * This should only be called when the annotation is actually nested.
+	 */
+	void moveAnnotation(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAssociationOverrideAnnotation.java
new file mode 100644
index 0000000..aa0adcd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAssociationOverrideAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.AssociationOverride
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableAssociationOverrideAnnotation
+	extends AssociationOverrideAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAttributeOverrideAnnotation.java
new file mode 100644
index 0000000..f9a8f66
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableAttributeOverrideAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.AttributeOverride
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableAttributeOverrideAnnotation
+	extends AttributeOverrideAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableColumnAnnotation.java
new file mode 100644
index 0000000..51371b9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableColumnAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Column
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableColumnAnnotation
+	extends NestableAnnotation, ColumnAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableJoinColumnAnnotation.java
new file mode 100644
index 0000000..7f692a3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableJoinColumnAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.JoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableJoinColumnAnnotation
+	extends JoinColumnAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableJoinTableAnnotation.java
new file mode 100644
index 0000000..63f0eeb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableJoinTableAnnotation.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.JoinTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableJoinTableAnnotation
+	extends NestableAnnotation, JoinTableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableNamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableNamedNativeQueryAnnotation.java
new file mode 100644
index 0000000..9d34627
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableNamedNativeQueryAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.NamedNativeQuery
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableNamedNativeQueryAnnotation
+	extends NamedNativeQueryAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableNamedQueryAnnotation.java
new file mode 100644
index 0000000..734129a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableNamedQueryAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.NamedQuery
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface NestableNamedQueryAnnotation
+	extends BaseNamedQueryAnnotation, NestableAnnotation
+{
+	// combines two annotation
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestablePrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestablePrimaryKeyJoinColumnAnnotation.java
new file mode 100644
index 0000000..5790b99
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestablePrimaryKeyJoinColumnAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.PrimaryKeyJoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestablePrimaryKeyJoinColumnAnnotation
+	extends PrimaryKeyJoinColumnAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableQueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableQueryHintAnnotation.java
new file mode 100644
index 0000000..61058a2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableQueryHintAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.QueryHint
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableQueryHintAnnotation
+	extends QueryHintAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableSecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableSecondaryTableAnnotation.java
new file mode 100644
index 0000000..11a9854
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableSecondaryTableAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.SecondaryTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableSecondaryTableAnnotation
+	extends SecondaryTableAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableUniqueConstraintAnnotation.java
new file mode 100644
index 0000000..5cf8f2d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/NestableUniqueConstraintAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.UniqueConstraint
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface NestableUniqueConstraintAnnotation
+	extends UniqueConstraintAnnotation, NestableAnnotation
+{
+	// combine two interfaces
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OneToManyAnnotation.java
new file mode 100644
index 0000000..4d4c591
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OneToManyAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.OneToMany
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OneToManyAnnotation 
+	extends OwnableRelationshipMappingAnnotation
+{
+	String ANNOTATION_NAME = JPA.ONE_TO_MANY;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OneToOneAnnotation.java
new file mode 100644
index 0000000..8333b4b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OneToOneAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.OneToOne
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OneToOneAnnotation 
+	extends OwnableRelationshipMappingAnnotation
+{
+	String ANNOTATION_NAME = JPA.ONE_TO_ONE;
+
+	/**
+	 * Corresponds to the 'optional' element of the OneToOne annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	Boolean getOptional();
+		String OPTIONAL_PROPERTY = "optional"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'optional' element of the OneToOne annotation.
+	 * Set to null to remove the element.
+	 */
+	void setOptional(Boolean optional);
+
+	/**
+	 * Return the {@link TextRange} for the 'optional' element. If the element 
+	 * does not exist return the {@link TextRange} for the OneToOne annotation.
+	 */
+	TextRange getOptionalTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OrderByAnnotation.java
new file mode 100644
index 0000000..0c1f60e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OrderByAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.OrderBy
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OrderByAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.ORDER_BY;
+
+	/**
+	 * Corresponds to the 'value' element of the OrderBy annotation.
+	 * Return null if the element does not exist in the annotation.
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the OrderBy annotation.
+	 * Setting the element to null will not remove the OrderBy annotation.
+	 */
+	void setValue(String value);
+		
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the OrderBy annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OverrideAnnotation.java
new file mode 100644
index 0000000..c62cb84
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OverrideAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol for
+ *     javax.persistence.AttributeOverride
+ *     javax.persistence.AssociationOverride
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface OverrideAnnotation
+	extends Annotation
+{
+
+	/**
+	 * Corresponds to the 'name' element of the override annotations.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'name' element of the override annotations.
+	 * Set to null to remove the element.
+	 */
+	void setName(String name);
+
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If element
+	 * does not exist return the {@link TextRange} for the override annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'name' element.
+	 * Return false if the element does not exist in Java.
+	 */
+	boolean nameTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OwnableRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OwnableRelationshipMappingAnnotation.java
new file mode 100644
index 0000000..8c2ff8f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/OwnableRelationshipMappingAnnotation.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Represents a relationship mapping annotation that may have the 'mappedBy'
+ * element:
+ *     javax.persistence.ManyToMany
+ *     javax.persistence.OneToMany
+ *     javax.persistence.OneToOne
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.2
+ */
+public interface OwnableRelationshipMappingAnnotation
+	extends RelationshipMappingAnnotation
+{
+	/**
+	 * Corresponds to the 'mappedBy' element of the annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getMappedBy();
+		String MAPPED_BY_PROPERTY = "mappedBy"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'mappedBy' element of the annotation.
+	 * Set to null to remove the element.
+	 */
+	void setMappedBy(String mappedBy);
+	
+	/**
+	 * Return the {@link TextRange} for the 'mappedBy' element. If the element 
+	 * does not exist return the {@link TextRange} for the annotation.
+	 */
+	TextRange getMappedByTextRange(CompilationUnit astRoot);
+	
+	/**
+	 * Return whether the specified position touches the 'mappedBy' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean mappedByTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/PrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/PrimaryKeyJoinColumnAnnotation.java
new file mode 100644
index 0000000..a625c75
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/PrimaryKeyJoinColumnAnnotation.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.PrimaryKeyJoinColumn
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface PrimaryKeyJoinColumnAnnotation
+	extends NamedColumnAnnotation
+{
+	String ANNOTATION_NAME = JPA.PRIMARY_KEY_JOIN_COLUMN;
+
+	/**
+	 * Corresponds to the 'referencedColumnName' element of the PrimaryKeyJoinColumn annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getReferencedColumnName();
+		String REFERENCED_COLUMN_NAME_PROPERTY = "referencedColumnName"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'referencedColumnName' element of the PrimaryKeyJoinColumn annotation.
+	 * Set the to null to remove the element.
+	 */
+	void setReferencedColumnName(String referencedColumnName);
+
+	/**
+	 * Return the {@link TextRange} for the 'referencedColumnName' element.
+	 * If the element does not exist return the {@link TextRange} for the PrimaryKeyJoinColumn annotation.
+	 */
+	TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'referencedColumnName' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean referencedColumnNameTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/PrimaryKeyJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/PrimaryKeyJoinColumnsAnnotation.java
new file mode 100644
index 0000000..563ed5f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/PrimaryKeyJoinColumnsAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.PrimaryKeyJoinColumns
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface PrimaryKeyJoinColumnsAnnotation
+	extends ContainerAnnotation<NestablePrimaryKeyJoinColumnAnnotation>
+{
+	String ANNOTATION_NAME = JPA.PRIMARY_KEY_JOIN_COLUMNS;
+
+	String PK_JOIN_COLUMNS_LIST = "pkJoinColumns"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/QueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/QueryHintAnnotation.java
new file mode 100644
index 0000000..aecaca1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/QueryHintAnnotation.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.QueryHint
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface QueryHintAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.QUERY_HINT;
+
+	/**
+	 * Corresponds to the 'name' element of the QueryHint annotation.
+	 * Return null if the element does not exist in the annotation
+	 */
+	String getName();
+		String NAME_PROPERTY = "name"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'name' element of the QueryHint annotation.
+	 * Setting to null will remove the element.
+	 */
+	void setName(String name);
+		
+	/**
+	 * Return the {@link TextRange} for the 'name' element. If the element 
+	 * does not exist return the {@link TextRange} for the QueryHint annotation.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'value' element of the QueryHint annotation.
+	 * Return null if the element does not exist in the annotation
+	 */
+	String getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the QueryHint annotation.
+	 * Setting to null will remove the element.
+	 */
+	void setValue(String value);
+
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the QueryHint annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ReferenceTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ReferenceTableAnnotation.java
new file mode 100644
index 0000000..51030e2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/ReferenceTableAnnotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+
+/**
+ * Corresponds to the JPA annotations
+ * javax.persistence.JoinTable
+ * javax.persistence.CollectionTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public interface ReferenceTableAnnotation
+	extends BaseTableAnnotation
+{
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 * Return an empty iterator if the element does not exist in Java.
+	 */
+	ListIterator<JoinColumnAnnotation> joinColumns();
+		String JOIN_COLUMNS_LIST = "joinColumns"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 */
+	int joinColumnsSize();
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 */
+	JoinColumnAnnotation joinColumnAt(int index);
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 */
+	int indexOfJoinColumn(JoinColumnAnnotation joinColumn);
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 */
+	JoinColumnAnnotation addJoinColumn(int index);
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 */
+	void moveJoinColumn(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the 'joinColumns' element of the JoinTable annotation.
+	 */
+	void removeJoinColumn(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/RelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/RelationshipMappingAnnotation.java
new file mode 100644
index 0000000..556f402
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/RelationshipMappingAnnotation.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common protocol among
+ *     javax.persistence.ManyToOne
+ *     javax.persistence.ManyToMany
+ *     javax.persistence.OneToMany
+ *     javax.persistence.OneToOne
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface RelationshipMappingAnnotation
+	extends Annotation
+{
+	/**
+	 * Corresponds to the 'targetEntity' element of the relationship mapping
+	 * annotations.
+	 * Return null if the element does not exist in Java.
+	 * Return the portion of the value preceding ".class".
+	 * <pre>
+	 *     &#64;ManyToMany(targetEntity=Employee.class)
+	 * </pre>
+	 * will return "Employee"
+	 */
+	String getTargetEntity();	
+		String TARGET_ENTITY_PROPERTY = "targetEntity"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'targetEntity' element of the relationship mapping
+	 * annotations.
+	 * Set to null to remove the element.
+	 */
+	void setTargetEntity(String targetEntity);
+	
+	/**
+	 * Return the {@link TextRange} for the 'targetEntity' element. If the element 
+	 * does not exist return the {@link TextRange} for the relationship mapping annotation.
+	 */
+	TextRange getTargetEntityTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return the fully-qualified target entity class name as resolved by the AST's bindings.
+	 * <pre>
+	 *     &#64;ManyToMany(targetEntity=Employee.class)
+	 * </pre>
+	 * will return "model.Employee" if there is an import for model.Employee.
+	 * @return
+	 */
+	String getFullyQualifiedTargetEntityClassName();
+		String FULLY_QUALIFIED_TARGET_ENTITY_CLASS_NAME_PROPERTY = "fullyQualifiedTargetEntityClassName"; //$NON-NLS-1$
+
+
+	/**
+	 * Corresponds to the 'fetch' element of the relationship mapping annotations.
+	 * Return null if the element does not exist in Java.
+	 */
+	FetchType getFetch();
+		String FETCH_PROPERTY = "fetch"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'fetch' element of the relationship annotations.
+	 * Set to null to remove the element.
+	 */
+	void setFetch(FetchType fetch);
+	
+	/**
+	 * Return the {@link TextRange} for the 'fetch' element. If the element 
+	 * does not exist return the {@link TextRange} for the relationship mapping annotation.
+	 */
+	TextRange getFetchTextRange(CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	boolean isCascadeAll();	
+		String CASCADE_ALL_PROPERTY = "cascadeAll"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	void setCascadeAll(boolean all);
+	
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	boolean isCascadeMerge();	
+		String CASCADE_MERGE_PROPERTY = "cascadeMerge"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	void setCascadeMerge(boolean merge);
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	boolean isCascadePersist();	
+		String CASCADE_PERSIST_PROPERTY = "cascadePersist"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	void setCascadePersist(boolean persist);
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	boolean isCascadeRefresh();	
+		String CASCADE_REFRESH_PROPERTY = "cascadeRefresh"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	void setCascadeRefresh(boolean refresh);
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	boolean isCascadeRemove();	
+		String CASCADE_REMOVE_PROPERTY = "cascadeRemove"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'cascade' element of the relationship annotations.
+	 */
+	void setCascadeRemove(boolean remove);
+
+	/**
+	 * Return the {@link TextRange} for the 'cascade' element. If the element 
+	 * does not exist return the {@link TextRange} for the relationship mapping annotation.
+	 */
+	TextRange getCascadeTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SecondaryTableAnnotation.java
new file mode 100644
index 0000000..f4d12c3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SecondaryTableAnnotation.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.SecondaryTable
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface SecondaryTableAnnotation
+	extends BaseTableAnnotation
+{
+	String ANNOTATION_NAME = JPA.SECONDARY_TABLE;
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 * Return an empty iterator if the element does not exist in Java.
+	 */
+	ListIterator<PrimaryKeyJoinColumnAnnotation> pkJoinColumns();
+		String PK_JOIN_COLUMNS_LIST = "pkJoinColumns"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 */
+	int pkJoinColumnsSize();
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 */
+	PrimaryKeyJoinColumnAnnotation pkJoinColumnAt(int index);
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 */
+	int indexOfPkJoinColumn(PrimaryKeyJoinColumnAnnotation pkJoinColumn);
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 */
+	PrimaryKeyJoinColumnAnnotation addPkJoinColumn(int index);
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 */
+	void removePkJoinColumn(int index);
+
+	/**
+	 * Corresponds to the 'pkJoinColumns' element of the SecondaryTable annotation.
+	 */
+	void movePkJoinColumn(int targetIndex, int sourceIndex);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SecondaryTablesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SecondaryTablesAnnotation.java
new file mode 100644
index 0000000..9428050
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SecondaryTablesAnnotation.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.SecondaryTables
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface SecondaryTablesAnnotation
+	extends ContainerAnnotation<NestableSecondaryTableAnnotation>
+{
+	String ANNOTATION_NAME = JPA.SECONDARY_TABLES;
+
+	String SECONDARY_TABLES_LIST = "secondaryTables"; //$NON-NLS-1$
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SequenceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SequenceGeneratorAnnotation.java
new file mode 100644
index 0000000..89f52d1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/SequenceGeneratorAnnotation.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.SequenceGenerator
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface SequenceGeneratorAnnotation
+	extends GeneratorAnnotation
+{
+	String ANNOTATION_NAME = JPA.SEQUENCE_GENERATOR;
+
+	/**
+	 * Corresponds to the 'sequenceName' element of the *Generator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getSequenceName();
+		String SEQUENCE_NAME_PROPERTY = "sequenceName"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'sequenceName' element of the *Generator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the *Generator annotation will be removed as well.
+	 */
+	void setSequenceName(String sequenceName);
+	
+	/**
+	 * Return the {@link TextRange} for the 'sequenceName' element. If the element 
+	 * does not exist return the {@link TextRange} for the SequenceGenerator annotation.
+	 */
+	TextRange getSequenceNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'sequenceName' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean sequenceNameTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TableAnnotation.java
new file mode 100644
index 0000000..fc48fcd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TableAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Table
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface TableAnnotation
+	extends BaseTableAnnotation
+{
+	String ANNOTATION_NAME = JPA.TABLE;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TableGeneratorAnnotation.java
new file mode 100644
index 0000000..673896a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TableGeneratorAnnotation.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.TableGenerator
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.1
+ * @since 2.0
+ */
+public interface TableGeneratorAnnotation
+	extends GeneratorAnnotation
+{
+	String ANNOTATION_NAME = JPA.TABLE_GENERATOR;
+
+	/**
+	 * Corresponds to the 'table' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getTable();
+		String TABLE_PROPERTY = "table"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'table' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setTable(String table);
+
+	/**
+	 * Return the {@link TextRange} for the 'table' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getTableTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'table' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean tableTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'schema' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getSchema();
+		String SCHEMA_PROPERTY = "schema"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'schema' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setSchema(String schema);
+
+	/**
+	 * Return the {@link TextRange} for the 'schema' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getSchemaTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'schema' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean schemaTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'catalog' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getCatalog();
+		String CATALOG_PROPERTY = "catalog"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'catalog' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setCatalog(String catalog);
+
+	/**
+	 * Return the {@link TextRange} for the 'catalog' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getCatalogTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'catalog' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean catalogTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'pkColumnName' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getPkColumnName();
+		String PK_COLUMN_NAME_PROPERTY = "pkColumnName"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'pkColumnName' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setPkColumnName(String pkColumnName);
+
+	/**
+	 * Return the {@link TextRange} for the 'pkColumnName' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getPkColumnNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'pkColumnName' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean pkColumnNameTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'valueColumnName' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getValueColumnName();
+		String VALUE_COLUMN_NAME_PROPERTY = "valueColumnName"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'valueColumnName' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setValueColumnName(String valueColumnName);
+
+	/**
+	 * Return the {@link TextRange} for the 'valueColumnName' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getValueColumnNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'valueColumnName' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean valueColumnNameTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'pkColumnValue' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	String getPkColumnValue();
+		String PK_COLUMN_VALUE_PROPERTY = "pkColumnValue"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'pkColumnValue' element of the TableGenerator annotation.
+	 * Set to null to remove the element. If no other elements exist
+	 * the TableGenerator annotation will be removed as well.
+	 */
+	void setPkColumnValue(String pkColumnValue);
+
+	/**
+	 * Return the {@link TextRange} for the 'pkColumnValue' element. If the element 
+	 * does not exist return the {@link TextRange} for the TableGenerator annotation.
+	 */
+	TextRange getPkColumnValueTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the specified position touches the 'pkColumnValue' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean pkColumnValueTouches(int pos, CompilationUnit astRoot);
+
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	ListIterator<UniqueConstraintAnnotation> uniqueConstraints();
+		String UNIQUE_CONSTRAINTS_LIST = "uniqueConstraints"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 */
+	int uniqueConstraintsSize();
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 */
+	UniqueConstraintAnnotation uniqueConstraintAt(int index);
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 */
+	int indexOfUniqueConstraint(UniqueConstraintAnnotation uniqueConstraint);
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 */
+	UniqueConstraintAnnotation addUniqueConstraint(int index);
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 */
+	void moveUniqueConstraint(int targetIndex, int sourceIndex);
+
+	/**
+	 * Corresponds to the 'uniqueConstraints' element of the TableGenerator annotation.
+	 * If no other elements exist the TableGenerator annotation will be removed as well.
+	 */
+	void removeUniqueConstraint(int index);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TemporalAnnotation.java
new file mode 100644
index 0000000..c2a7ecf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TemporalAnnotation.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Temporal
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface TemporalAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.TEMPORAL;
+
+	/**
+	 * Corresponds to the 'value' element of the Temporal annotation.
+	 * Return null if the element does not exist in Java.
+	 */
+	TemporalType getValue();
+		String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+	
+	/**
+	 * Corresponds to the 'value' element of the Temporal annotation.
+	 * Set to null to remove the element.
+	 */
+	void setValue(TemporalType value);
+	
+	/**
+	 * Return the {@link TextRange} for the 'value' element. If the element 
+	 * does not exist return the {@link TextRange} for the Temporal annotation.
+	 */
+	TextRange getValueTextRange(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TemporalType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TemporalType.java
new file mode 100644
index 0000000..1a0f652
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TemporalType.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA enum
+ * javax.persistence.TemporalType
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public enum TemporalType {
+
+	DATE(JPA.TEMPORAL_TYPE__DATE),
+	TIME(JPA.TEMPORAL_TYPE__TIME),
+	TIMESTAMP(JPA.TEMPORAL_TYPE__TIMESTAMP);
+
+
+	private String javaAnnotationValue;
+
+	TemporalType(String javaAnnotationValue) {
+		if (javaAnnotationValue == null) {
+			throw new NullPointerException();
+		}
+		this.javaAnnotationValue = javaAnnotationValue;
+	}
+
+	public String getJavaAnnotationValue() {
+		return this.javaAnnotationValue;
+	}
+
+
+	// ********** static methods **********
+
+	public static TemporalType fromJavaAnnotationValue(Object javaAnnotationValue) {
+		return (javaAnnotationValue == null) ? null : fromJavaAnnotationValue_(javaAnnotationValue);
+	}
+
+	private static TemporalType fromJavaAnnotationValue_(Object javaAnnotationValue) {
+		for (TemporalType temporalType : TemporalType.values()) {
+			if (temporalType.getJavaAnnotationValue().equals(javaAnnotationValue)) {
+				return temporalType;
+			}
+		}
+		return null;
+	}
+
+	public static String toJavaAnnotationValue(TemporalType temporalType) {
+		return (temporalType == null) ? null : temporalType.getJavaAnnotationValue();
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TransientAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TransientAnnotation.java
new file mode 100644
index 0000000..e7f7df7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/TransientAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Transient
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface TransientAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.TRANSIENT;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/UniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/UniqueConstraintAnnotation.java
new file mode 100644
index 0000000..0d8bb17
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/UniqueConstraintAnnotation.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.ListIterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.UniqueConstraint
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface UniqueConstraintAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.UNIQUE_CONSTRAINT;
+
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 * Return null if the element does not exist in the annotation.
+	 */
+	ListIterator<String> columnNames();
+		String COLUMN_NAMES_LIST = "columnNames"; //$NON-NLS-1$
+
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 */
+	int columnNamesSize();
+	
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 */
+	void addColumnName(String columnName);
+
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 */
+	void addColumnName(int index, String columnName);
+	
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 */
+	void moveColumnName(int targetIndex, int sourceIndex);
+		
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 */
+	void removeColumnName(String columnName);
+	
+	/**
+	 * Corresponds to the 'columnNames' element of the UniqueConstraint annotation.
+	 */
+	void removeColumnName(int index);
+	
+	/**
+	 * Return whether the specified position touches the 'columnNames' element.
+	 * Return false if the element does not exist.
+	 */
+	boolean columnNamesTouches(int pos, CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/VersionAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/VersionAnnotation.java
new file mode 100644
index 0000000..852f065
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/VersionAnnotation.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+/**
+ * Corresponds to the JPA annotation
+ * javax.persistence.Version
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.2
+ * @since 2.0
+ */
+public interface VersionAnnotation
+	extends Annotation
+{
+	String ANNOTATION_NAME = JPA.VERSION;
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlAttributeMapping.java
new file mode 100644
index 0000000..13ffd5a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlAttributeMapping.java
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Xml Attribute Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlAttributeMapping()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlAttributeMapping
+	extends AbstractJpaEObject
+	implements XmlAttributeMapping
+{
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final AccessType ACCESS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAccess()
+	 * @generated
+	 * @ordered
+	 */
+	protected AccessType access = ACCESS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlAttributeMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_ATTRIBUTE_MAPPING;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Access</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.AccessType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Access</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #setAccess(AccessType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
+	 * @model
+	 * @generated
+	 */
+	public AccessType getAccess()
+	{
+		return access;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping#getAccess <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #getAccess()
+	 * @generated
+	 */
+	public void setAccess(AccessType newAccess)
+	{
+		AccessType oldAccess = access;
+		access = newAccess == null ? ACCESS_EDEFAULT : newAccess;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS, oldAccess, access));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeMapping_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME, oldName, name));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
+				return getAccess();
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
+				return getName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
+				setAccess((AccessType)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
+				setName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
+				setAccess(ACCESS_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS:
+				return access != ACCESS_EDEFAULT;
+			case OrmPackage.ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (access: ");
+		result.append(access);
+		result.append(", name: ");
+		result.append(name);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** validation ***********
+	
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	// ********** translators **********
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlAttributeMapping_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildAccessTranslator() {
+		return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access(), Translator.DOM_ATTRIBUTE);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlColumn.java
new file mode 100644
index 0000000..9c98d03
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlColumn.java
@@ -0,0 +1,500 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.BooleanTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Xml Abstract Column</b></em>'.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getInsertable <em>Insertable</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getNullable <em>Nullable</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getTable <em>Table</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUnique <em>Unique</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUpdatable <em>Updatable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlColumn extends AbstractXmlNamedColumn
+{
+	/**
+	 * The default value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInsertable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean INSERTABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInsertable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean insertable = INSERTABLE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNullable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean NULLABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNullable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean nullable = NULLABLE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getTable() <em>Table</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String TABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTable() <em>Table</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected String table = TABLE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getUnique() <em>Unique</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUnique()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean UNIQUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getUnique() <em>Unique</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUnique()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean unique = UNIQUE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUpdatable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean UPDATABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUpdatable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean updatable = UPDATABLE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Insertable</em>' attribute.
+	 * @see #setInsertable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn_Insertable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getInsertable()
+	{
+		return insertable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getInsertable <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Insertable</em>' attribute.
+	 * @see #getInsertable()
+	 * @generated
+	 */
+	public void setInsertable(Boolean newInsertable)
+	{
+		Boolean oldInsertable = insertable;
+		insertable = newInsertable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_COLUMN__INSERTABLE, oldInsertable, insertable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Nullable</em>' attribute.
+	 * @see #setNullable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn_Nullable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getNullable()
+	{
+		return nullable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getNullable <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Nullable</em>' attribute.
+	 * @see #getNullable()
+	 * @generated
+	 */
+	public void setNullable(Boolean newNullable)
+	{
+		Boolean oldNullable = nullable;
+		nullable = newNullable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_COLUMN__NULLABLE, oldNullable, nullable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Table</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table</em>' attribute.
+	 * @see #setTable(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn_Table()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getTable()
+	{
+		return table;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getTable <em>Table</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Table</em>' attribute.
+	 * @see #getTable()
+	 * @generated
+	 */
+	public void setTable(String newTable)
+	{
+		String oldTable = table;
+		table = newTable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_COLUMN__TABLE, oldTable, table));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Unique</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Unique</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Unique</em>' attribute.
+	 * @see #setUnique(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn_Unique()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getUnique()
+	{
+		return unique;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUnique <em>Unique</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Unique</em>' attribute.
+	 * @see #getUnique()
+	 * @generated
+	 */
+	public void setUnique(Boolean newUnique)
+	{
+		Boolean oldUnique = unique;
+		unique = newUnique;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_COLUMN__UNIQUE, oldUnique, unique));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Updatable</em>' attribute.
+	 * @see #setUpdatable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn_Updatable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getUpdatable()
+	{
+		return updatable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUpdatable <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Updatable</em>' attribute.
+	 * @see #getUpdatable()
+	 * @generated
+	 */
+	public void setUpdatable(Boolean newUpdatable)
+	{
+		Boolean oldUpdatable = updatable;
+		updatable = newUpdatable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_COLUMN__UPDATABLE, oldUpdatable, updatable));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_COLUMN__INSERTABLE:
+				return getInsertable();
+			case OrmPackage.ABSTRACT_XML_COLUMN__NULLABLE:
+				return getNullable();
+			case OrmPackage.ABSTRACT_XML_COLUMN__TABLE:
+				return getTable();
+			case OrmPackage.ABSTRACT_XML_COLUMN__UNIQUE:
+				return getUnique();
+			case OrmPackage.ABSTRACT_XML_COLUMN__UPDATABLE:
+				return getUpdatable();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_COLUMN__INSERTABLE:
+				setInsertable((Boolean)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__NULLABLE:
+				setNullable((Boolean)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__TABLE:
+				setTable((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__UNIQUE:
+				setUnique((Boolean)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__UPDATABLE:
+				setUpdatable((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_COLUMN__INSERTABLE:
+				setInsertable(INSERTABLE_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__NULLABLE:
+				setNullable(NULLABLE_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__TABLE:
+				setTable(TABLE_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__UNIQUE:
+				setUnique(UNIQUE_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_COLUMN__UPDATABLE:
+				setUpdatable(UPDATABLE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_COLUMN__INSERTABLE:
+				return INSERTABLE_EDEFAULT == null ? insertable != null : !INSERTABLE_EDEFAULT.equals(insertable);
+			case OrmPackage.ABSTRACT_XML_COLUMN__NULLABLE:
+				return NULLABLE_EDEFAULT == null ? nullable != null : !NULLABLE_EDEFAULT.equals(nullable);
+			case OrmPackage.ABSTRACT_XML_COLUMN__TABLE:
+				return TABLE_EDEFAULT == null ? table != null : !TABLE_EDEFAULT.equals(table);
+			case OrmPackage.ABSTRACT_XML_COLUMN__UNIQUE:
+				return UNIQUE_EDEFAULT == null ? unique != null : !UNIQUE_EDEFAULT.equals(unique);
+			case OrmPackage.ABSTRACT_XML_COLUMN__UPDATABLE:
+				return UPDATABLE_EDEFAULT == null ? updatable != null : !UPDATABLE_EDEFAULT.equals(updatable);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (insertable: ");
+		result.append(insertable);
+		result.append(", nullable: ");
+		result.append(nullable);
+		result.append(", table: ");
+		result.append(table);
+		result.append(", unique: ");
+		result.append(unique);
+		result.append(", updatable: ");
+		result.append(updatable);
+		result.append(')');
+		return result.toString();
+	}
+
+	public TextRange getTableTextRange() {
+		return getAttributeTextRange(JPA.TABLE);
+	}
+	
+	// ********** translators **********
+
+	protected static Translator buildUniqueTranslator() {
+		return new BooleanTranslator(JPA.UNIQUE, OrmPackage.eINSTANCE.getAbstractXmlColumn_Unique(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildNullableTranslator() {
+		return new BooleanTranslator(JPA.NULLABLE, OrmPackage.eINSTANCE.getAbstractXmlColumn_Nullable(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildInsertableTranslator() {
+		return new BooleanTranslator(JPA.INSERTABLE, OrmPackage.eINSTANCE.getAbstractXmlColumn_Insertable(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildUpdatableTranslator() {
+		return new BooleanTranslator(JPA.UPDATABLE, OrmPackage.eINSTANCE.getAbstractXmlColumn_Updatable(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildTableTranslator() {
+		return new Translator(JPA.TABLE, OrmPackage.eINSTANCE.getAbstractXmlColumn_Table(), Translator.DOM_ATTRIBUTE);
+	}
+	
+} // AbstractXmlAbstractColumn
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlEmbedded.java
new file mode 100644
index 0000000..fa4a518
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlEmbedded.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Base Xml Embedded</b></em>'.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlEmbedded()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlEmbedded extends AbstractXmlAttributeMapping implements XmlAttributeOverrideContainer
+{
+	/**
+	 * The cached value of the '{@link #getAttributeOverrides() <em>Attribute Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAttributeOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAttributeOverride> attributeOverrides;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlEmbedded()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_EMBEDDED;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAttributeOverride> getAttributeOverrides() {
+		if (attributeOverrides == null)
+		{
+			attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES);
+		}
+		return attributeOverrides;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
+				return ((InternalEList<?>)getAttributeOverrides()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
+				return getAttributeOverrides();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
+				getAttributeOverrides().clear();
+				getAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
+				getAttributeOverrides().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES:
+				return attributeOverrides != null && !attributeOverrides.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+	
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlAttributeOverrideContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlAttributeOverrideContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES: return OrmPackage.ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+	
+	
+	// ********** translators **********
+	
+	protected static Translator buildAttributeOverrideTranslator() {
+		return XmlAttributeOverride.buildTranslator(JPA.ATTRIBUTE_OVERRIDE, OrmPackage.eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlMultiRelationshipMapping.java
new file mode 100644
index 0000000..5444fc9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlMultiRelationshipMapping.java
@@ -0,0 +1,1086 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Multi Relationship Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey <em>Map Key</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlMultiRelationshipMapping extends AbstractXmlRelationshipMapping implements XmlMappedByMapping, XmlJoinTableMapping, XmlOrderable, XmlMultiRelationshipMapping_2_0
+{
+	/**
+	 * The default value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMappedBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String MAPPED_BY_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMappedBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected String mappedBy = MAPPED_BY_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlJoinTable joinTable;
+	/**
+	 * The cached value of the '{@link #getOrderColumn() <em>Order Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrderColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlOrderColumn orderColumn;
+	/**
+	 * The default value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrderBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String ORDER_BY_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrderBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected String orderBy = ORDER_BY_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getMapKeyAttributeOverrides() <em>Map Key Attribute Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyAttributeOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAttributeOverride> mapKeyAttributeOverrides;
+	/**
+	 * The cached value of the '{@link #getMapKeyClass() <em>Map Key Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlClassReference mapKeyClass;
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final TemporalType MAP_KEY_TEMPORAL_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getMapKeyTemporal() <em>Map Key Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyTemporal()
+	 * @generated
+	 * @ordered
+	 */
+	protected TemporalType mapKeyTemporal = MAP_KEY_TEMPORAL_EDEFAULT;
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final EnumType MAP_KEY_ENUMERATED_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getMapKeyEnumerated() <em>Map Key Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected EnumType mapKeyEnumerated = MAP_KEY_ENUMERATED_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getMapKeyColumn() <em>Map Key Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn mapKeyColumn;
+	/**
+	 * The cached value of the '{@link #getMapKeyJoinColumns() <em>Map Key Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> mapKeyJoinColumns;
+	/**
+	 * The cached value of the '{@link #getMapKey() <em>Map Key</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKey()
+	 * @generated
+	 * @ordered
+	 */
+	protected MapKey mapKey;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlMultiRelationshipMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Mapped By</em>' attribute.
+	 * @see #setMappedBy(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedByMapping_MappedBy()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getMappedBy()
+	{
+		return mappedBy;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMappedBy <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Mapped By</em>' attribute.
+	 * @see #getMappedBy()
+	 * @generated
+	 */
+	public void setMappedBy(String newMappedBy)
+	{
+		String oldMappedBy = mappedBy;
+		mappedBy = newMappedBy;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY, oldMappedBy, mappedBy));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Table</em>' containment reference.
+	 * @see #setJoinTable(XmlJoinTable)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTableMapping_JoinTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlJoinTable getJoinTable()
+	{
+		return joinTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetJoinTable(XmlJoinTable newJoinTable, NotificationChain msgs)
+	{
+		XmlJoinTable oldJoinTable = joinTable;
+		joinTable = newJoinTable;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, oldJoinTable, newJoinTable);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getJoinTable <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Join Table</em>' containment reference.
+	 * @see #getJoinTable()
+	 * @generated
+	 */
+	public void setJoinTable(XmlJoinTable newJoinTable)
+	{
+		if (newJoinTable != joinTable)
+		{
+			NotificationChain msgs = null;
+			if (joinTable != null)
+				msgs = ((InternalEObject)joinTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
+			if (newJoinTable != null)
+				msgs = ((InternalEObject)newJoinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
+			msgs = basicSetJoinTable(newJoinTable, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE, newJoinTable, newJoinTable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Order Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Order Column</em>' containment reference.
+	 * @see #setOrderColumn(XmlOrderColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable_2_0_OrderColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlOrderColumn getOrderColumn()
+	{
+		return orderColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetOrderColumn(XmlOrderColumn newOrderColumn, NotificationChain msgs)
+	{
+		XmlOrderColumn oldOrderColumn = orderColumn;
+		orderColumn = newOrderColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, oldOrderColumn, newOrderColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getOrderColumn <em>Order Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Order Column</em>' containment reference.
+	 * @see #getOrderColumn()
+	 * @generated
+	 */
+	public void setOrderColumn(XmlOrderColumn newOrderColumn)
+	{
+		if (newOrderColumn != orderColumn)
+		{
+			NotificationChain msgs = null;
+			if (orderColumn != null)
+				msgs = ((InternalEObject)orderColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, null, msgs);
+			if (newOrderColumn != null)
+				msgs = ((InternalEObject)newOrderColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, null, msgs);
+			msgs = basicSetOrderColumn(newOrderColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN, newOrderColumn, newOrderColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Order By</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Order By</em>' attribute.
+	 * @see #setOrderBy(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable_OrderBy()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getOrderBy() {
+		return orderBy;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getOrderBy <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Order By</em>' attribute.
+	 * @see #getOrderBy()
+	 * @generated
+	 */
+	public void setOrderBy(String newOrderBy) {
+		String oldOrderBy = orderBy;
+		orderBy = newOrderBy;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY, oldOrderBy, orderBy));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAttributeOverride> getMapKeyAttributeOverrides()
+	{
+		if (mapKeyAttributeOverrides == null)
+		{
+			mapKeyAttributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES);
+		}
+		return mapKeyAttributeOverrides;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #setMapKeyClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlClassReference getMapKeyClass()
+	{
+		return mapKeyClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetMapKeyClass(XmlClassReference newMapKeyClass, NotificationChain msgs)
+	{
+		XmlClassReference oldMapKeyClass = mapKeyClass;
+		mapKeyClass = newMapKeyClass;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, oldMapKeyClass, newMapKeyClass);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyClass <em>Map Key Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #getMapKeyClass()
+	 * @generated
+	 */
+	public void setMapKeyClass(XmlClassReference newMapKeyClass)
+	{
+		if (newMapKeyClass != mapKeyClass)
+		{
+			NotificationChain msgs = null;
+			if (mapKeyClass != null)
+				msgs = ((InternalEObject)mapKeyClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, null, msgs);
+			if (newMapKeyClass != null)
+				msgs = ((InternalEObject)newMapKeyClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, null, msgs);
+			msgs = basicSetMapKeyClass(newMapKeyClass, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS, newMapKeyClass, newMapKeyClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setMapKeyTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyTemporal()
+	 * @model
+	 * @generated
+	 */
+	public TemporalType getMapKeyTemporal()
+	{
+		return mapKeyTemporal;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getMapKeyTemporal()
+	 * @generated
+	 */
+	public void setMapKeyTemporal(TemporalType newMapKeyTemporal)
+	{
+		TemporalType oldMapKeyTemporal = mapKeyTemporal;
+		mapKeyTemporal = newMapKeyTemporal == null ? MAP_KEY_TEMPORAL_EDEFAULT : newMapKeyTemporal;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL, oldMapKeyTemporal, mapKeyTemporal));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setMapKeyEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyEnumerated()
+	 * @model
+	 * @generated
+	 */
+	public EnumType getMapKeyEnumerated()
+	{
+		return mapKeyEnumerated;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getMapKeyEnumerated()
+	 * @generated
+	 */
+	public void setMapKeyEnumerated(EnumType newMapKeyEnumerated)
+	{
+		EnumType oldMapKeyEnumerated = mapKeyEnumerated;
+		mapKeyEnumerated = newMapKeyEnumerated == null ? MAP_KEY_ENUMERATED_EDEFAULT : newMapKeyEnumerated;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED, oldMapKeyEnumerated, mapKeyEnumerated));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #setMapKeyColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlColumn getMapKeyColumn()
+	{
+		return mapKeyColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetMapKeyColumn(XmlColumn newMapKeyColumn, NotificationChain msgs)
+	{
+		XmlColumn oldMapKeyColumn = mapKeyColumn;
+		mapKeyColumn = newMapKeyColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, oldMapKeyColumn, newMapKeyColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #getMapKeyColumn()
+	 * @generated
+	 */
+	public void setMapKeyColumn(XmlColumn newMapKeyColumn)
+	{
+		if (newMapKeyColumn != mapKeyColumn)
+		{
+			NotificationChain msgs = null;
+			if (mapKeyColumn != null)
+				msgs = ((InternalEObject)mapKeyColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, null, msgs);
+			if (newMapKeyColumn != null)
+				msgs = ((InternalEObject)newMapKeyColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, null, msgs);
+			msgs = basicSetMapKeyColumn(newMapKeyColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN, newMapKeyColumn, newMapKeyColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getMapKeyJoinColumns()
+	{
+		if (mapKeyJoinColumns == null)
+		{
+			mapKeyJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS);
+		}
+		return mapKeyJoinColumns;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key</em>' containment reference.
+	 * @see #setMapKey(MapKey)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping_MapKey()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public MapKey getMapKey() {
+		return mapKey;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetMapKey(MapKey newMapKey, NotificationChain msgs)
+	{
+		MapKey oldMapKey = mapKey;
+		mapKey = newMapKey;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, oldMapKey, newMapKey);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey <em>Map Key</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key</em>' containment reference.
+	 * @see #getMapKey()
+	 * @generated
+	 */
+	public void setMapKey(MapKey newMapKey) {
+		if (newMapKey != mapKey)
+		{
+			NotificationChain msgs = null;
+			if (mapKey != null)
+				msgs = ((InternalEObject)mapKey).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, null, msgs);
+			if (newMapKey != null)
+				msgs = ((InternalEObject)newMapKey).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, null, msgs);
+			msgs = basicSetMapKey(newMapKey, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY, newMapKey, newMapKey));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				return basicSetJoinTable(null, msgs);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
+				return basicSetOrderColumn(null, msgs);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				return ((InternalEList<?>)getMapKeyAttributeOverrides()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
+				return basicSetMapKeyClass(null, msgs);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
+				return basicSetMapKeyColumn(null, msgs);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
+				return ((InternalEList<?>)getMapKeyJoinColumns()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
+				return basicSetMapKey(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
+				return getMappedBy();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				return getJoinTable();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
+				return getOrderColumn();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
+				return getOrderBy();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				return getMapKeyAttributeOverrides();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
+				return getMapKeyClass();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
+				return getMapKeyTemporal();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
+				return getMapKeyEnumerated();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
+				return getMapKeyColumn();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
+				return getMapKeyJoinColumns();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
+				return getMapKey();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
+				setMappedBy((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				setJoinTable((XmlJoinTable)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
+				setOrderColumn((XmlOrderColumn)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
+				setOrderBy((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				getMapKeyAttributeOverrides().clear();
+				getMapKeyAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
+				setMapKeyClass((XmlClassReference)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
+				setMapKeyTemporal((TemporalType)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
+				setMapKeyEnumerated((EnumType)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
+				setMapKeyColumn((XmlColumn)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
+				getMapKeyJoinColumns().clear();
+				getMapKeyJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
+				setMapKey((MapKey)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
+				setMappedBy(MAPPED_BY_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				setJoinTable((XmlJoinTable)null);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
+				setOrderColumn((XmlOrderColumn)null);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
+				setOrderBy(ORDER_BY_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				getMapKeyAttributeOverrides().clear();
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
+				setMapKeyClass((XmlClassReference)null);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
+				setMapKeyTemporal(MAP_KEY_TEMPORAL_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
+				setMapKeyEnumerated(MAP_KEY_ENUMERATED_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
+				setMapKeyColumn((XmlColumn)null);
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
+				getMapKeyJoinColumns().clear();
+				return;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
+				setMapKey((MapKey)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY:
+				return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				return joinTable != null;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN:
+				return orderColumn != null;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY:
+				return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				return mapKeyAttributeOverrides != null && !mapKeyAttributeOverrides.isEmpty();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS:
+				return mapKeyClass != null;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL:
+				return mapKeyTemporal != MAP_KEY_TEMPORAL_EDEFAULT;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED:
+				return mapKeyEnumerated != MAP_KEY_ENUMERATED_EDEFAULT;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN:
+				return mapKeyColumn != null;
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS:
+				return mapKeyJoinColumns != null && !mapKeyJoinColumns.isEmpty();
+			case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY:
+				return mapKey != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlMappedByMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY: return OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlJoinTableMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE: return OrmPackage.XML_JOIN_TABLE_MAPPING__JOIN_TABLE;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN: return OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY: return OrmPackage.XML_ORDERABLE__ORDER_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMultiRelationshipMapping_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS;
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL;
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED;
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN;
+				case OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS: return OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlMappedByMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlJoinTableMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_JOIN_TABLE_MAPPING__JOIN_TABLE: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ORDERABLE__ORDER_BY: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMultiRelationshipMapping_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS;
+				case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL;
+				case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED;
+				case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN;
+				case OrmV2_0Package.XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS: return OrmPackage.ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (mappedBy: ");
+		result.append(mappedBy);
+		result.append(", orderBy: ");
+		result.append(orderBy);
+		result.append(", mapKeyTemporal: ");
+		result.append(mapKeyTemporal);
+		result.append(", mapKeyEnumerated: ");
+		result.append(mapKeyEnumerated);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getMappedByTextRange() {
+		return getAttributeTextRange(JPA.MAPPED_BY);
+	}
+	
+	// ********** translators **********
+	
+	protected static Translator buildOrderByTranslator() {
+		return new Translator(JPA.ORDER_BY, OrmPackage.eINSTANCE.getXmlOrderable_OrderBy());
+	}
+	
+	protected static Translator buildMapKeyTranslator() {
+		return MapKey.buildTranslator(JPA.MAP_KEY, OrmPackage.eINSTANCE.getAbstractXmlMultiRelationshipMapping_MapKey());
+	}
+
+	protected static Translator buildMapKeyTemporalTranslator() {
+		return new Translator(JPA2_0.MAP_KEY_TEMPORAL, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyTemporal());
+	}
+
+	protected static Translator buildMapKeyEnumeratedTranslator() {
+		return new Translator(JPA2_0.MAP_KEY_ENUMERATED, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyEnumerated());
+	}
+
+	protected static Translator buildMapKeyClassTranslator() {
+		return XmlClassReference.buildTranslator(JPA2_0.MAP_KEY_CLASS, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyClass());
+	}
+
+	protected static Translator buildMapKeyColumnTranslator() {
+		return XmlColumn.buildTranslator(JPA2_0.MAP_KEY_COLUMN, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyColumn());
+	}
+
+	protected static Translator buildMapKeyJoinColumnTranslator() {
+		return XmlJoinColumn.buildTranslator(JPA2_0.MAP_KEY_JOIN_COLUMN, OrmV2_0Package.eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns());
+	}
+
+	protected static Translator buildMappedByTranslator() {
+		return new Translator(JPA.MAPPED_BY, OrmPackage.eINSTANCE.getXmlMappedByMapping_MappedBy(), Translator.DOM_ATTRIBUTE);
+	}
+
+	protected static Translator buildMapKeyAttributeOverrideTranslator() {
+		return XmlAttributeOverride.buildTranslator(JPA2_0.MAP_KEY_ATTRIBUTE_OVERRIDE, OrmV2_0Package.eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides());
+	}
+
+	protected static Translator buildJoinTableTranslator() {
+		return XmlJoinTable.buildTranslator(JPA.JOIN_TABLE, OrmPackage.eINSTANCE.getXmlJoinTableMapping_JoinTable());
+	}
+
+	protected static Translator buildOrderColumnTranslator() {
+		return XmlOrderColumn.buildTranslator(JPA2_0.ORDER_COLUMN, OrmV2_0Package.eINSTANCE.getXmlOrderable_2_0_OrderColumn());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlNamedColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlNamedColumn.java
new file mode 100644
index 0000000..1ac04f2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlNamedColumn.java
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Xml Named Column</b></em>'.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getColumnDefinition <em>Column Definition</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn()
+ * @model kind="class" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public abstract class AbstractXmlNamedColumn extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumnDefinition()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String COLUMN_DEFINITION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getColumnDefinition() <em>Column Definition</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumnDefinition()
+	 * @generated
+	 * @ordered
+	 */
+	protected String columnDefinition = COLUMN_DEFINITION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlNamedColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_NAMED_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column Definition</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column Definition</em>' attribute.
+	 * @see #setColumnDefinition(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn_ColumnDefinition()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getColumnDefinition()
+	{
+		return columnDefinition;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getColumnDefinition <em>Column Definition</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column Definition</em>' attribute.
+	 * @see #getColumnDefinition()
+	 * @generated
+	 */
+	public void setColumnDefinition(String newColumnDefinition)
+	{
+		String oldColumnDefinition = columnDefinition;
+		columnDefinition = newColumnDefinition;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION, oldColumnDefinition, columnDefinition));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME, oldName, name));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
+				return getColumnDefinition();
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
+				return getName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
+				setColumnDefinition((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
+				setName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
+				setColumnDefinition(COLUMN_DEFINITION_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION:
+				return COLUMN_DEFINITION_EDEFAULT == null ? columnDefinition != null : !COLUMN_DEFINITION_EDEFAULT.equals(columnDefinition);
+			case OrmPackage.ABSTRACT_XML_NAMED_COLUMN__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (columnDefinition: ");
+		result.append(columnDefinition);
+		result.append(", name: ");
+		result.append(name);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	// ********** translators **********
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getAbstractXmlNamedColumn_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildColumnDefinitionTranslator() {
+		return new Translator(JPA.COLUMN_DEFINITION, OrmPackage.eINSTANCE.getAbstractXmlNamedColumn_ColumnDefinition(), Translator.DOM_ATTRIBUTE);
+	}
+
+} // AbstractXmlNamedColumn
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlReferenceTable.java
new file mode 100644
index 0000000..35e8485
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlReferenceTable.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Xml Reference Table</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlReferenceTable()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlReferenceTable extends AbstractXmlTable implements XmlReferenceTable
+{
+	/**
+	 * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> joinColumns;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlReferenceTable()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_REFERENCE_TABLE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlReferenceTable_JoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getJoinColumns()
+	{
+		if (joinColumns == null)
+		{
+			joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS);
+		}
+		return joinColumns;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
+				return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
+				return getJoinColumns();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS:
+				return joinColumns != null && !joinColumns.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlReferenceTable.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS: return OrmPackage.XML_REFERENCE_TABLE__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlReferenceTable.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_REFERENCE_TABLE__JOIN_COLUMNS: return OrmPackage.ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+
+	// ********** translators **********
+	
+	protected static Translator buildJoinColumnTranslator() {
+		return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlReferenceTable_JoinColumns());
+	}
+
+} // AbstractXmlReferenceTable
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlRelationshipMapping.java
new file mode 100644
index 0000000..2f590a2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlRelationshipMapping.java
@@ -0,0 +1,382 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Relationship Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity <em>Target Entity</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getFetch <em>Fetch</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getCascade <em>Cascade</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlRelationshipMapping extends AbstractXmlAttributeMapping
+{
+	/**
+	 * The default value of the '{@link #getTargetEntity() <em>Target Entity</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTargetEntity()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String TARGET_ENTITY_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getTargetEntity() <em>Target Entity</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTargetEntity()
+	 * @generated
+	 * @ordered
+	 */
+	protected String targetEntity = TARGET_ENTITY_EDEFAULT;
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final FetchType FETCH_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFetch()
+	 * @generated
+	 * @ordered
+	 */
+	protected FetchType fetch = FETCH_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getCascade() <em>Cascade</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCascade()
+	 * @generated
+	 * @ordered
+	 */
+	protected CascadeType cascade;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlRelationshipMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_RELATIONSHIP_MAPPING;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Target Entity</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Target Entity</em>' attribute.
+	 * @see #setTargetEntity(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping_TargetEntity()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getTargetEntity() {
+		return targetEntity;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity <em>Target Entity</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Target Entity</em>' attribute.
+	 * @see #getTargetEntity()
+	 * @generated
+	 */
+	public void setTargetEntity(String newTargetEntity) {
+		String oldTargetEntity = targetEntity;
+		targetEntity = newTargetEntity;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY, oldTargetEntity, targetEntity));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Fetch</b></em>' attribute.
+	 * The default value is <code>"LAZY"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.FetchType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #setFetch(FetchType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping_Fetch()
+	 * @model default="LAZY"
+	 * @generated
+	 */
+	public FetchType getFetch() {
+		return fetch;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getFetch <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #getFetch()
+	 * @generated
+	 */
+	public void setFetch(FetchType newFetch) {
+		FetchType oldFetch = fetch;
+		fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH, oldFetch, fetch));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade</em>' containment reference.
+	 * @see #setCascade(CascadeType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping_Cascade()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public CascadeType getCascade() {
+		return cascade;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetCascade(CascadeType newCascade, NotificationChain msgs)
+	{
+		CascadeType oldCascade = cascade;
+		cascade = newCascade;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, oldCascade, newCascade);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getCascade <em>Cascade</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade</em>' containment reference.
+	 * @see #getCascade()
+	 * @generated
+	 */
+	public void setCascade(CascadeType newCascade) {
+		if (newCascade != cascade)
+		{
+			NotificationChain msgs = null;
+			if (cascade != null)
+				msgs = ((InternalEObject)cascade).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, null, msgs);
+			if (newCascade != null)
+				msgs = ((InternalEObject)newCascade).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, null, msgs);
+			msgs = basicSetCascade(newCascade, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE, newCascade, newCascade));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
+				return basicSetCascade(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
+				return getTargetEntity();
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
+				return getFetch();
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
+				return getCascade();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
+				setTargetEntity((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
+				setFetch((FetchType)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
+				setCascade((CascadeType)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
+				setTargetEntity(TARGET_ENTITY_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
+				setFetch(FETCH_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
+				setCascade((CascadeType)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY:
+				return TARGET_ENTITY_EDEFAULT == null ? targetEntity != null : !TARGET_ENTITY_EDEFAULT.equals(targetEntity);
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH:
+				return fetch != FETCH_EDEFAULT;
+			case OrmPackage.ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE:
+				return cascade != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (targetEntity: ");
+		result.append(targetEntity);
+		result.append(", fetch: ");
+		result.append(fetch);
+		result.append(')');
+		return result.toString();
+	}
+
+	/**
+	 * Return the {@link TextRange} for the target-entity attribute.
+	 */
+	
+	public TextRange getTargetEntityTextRange() {
+		return getAttributeTextRange(JPA.TARGET_ENTITY);
+	}
+	
+	
+	// ********** translators **********
+	
+	protected static Translator buildTargetEntityTranslator() {
+		return new Translator(JPA.TARGET_ENTITY, OrmPackage.eINSTANCE.getAbstractXmlRelationshipMapping_TargetEntity(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildFetchTranslator() {
+		return new Translator(JPA.FETCH, OrmPackage.eINSTANCE.getAbstractXmlRelationshipMapping_Fetch(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildCascadeTranslator() {
+		return CascadeType.buildTranslator(JPA.CASCADE, OrmPackage.eINSTANCE.getAbstractXmlRelationshipMapping_Cascade());
+	}
+	
+} // RelationshipMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlSingleRelationshipMapping.java
new file mode 100644
index 0000000..b0c5572
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlSingleRelationshipMapping.java
@@ -0,0 +1,614 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Single Relationship Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional <em>Optional</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlSingleRelationshipMapping extends AbstractXmlRelationshipMapping implements XmlJoinTableMapping, XmlJoinColumnsMapping, XmlSingleRelationshipMapping_2_0
+{
+	/**
+	 * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlJoinTable joinTable;
+	/**
+	 * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> joinColumns;
+	/**
+	 * The default value of the '{@link #getId() <em>Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getId()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean ID_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getId() <em>Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getId()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean id = ID_EDEFAULT;
+	/**
+	 * The default value of the '{@link #getMapsId() <em>Maps Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapsId()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String MAPS_ID_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getMapsId() <em>Maps Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapsId()
+	 * @generated
+	 * @ordered
+	 */
+	protected String mapsId = MAPS_ID_EDEFAULT;
+	/**
+	 * The default value of the '{@link #getOptional() <em>Optional</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOptional()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean OPTIONAL_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getOptional() <em>Optional</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOptional()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean optional = OPTIONAL_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlSingleRelationshipMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Table</em>' containment reference.
+	 * @see #setJoinTable(XmlJoinTable)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTableMapping_JoinTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlJoinTable getJoinTable()
+	{
+		return joinTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetJoinTable(XmlJoinTable newJoinTable, NotificationChain msgs)
+	{
+		XmlJoinTable oldJoinTable = joinTable;
+		joinTable = newJoinTable;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, oldJoinTable, newJoinTable);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getJoinTable <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Join Table</em>' containment reference.
+	 * @see #getJoinTable()
+	 * @generated
+	 */
+	public void setJoinTable(XmlJoinTable newJoinTable)
+	{
+		if (newJoinTable != joinTable)
+		{
+			NotificationChain msgs = null;
+			if (joinTable != null)
+				msgs = ((InternalEObject)joinTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
+			if (newJoinTable != null)
+				msgs = ((InternalEObject)newJoinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, null, msgs);
+			msgs = basicSetJoinTable(newJoinTable, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE, newJoinTable, newJoinTable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping_JoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getJoinColumns()
+	{
+		if (joinColumns == null)
+		{
+			joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS);
+		}
+		return joinColumns;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Id</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Id</em>' attribute.
+	 * @see #setId(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlDerivedId_2_0_Id()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getId()
+	{
+		return id;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getId <em>Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Id</em>' attribute.
+	 * @see #getId()
+	 * @generated
+	 */
+	public void setId(Boolean newId)
+	{
+		Boolean oldId = id;
+		id = newId;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID, oldId, id));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Maps Id</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Maps Id</em>' attribute.
+	 * @see #setMapsId(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMapsId_2_0_MapsId()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getMapsId()
+	{
+		return mapsId;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getMapsId <em>Maps Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Maps Id</em>' attribute.
+	 * @see #getMapsId()
+	 * @generated
+	 */
+	public void setMapsId(String newMapsId)
+	{
+		String oldMapsId = mapsId;
+		mapsId = newMapsId;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID, oldMapsId, mapsId));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Optional</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Optional</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Optional</em>' attribute.
+	 * @see #setOptional(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping_Optional()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getOptional() {
+		return optional;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional <em>Optional</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Optional</em>' attribute.
+	 * @see #getOptional()
+	 * @generated
+	 */
+	public void setOptional(Boolean newOptional) {
+		Boolean oldOptional = optional;
+		optional = newOptional;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL, oldOptional, optional));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				return basicSetJoinTable(null, msgs);
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
+				return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				return getJoinTable();
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
+				return getJoinColumns();
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
+				return getId();
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
+				return getMapsId();
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
+				return getOptional();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				setJoinTable((XmlJoinTable)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
+				setId((Boolean)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
+				setMapsId((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
+				setOptional((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				setJoinTable((XmlJoinTable)null);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
+				setId(ID_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
+				setMapsId(MAPS_ID_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
+				setOptional(OPTIONAL_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE:
+				return joinTable != null;
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS:
+				return joinColumns != null && !joinColumns.isEmpty();
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID:
+				return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID:
+				return MAPS_ID_EDEFAULT == null ? mapsId != null : !MAPS_ID_EDEFAULT.equals(mapsId);
+			case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL:
+				return OPTIONAL_EDEFAULT == null ? optional != null : !OPTIONAL_EDEFAULT.equals(optional);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlJoinTableMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE: return OrmPackage.XML_JOIN_TABLE_MAPPING__JOIN_TABLE;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlJoinColumnsMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS: return OrmPackage.XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlDerivedId_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID: return OrmV2_0Package.XML_DERIVED_ID_20__ID;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMapsId_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID: return OrmV2_0Package.XML_MAPS_ID_20__MAPS_ID;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlSingleRelationshipMapping_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlJoinTableMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_JOIN_TABLE_MAPPING__JOIN_TABLE: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlJoinColumnsMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlDerivedId_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_DERIVED_ID_20__ID: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMapsId_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_MAPS_ID_20__MAPS_ID: return OrmPackage.ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlSingleRelationshipMapping_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (id: ");
+		result.append(id);
+		result.append(", mapsId: ");
+		result.append(mapsId);
+		result.append(", optional: ");
+		result.append(optional);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** validation ***********
+	
+	public TextRange getMapsIdTextRange() {
+		return getAttributeTextRange(JPA2_0.MAPS_ID);
+	}
+	
+	public TextRange getIdTextRange() {
+		return getAttributeTextRange(JPA2_0.ID);
+	}
+	
+	
+	// ********** translators **********
+	
+	protected static Translator buildOptionalTranslator() {
+		return new Translator(JPA.OPTIONAL, OrmPackage.eINSTANCE.getAbstractXmlSingleRelationshipMapping_Optional(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildMapsIdTranslator() {
+		return new Translator(JPA2_0.MAPS_ID, OrmV2_0Package.eINSTANCE.getXmlMapsId_2_0_MapsId(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildIdTranslator() {
+		return new Translator(JPA2_0.ID, OrmV2_0Package.eINSTANCE.getXmlDerivedId_2_0_Id(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildJoinColumnTranslator() {
+		return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinColumnsMapping_JoinColumns());
+	}
+	
+	protected static Translator buildJoinTableTranslator() {
+		return XmlJoinTable.buildTranslator(JPA.JOIN_TABLE, OrmPackage.eINSTANCE.getXmlJoinTableMapping_JoinTable());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlTable.java
new file mode 100644
index 0000000..2eeeaeb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlTable.java
@@ -0,0 +1,439 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Xml Base Table</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getCatalog <em>Catalog</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getSchema <em>Schema</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getUniqueConstraints <em>Unique Constraints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable()
+ * @model kind="class" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public abstract class AbstractXmlTable extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CATALOG_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected String catalog = CATALOG_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCHEMA_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected String schema = SCHEMA_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getUniqueConstraints() <em>Unique Constraints</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUniqueConstraints()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlUniqueConstraint> uniqueConstraints;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlTable()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_TABLE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TABLE__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Catalog</em>' attribute.
+	 * @see #setCatalog(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable_Catalog()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getCatalog()
+	{
+		return catalog;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getCatalog <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Catalog</em>' attribute.
+	 * @see #getCatalog()
+	 * @generated
+	 */
+	public void setCatalog(String newCatalog)
+	{
+		String oldCatalog = catalog;
+		catalog = newCatalog;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TABLE__CATALOG, oldCatalog, catalog));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema</em>' attribute.
+	 * @see #setSchema(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable_Schema()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getSchema()
+	{
+		return schema;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getSchema <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema</em>' attribute.
+	 * @see #getSchema()
+	 * @generated
+	 */
+	public void setSchema(String newSchema)
+	{
+		String oldSchema = schema;
+		schema = newSchema;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TABLE__SCHEMA, oldSchema, schema));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Unique Constraints</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Unique Constraints</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable_UniqueConstraints()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlUniqueConstraint> getUniqueConstraints()
+	{
+		if (uniqueConstraints == null)
+		{
+			uniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS);
+		}
+		return uniqueConstraints;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
+				return ((InternalEList<?>)getUniqueConstraints()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TABLE__NAME:
+				return getName();
+			case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
+				return getCatalog();
+			case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
+				return getSchema();
+			case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
+				return getUniqueConstraints();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TABLE__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
+				setCatalog((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
+				setSchema((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
+				getUniqueConstraints().clear();
+				getUniqueConstraints().addAll((Collection<? extends XmlUniqueConstraint>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TABLE__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
+				setCatalog(CATALOG_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
+				setSchema(SCHEMA_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
+				getUniqueConstraints().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TABLE__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.ABSTRACT_XML_TABLE__CATALOG:
+				return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
+			case OrmPackage.ABSTRACT_XML_TABLE__SCHEMA:
+				return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
+			case OrmPackage.ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS:
+				return uniqueConstraints != null && !uniqueConstraints.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(", catalog: ");
+		result.append(catalog);
+		result.append(", schema: ");
+		result.append(schema);
+		result.append(')');
+		return result.toString();
+	}
+
+
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	public TextRange getCatalogTextRange() {
+		return getAttributeTextRange(JPA.CATALOG);
+	}
+	
+	public TextRange getSchemaTextRange() {
+		return getAttributeTextRange(JPA.SCHEMA);
+	}
+	
+	// ********** translators **********
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getAbstractXmlTable_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildCatalogTranslator() {
+		return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getAbstractXmlTable_Catalog(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildSchemaTranslator() {
+		return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getAbstractXmlTable_Schema(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildUniqueConstraintTranslator() {
+		return XmlUniqueConstraint.buildTranslator(JPA.UNIQUE_CONSTRAINT, OrmPackage.eINSTANCE.getAbstractXmlTable_UniqueConstraints());
+	}
+
+} // AbstractXmlBaseTable
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlTypeMapping.java
new file mode 100644
index 0000000..322b3ea
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AbstractXmlTypeMapping.java
@@ -0,0 +1,521 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTypeMapping()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractXmlTypeMapping extends AbstractJpaEObject implements XmlTypeMapping
+{
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final AccessType ACCESS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAccess()
+	 * @generated
+	 * @ordered
+	 */
+	protected AccessType access = ACCESS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClassName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CLASS_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClassName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String className = CLASS_NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getMetadataComplete() <em>Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMetadataComplete()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean METADATA_COMPLETE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getMetadataComplete() <em>Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMetadataComplete()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean metadataComplete = METADATA_COMPLETE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAttributes()
+	 * @generated
+	 * @ordered
+	 */
+	protected Attributes attributes;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractXmlTypeMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ABSTRACT_XML_TYPE_MAPPING;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Class Name</em>' attribute.
+	 * @see #setClassName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_ClassName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getClassName()
+	{
+		return className;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping#getClassName <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Class Name</em>' attribute.
+	 * @see #getClassName()
+	 * @generated
+	 */
+	public void setClassName(String newClassName)
+	{
+		String oldClassName = className;
+		className = newClassName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME, oldClassName, className));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Access</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.AccessType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Access</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #setAccess(AccessType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
+	 * @model
+	 * @generated
+	 */
+	public AccessType getAccess()
+	{
+		return access;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping#getAccess <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #getAccess()
+	 * @generated
+	 */
+	public void setAccess(AccessType newAccess)
+	{
+		AccessType oldAccess = access;
+		access = newAccess == null ? ACCESS_EDEFAULT : newAccess;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS, oldAccess, access));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Metadata Complete</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Metadata Complete</em>' attribute.
+	 * @see #setMetadataComplete(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_MetadataComplete()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getMetadataComplete()
+	{
+		return metadataComplete;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Metadata Complete</em>' attribute.
+	 * @see #getMetadataComplete()
+	 * @generated
+	 */
+	public void setMetadataComplete(Boolean newMetadataComplete)
+	{
+		Boolean oldMetadataComplete = metadataComplete;
+		metadataComplete = newMetadataComplete;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE, oldMetadataComplete, metadataComplete));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Attributes</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Attributes</em>' containment reference.
+	 * @see #setAttributes(Attributes)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_Attributes()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public Attributes getAttributes()
+	{
+		return attributes;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetAttributes(Attributes newAttributes, NotificationChain msgs)
+	{
+		Attributes oldAttributes = attributes;
+		attributes = newAttributes;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, oldAttributes, newAttributes);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping#getAttributes <em>Attributes</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Attributes</em>' containment reference.
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public void setAttributes(Attributes newAttributes)
+	{
+		if (newAttributes != attributes)
+		{
+			NotificationChain msgs = null;
+			if (attributes != null)
+				msgs = ((InternalEObject)attributes).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, null, msgs);
+			if (newAttributes != null)
+				msgs = ((InternalEObject)newAttributes).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, null, msgs);
+			msgs = basicSetAttributes(newAttributes, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES, newAttributes, newAttributes));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
+				return basicSetAttributes(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
+				return getAccess();
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
+				return getClassName();
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
+				return getMetadataComplete();
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
+				return getAttributes();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
+				setAccess((AccessType)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
+				setClassName((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
+				setMetadataComplete((Boolean)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
+				setAttributes((Attributes)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
+				setAccess(ACCESS_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
+				setClassName(CLASS_NAME_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
+				setMetadataComplete(METADATA_COMPLETE_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
+				setAttributes((Attributes)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ACCESS:
+				return access != ACCESS_EDEFAULT;
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME:
+				return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE:
+				return METADATA_COMPLETE_EDEFAULT == null ? metadataComplete != null : !METADATA_COMPLETE_EDEFAULT.equals(metadataComplete);
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES:
+				return attributes != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (access: ");
+		result.append(access);
+		result.append(", className: ");
+		result.append(className);
+		result.append(", metadataComplete: ");
+		result.append(metadataComplete);
+		result.append(", description: ");
+		result.append(description);
+		result.append(')');
+		return result.toString();
+	}
+	
+
+	public TextRange getClassTextRange() {
+		return getAttributeTextRange(JPA.CLASS);
+	}
+
+	public TextRange getAttributesTextRange() {
+		return getAttributeTextRange(JPA.ATTRIBUTES);
+	}
+	
+	// ********** translators **********
+	
+	protected static Translator buildClassTranslator() {
+		return new Translator(JPA.CLASS, OrmPackage.eINSTANCE.getXmlTypeMapping_ClassName(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildMetadataCompleteTranslator() {
+		return new Translator(JPA.METADATA_COMPLETE, OrmPackage.eINSTANCE.getXmlTypeMapping_MetadataComplete(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmPackage.eINSTANCE.getXmlTypeMapping_Description());
+	}
+	
+	protected static Translator buildAttributesTranslator() {
+		return Attributes.buildTranslator();
+	}	
+
+} // TypeMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AccessType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AccessType.java
new file mode 100644
index 0000000..aae4803
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/AccessType.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Access Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAccessType()
+ * @model
+ * @generated
+ */
+public enum AccessType implements Enumerator
+{
+	/**
+	 * The '<em><b>PROPERTY</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #PROPERTY_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	PROPERTY(0, "PROPERTY", "PROPERTY"),
+
+	/**
+	 * The '<em><b>FIELD</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #FIELD_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	FIELD(1, "FIELD", "FIELD");
+
+	/**
+	 * The '<em><b>PROPERTY</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>PROPERTY</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #PROPERTY
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PROPERTY_VALUE = 0;
+
+	/**
+	 * The '<em><b>FIELD</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>FIELD</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #FIELD
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int FIELD_VALUE = 1;
+
+	/**
+	 * An array of all the '<em><b>Access Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final AccessType[] VALUES_ARRAY =
+		new AccessType[]
+		{
+			PROPERTY,
+			FIELD,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Access Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<AccessType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Access Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static AccessType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			AccessType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Access Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static AccessType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			AccessType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Access Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static AccessType get(int value)
+	{
+		switch (value)
+		{
+			case PROPERTY_VALUE: return PROPERTY;
+			case FIELD_VALUE: return FIELD;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private AccessType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Attributes.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Attributes.java
new file mode 100644
index 0000000..e40fea2
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Attributes.java
@@ -0,0 +1,792 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Attributes</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getIds <em>Ids</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getEmbeddedIds <em>Embedded Ids</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getBasics <em>Basics</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getVersions <em>Versions</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getManyToOnes <em>Many To Ones</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getOneToManys <em>One To Manys</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getOneToOnes <em>One To Ones</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getManyToManys <em>Many To Manys</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getEmbeddeds <em>Embeddeds</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Attributes#getTransients <em>Transients</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes()
+ * @model kind="class"
+ * @generated
+ */
+public class Attributes extends AbstractJpaEObject implements XmlAttributes_2_0
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getElementCollections() <em>Element Collections</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getElementCollections()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlElementCollection> elementCollections;
+
+	/**
+	 * The cached value of the '{@link #getIds() <em>Ids</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getIds()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlId> ids;
+
+	/**
+	 * The cached value of the '{@link #getEmbeddedIds() <em>Embedded Ids</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEmbeddedIds()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlEmbeddedId> embeddedIds;
+
+	/**
+	 * The cached value of the '{@link #getBasics() <em>Basics</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getBasics()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlBasic> basics;
+
+	/**
+	 * The cached value of the '{@link #getVersions() <em>Versions</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getVersions()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlVersion> versions;
+
+	/**
+	 * The cached value of the '{@link #getManyToOnes() <em>Many To Ones</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getManyToOnes()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlManyToOne> manyToOnes;
+
+	/**
+	 * The cached value of the '{@link #getOneToManys() <em>One To Manys</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOneToManys()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlOneToMany> oneToManys;
+
+	/**
+	 * The cached value of the '{@link #getOneToOnes() <em>One To Ones</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOneToOnes()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlOneToOne> oneToOnes;
+
+	/**
+	 * The cached value of the '{@link #getManyToManys() <em>Many To Manys</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getManyToManys()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlManyToMany> manyToManys;
+
+	/**
+	 * The cached value of the '{@link #getEmbeddeds() <em>Embeddeds</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEmbeddeds()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlEmbedded> embeddeds;
+
+	/**
+	 * The cached value of the '{@link #getTransients() <em>Transients</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTransients()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlTransient> transients;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected Attributes()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ATTRIBUTES;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributes_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.Attributes#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ATTRIBUTES__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Element Collections</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlElementCollection}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Element Collections</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Element Collections</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributes_2_0_ElementCollections()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlElementCollection> getElementCollections()
+	{
+		if (elementCollections == null)
+		{
+			elementCollections = new EObjectContainmentEList<XmlElementCollection>(XmlElementCollection.class, this, OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS);
+		}
+		return elementCollections;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Ids</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlId}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Ids</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Ids</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_Ids()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlId> getIds()
+	{
+		if (ids == null)
+		{
+			ids = new EObjectContainmentEList<XmlId>(XmlId.class, this, OrmPackage.ATTRIBUTES__IDS);
+		}
+		return ids;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Embedded Ids</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlEmbeddedId}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Embedded Ids</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Embedded Ids</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_EmbeddedIds()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlEmbeddedId> getEmbeddedIds()
+	{
+		if (embeddedIds == null)
+		{
+			embeddedIds = new EObjectContainmentEList<XmlEmbeddedId>(XmlEmbeddedId.class, this, OrmPackage.ATTRIBUTES__EMBEDDED_IDS);
+		}
+		return embeddedIds;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Basics</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlBasic}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Basics</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Basics</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_Basics()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlBasic> getBasics()
+	{
+		if (basics == null)
+		{
+			basics = new EObjectContainmentEList<XmlBasic>(XmlBasic.class, this, OrmPackage.ATTRIBUTES__BASICS);
+		}
+		return basics;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Versions</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlVersion}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Versions</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Versions</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_Versions()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlVersion> getVersions()
+	{
+		if (versions == null)
+		{
+			versions = new EObjectContainmentEList<XmlVersion>(XmlVersion.class, this, OrmPackage.ATTRIBUTES__VERSIONS);
+		}
+		return versions;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Many To Ones</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlManyToOne}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Many To Ones</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Many To Ones</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_ManyToOnes()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlManyToOne> getManyToOnes()
+	{
+		if (manyToOnes == null)
+		{
+			manyToOnes = new EObjectContainmentEList<XmlManyToOne>(XmlManyToOne.class, this, OrmPackage.ATTRIBUTES__MANY_TO_ONES);
+		}
+		return manyToOnes;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>One To Manys</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlOneToMany}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>One To Manys</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>One To Manys</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_OneToManys()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlOneToMany> getOneToManys()
+	{
+		if (oneToManys == null)
+		{
+			oneToManys = new EObjectContainmentEList<XmlOneToMany>(XmlOneToMany.class, this, OrmPackage.ATTRIBUTES__ONE_TO_MANYS);
+		}
+		return oneToManys;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>One To Ones</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlOneToOne}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>One To Ones</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>One To Ones</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_OneToOnes()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlOneToOne> getOneToOnes()
+	{
+		if (oneToOnes == null)
+		{
+			oneToOnes = new EObjectContainmentEList<XmlOneToOne>(XmlOneToOne.class, this, OrmPackage.ATTRIBUTES__ONE_TO_ONES);
+		}
+		return oneToOnes;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Many To Manys</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlManyToMany}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Many To Manys</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Many To Manys</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_ManyToManys()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlManyToMany> getManyToManys()
+	{
+		if (manyToManys == null)
+		{
+			manyToManys = new EObjectContainmentEList<XmlManyToMany>(XmlManyToMany.class, this, OrmPackage.ATTRIBUTES__MANY_TO_MANYS);
+		}
+		return manyToManys;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Embeddeds</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlEmbedded}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Embeddeds</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Embeddeds</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_Embeddeds()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlEmbedded> getEmbeddeds()
+	{
+		if (embeddeds == null)
+		{
+			embeddeds = new EObjectContainmentEList<XmlEmbedded>(XmlEmbedded.class, this, OrmPackage.ATTRIBUTES__EMBEDDEDS);
+		}
+		return embeddeds;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Transients</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlTransient}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Transients</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Transients</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes_Transients()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlTransient> getTransients()
+	{
+		if (transients == null)
+		{
+			transients = new EObjectContainmentEList<XmlTransient>(XmlTransient.class, this, OrmPackage.ATTRIBUTES__TRANSIENTS);
+		}
+		return transients;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
+				return ((InternalEList<?>)getElementCollections()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__IDS:
+				return ((InternalEList<?>)getIds()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
+				return ((InternalEList<?>)getEmbeddedIds()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__BASICS:
+				return ((InternalEList<?>)getBasics()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__VERSIONS:
+				return ((InternalEList<?>)getVersions()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
+				return ((InternalEList<?>)getManyToOnes()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
+				return ((InternalEList<?>)getOneToManys()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
+				return ((InternalEList<?>)getOneToOnes()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
+				return ((InternalEList<?>)getManyToManys()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__EMBEDDEDS:
+				return ((InternalEList<?>)getEmbeddeds()).basicRemove(otherEnd, msgs);
+			case OrmPackage.ATTRIBUTES__TRANSIENTS:
+				return ((InternalEList<?>)getTransients()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ATTRIBUTES__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
+				return getElementCollections();
+			case OrmPackage.ATTRIBUTES__IDS:
+				return getIds();
+			case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
+				return getEmbeddedIds();
+			case OrmPackage.ATTRIBUTES__BASICS:
+				return getBasics();
+			case OrmPackage.ATTRIBUTES__VERSIONS:
+				return getVersions();
+			case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
+				return getManyToOnes();
+			case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
+				return getOneToManys();
+			case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
+				return getOneToOnes();
+			case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
+				return getManyToManys();
+			case OrmPackage.ATTRIBUTES__EMBEDDEDS:
+				return getEmbeddeds();
+			case OrmPackage.ATTRIBUTES__TRANSIENTS:
+				return getTransients();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ATTRIBUTES__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
+				getElementCollections().clear();
+				getElementCollections().addAll((Collection<? extends XmlElementCollection>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__IDS:
+				getIds().clear();
+				getIds().addAll((Collection<? extends XmlId>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
+				getEmbeddedIds().clear();
+				getEmbeddedIds().addAll((Collection<? extends XmlEmbeddedId>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__BASICS:
+				getBasics().clear();
+				getBasics().addAll((Collection<? extends XmlBasic>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__VERSIONS:
+				getVersions().clear();
+				getVersions().addAll((Collection<? extends XmlVersion>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
+				getManyToOnes().clear();
+				getManyToOnes().addAll((Collection<? extends XmlManyToOne>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
+				getOneToManys().clear();
+				getOneToManys().addAll((Collection<? extends XmlOneToMany>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
+				getOneToOnes().clear();
+				getOneToOnes().addAll((Collection<? extends XmlOneToOne>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
+				getManyToManys().clear();
+				getManyToManys().addAll((Collection<? extends XmlManyToMany>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__EMBEDDEDS:
+				getEmbeddeds().clear();
+				getEmbeddeds().addAll((Collection<? extends XmlEmbedded>)newValue);
+				return;
+			case OrmPackage.ATTRIBUTES__TRANSIENTS:
+				getTransients().clear();
+				getTransients().addAll((Collection<? extends XmlTransient>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ATTRIBUTES__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
+				getElementCollections().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__IDS:
+				getIds().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
+				getEmbeddedIds().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__BASICS:
+				getBasics().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__VERSIONS:
+				getVersions().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
+				getManyToOnes().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
+				getOneToManys().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
+				getOneToOnes().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
+				getManyToManys().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__EMBEDDEDS:
+				getEmbeddeds().clear();
+				return;
+			case OrmPackage.ATTRIBUTES__TRANSIENTS:
+				getTransients().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ATTRIBUTES__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.ATTRIBUTES__ELEMENT_COLLECTIONS:
+				return elementCollections != null && !elementCollections.isEmpty();
+			case OrmPackage.ATTRIBUTES__IDS:
+				return ids != null && !ids.isEmpty();
+			case OrmPackage.ATTRIBUTES__EMBEDDED_IDS:
+				return embeddedIds != null && !embeddedIds.isEmpty();
+			case OrmPackage.ATTRIBUTES__BASICS:
+				return basics != null && !basics.isEmpty();
+			case OrmPackage.ATTRIBUTES__VERSIONS:
+				return versions != null && !versions.isEmpty();
+			case OrmPackage.ATTRIBUTES__MANY_TO_ONES:
+				return manyToOnes != null && !manyToOnes.isEmpty();
+			case OrmPackage.ATTRIBUTES__ONE_TO_MANYS:
+				return oneToManys != null && !oneToManys.isEmpty();
+			case OrmPackage.ATTRIBUTES__ONE_TO_ONES:
+				return oneToOnes != null && !oneToOnes.isEmpty();
+			case OrmPackage.ATTRIBUTES__MANY_TO_MANYS:
+				return manyToManys != null && !manyToManys.isEmpty();
+			case OrmPackage.ATTRIBUTES__EMBEDDEDS:
+				return embeddeds != null && !embeddeds.isEmpty();
+			case OrmPackage.ATTRIBUTES__TRANSIENTS:
+				return transients != null && !transients.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(')');
+		return result.toString();
+	}
+
+	public List<XmlAttributeMapping> getAttributeMappings() {
+		// convert lists to arrays to avoid ConcurrentModificationException while adding to result list
+		ArrayList<XmlAttributeMapping> attributeMappings = new ArrayList<XmlAttributeMapping>();
+		CollectionTools.addAll(attributeMappings, this.getIds().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getEmbeddedIds().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getBasics().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getVersions().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getManyToOnes().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getOneToManys().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getOneToOnes().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getManyToManys().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getElementCollections().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getEmbeddeds().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		CollectionTools.addAll(attributeMappings, this.getTransients().toArray(EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY));
+		return attributeMappings;
+	}
+
+	private static final XmlAttributeMapping[] EMPTY_XML_ATTRIBUTE_MAPPING_ARRAY = new XmlAttributeMapping[0];
+
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.ATTRIBUTES, 
+			OrmPackage.eINSTANCE.getXmlTypeMapping_Attributes());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			XmlId.buildTranslator(JPA.ID, OrmPackage.eINSTANCE.getAttributes_Ids()),
+			XmlEmbeddedId.buildTranslator(JPA.EMBEDDED_ID, OrmPackage.eINSTANCE.getAttributes_EmbeddedIds()),
+			XmlBasic.buildTranslator(JPA.BASIC, OrmPackage.eINSTANCE.getAttributes_Basics()),
+			XmlVersion.buildTranslator(JPA.VERSION, OrmPackage.eINSTANCE.getAttributes_Versions()),
+			XmlManyToOne.buildTranslator(JPA.MANY_TO_ONE, OrmPackage.eINSTANCE.getAttributes_ManyToOnes()),
+			XmlOneToMany.buildTranslator(JPA.ONE_TO_MANY, OrmPackage.eINSTANCE.getAttributes_OneToManys()),
+			XmlOneToOne.buildTranslator(JPA.ONE_TO_ONE, OrmPackage.eINSTANCE.getAttributes_OneToOnes()),
+			XmlManyToMany.buildTranslator(JPA.MANY_TO_MANY, OrmPackage.eINSTANCE.getAttributes_ManyToManys()),
+			XmlElementCollection.buildTranslator(JPA2_0.ELEMENT_COLLECTION, OrmV2_0Package.eINSTANCE.getXmlAttributes_2_0_ElementCollections()),
+			XmlEmbedded.buildTranslator(JPA.EMBEDDED, OrmPackage.eINSTANCE.getAttributes_Embeddeds()),
+			XmlTransient.buildTranslator(JPA.TRANSIENT, OrmPackage.eINSTANCE.getAttributes_Transients()),
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/CascadeType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/CascadeType.java
new file mode 100644
index 0000000..ece75dd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/CascadeType.java
@@ -0,0 +1,586 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Cascade Type</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeAll <em>Cascade All</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadePersist <em>Cascade Persist</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeMerge <em>Cascade Merge</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRemove <em>Cascade Remove</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRefresh <em>Cascade Refresh</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType()
+ * @model kind="class"
+ * @generated
+ */
+public class CascadeType extends AbstractJpaEObject implements XmlCascadeType_2_0
+{
+	/**
+	 * The default value of the '{@link #isCascadeDetach() <em>Cascade Detach</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeDetach()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_DETACH_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadeDetach() <em>Cascade Detach</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeDetach()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadeDetach = CASCADE_DETACH_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isCascadeAll() <em>Cascade All</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeAll()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_ALL_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadeAll() <em>Cascade All</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeAll()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadeAll = CASCADE_ALL_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadePersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_PERSIST_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadePersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadePersist = CASCADE_PERSIST_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isCascadeMerge() <em>Cascade Merge</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeMerge()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_MERGE_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadeMerge() <em>Cascade Merge</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeMerge()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadeMerge = CASCADE_MERGE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isCascadeRemove() <em>Cascade Remove</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeRemove()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_REMOVE_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadeRemove() <em>Cascade Remove</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeRemove()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadeRemove = CASCADE_REMOVE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isCascadeRefresh() <em>Cascade Refresh</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeRefresh()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_REFRESH_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadeRefresh() <em>Cascade Refresh</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadeRefresh()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadeRefresh = CASCADE_REFRESH_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected CascadeType()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.CASCADE_TYPE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade Detach</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Detach</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Detach</em>' attribute.
+	 * @see #setCascadeDetach(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlCascadeType_2_0_CascadeDetach()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadeDetach()
+	{
+		return cascadeDetach;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeDetach <em>Cascade Detach</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Detach</em>' attribute.
+	 * @see #isCascadeDetach()
+	 * @generated
+	 */
+	public void setCascadeDetach(boolean newCascadeDetach)
+	{
+		boolean oldCascadeDetach = cascadeDetach;
+		cascadeDetach = newCascadeDetach;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_DETACH, oldCascadeDetach, cascadeDetach));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade All</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade All</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade All</em>' attribute.
+	 * @see #setCascadeAll(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType_CascadeAll()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadeAll()
+	{
+		return cascadeAll;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeAll <em>Cascade All</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade All</em>' attribute.
+	 * @see #isCascadeAll()
+	 * @generated
+	 */
+	public void setCascadeAll(boolean newCascadeAll)
+	{
+		boolean oldCascadeAll = cascadeAll;
+		cascadeAll = newCascadeAll;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_ALL, oldCascadeAll, cascadeAll));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade Persist</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Persist</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Persist</em>' attribute.
+	 * @see #setCascadePersist(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType_CascadePersist()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadePersist()
+	{
+		return cascadePersist;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadePersist <em>Cascade Persist</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Persist</em>' attribute.
+	 * @see #isCascadePersist()
+	 * @generated
+	 */
+	public void setCascadePersist(boolean newCascadePersist)
+	{
+		boolean oldCascadePersist = cascadePersist;
+		cascadePersist = newCascadePersist;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_PERSIST, oldCascadePersist, cascadePersist));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade Merge</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Merge</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Merge</em>' attribute.
+	 * @see #setCascadeMerge(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType_CascadeMerge()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadeMerge()
+	{
+		return cascadeMerge;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeMerge <em>Cascade Merge</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Merge</em>' attribute.
+	 * @see #isCascadeMerge()
+	 * @generated
+	 */
+	public void setCascadeMerge(boolean newCascadeMerge)
+	{
+		boolean oldCascadeMerge = cascadeMerge;
+		cascadeMerge = newCascadeMerge;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_MERGE, oldCascadeMerge, cascadeMerge));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade Remove</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Remove</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Remove</em>' attribute.
+	 * @see #setCascadeRemove(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType_CascadeRemove()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadeRemove()
+	{
+		return cascadeRemove;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRemove <em>Cascade Remove</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Remove</em>' attribute.
+	 * @see #isCascadeRemove()
+	 * @generated
+	 */
+	public void setCascadeRemove(boolean newCascadeRemove)
+	{
+		boolean oldCascadeRemove = cascadeRemove;
+		cascadeRemove = newCascadeRemove;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_REMOVE, oldCascadeRemove, cascadeRemove));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade Refresh</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Refresh</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Refresh</em>' attribute.
+	 * @see #setCascadeRefresh(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType_CascadeRefresh()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadeRefresh()
+	{
+		return cascadeRefresh;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRefresh <em>Cascade Refresh</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Refresh</em>' attribute.
+	 * @see #isCascadeRefresh()
+	 * @generated
+	 */
+	public void setCascadeRefresh(boolean newCascadeRefresh)
+	{
+		boolean oldCascadeRefresh = cascadeRefresh;
+		cascadeRefresh = newCascadeRefresh;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.CASCADE_TYPE__CASCADE_REFRESH, oldCascadeRefresh, cascadeRefresh));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
+				return isCascadeDetach();
+			case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
+				return isCascadeAll();
+			case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
+				return isCascadePersist();
+			case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
+				return isCascadeMerge();
+			case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
+				return isCascadeRemove();
+			case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
+				return isCascadeRefresh();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
+				setCascadeDetach((Boolean)newValue);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
+				setCascadeAll((Boolean)newValue);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
+				setCascadePersist((Boolean)newValue);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
+				setCascadeMerge((Boolean)newValue);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
+				setCascadeRemove((Boolean)newValue);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
+				setCascadeRefresh((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
+				setCascadeDetach(CASCADE_DETACH_EDEFAULT);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
+				setCascadeAll(CASCADE_ALL_EDEFAULT);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
+				setCascadePersist(CASCADE_PERSIST_EDEFAULT);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
+				setCascadeMerge(CASCADE_MERGE_EDEFAULT);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
+				setCascadeRemove(CASCADE_REMOVE_EDEFAULT);
+				return;
+			case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
+				setCascadeRefresh(CASCADE_REFRESH_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.CASCADE_TYPE__CASCADE_DETACH:
+				return cascadeDetach != CASCADE_DETACH_EDEFAULT;
+			case OrmPackage.CASCADE_TYPE__CASCADE_ALL:
+				return cascadeAll != CASCADE_ALL_EDEFAULT;
+			case OrmPackage.CASCADE_TYPE__CASCADE_PERSIST:
+				return cascadePersist != CASCADE_PERSIST_EDEFAULT;
+			case OrmPackage.CASCADE_TYPE__CASCADE_MERGE:
+				return cascadeMerge != CASCADE_MERGE_EDEFAULT;
+			case OrmPackage.CASCADE_TYPE__CASCADE_REMOVE:
+				return cascadeRemove != CASCADE_REMOVE_EDEFAULT;
+			case OrmPackage.CASCADE_TYPE__CASCADE_REFRESH:
+				return cascadeRefresh != CASCADE_REFRESH_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (cascadeDetach: ");
+		result.append(cascadeDetach);
+		result.append(", cascadeAll: ");
+		result.append(cascadeAll);
+		result.append(", cascadePersist: ");
+		result.append(cascadePersist);
+		result.append(", cascadeMerge: ");
+		result.append(cascadeMerge);
+		result.append(", cascadeRemove: ");
+		result.append(cascadeRemove);
+		result.append(", cascadeRefresh: ");
+		result.append(cascadeRefresh);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildCascadeAllTranslator(),
+			buildCascadePersistTranslator(),
+			buildCascadeMergeTranslator(),
+			buildCascadeRemoveTranslator(),
+			buildCascadeRefreshTranslator(),
+			buildCascadeDetachTranslator()
+		};
+	}
+	
+	protected static Translator buildCascadeAllTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_ALL, OrmPackage.eINSTANCE.getCascadeType_CascadeAll());
+	}
+	
+	protected static Translator buildCascadePersistTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_PERSIST, OrmPackage.eINSTANCE.getCascadeType_CascadePersist());
+	}
+	
+	protected static Translator buildCascadeMergeTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_MERGE, OrmPackage.eINSTANCE.getCascadeType_CascadeMerge());
+	}
+	
+	protected static Translator buildCascadeRemoveTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_REMOVE, OrmPackage.eINSTANCE.getCascadeType_CascadeRemove());
+	}
+
+	protected static Translator buildCascadeRefreshTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_REFRESH, OrmPackage.eINSTANCE.getCascadeType_CascadeRefresh());
+	}
+	
+	protected static Translator buildCascadeDetachTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_DETACH, OrmV2_0Package.eINSTANCE.getXmlCascadeType_2_0_CascadeDetach());
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/ColumnMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/ColumnMapping.java
new file mode 100644
index 0000000..fe4b199
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/ColumnMapping.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Column Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.ColumnMapping#getColumn <em>Column</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface ColumnMapping extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping_Column()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlColumn getColumn();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.ColumnMapping#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	void setColumn(XmlColumn value);
+
+} // ColumnMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/ColumnResult.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/ColumnResult.java
new file mode 100644
index 0000000..336c564
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/ColumnResult.java
@@ -0,0 +1,221 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Column Result</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.ColumnResult#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnResult()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class ColumnResult extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected ColumnResult()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.COLUMN_RESULT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnResult_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.ColumnResult#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.COLUMN_RESULT__NAME, oldName, name));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.COLUMN_RESULT__NAME:
+				return getName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.COLUMN_RESULT__NAME:
+				setName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.COLUMN_RESULT__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.COLUMN_RESULT__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+		};
+	}
+
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getColumnResult_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+} // ColumnResult
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/DiscriminatorType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/DiscriminatorType.java
new file mode 100644
index 0000000..ce4a9a3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/DiscriminatorType.java
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Discriminator Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getDiscriminatorType()
+ * @model
+ * @generated
+ */
+public enum DiscriminatorType implements Enumerator
+{
+	/**
+	 * The '<em><b>STRING</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #STRING_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	STRING(0, "STRING", "STRING"),
+
+	/**
+	 * The '<em><b>CHAR</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #CHAR_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	CHAR(1, "CHAR", "CHAR"),
+
+	/**
+	 * The '<em><b>INTEGER</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #INTEGER_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	INTEGER(2, "INTEGER", "INTEGER");
+
+	/**
+	 * The '<em><b>STRING</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>STRING</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #STRING
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int STRING_VALUE = 0;
+
+	/**
+	 * The '<em><b>CHAR</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>CHAR</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #CHAR
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CHAR_VALUE = 1;
+
+	/**
+	 * The '<em><b>INTEGER</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>INTEGER</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #INTEGER
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int INTEGER_VALUE = 2;
+
+	/**
+	 * An array of all the '<em><b>Discriminator Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final DiscriminatorType[] VALUES_ARRAY =
+		new DiscriminatorType[]
+		{
+			STRING,
+			CHAR,
+			INTEGER,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Discriminator Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<DiscriminatorType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Discriminator Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static DiscriminatorType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			DiscriminatorType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Discriminator Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static DiscriminatorType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			DiscriminatorType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Discriminator Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static DiscriminatorType get(int value)
+	{
+		switch (value)
+		{
+			case STRING_VALUE: return STRING;
+			case CHAR_VALUE: return CHAR;
+			case INTEGER_VALUE: return INTEGER;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private DiscriminatorType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //DiscriminatorType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityListener.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityListener.java
new file mode 100644
index 0000000..cb60fce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityListener.java
@@ -0,0 +1,928 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity Listener</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.EntityListener#getClassName <em>Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListener()
+ * @model kind="class"
+ * @generated
+ */
+public class EntityListener extends AbstractJpaEObject implements XmlEventMethodContainer, XmlEntityListener_2_0
+{
+	/**
+	 * The cached value of the '{@link #getPrePersist() <em>Pre Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrePersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected PrePersist prePersist;
+
+	/**
+	 * The cached value of the '{@link #getPostPersist() <em>Post Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostPersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostPersist postPersist;
+
+	/**
+	 * The cached value of the '{@link #getPreRemove() <em>Pre Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPreRemove()
+	 * @generated
+	 * @ordered
+	 */
+	protected PreRemove preRemove;
+
+	/**
+	 * The cached value of the '{@link #getPostRemove() <em>Post Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostRemove()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostRemove postRemove;
+
+	/**
+	 * The cached value of the '{@link #getPreUpdate() <em>Pre Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPreUpdate()
+	 * @generated
+	 * @ordered
+	 */
+	protected PreUpdate preUpdate;
+
+	/**
+	 * The cached value of the '{@link #getPostUpdate() <em>Post Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostUpdate()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostUpdate postUpdate;
+
+	/**
+	 * The cached value of the '{@link #getPostLoad() <em>Post Load</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostLoad()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostLoad postLoad;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClassName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CLASS_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClassName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String className = CLASS_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected EntityListener()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ENTITY_LISTENER;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Class Name</em>' attribute.
+	 * @see #setClassName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListener_ClassName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getClassName()
+	{
+		return className;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getClassName <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Class Name</em>' attribute.
+	 * @see #getClassName()
+	 * @generated
+	 */
+	public void setClassName(String newClassName)
+	{
+		String oldClassName = className;
+		className = newClassName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__CLASS_NAME, oldClassName, className));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pre Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Persist</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Persist</em>' containment reference.
+	 * @see #setPrePersist(PrePersist)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PrePersist()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PrePersist getPrePersist()
+	{
+		return prePersist;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPrePersist(PrePersist newPrePersist, NotificationChain msgs)
+	{
+		PrePersist oldPrePersist = prePersist;
+		prePersist = newPrePersist;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_PERSIST, oldPrePersist, newPrePersist);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPrePersist <em>Pre Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Persist</em>' containment reference.
+	 * @see #getPrePersist()
+	 * @generated
+	 */
+	public void setPrePersist(PrePersist newPrePersist)
+	{
+		if (newPrePersist != prePersist)
+		{
+			NotificationChain msgs = null;
+			if (prePersist != null)
+				msgs = ((InternalEObject)prePersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_PERSIST, null, msgs);
+			if (newPrePersist != null)
+				msgs = ((InternalEObject)newPrePersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_PERSIST, null, msgs);
+			msgs = basicSetPrePersist(newPrePersist, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_PERSIST, newPrePersist, newPrePersist));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Persist</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Persist</em>' containment reference.
+	 * @see #setPostPersist(PostPersist)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostPersist()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostPersist getPostPersist()
+	{
+		return postPersist;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostPersist(PostPersist newPostPersist, NotificationChain msgs)
+	{
+		PostPersist oldPostPersist = postPersist;
+		postPersist = newPostPersist;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_PERSIST, oldPostPersist, newPostPersist);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPostPersist <em>Post Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Persist</em>' containment reference.
+	 * @see #getPostPersist()
+	 * @generated
+	 */
+	public void setPostPersist(PostPersist newPostPersist)
+	{
+		if (newPostPersist != postPersist)
+		{
+			NotificationChain msgs = null;
+			if (postPersist != null)
+				msgs = ((InternalEObject)postPersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_PERSIST, null, msgs);
+			if (newPostPersist != null)
+				msgs = ((InternalEObject)newPostPersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_PERSIST, null, msgs);
+			msgs = basicSetPostPersist(newPostPersist, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_PERSIST, newPostPersist, newPostPersist));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pre Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Remove</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Remove</em>' containment reference.
+	 * @see #setPreRemove(PreRemove)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreRemove()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PreRemove getPreRemove()
+	{
+		return preRemove;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPreRemove(PreRemove newPreRemove, NotificationChain msgs)
+	{
+		PreRemove oldPreRemove = preRemove;
+		preRemove = newPreRemove;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_REMOVE, oldPreRemove, newPreRemove);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPreRemove <em>Pre Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Remove</em>' containment reference.
+	 * @see #getPreRemove()
+	 * @generated
+	 */
+	public void setPreRemove(PreRemove newPreRemove)
+	{
+		if (newPreRemove != preRemove)
+		{
+			NotificationChain msgs = null;
+			if (preRemove != null)
+				msgs = ((InternalEObject)preRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_REMOVE, null, msgs);
+			if (newPreRemove != null)
+				msgs = ((InternalEObject)newPreRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_REMOVE, null, msgs);
+			msgs = basicSetPreRemove(newPreRemove, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_REMOVE, newPreRemove, newPreRemove));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Remove</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Remove</em>' containment reference.
+	 * @see #setPostRemove(PostRemove)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostRemove()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostRemove getPostRemove()
+	{
+		return postRemove;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostRemove(PostRemove newPostRemove, NotificationChain msgs)
+	{
+		PostRemove oldPostRemove = postRemove;
+		postRemove = newPostRemove;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_REMOVE, oldPostRemove, newPostRemove);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPostRemove <em>Post Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Remove</em>' containment reference.
+	 * @see #getPostRemove()
+	 * @generated
+	 */
+	public void setPostRemove(PostRemove newPostRemove)
+	{
+		if (newPostRemove != postRemove)
+		{
+			NotificationChain msgs = null;
+			if (postRemove != null)
+				msgs = ((InternalEObject)postRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_REMOVE, null, msgs);
+			if (newPostRemove != null)
+				msgs = ((InternalEObject)newPostRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_REMOVE, null, msgs);
+			msgs = basicSetPostRemove(newPostRemove, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_REMOVE, newPostRemove, newPostRemove));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pre Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Update</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Update</em>' containment reference.
+	 * @see #setPreUpdate(PreUpdate)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreUpdate()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PreUpdate getPreUpdate()
+	{
+		return preUpdate;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPreUpdate(PreUpdate newPreUpdate, NotificationChain msgs)
+	{
+		PreUpdate oldPreUpdate = preUpdate;
+		preUpdate = newPreUpdate;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_UPDATE, oldPreUpdate, newPreUpdate);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPreUpdate <em>Pre Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Update</em>' containment reference.
+	 * @see #getPreUpdate()
+	 * @generated
+	 */
+	public void setPreUpdate(PreUpdate newPreUpdate)
+	{
+		if (newPreUpdate != preUpdate)
+		{
+			NotificationChain msgs = null;
+			if (preUpdate != null)
+				msgs = ((InternalEObject)preUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_UPDATE, null, msgs);
+			if (newPreUpdate != null)
+				msgs = ((InternalEObject)newPreUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__PRE_UPDATE, null, msgs);
+			msgs = basicSetPreUpdate(newPreUpdate, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__PRE_UPDATE, newPreUpdate, newPreUpdate));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Update</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Update</em>' containment reference.
+	 * @see #setPostUpdate(PostUpdate)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostUpdate()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostUpdate getPostUpdate()
+	{
+		return postUpdate;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostUpdate(PostUpdate newPostUpdate, NotificationChain msgs)
+	{
+		PostUpdate oldPostUpdate = postUpdate;
+		postUpdate = newPostUpdate;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_UPDATE, oldPostUpdate, newPostUpdate);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPostUpdate <em>Post Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Update</em>' containment reference.
+	 * @see #getPostUpdate()
+	 * @generated
+	 */
+	public void setPostUpdate(PostUpdate newPostUpdate)
+	{
+		if (newPostUpdate != postUpdate)
+		{
+			NotificationChain msgs = null;
+			if (postUpdate != null)
+				msgs = ((InternalEObject)postUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_UPDATE, null, msgs);
+			if (newPostUpdate != null)
+				msgs = ((InternalEObject)newPostUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_UPDATE, null, msgs);
+			msgs = basicSetPostUpdate(newPostUpdate, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_UPDATE, newPostUpdate, newPostUpdate));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Load</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Load</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Load</em>' containment reference.
+	 * @see #setPostLoad(PostLoad)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostLoad()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostLoad getPostLoad()
+	{
+		return postLoad;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostLoad(PostLoad newPostLoad, NotificationChain msgs)
+	{
+		PostLoad oldPostLoad = postLoad;
+		postLoad = newPostLoad;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_LOAD, oldPostLoad, newPostLoad);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getPostLoad <em>Post Load</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Load</em>' containment reference.
+	 * @see #getPostLoad()
+	 * @generated
+	 */
+	public void setPostLoad(PostLoad newPostLoad)
+	{
+		if (newPostLoad != postLoad)
+		{
+			NotificationChain msgs = null;
+			if (postLoad != null)
+				msgs = ((InternalEObject)postLoad).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_LOAD, null, msgs);
+			if (newPostLoad != null)
+				msgs = ((InternalEObject)newPostLoad).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.ENTITY_LISTENER__POST_LOAD, null, msgs);
+			msgs = basicSetPostLoad(newPostLoad, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__POST_LOAD, newPostLoad, newPostLoad));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityListener_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_LISTENER__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
+				return basicSetPrePersist(null, msgs);
+			case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
+				return basicSetPostPersist(null, msgs);
+			case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
+				return basicSetPreRemove(null, msgs);
+			case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
+				return basicSetPostRemove(null, msgs);
+			case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
+				return basicSetPreUpdate(null, msgs);
+			case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
+				return basicSetPostUpdate(null, msgs);
+			case OrmPackage.ENTITY_LISTENER__POST_LOAD:
+				return basicSetPostLoad(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
+				return getPrePersist();
+			case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
+				return getPostPersist();
+			case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
+				return getPreRemove();
+			case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
+				return getPostRemove();
+			case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
+				return getPreUpdate();
+			case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
+				return getPostUpdate();
+			case OrmPackage.ENTITY_LISTENER__POST_LOAD:
+				return getPostLoad();
+			case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
+				return getClassName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
+				setPrePersist((PrePersist)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
+				setPostPersist((PostPersist)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
+				setPreRemove((PreRemove)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
+				setPostRemove((PostRemove)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
+				setPreUpdate((PreUpdate)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
+				setPostUpdate((PostUpdate)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_LOAD:
+				setPostLoad((PostLoad)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
+				setClassName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
+				setPrePersist((PrePersist)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
+				setPostPersist((PostPersist)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
+				setPreRemove((PreRemove)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
+				setPostRemove((PostRemove)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
+				setPreUpdate((PreUpdate)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
+				setPostUpdate((PostUpdate)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__POST_LOAD:
+				setPostLoad((PostLoad)null);
+				return;
+			case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
+				setClassName(CLASS_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENER__PRE_PERSIST:
+				return prePersist != null;
+			case OrmPackage.ENTITY_LISTENER__POST_PERSIST:
+				return postPersist != null;
+			case OrmPackage.ENTITY_LISTENER__PRE_REMOVE:
+				return preRemove != null;
+			case OrmPackage.ENTITY_LISTENER__POST_REMOVE:
+				return postRemove != null;
+			case OrmPackage.ENTITY_LISTENER__PRE_UPDATE:
+				return preUpdate != null;
+			case OrmPackage.ENTITY_LISTENER__POST_UPDATE:
+				return postUpdate != null;
+			case OrmPackage.ENTITY_LISTENER__POST_LOAD:
+				return postLoad != null;
+			case OrmPackage.ENTITY_LISTENER__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.ENTITY_LISTENER__CLASS_NAME:
+				return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlEntityListener_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.ENTITY_LISTENER__DESCRIPTION: return OrmV2_0Package.XML_ENTITY_LISTENER_20__DESCRIPTION;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlEntityListener_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ENTITY_LISTENER_20__DESCRIPTION: return OrmPackage.ENTITY_LISTENER__DESCRIPTION;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", className: ");
+		result.append(className);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildDescriptionTranslator(),
+			buildClassTranslator(),
+			PrePersist.buildTranslator(),
+			PostPersist.buildTranslator(),
+			PreRemove.buildTranslator(),
+			PostRemove.buildTranslator(),
+			PreUpdate.buildTranslator(),
+			PostUpdate.buildTranslator(),
+			PostLoad.buildTranslator()
+		};
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlEntityListener_2_0_Description());
+	}
+	
+	protected static Translator buildClassTranslator() {
+		return new Translator(JPA.CLASS, OrmPackage.eINSTANCE.getEntityListener_ClassName());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityListeners.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityListeners.java
new file mode 100644
index 0000000..c89369d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityListeners.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity Listeners</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.EntityListeners#getEntityListeners <em>Entity Listeners</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListeners()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class EntityListeners extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<EntityListener> entityListeners;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected EntityListeners()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ENTITY_LISTENERS;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.EntityListener}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entity Listeners</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entity Listeners</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListeners_EntityListeners()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<EntityListener> getEntityListeners()
+	{
+		if (entityListeners == null)
+		{
+			entityListeners = new EObjectContainmentEList<EntityListener>(EntityListener.class, this, OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS);
+		}
+		return entityListeners;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
+				return ((InternalEList<?>)getEntityListeners()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
+				return getEntityListeners();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
+				getEntityListeners().clear();
+				getEntityListeners().addAll((Collection<? extends EntityListener>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
+				getEntityListeners().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_LISTENERS__ENTITY_LISTENERS:
+				return entityListeners != null && !entityListeners.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			EntityListener.buildTranslator(JPA.ENTITY_LISTENER, OrmPackage.eINSTANCE.getEntityListeners_EntityListeners())
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityResult.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityResult.java
new file mode 100644
index 0000000..f8110fa
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EntityResult.java
@@ -0,0 +1,363 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity Result</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.EntityResult#getDiscriminatorColumn <em>Discriminator Column</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.EntityResult#getEntityClass <em>Entity Class</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.EntityResult#getFieldResults <em>Field Results</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityResult()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class EntityResult extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDiscriminatorColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DISCRIMINATOR_COLUMN_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDiscriminatorColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected String discriminatorColumn = DISCRIMINATOR_COLUMN_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getEntityClass() <em>Entity Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String ENTITY_CLASS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getEntityClass() <em>Entity Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected String entityClass = ENTITY_CLASS_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getFieldResults() <em>Field Results</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFieldResults()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<FieldResult> fieldResults;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected EntityResult()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.ENTITY_RESULT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Discriminator Column</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Discriminator Column</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Discriminator Column</em>' attribute.
+	 * @see #setDiscriminatorColumn(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityResult_DiscriminatorColumn()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDiscriminatorColumn()
+	{
+		return discriminatorColumn;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityResult#getDiscriminatorColumn <em>Discriminator Column</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Discriminator Column</em>' attribute.
+	 * @see #getDiscriminatorColumn()
+	 * @generated
+	 */
+	public void setDiscriminatorColumn(String newDiscriminatorColumn)
+	{
+		String oldDiscriminatorColumn = discriminatorColumn;
+		discriminatorColumn = newDiscriminatorColumn;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN, oldDiscriminatorColumn, discriminatorColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entity Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entity Class</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entity Class</em>' attribute.
+	 * @see #setEntityClass(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityResult_EntityClass()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getEntityClass()
+	{
+		return entityClass;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EntityResult#getEntityClass <em>Entity Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Entity Class</em>' attribute.
+	 * @see #getEntityClass()
+	 * @generated
+	 */
+	public void setEntityClass(String newEntityClass)
+	{
+		String oldEntityClass = entityClass;
+		entityClass = newEntityClass;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.ENTITY_RESULT__ENTITY_CLASS, oldEntityClass, entityClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Field Results</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.FieldResult}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Field Results</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Field Results</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityResult_FieldResults()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<FieldResult> getFieldResults()
+	{
+		if (fieldResults == null)
+		{
+			fieldResults = new EObjectContainmentEList<FieldResult>(FieldResult.class, this, OrmPackage.ENTITY_RESULT__FIELD_RESULTS);
+		}
+		return fieldResults;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
+				return ((InternalEList<?>)getFieldResults()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
+				return getDiscriminatorColumn();
+			case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
+				return getEntityClass();
+			case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
+				return getFieldResults();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
+				setDiscriminatorColumn((String)newValue);
+				return;
+			case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
+				setEntityClass((String)newValue);
+				return;
+			case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
+				getFieldResults().clear();
+				getFieldResults().addAll((Collection<? extends FieldResult>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
+				setDiscriminatorColumn(DISCRIMINATOR_COLUMN_EDEFAULT);
+				return;
+			case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
+				setEntityClass(ENTITY_CLASS_EDEFAULT);
+				return;
+			case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
+				getFieldResults().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.ENTITY_RESULT__DISCRIMINATOR_COLUMN:
+				return DISCRIMINATOR_COLUMN_EDEFAULT == null ? discriminatorColumn != null : !DISCRIMINATOR_COLUMN_EDEFAULT.equals(discriminatorColumn);
+			case OrmPackage.ENTITY_RESULT__ENTITY_CLASS:
+				return ENTITY_CLASS_EDEFAULT == null ? entityClass != null : !ENTITY_CLASS_EDEFAULT.equals(entityClass);
+			case OrmPackage.ENTITY_RESULT__FIELD_RESULTS:
+				return fieldResults != null && !fieldResults.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (discriminatorColumn: ");
+		result.append(discriminatorColumn);
+		result.append(", entityClass: ");
+		result.append(entityClass);
+		result.append(')');
+		return result.toString();
+	}
+
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildEntityClassTranslator(),
+			buildDiscriminatorColumnTranslator(),
+			FieldResult.buildTranslator(JPA.FIELD_RESULT, OrmPackage.eINSTANCE.getEntityResult_FieldResults()),
+		};
+	}
+	
+	protected static Translator buildEntityClassTranslator() {
+		return new Translator(JPA.ENTITY_CLASS, OrmPackage.eINSTANCE.getEntityResult_EntityClass(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDiscriminatorColumnTranslator() {
+		return new Translator(JPA.DISCRIMINATOR_COLUMN, OrmPackage.eINSTANCE.getEntityResult_DiscriminatorColumn(), Translator.DOM_ATTRIBUTE);
+	}
+} // EntityResult
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EnumType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EnumType.java
new file mode 100644
index 0000000..411b2ff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EnumType.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Enum Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEnumType()
+ * @model
+ * @generated
+ */
+public enum EnumType implements Enumerator
+{
+	/**
+	 * The '<em><b>ORDINAL</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #ORDINAL_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	ORDINAL(0, "ORDINAL", "ORDINAL"),
+
+	/**
+	 * The '<em><b>STRING</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #STRING_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	STRING(1, "STRING", "STRING");
+
+	/**
+	 * The '<em><b>ORDINAL</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>ORDINAL</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #ORDINAL
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ORDINAL_VALUE = 0;
+
+	/**
+	 * The '<em><b>STRING</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>STRING</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #STRING
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int STRING_VALUE = 1;
+
+	/**
+	 * An array of all the '<em><b>Enum Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final EnumType[] VALUES_ARRAY =
+		new EnumType[]
+		{
+			ORDINAL,
+			STRING,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Enum Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<EnumType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Enum Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static EnumType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			EnumType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Enum Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static EnumType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			EnumType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Enum Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static EnumType get(int value)
+	{
+		switch (value)
+		{
+			case ORDINAL_VALUE: return ORDINAL;
+			case STRING_VALUE: return STRING;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EnumType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //EnumType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EventMethod.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EventMethod.java
new file mode 100644
index 0000000..e81d2ce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/EventMethod.java
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Event Method</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.EventMethod#getMethodName <em>Method Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEventMethod()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class EventMethod extends AbstractJpaEObject implements XmlEventMethod_2_0
+{
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+	/**
+	 * The default value of the '{@link #getMethodName() <em>Method Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMethodName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String METHOD_NAME_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getMethodName() <em>Method Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMethodName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String methodName = METHOD_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected EventMethod()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.EVENT_METHOD;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethod_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EventMethod#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.EVENT_METHOD__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Method Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Method Name</em>' attribute.
+	 * @see #setMethodName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEventMethod_MethodName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getMethodName() {
+		return methodName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.EventMethod#getMethodName <em>Method Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Method Name</em>' attribute.
+	 * @see #getMethodName()
+	 * @generated
+	 */
+	public void setMethodName(String newMethodName) {
+		String oldMethodName = methodName;
+		methodName = newMethodName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.EVENT_METHOD__METHOD_NAME, oldMethodName, methodName));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.EVENT_METHOD__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.EVENT_METHOD__METHOD_NAME:
+				return getMethodName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.EVENT_METHOD__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.EVENT_METHOD__METHOD_NAME:
+				setMethodName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.EVENT_METHOD__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.EVENT_METHOD__METHOD_NAME:
+				setMethodName(METHOD_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.EVENT_METHOD__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.EVENT_METHOD__METHOD_NAME:
+				return METHOD_NAME_EDEFAULT == null ? methodName != null : !METHOD_NAME_EDEFAULT.equals(methodName);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", methodName: ");
+		result.append(methodName);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** translators **********
+	
+	protected static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildMethodNameTranslator(),
+			buildDescriptionTranslator()
+		};
+	}
+	
+	protected static Translator buildMethodNameTranslator() {
+		return new Translator(JPA.METHOD_NAME, OrmPackage.eINSTANCE.getEventMethod_MethodName(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlEventMethod_2_0_Description());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/FetchType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/FetchType.java
new file mode 100644
index 0000000..54a7e7d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/FetchType.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Fetch Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFetchType()
+ * @model
+ * @generated
+ */
+public enum FetchType implements Enumerator
+{
+	/**
+	 * The '<em><b>LAZY</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #LAZY_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	LAZY(0, "LAZY", "LAZY"),
+
+	/**
+	 * The '<em><b>EAGER</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #EAGER_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	EAGER(1, "EAGER", "EAGER");
+
+	/**
+	 * The '<em><b>LAZY</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>LAZY</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #LAZY
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int LAZY_VALUE = 0;
+
+	/**
+	 * The '<em><b>EAGER</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>EAGER</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #EAGER
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int EAGER_VALUE = 1;
+
+	/**
+	 * An array of all the '<em><b>Fetch Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final FetchType[] VALUES_ARRAY =
+		new FetchType[]
+		{
+			LAZY,
+			EAGER,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Fetch Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<FetchType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Fetch Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static FetchType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			FetchType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Fetch Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static FetchType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			FetchType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Fetch Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static FetchType get(int value)
+	{
+		switch (value)
+		{
+			case LAZY_VALUE: return LAZY;
+			case EAGER_VALUE: return EAGER;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private FetchType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //FetchType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/FieldResult.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/FieldResult.java
new file mode 100644
index 0000000..5824f42
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/FieldResult.java
@@ -0,0 +1,294 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Field Result</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.FieldResult#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.FieldResult#getColumn <em>Column</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFieldResult()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class FieldResult extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getColumn() <em>Column</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String COLUMN_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getColumn() <em>Column</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected String column = COLUMN_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected FieldResult()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.FIELD_RESULT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFieldResult_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.FieldResult#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.FIELD_RESULT__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' attribute.
+	 * @see #setColumn(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFieldResult_Column()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getColumn()
+	{
+		return column;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.FieldResult#getColumn <em>Column</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' attribute.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	public void setColumn(String newColumn)
+	{
+		String oldColumn = column;
+		column = newColumn;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.FIELD_RESULT__COLUMN, oldColumn, column));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.FIELD_RESULT__NAME:
+				return getName();
+			case OrmPackage.FIELD_RESULT__COLUMN:
+				return getColumn();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.FIELD_RESULT__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.FIELD_RESULT__COLUMN:
+				setColumn((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.FIELD_RESULT__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.FIELD_RESULT__COLUMN:
+				setColumn(COLUMN_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.FIELD_RESULT__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.FIELD_RESULT__COLUMN:
+				return COLUMN_EDEFAULT == null ? column != null : !COLUMN_EDEFAULT.equals(column);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(", column: ");
+		result.append(column);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			createColumnTranslator()
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getFieldResult_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator createColumnTranslator() {
+		return new Translator(JPA.COLUMN, OrmPackage.eINSTANCE.getFieldResult_Column(), Translator.DOM_ATTRIBUTE);
+	}	
+
+} // FieldResult
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/GenerationType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/GenerationType.java
new file mode 100644
index 0000000..64941d6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/GenerationType.java
@@ -0,0 +1,289 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Generation Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getGenerationType()
+ * @model
+ * @generated
+ */
+public enum GenerationType implements Enumerator
+{
+	/**
+	 * The '<em><b>TABLE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #TABLE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	TABLE(0, "TABLE", "TABLE"),
+
+	/**
+	 * The '<em><b>SEQUENCE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #SEQUENCE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	SEQUENCE(1, "SEQUENCE", "SEQUENCE"),
+
+	/**
+	 * The '<em><b>IDENTITY</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #IDENTITY_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	IDENTITY(2, "IDENTITY", "IDENTITY"),
+
+	/**
+	 * The '<em><b>AUTO</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #AUTO_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	AUTO(3, "AUTO", "AUTO");
+
+	/**
+	 * The '<em><b>TABLE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>TABLE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #TABLE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int TABLE_VALUE = 0;
+
+	/**
+	 * The '<em><b>SEQUENCE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>SEQUENCE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #SEQUENCE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SEQUENCE_VALUE = 1;
+
+	/**
+	 * The '<em><b>IDENTITY</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>IDENTITY</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #IDENTITY
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int IDENTITY_VALUE = 2;
+
+	/**
+	 * The '<em><b>AUTO</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>AUTO</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #AUTO
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int AUTO_VALUE = 3;
+
+	/**
+	 * An array of all the '<em><b>Generation Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final GenerationType[] VALUES_ARRAY =
+		new GenerationType[]
+		{
+			TABLE,
+			SEQUENCE,
+			IDENTITY,
+			AUTO,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Generation Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<GenerationType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Generation Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static GenerationType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			GenerationType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Generation Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static GenerationType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			GenerationType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Generation Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static GenerationType get(int value)
+	{
+		switch (value)
+		{
+			case TABLE_VALUE: return TABLE;
+			case SEQUENCE_VALUE: return SEQUENCE;
+			case IDENTITY_VALUE: return IDENTITY;
+			case AUTO_VALUE: return AUTO;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private GenerationType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //GenerationType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Inheritance.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Inheritance.java
new file mode 100644
index 0000000..783e947
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Inheritance.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Inheritance</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.Inheritance#getStrategy <em>Strategy</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritance()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class Inheritance extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final InheritanceType STRATEGY_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getStrategy()
+	 * @generated
+	 * @ordered
+	 */
+	protected InheritanceType strategy = STRATEGY_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected Inheritance()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.INHERITANCE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Strategy</b></em>' attribute.
+	 * The default value is <code>"SINGLE_TABLE"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.InheritanceType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Strategy</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Strategy</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.InheritanceType
+	 * @see #setStrategy(InheritanceType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritance_Strategy()
+	 * @model default="SINGLE_TABLE"
+	 * @generated
+	 */
+	public InheritanceType getStrategy()
+	{
+		return strategy;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.Inheritance#getStrategy <em>Strategy</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Strategy</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.InheritanceType
+	 * @see #getStrategy()
+	 * @generated
+	 */
+	public void setStrategy(InheritanceType newStrategy)
+	{
+		InheritanceType oldStrategy = strategy;
+		strategy = newStrategy == null ? STRATEGY_EDEFAULT : newStrategy;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.INHERITANCE__STRATEGY, oldStrategy, strategy));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.INHERITANCE__STRATEGY:
+				return getStrategy();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.INHERITANCE__STRATEGY:
+				setStrategy((InheritanceType)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.INHERITANCE__STRATEGY:
+				setStrategy(STRATEGY_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.INHERITANCE__STRATEGY:
+				return strategy != STRATEGY_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (strategy: ");
+		result.append(strategy);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getStrategyTextRange() {
+		return getAttributeTextRange(JPA.STRATEGY);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildStrategyTranslator(),
+		};
+	}
+
+	protected static Translator buildStrategyTranslator() {
+		return new Translator(JPA.STRATEGY, OrmPackage.eINSTANCE.getInheritance_Strategy(), Translator.DOM_ATTRIBUTE);
+	}
+	
+} // Inheritance
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/InheritanceType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/InheritanceType.java
new file mode 100644
index 0000000..4d4f250
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/InheritanceType.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Inheritance Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritanceType()
+ * @model
+ * @generated
+ */
+public enum InheritanceType implements Enumerator
+{
+	/**
+	 * The '<em><b>SINGLE TABLE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #SINGLE_TABLE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	SINGLE_TABLE(0, "SINGLE_TABLE", "SINGLE_TABLE"), /**
+	 * The '<em><b>JOINED</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #JOINED_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	JOINED(1, "JOINED", "JOINED"),
+
+	/**
+	 * The '<em><b>TABLE PER CLASS</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #TABLE_PER_CLASS_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	TABLE_PER_CLASS(2, "TABLE_PER_CLASS", "TABLE_PER_CLASS");
+
+	/**
+	 * The '<em><b>SINGLE TABLE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>SINGLE TABLE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #SINGLE_TABLE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SINGLE_TABLE_VALUE = 0;
+
+	/**
+	 * The '<em><b>JOINED</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>JOINED</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #JOINED
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int JOINED_VALUE = 1;
+
+	/**
+	 * The '<em><b>TABLE PER CLASS</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>TABLE PER CLASS</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #TABLE_PER_CLASS
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int TABLE_PER_CLASS_VALUE = 2;
+
+	/**
+	 * An array of all the '<em><b>Inheritance Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final InheritanceType[] VALUES_ARRAY =
+		new InheritanceType[]
+		{
+			SINGLE_TABLE,
+			JOINED,
+			TABLE_PER_CLASS,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Inheritance Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<InheritanceType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Inheritance Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static InheritanceType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			InheritanceType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Inheritance Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static InheritanceType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			InheritanceType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Inheritance Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static InheritanceType get(int value)
+	{
+		switch (value)
+		{
+			case SINGLE_TABLE_VALUE: return SINGLE_TABLE;
+			case JOINED_VALUE: return JOINED;
+			case TABLE_PER_CLASS_VALUE: return TABLE_PER_CLASS;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private InheritanceType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //InheritanceType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/JPA.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/JPA.java
new file mode 100644
index 0000000..d198d89
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/JPA.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Oracle. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+@SuppressWarnings("nls")
+public interface JPA
+{
+	String SCHEMA_NAMESPACE = "http://java.sun.com/xml/ns/persistence/orm";
+	String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
+	String SCHEMA_VERSION = "1.0";
+	
+	String ACCESS = "access";
+	String ALLOCATION_SIZE = "allocation-size";
+	String ASSOCIATION_OVERRIDE = "association-override";
+	String ATTRIBUTE_OVERRIDE = "attribute-override";
+	String ATTRIBUTES = "attributes";
+	String BASIC = "basic";
+	String CASCADE = "cascade";
+	String CASCADE_ALL = "cascade-all";
+	String CASCADE_DETACH = "cascade-detach";	
+	String CASCADE_MERGE = "cascade-merge";
+	String CASCADE_PERSIST = "cascade-persist";
+	String CASCADE_REFRESH = "cascade-refresh";	
+	String CASCADE_REMOVE = "cascade-remove";	
+	String CATALOG = "catalog";
+	String CLASS = "class";
+	String COLUMN = "column";
+	String COLUMN_DEFINITION= "column-definition";
+	String COLUMN_NAME = "column-name";
+	String COLUMN_RESULT = "column-result";
+	String DESCRIPTION = "description";
+	String DISCRIMINATOR_COLUMN = "discriminator-column";
+	String DISCRIMINATOR_TYPE = "discriminator-type";
+	String DISCRIMINATOR_VALUE = "discriminator-value";
+	String EMBEDDABLE = "embeddable";
+	String EMBEDDED = "embedded";
+	String EMBEDDED_ID = "embedded-id";
+	String ENTITY = "entity";
+	String ENTITY_CLASS = "entity-class";
+	String ENTITY_LISTENER = "entity-listener";
+	String ENTITY_LISTENERS = "entity-listeners";
+	String ENTITY_MAPPINGS = "entity-mappings";
+	String ENTITY_RESULT = "entity-result";
+	String ENUMERATED = "enumerated";
+	String EXCLUDE_DEFAULT_LISTENERS = "exclude-default-listeners";
+	String EXCLUDE_SUPERCLASS_LISTENERS = "exclude-superclass-listeners";
+	String FETCH = "fetch";
+	String FIELD_RESULT = "field-result";
+	String GENERATED_VALUE = "generated-value";
+	String GENERATOR = "generator";
+	String HINT = "hint";
+	String ID = "id";
+	String ID_CLASS = "id-class";
+	String INHERITANCE = "inheritance";
+	String INITIAL_VALUE = "initial-value";
+	String INSERTABLE = "insertable";
+	String INVERSE_JOIN_COLUMN = "inverse-join-column";
+	String JOIN_COLUMN = "join-column";
+	String JOIN_TABLE = "join-table";
+	String LENGTH = "length";
+	String LOB = "lob";
+	String MANY_TO_MANY = "many-to-many";
+	String MANY_TO_ONE = "many-to-one";
+	String MAP_KEY = "map-key";
+	String MAPPED_BY = "mapped-by";
+	String MAPPED_SUPERCLASS = "mapped-superclass";
+	String METADATA_COMPLETE = "metadata-complete";
+	String METHOD_NAME = "method-name";
+	String NAME = "name";
+	String NAMED_NATIVE_QUERY = "named-native-query";
+	String NAMED_QUERY = "named-query";
+	String NULLABLE = "nullable";
+	String ONE_TO_MANY = "one-to-many";
+	String ONE_TO_ONE = "one-to-one";
+	String OPTIONAL = "optional";
+	String ORDER_BY = "order-by";
+	String PACKAGE = "package";
+	String PERSISTENCE_UNIT_DEFAULTS = "persistence-unit-defaults";
+	String PERSISTENCE_UNIT_METADATA = "persistence-unit-metadata";
+	String PK_COLUMN_NAME = "pk-column-name";
+	String PK_COLUMN_VALUE = "pk-column-value";
+	String POST_LOAD = "post-load";
+	String POST_PERSIST = "post-persist";
+	String POST_REMOVE = "post-remove";
+	String POST_UPDATE = "post-update";
+	String PRE_PERSIST = "pre-persist";
+	String PRE_REMOVE = "pre-remove";
+	String PRE_UPDATE = "pre-update";
+	String PRECISION= "precision";
+	String PRIMARY_KEY_JOIN_COLUMN = "primary-key-join-column";
+	String QUERY = "query";
+	String REFERENCED_COLUMN_NAME = "referenced-column-name";
+	String RESULT_CLASS = "result-class";
+	String RESULT_SET_MAPPING = "result-set-mapping";
+	String SCALE= "scale";
+	String SCHEMA = "schema";
+	String SECONDARY_TABLE = "secondary-table";
+	String SEQUENCE_GENERATOR = "sequence-generator";
+	String SEQUENCE_NAME = "sequence-name";
+	String SQL_RESULT_SET_MAPPING = "sql-result-set-mapping";
+	String STRATEGY = "strategy";
+	String TABLE = "table";
+	String TABLE_GENERATOR = "table-generator";
+	String TARGET_ENTITY = "target-entity";
+	String TEMPORAL = "temporal";
+	String TRANSIENT = "transient";
+	String UNIQUE = "unique";
+	String UNIQUE_CONSTRAINT = "unique-constraint";
+	String UPDATABLE = "updatable";
+	String VALUE = "value";
+	String VALUE_COLUMN_NAME = "value-column-name";
+	String VERSION = "version";
+	String XML_MAPPING_METADATA_COMPLETE = "xml-mapping-metadata-complete";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Lob.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Lob.java
new file mode 100644
index 0000000..00c17b7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/Lob.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Lob</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getLob()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class Lob extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected Lob()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.LOB;
+	}
+
+} // Lob
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/MapKey.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/MapKey.java
new file mode 100644
index 0000000..845a5cb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/MapKey.java
@@ -0,0 +1,221 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Map Key</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.MapKey#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getMapKey()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class MapKey extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected MapKey()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.MAP_KEY;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getMapKey_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.MapKey#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.MAP_KEY__NAME, oldName, name));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.MAP_KEY__NAME:
+				return getName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.MAP_KEY__NAME:
+				setName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.MAP_KEY__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.MAP_KEY__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(')');
+		return result.toString();
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getMapKey_Name(), Translator.DOM_ATTRIBUTE);
+	}
+
+} // MapKey
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmFactory.java
new file mode 100644
index 0000000..f2a39a1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmFactory.java
@@ -0,0 +1,970 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage
+ * @generated
+ */
+public class OrmFactory extends EFactoryImpl
+{
+	/**
+	 * The singleton instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final OrmFactory eINSTANCE = init();
+
+	/**
+	 * Creates the default factory implementation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static OrmFactory init()
+	{
+		try
+		{
+			OrmFactory theOrmFactory = (OrmFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.orm.xmi"); 
+			if (theOrmFactory != null)
+			{
+				return theOrmFactory;
+			}
+		}
+		catch (Exception exception)
+		{
+			EcorePlugin.INSTANCE.log(exception);
+		}
+		return new OrmFactory();
+	}
+
+	/**
+	 * Creates an instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public OrmFactory()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public EObject create(EClass eClass)
+	{
+		switch (eClass.getClassifierID())
+		{
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE: return (EObject)createXmlAssociationOverride();
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE: return (EObject)createXmlAttributeOverride();
+			case OrmPackage.ATTRIBUTES: return (EObject)createAttributes();
+			case OrmPackage.XML_BASIC: return (EObject)createXmlBasic();
+			case OrmPackage.CASCADE_TYPE: return (EObject)createCascadeType();
+			case OrmPackage.XML_CLASS_REFERENCE: return (EObject)createXmlClassReference();
+			case OrmPackage.XML_COLLECTION_TABLE: return (EObject)createXmlCollectionTable();
+			case OrmPackage.XML_COLUMN: return (EObject)createXmlColumn();
+			case OrmPackage.COLUMN_RESULT: return (EObject)createColumnResult();
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN: return (EObject)createXmlDiscriminatorColumn();
+			case OrmPackage.XML_ELEMENT_COLLECTION: return (EObject)createXmlElementCollection();
+			case OrmPackage.XML_EMBEDDABLE: return (EObject)createXmlEmbeddable();
+			case OrmPackage.XML_EMBEDDED: return (EObject)createXmlEmbedded();
+			case OrmPackage.XML_EMBEDDED_ID: return (EObject)createXmlEmbeddedId();
+			case OrmPackage.XML_ENTITY: return (EObject)createXmlEntity();
+			case OrmPackage.ENTITY_LISTENER: return (EObject)createEntityListener();
+			case OrmPackage.ENTITY_LISTENERS: return (EObject)createEntityListeners();
+			case OrmPackage.XML_ENTITY_MAPPINGS: return (EObject)createXmlEntityMappings();
+			case OrmPackage.ENTITY_RESULT: return (EObject)createEntityResult();
+			case OrmPackage.FIELD_RESULT: return (EObject)createFieldResult();
+			case OrmPackage.XML_GENERATED_VALUE: return (EObject)createXmlGeneratedValue();
+			case OrmPackage.XML_ID: return (EObject)createXmlId();
+			case OrmPackage.INHERITANCE: return (EObject)createInheritance();
+			case OrmPackage.XML_JOIN_COLUMN: return (EObject)createXmlJoinColumn();
+			case OrmPackage.XML_JOIN_TABLE: return (EObject)createXmlJoinTable();
+			case OrmPackage.LOB: return (EObject)createLob();
+			case OrmPackage.XML_MANY_TO_MANY: return (EObject)createXmlManyToMany();
+			case OrmPackage.XML_MANY_TO_ONE: return (EObject)createXmlManyToOne();
+			case OrmPackage.MAP_KEY: return (EObject)createMapKey();
+			case OrmPackage.XML_MAPPED_SUPERCLASS: return (EObject)createXmlMappedSuperclass();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY: return (EObject)createXmlNamedNativeQuery();
+			case OrmPackage.XML_NAMED_QUERY: return (EObject)createXmlNamedQuery();
+			case OrmPackage.XML_ONE_TO_MANY: return (EObject)createXmlOneToMany();
+			case OrmPackage.XML_ONE_TO_ONE: return (EObject)createXmlOneToOne();
+			case OrmPackage.XML_ORDER_COLUMN: return (EObject)createXmlOrderColumn();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS: return (EObject)createXmlPersistenceUnitDefaults();
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA: return (EObject)createXmlPersistenceUnitMetadata();
+			case OrmPackage.POST_LOAD: return (EObject)createPostLoad();
+			case OrmPackage.POST_PERSIST: return (EObject)createPostPersist();
+			case OrmPackage.POST_REMOVE: return (EObject)createPostRemove();
+			case OrmPackage.POST_UPDATE: return (EObject)createPostUpdate();
+			case OrmPackage.PRE_PERSIST: return (EObject)createPrePersist();
+			case OrmPackage.PRE_REMOVE: return (EObject)createPreRemove();
+			case OrmPackage.PRE_UPDATE: return (EObject)createPreUpdate();
+			case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN: return (EObject)createXmlPrimaryKeyJoinColumn();
+			case OrmPackage.XML_QUERY_HINT: return (EObject)createXmlQueryHint();
+			case OrmPackage.XML_SECONDARY_TABLE: return (EObject)createXmlSecondaryTable();
+			case OrmPackage.XML_SEQUENCE_GENERATOR: return (EObject)createXmlSequenceGenerator();
+			case OrmPackage.SQL_RESULT_SET_MAPPING: return (EObject)createSqlResultSetMapping();
+			case OrmPackage.XML_TABLE: return (EObject)createXmlTable();
+			case OrmPackage.XML_TABLE_GENERATOR: return (EObject)createXmlTableGenerator();
+			case OrmPackage.XML_TRANSIENT: return (EObject)createXmlTransient();
+			case OrmPackage.XML_UNIQUE_CONSTRAINT: return (EObject)createXmlUniqueConstraint();
+			case OrmPackage.XML_VERSION: return (EObject)createXmlVersion();
+			default:
+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object createFromString(EDataType eDataType, String initialValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case OrmPackage.ACCESS_TYPE:
+				return createAccessTypeFromString(eDataType, initialValue);
+			case OrmPackage.DISCRIMINATOR_TYPE:
+				return createDiscriminatorTypeFromString(eDataType, initialValue);
+			case OrmPackage.ENUM_TYPE:
+				return createEnumTypeFromString(eDataType, initialValue);
+			case OrmPackage.FETCH_TYPE:
+				return createFetchTypeFromString(eDataType, initialValue);
+			case OrmPackage.GENERATION_TYPE:
+				return createGenerationTypeFromString(eDataType, initialValue);
+			case OrmPackage.INHERITANCE_TYPE:
+				return createInheritanceTypeFromString(eDataType, initialValue);
+			case OrmPackage.TEMPORAL_TYPE:
+				return createTemporalTypeFromString(eDataType, initialValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String convertToString(EDataType eDataType, Object instanceValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case OrmPackage.ACCESS_TYPE:
+				return convertAccessTypeToString(eDataType, instanceValue);
+			case OrmPackage.DISCRIMINATOR_TYPE:
+				return convertDiscriminatorTypeToString(eDataType, instanceValue);
+			case OrmPackage.ENUM_TYPE:
+				return convertEnumTypeToString(eDataType, instanceValue);
+			case OrmPackage.FETCH_TYPE:
+				return convertFetchTypeToString(eDataType, instanceValue);
+			case OrmPackage.GENERATION_TYPE:
+				return convertGenerationTypeToString(eDataType, instanceValue);
+			case OrmPackage.INHERITANCE_TYPE:
+				return convertInheritanceTypeToString(eDataType, instanceValue);
+			case OrmPackage.TEMPORAL_TYPE:
+				return convertTemporalTypeToString(eDataType, instanceValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlAssociationOverride createXmlAssociationOverride()
+	{
+		XmlAssociationOverride xmlAssociationOverride = new XmlAssociationOverride();
+		return xmlAssociationOverride;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlAttributeOverride createXmlAttributeOverride()
+	{
+		XmlAttributeOverride xmlAttributeOverride = new XmlAttributeOverride();
+		return xmlAttributeOverride;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Attributes createAttributes()
+	{
+		Attributes attributes = new Attributes();
+		return attributes;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlBasic createXmlBasic()
+	{
+		XmlBasic xmlBasic = new XmlBasic();
+		return xmlBasic;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CascadeType createCascadeType()
+	{
+		CascadeType cascadeType = new CascadeType();
+		return cascadeType;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlClassReference createXmlClassReference()
+	{
+		XmlClassReference xmlClassReference = new XmlClassReference();
+		return xmlClassReference;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlCollectionTable createXmlCollectionTable()
+	{
+		XmlCollectionTable xmlCollectionTable = new XmlCollectionTable();
+		return xmlCollectionTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlColumn createXmlColumn()
+	{
+		XmlColumn xmlColumn = new XmlColumn();
+		return xmlColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public ColumnResult createColumnResult()
+	{
+		ColumnResult columnResult = new ColumnResult();
+		return columnResult;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlDiscriminatorColumn createXmlDiscriminatorColumn()
+	{
+		XmlDiscriminatorColumn xmlDiscriminatorColumn = new XmlDiscriminatorColumn();
+		return xmlDiscriminatorColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlElementCollection createXmlElementCollection()
+	{
+		XmlElementCollection xmlElementCollection = new XmlElementCollection();
+		return xmlElementCollection;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlEmbeddable createXmlEmbeddable()
+	{
+		XmlEmbeddable xmlEmbeddable = new XmlEmbeddable();
+		return xmlEmbeddable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlEmbedded createXmlEmbedded()
+	{
+		XmlEmbedded xmlEmbedded = new XmlEmbedded();
+		return xmlEmbedded;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlEmbeddedId createXmlEmbeddedId()
+	{
+		XmlEmbeddedId xmlEmbeddedId = new XmlEmbeddedId();
+		return xmlEmbeddedId;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlEntity createXmlEntity()
+	{
+		XmlEntity xmlEntity = new XmlEntity();
+		return xmlEntity;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EntityListener createEntityListener()
+	{
+		EntityListener entityListener = new EntityListener();
+		return entityListener;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EntityListeners createEntityListeners()
+	{
+		EntityListeners entityListeners = new EntityListeners();
+		return entityListeners;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlEntityMappings createXmlEntityMappings()
+	{
+		XmlEntityMappings xmlEntityMappings = new XmlEntityMappings();
+		return xmlEntityMappings;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EntityResult createEntityResult()
+	{
+		EntityResult entityResult = new EntityResult();
+		return entityResult;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public FieldResult createFieldResult()
+	{
+		FieldResult fieldResult = new FieldResult();
+		return fieldResult;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlGeneratedValue createXmlGeneratedValue()
+	{
+		XmlGeneratedValue xmlGeneratedValue = new XmlGeneratedValue();
+		return xmlGeneratedValue;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlId createXmlId()
+	{
+		XmlId xmlId = new XmlId();
+		return xmlId;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Inheritance createInheritance()
+	{
+		Inheritance inheritance = new Inheritance();
+		return inheritance;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlJoinColumn createXmlJoinColumn()
+	{
+		XmlJoinColumn xmlJoinColumn = new XmlJoinColumn();
+		return xmlJoinColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlJoinTable createXmlJoinTable()
+	{
+		XmlJoinTable xmlJoinTable = new XmlJoinTable();
+		return xmlJoinTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Lob createLob()
+	{
+		Lob lob = new Lob();
+		return lob;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlManyToMany createXmlManyToMany()
+	{
+		XmlManyToMany xmlManyToMany = new XmlManyToMany();
+		return xmlManyToMany;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlManyToOne createXmlManyToOne()
+	{
+		XmlManyToOne xmlManyToOne = new XmlManyToOne();
+		return xmlManyToOne;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public MapKey createMapKey()
+	{
+		MapKey mapKey = new MapKey();
+		return mapKey;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlMappedSuperclass createXmlMappedSuperclass()
+	{
+		XmlMappedSuperclass xmlMappedSuperclass = new XmlMappedSuperclass();
+		return xmlMappedSuperclass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlNamedNativeQuery createXmlNamedNativeQuery()
+	{
+		XmlNamedNativeQuery xmlNamedNativeQuery = new XmlNamedNativeQuery();
+		return xmlNamedNativeQuery;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlNamedQuery createXmlNamedQuery()
+	{
+		XmlNamedQuery xmlNamedQuery = new XmlNamedQuery();
+		return xmlNamedQuery;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlOneToMany createXmlOneToMany()
+	{
+		XmlOneToMany xmlOneToMany = new XmlOneToMany();
+		return xmlOneToMany;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlOneToOne createXmlOneToOne()
+	{
+		XmlOneToOne xmlOneToOne = new XmlOneToOne();
+		return xmlOneToOne;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlOrderColumn createXmlOrderColumn()
+	{
+		XmlOrderColumn xmlOrderColumn = new XmlOrderColumn();
+		return xmlOrderColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistenceUnitDefaults createXmlPersistenceUnitDefaults()
+	{
+		XmlPersistenceUnitDefaults xmlPersistenceUnitDefaults = new XmlPersistenceUnitDefaults();
+		return xmlPersistenceUnitDefaults;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistenceUnitMetadata createXmlPersistenceUnitMetadata()
+	{
+		XmlPersistenceUnitMetadata xmlPersistenceUnitMetadata = new XmlPersistenceUnitMetadata();
+		return xmlPersistenceUnitMetadata;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PostLoad createPostLoad()
+	{
+		PostLoad postLoad = new PostLoad();
+		return postLoad;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PostPersist createPostPersist()
+	{
+		PostPersist postPersist = new PostPersist();
+		return postPersist;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PostRemove createPostRemove()
+	{
+		PostRemove postRemove = new PostRemove();
+		return postRemove;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PostUpdate createPostUpdate()
+	{
+		PostUpdate postUpdate = new PostUpdate();
+		return postUpdate;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PrePersist createPrePersist()
+	{
+		PrePersist prePersist = new PrePersist();
+		return prePersist;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PreRemove createPreRemove()
+	{
+		PreRemove preRemove = new PreRemove();
+		return preRemove;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PreUpdate createPreUpdate()
+	{
+		PreUpdate preUpdate = new PreUpdate();
+		return preUpdate;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPrimaryKeyJoinColumn createXmlPrimaryKeyJoinColumn()
+	{
+		XmlPrimaryKeyJoinColumn xmlPrimaryKeyJoinColumn = new XmlPrimaryKeyJoinColumn();
+		return xmlPrimaryKeyJoinColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlQueryHint createXmlQueryHint()
+	{
+		XmlQueryHint xmlQueryHint = new XmlQueryHint();
+		return xmlQueryHint;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlSecondaryTable createXmlSecondaryTable()
+	{
+		XmlSecondaryTable xmlSecondaryTable = new XmlSecondaryTable();
+		return xmlSecondaryTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlSequenceGenerator createXmlSequenceGenerator()
+	{
+		XmlSequenceGenerator xmlSequenceGenerator = new XmlSequenceGenerator();
+		return xmlSequenceGenerator;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public SqlResultSetMapping createSqlResultSetMapping()
+	{
+		SqlResultSetMapping sqlResultSetMapping = new SqlResultSetMapping();
+		return sqlResultSetMapping;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlTable createXmlTable()
+	{
+		XmlTable xmlTable = new XmlTable();
+		return xmlTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlTableGenerator createXmlTableGenerator()
+	{
+		XmlTableGenerator xmlTableGenerator = new XmlTableGenerator();
+		return xmlTableGenerator;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlTransient createXmlTransient()
+	{
+		XmlTransient xmlTransient = new XmlTransient();
+		return xmlTransient;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlUniqueConstraint createXmlUniqueConstraint()
+	{
+		XmlUniqueConstraint xmlUniqueConstraint = new XmlUniqueConstraint();
+		return xmlUniqueConstraint;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlVersion createXmlVersion()
+	{
+		XmlVersion xmlVersion = new XmlVersion();
+		return xmlVersion;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AccessType createAccessTypeFromString(EDataType eDataType, String initialValue)
+	{
+		AccessType result = AccessType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertAccessTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public DiscriminatorType createDiscriminatorTypeFromString(EDataType eDataType, String initialValue)
+	{
+		DiscriminatorType result = DiscriminatorType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertDiscriminatorTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EnumType createEnumTypeFromString(EDataType eDataType, String initialValue)
+	{
+		EnumType result = EnumType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertEnumTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public FetchType createFetchTypeFromString(EDataType eDataType, String initialValue)
+	{
+		FetchType result = FetchType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertFetchTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public GenerationType createGenerationTypeFromString(EDataType eDataType, String initialValue)
+	{
+		GenerationType result = GenerationType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertGenerationTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public InheritanceType createInheritanceTypeFromString(EDataType eDataType, String initialValue)
+	{
+		InheritanceType result = InheritanceType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertInheritanceTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TemporalType createTemporalTypeFromString(EDataType eDataType, String initialValue)
+	{
+		TemporalType result = TemporalType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertTemporalTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public OrmPackage getOrmPackage()
+	{
+		return (OrmPackage)getEPackage();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @deprecated
+	 * @generated
+	 */
+	@Deprecated
+	public static OrmPackage getPackage()
+	{
+		return OrmPackage.eINSTANCE;
+	}
+
+} //OrmFactory
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmPackage.java
new file mode 100644
index 0000000..eb17fee
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmPackage.java
@@ -0,0 +1,12487 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.persistence.PersistencePackage;
+import org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package;
+import org.eclipse.jpt.core.resource.xml.CommonPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmFactory
+ * @model kind="package"
+ * @generated
+ */
+public class OrmPackage extends EPackageImpl
+{
+	/**
+	 * The package name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNAME = "orm";
+
+	/**
+	 * The package namespace URI.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_URI = "jpt.orm.xmi";
+
+	/**
+	 * The package namespace name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_PREFIX = "org.eclipse.jpt.core.resource.orm";
+
+	/**
+	 * The singleton instance of the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final OrmPackage eINSTANCE = org.eclipse.jpt.core.resource.orm.OrmPackage.init();
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlAccessHolder <em>Xml Access Holder</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAccessHolder
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder()
+	 * @generated
+	 */
+	public static final int XML_ACCESS_HOLDER = 10;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ACCESS_HOLDER__ACCESS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Access Holder</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ACCESS_HOLDER_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeMapping <em>Xml Attribute Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeMapping()
+	 * @generated
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING = 11;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING__ACCESS = OrmV2_0Package.XML_ATTRIBUTE_MAPPING_20__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING__NAME = OrmV2_0Package.XML_ATTRIBUTE_MAPPING_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Attribute Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING_FEATURE_COUNT = OrmV2_0Package.XML_ATTRIBUTE_MAPPING_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping <em>Abstract Xml Attribute Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlAttributeMapping()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING = 0;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS = XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME = XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Attribute Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT = XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn <em>Abstract Xml Named Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_NAMED_COLUMN = 4;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION = 0;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_NAMED_COLUMN__NAME = 1;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Named Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT = 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn <em>Abstract Xml Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_COLUMN = 1;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__INSERTABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__NULLABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Table</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__TABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Unique</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__UNIQUE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN__UPDATABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 4;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 5;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded <em>Abstract Xml Embedded</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlEmbedded()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_EMBEDDED = 2;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_EMBEDDED__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_EMBEDDED__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Embedded</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_EMBEDDED_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping <em>Abstract Xml Relationship Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING = 5;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Relationship Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping <em>Abstract Xml Multi Relationship Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING = 3;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ACCESS = ABSTRACT_XML_RELATIONSHIP_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__NAME = ABSTRACT_XML_RELATIONSHIP_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY = ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__FETCH = ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__CASCADE = ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE;
+
+	/**
+	 * The feature id for the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 9;
+
+	/**
+	 * The feature id for the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 10;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Multi Relationship Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 11;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping <em>Abstract Xml Single Relationship Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING = 6;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ACCESS = ABSTRACT_XML_RELATIONSHIP_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__NAME = ABSTRACT_XML_RELATIONSHIP_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY = ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__FETCH = ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__CASCADE = ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Optional</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Single Relationship Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT = ABSTRACT_XML_RELATIONSHIP_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable <em>Abstract Xml Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_TABLE = 8;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TABLE__NAME = 0;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TABLE__CATALOG = 1;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TABLE__SCHEMA = 2;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS = 3;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TABLE_FEATURE_COUNT = 4;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping <em>Xml Type Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping()
+	 * @generated
+	 */
+	public static final int XML_TYPE_MAPPING = 82;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping <em>Abstract Xml Type Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTypeMapping()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING = 9;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping <em>Xml Join Columns Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping()
+	 * @generated
+	 */
+	public static final int XML_JOIN_COLUMNS_MAPPING = 45;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride <em>Xml Association Override</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverride
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverride()
+	 * @generated
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE = 12;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer <em>Xml Association Override Container</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer()
+	 * @generated
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_CONTAINER = 13;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride <em>Xml Attribute Override</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverride
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverride()
+	 * @generated
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE = 14;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer <em>Xml Attribute Override Container</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer()
+	 * @generated
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_CONTAINER = 15;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.Attributes <em>Attributes</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes()
+	 * @generated
+	 */
+	public static final int ATTRIBUTES = 16;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic <em>Xml Basic</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlBasic
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlBasic()
+	 * @generated
+	 */
+	public static final int XML_BASIC = 17;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.CascadeType <em>Cascade Type</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType()
+	 * @generated
+	 */
+	public static final int CASCADE_TYPE = 18;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable <em>Abstract Xml Reference Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlReferenceTable()
+	 * @generated
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE = 7;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE__NAME = ABSTRACT_XML_TABLE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE__CATALOG = ABSTRACT_XML_TABLE__CATALOG;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE__SCHEMA = ABSTRACT_XML_TABLE__SCHEMA;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS = ABSTRACT_XML_TABLE_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Reference Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT = ABSTRACT_XML_TABLE_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TYPE_MAPPING__ACCESS = XML_ACCESS_HOLDER__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TYPE_MAPPING__CLASS_NAME = XML_ACCESS_HOLDER_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TYPE_MAPPING__METADATA_COMPLETE = XML_ACCESS_HOLDER_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TYPE_MAPPING__DESCRIPTION = XML_ACCESS_HOLDER_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TYPE_MAPPING__ATTRIBUTES = XML_ACCESS_HOLDER_FEATURE_COUNT + 3;
+
+	/**
+	 * The number of structural features of the '<em>Xml Type Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TYPE_MAPPING_FEATURE_COUNT = XML_ACCESS_HOLDER_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING__ACCESS = XML_TYPE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME = XML_TYPE_MAPPING__CLASS_NAME;
+
+	/**
+	 * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE = XML_TYPE_MAPPING__METADATA_COMPLETE;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION = XML_TYPE_MAPPING__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES = XML_TYPE_MAPPING__ATTRIBUTES;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Xml Type Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT = XML_TYPE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlOverride <em>Xml Override</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOverride
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOverride()
+	 * @generated
+	 */
+	public static final int XML_OVERRIDE = 61;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_OVERRIDE__NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Override</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_OVERRIDE_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE__NAME = XML_OVERRIDE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS = XML_OVERRIDE_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE__DESCRIPTION = XML_OVERRIDE_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE__JOIN_TABLE = XML_OVERRIDE_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Association Override</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_FEATURE_COUNT = XML_OVERRIDE_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Association Override Container</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_CONTAINER_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE__NAME = XML_OVERRIDE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE__DESCRIPTION = XML_OVERRIDE_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE__COLUMN = XML_OVERRIDE_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Attribute Override</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_FEATURE_COUNT = XML_OVERRIDE_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Attribute Override Container</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_CONTAINER_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__DESCRIPTION = OrmV2_0Package.XML_ATTRIBUTES_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Element Collections</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__ELEMENT_COLLECTIONS = OrmV2_0Package.XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS;
+
+	/**
+	 * The feature id for the '<em><b>Ids</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__IDS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Embedded Ids</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__EMBEDDED_IDS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Basics</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__BASICS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Versions</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__VERSIONS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Many To Ones</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__MANY_TO_ONES = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>One To Manys</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__ONE_TO_MANYS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>One To Ones</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__ONE_TO_ONES = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Many To Manys</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__MANY_TO_MANYS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Embeddeds</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__EMBEDDEDS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Transients</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES__TRANSIENTS = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 9;
+
+	/**
+	 * The number of structural features of the '<em>Attributes</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ATTRIBUTES_FEATURE_COUNT = OrmV2_0Package.XML_ATTRIBUTES_20_FEATURE_COUNT + 10;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__FETCH = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Optional</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC__OPTIONAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The number of structural features of the '<em>Xml Basic</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_BASIC_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Detach</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE__CASCADE_DETACH = OrmV2_0Package.XML_CASCADE_TYPE_20__CASCADE_DETACH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade All</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE__CASCADE_ALL = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Persist</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE__CASCADE_PERSIST = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Merge</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE__CASCADE_MERGE = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Remove</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE__CASCADE_REMOVE = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Refresh</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE__CASCADE_REFRESH = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 4;
+
+	/**
+	 * The number of structural features of the '<em>Cascade Type</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CASCADE_TYPE_FEATURE_COUNT = OrmV2_0Package.XML_CASCADE_TYPE_20_FEATURE_COUNT + 5;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlClassReference <em>Xml Class Reference</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlClassReference
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlClassReference()
+	 * @generated
+	 */
+	public static final int XML_CLASS_REFERENCE = 19;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CLASS_REFERENCE__CLASS_NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Class Reference</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CLASS_REFERENCE_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlCollectionTable <em>Xml Collection Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlCollectionTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlCollectionTable()
+	 * @generated
+	 */
+	public static final int XML_COLLECTION_TABLE = 20;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE__NAME = ABSTRACT_XML_REFERENCE_TABLE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE__CATALOG = ABSTRACT_XML_REFERENCE_TABLE__CATALOG;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE__SCHEMA = ABSTRACT_XML_REFERENCE_TABLE__SCHEMA;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_REFERENCE_TABLE__UNIQUE_CONSTRAINTS;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE__JOIN_COLUMNS = ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS;
+
+	/**
+	 * The number of structural features of the '<em>Xml Collection Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE_FEATURE_COUNT = ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlColumn <em>Xml Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlColumn()
+	 * @generated
+	 */
+	public static final int XML_COLUMN = 21;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_COLUMN__COLUMN_DEFINITION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__NAME = ABSTRACT_XML_COLUMN__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__INSERTABLE = ABSTRACT_XML_COLUMN__INSERTABLE;
+
+	/**
+	 * The feature id for the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__NULLABLE = ABSTRACT_XML_COLUMN__NULLABLE;
+
+	/**
+	 * The feature id for the '<em><b>Table</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__TABLE = ABSTRACT_XML_COLUMN__TABLE;
+
+	/**
+	 * The feature id for the '<em><b>Unique</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__UNIQUE = ABSTRACT_XML_COLUMN__UNIQUE;
+
+	/**
+	 * The feature id for the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__UPDATABLE = ABSTRACT_XML_COLUMN__UPDATABLE;
+
+	/**
+	 * The feature id for the '<em><b>Length</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__LENGTH = ABSTRACT_XML_COLUMN_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Precision</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__PRECISION = ABSTRACT_XML_COLUMN_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Scale</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN__SCALE = ABSTRACT_XML_COLUMN_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLUMN_FEATURE_COUNT = ABSTRACT_XML_COLUMN_FEATURE_COUNT + 3;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.ColumnMapping <em>Column Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.ColumnMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping()
+	 * @generated
+	 */
+	public static final int COLUMN_MAPPING = 22;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int COLUMN_MAPPING__COLUMN = 0;
+
+	/**
+	 * The number of structural features of the '<em>Column Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int COLUMN_MAPPING_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.ColumnResult <em>Column Result</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.ColumnResult
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnResult()
+	 * @generated
+	 */
+	public static final int COLUMN_RESULT = 23;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int COLUMN_RESULT__NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Column Result</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int COLUMN_RESULT_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping <em>Xml Convertible Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping()
+	 * @generated
+	 */
+	public static final int XML_CONVERTIBLE_MAPPING = 24;
+
+	/**
+	 * The feature id for the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CONVERTIBLE_MAPPING__LOB = 0;
+
+	/**
+	 * The feature id for the '<em><b>Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CONVERTIBLE_MAPPING__TEMPORAL = 1;
+
+	/**
+	 * The feature id for the '<em><b>Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CONVERTIBLE_MAPPING__ENUMERATED = 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Convertible Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CONVERTIBLE_MAPPING_FEATURE_COUNT = 3;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn <em>Xml Discriminator Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn()
+	 * @generated
+	 */
+	public static final int XML_DISCRIMINATOR_COLUMN = 25;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DISCRIMINATOR_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DISCRIMINATOR_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Discriminator Type</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Length</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DISCRIMINATOR_COLUMN__LENGTH = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Discriminator Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DISCRIMINATOR_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection <em>Xml Element Collection</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlElementCollection
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection()
+	 * @generated
+	 */
+	public static final int XML_ELEMENT_COLLECTION = 26;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__ORDER_COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__ORDER_BY = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Target Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__TARGET_CLASS = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__FETCH = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 9;
+
+	/**
+	 * The feature id for the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 10;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY_CLASS = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 11;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 12;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 13;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 14;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 15;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 16;
+
+	/**
+	 * The feature id for the '<em><b>Collection Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION__COLLECTION_TABLE = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 17;
+
+	/**
+	 * The number of structural features of the '<em>Xml Element Collection</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 18;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlEmbeddable <em>Xml Embeddable</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEmbeddable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbeddable()
+	 * @generated
+	 */
+	public static final int XML_EMBEDDABLE = 27;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDABLE__ACCESS = ABSTRACT_XML_TYPE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDABLE__CLASS_NAME = ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME;
+
+	/**
+	 * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDABLE__METADATA_COMPLETE = ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDABLE__DESCRIPTION = ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDABLE__ATTRIBUTES = ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES;
+
+	/**
+	 * The number of structural features of the '<em>Xml Embeddable</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDABLE_FEATURE_COUNT = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlEmbedded <em>Xml Embedded</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEmbedded
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbedded()
+	 * @generated
+	 */
+	public static final int XML_EMBEDDED = 28;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED__ACCESS = ABSTRACT_XML_EMBEDDED__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED__NAME = ABSTRACT_XML_EMBEDDED__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES;
+
+	/**
+	 * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED__ASSOCIATION_OVERRIDES = ABSTRACT_XML_EMBEDDED_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Embedded</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_FEATURE_COUNT = ABSTRACT_XML_EMBEDDED_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlEmbeddedId <em>Xml Embedded Id</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEmbeddedId
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbeddedId()
+	 * @generated
+	 */
+	public static final int XML_EMBEDDED_ID = 29;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_ID__ACCESS = ABSTRACT_XML_EMBEDDED__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_ID__NAME = ABSTRACT_XML_EMBEDDED__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_ID__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_EMBEDDED__ATTRIBUTE_OVERRIDES;
+
+	/**
+	 * The number of structural features of the '<em>Xml Embedded Id</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_ID_FEATURE_COUNT = ABSTRACT_XML_EMBEDDED_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity <em>Xml Entity</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity()
+	 * @generated
+	 */
+	public static final int XML_ENTITY = 30;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__ACCESS = ABSTRACT_XML_TYPE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__CLASS_NAME = ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME;
+
+	/**
+	 * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__METADATA_COMPLETE = ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__DESCRIPTION = ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__ATTRIBUTES = ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES;
+
+	/**
+	 * The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__NAMED_QUERIES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__NAMED_NATIVE_QUERIES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__SEQUENCE_GENERATOR = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__TABLE_GENERATOR = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Pre Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__PRE_PERSIST = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Post Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__POST_PERSIST = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Pre Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__PRE_REMOVE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Post Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__POST_REMOVE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Pre Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__PRE_UPDATE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Post Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__POST_UPDATE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 9;
+
+	/**
+	 * The feature id for the '<em><b>Post Load</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__POST_LOAD = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 10;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__ATTRIBUTE_OVERRIDES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 11;
+
+	/**
+	 * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__ASSOCIATION_OVERRIDES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 12;
+
+	/**
+	 * The feature id for the '<em><b>Cacheable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__CACHEABLE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 13;
+
+	/**
+	 * The feature id for the '<em><b>Id Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__ID_CLASS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 14;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__NAME = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 15;
+
+	/**
+	 * The feature id for the '<em><b>Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__TABLE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 16;
+
+	/**
+	 * The feature id for the '<em><b>Secondary Tables</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__SECONDARY_TABLES = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 17;
+
+	/**
+	 * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 18;
+
+	/**
+	 * The feature id for the '<em><b>Inheritance</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__INHERITANCE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 19;
+
+	/**
+	 * The feature id for the '<em><b>Discriminator Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__DISCRIMINATOR_VALUE = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 20;
+
+	/**
+	 * The feature id for the '<em><b>Discriminator Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__DISCRIMINATOR_COLUMN = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 21;
+
+	/**
+	 * The feature id for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__SQL_RESULT_SET_MAPPINGS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 22;
+
+	/**
+	 * The feature id for the '<em><b>Exclude Default Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 23;
+
+	/**
+	 * The feature id for the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 24;
+
+	/**
+	 * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY__ENTITY_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 25;
+
+	/**
+	 * The number of structural features of the '<em>Xml Entity</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_FEATURE_COUNT = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 26;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer <em>Xml Event Method Container</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER = 36;
+
+	/**
+	 * The feature id for the '<em><b>Pre Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__PRE_PERSIST = 0;
+
+	/**
+	 * The feature id for the '<em><b>Post Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__POST_PERSIST = 1;
+
+	/**
+	 * The feature id for the '<em><b>Pre Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__PRE_REMOVE = 2;
+
+	/**
+	 * The feature id for the '<em><b>Post Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__POST_REMOVE = 3;
+
+	/**
+	 * The feature id for the '<em><b>Pre Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__PRE_UPDATE = 4;
+
+	/**
+	 * The feature id for the '<em><b>Post Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__POST_UPDATE = 5;
+
+	/**
+	 * The feature id for the '<em><b>Post Load</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER__POST_LOAD = 6;
+
+	/**
+	 * The number of structural features of the '<em>Xml Event Method Container</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT = 7;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.EntityListener <em>Entity Listener</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.EntityListener
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListener()
+	 * @generated
+	 */
+	public static final int ENTITY_LISTENER = 31;
+
+	/**
+	 * The feature id for the '<em><b>Pre Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__PRE_PERSIST = XML_EVENT_METHOD_CONTAINER__PRE_PERSIST;
+
+	/**
+	 * The feature id for the '<em><b>Post Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__POST_PERSIST = XML_EVENT_METHOD_CONTAINER__POST_PERSIST;
+
+	/**
+	 * The feature id for the '<em><b>Pre Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__PRE_REMOVE = XML_EVENT_METHOD_CONTAINER__PRE_REMOVE;
+
+	/**
+	 * The feature id for the '<em><b>Post Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__POST_REMOVE = XML_EVENT_METHOD_CONTAINER__POST_REMOVE;
+
+	/**
+	 * The feature id for the '<em><b>Pre Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__PRE_UPDATE = XML_EVENT_METHOD_CONTAINER__PRE_UPDATE;
+
+	/**
+	 * The feature id for the '<em><b>Post Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__POST_UPDATE = XML_EVENT_METHOD_CONTAINER__POST_UPDATE;
+
+	/**
+	 * The feature id for the '<em><b>Post Load</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__POST_LOAD = XML_EVENT_METHOD_CONTAINER__POST_LOAD;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__DESCRIPTION = XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER__CLASS_NAME = XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Entity Listener</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENER_FEATURE_COUNT = XML_EVENT_METHOD_CONTAINER_FEATURE_COUNT + 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.EntityListeners <em>Entity Listeners</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.EntityListeners
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListeners()
+	 * @generated
+	 */
+	public static final int ENTITY_LISTENERS = 32;
+
+	/**
+	 * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENERS__ENTITY_LISTENERS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Entity Listeners</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_LISTENERS_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings <em>Xml Entity Mappings</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings()
+	 * @generated
+	 */
+	public static final int XML_ENTITY_MAPPINGS = 33;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.EntityResult <em>Entity Result</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.EntityResult
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityResult()
+	 * @generated
+	 */
+	public static final int ENTITY_RESULT = 34;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.EventMethod <em>Event Method</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.EventMethod
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEventMethod()
+	 * @generated
+	 */
+	public static final int EVENT_METHOD = 35;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.FieldResult <em>Field Result</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.FieldResult
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFieldResult()
+	 * @generated
+	 */
+	public static final int FIELD_RESULT = 37;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue <em>Xml Generated Value</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratedValue
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratedValue()
+	 * @generated
+	 */
+	public static final int XML_GENERATED_VALUE = 38;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator <em>Xml Generator</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGenerator
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator()
+	 * @generated
+	 */
+	public static final int XML_GENERATOR = 39;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer <em>Xml Generator Container</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer()
+	 * @generated
+	 */
+	public static final int XML_GENERATOR_CONTAINER = 40;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlId <em>Xml Id</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlId
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlId()
+	 * @generated
+	 */
+	public static final int XML_ID = 41;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.Inheritance <em>Inheritance</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.Inheritance
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritance()
+	 * @generated
+	 */
+	public static final int INHERITANCE = 43;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn <em>Xml Join Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumn()
+	 * @generated
+	 */
+	public static final int XML_JOIN_COLUMN = 44;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTable <em>Xml Join Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTable()
+	 * @generated
+	 */
+	public static final int XML_JOIN_TABLE = 46;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping <em>Xml Join Table Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTableMapping()
+	 * @generated
+	 */
+	public static final int XML_JOIN_TABLE_MAPPING = 47;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.Lob <em>Lob</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.Lob
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getLob()
+	 * @generated
+	 */
+	public static final int LOB = 48;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlManyToMany <em>Xml Many To Many</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlManyToMany
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlManyToMany()
+	 * @generated
+	 */
+	public static final int XML_MANY_TO_MANY = 49;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlManyToOne <em>Xml Many To One</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlManyToOne
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlManyToOne()
+	 * @generated
+	 */
+	public static final int XML_MANY_TO_ONE = 50;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.MapKey <em>Map Key</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.MapKey
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getMapKey()
+	 * @generated
+	 */
+	public static final int MAP_KEY = 51;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedByMapping <em>Xml Mapped By Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedByMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedByMapping()
+	 * @generated
+	 */
+	public static final int XML_MAPPED_BY_MAPPING = 52;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass <em>Xml Mapped Superclass</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedSuperclass()
+	 * @generated
+	 */
+	public static final int XML_MAPPED_SUPERCLASS = 53;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlQuery <em>Xml Query</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQuery
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery()
+	 * @generated
+	 */
+	public static final int XML_QUERY = 73;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery <em>Xml Named Native Query</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedNativeQuery()
+	 * @generated
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY = 54;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery <em>Xml Named Query</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNamedQuery
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedQuery()
+	 * @generated
+	 */
+	public static final int XML_NAMED_QUERY = 55;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping <em>Xml Null Attribute Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNullAttributeMapping()
+	 * @generated
+	 */
+	public static final int XML_NULL_ATTRIBUTE_MAPPING = 56;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToMany <em>Xml One To Many</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOneToMany
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToMany()
+	 * @generated
+	 */
+	public static final int XML_ONE_TO_MANY = 57;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne <em>Xml One To One</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOneToOne
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToOne()
+	 * @generated
+	 */
+	public static final int XML_ONE_TO_ONE = 58;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderColumn <em>Xml Order Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOrderColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderColumn()
+	 * @generated
+	 */
+	public static final int XML_ORDER_COLUMN = 60;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults <em>Xml Persistence Unit Defaults</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS = 62;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata <em>Xml Persistence Unit Metadata</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA = 63;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PostLoad <em>Post Load</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PostLoad
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostLoad()
+	 * @generated
+	 */
+	public static final int POST_LOAD = 65;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PostPersist <em>Post Persist</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PostPersist
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostPersist()
+	 * @generated
+	 */
+	public static final int POST_PERSIST = 66;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PostRemove <em>Post Remove</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PostRemove
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostRemove()
+	 * @generated
+	 */
+	public static final int POST_REMOVE = 67;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PostUpdate <em>Post Update</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PostUpdate
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostUpdate()
+	 * @generated
+	 */
+	public static final int POST_UPDATE = 68;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PrePersist <em>Pre Persist</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PrePersist
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPrePersist()
+	 * @generated
+	 */
+	public static final int PRE_PERSIST = 69;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PreRemove <em>Pre Remove</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PreRemove
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPreRemove()
+	 * @generated
+	 */
+	public static final int PRE_REMOVE = 70;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.PreUpdate <em>Pre Update</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.PreUpdate
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPreUpdate()
+	 * @generated
+	 */
+	public static final int PRE_UPDATE = 71;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn <em>Xml Primary Key Join Column</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn()
+	 * @generated
+	 */
+	public static final int XML_PRIMARY_KEY_JOIN_COLUMN = 72;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer <em>Xml Query Container</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryContainer
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer()
+	 * @generated
+	 */
+	public static final int XML_QUERY_CONTAINER = 74;
+
+	/**
+	 * The feature id for the '<em><b>Version</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__VERSION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION;
+
+	/**
+	 * The feature id for the '<em><b>Schema Location</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__SCHEMA_LOCATION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION;
+
+	/**
+	 * The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__NAMED_QUERIES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__ACCESS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__DESCRIPTION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Persistence Unit Metadata</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Package</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__PACKAGE = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__SCHEMA = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__CATALOG = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Sequence Generators</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Table Generators</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__TABLE_GENERATORS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 9;
+
+	/**
+	 * The feature id for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 10;
+
+	/**
+	 * The feature id for the '<em><b>Mapped Superclasses</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 11;
+
+	/**
+	 * The feature id for the '<em><b>Entities</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__ENTITIES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 12;
+
+	/**
+	 * The feature id for the '<em><b>Embeddables</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS__EMBEDDABLES = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 13;
+
+	/**
+	 * The number of structural features of the '<em>Xml Entity Mappings</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_MAPPINGS_FEATURE_COUNT = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 14;
+
+	/**
+	 * The feature id for the '<em><b>Discriminator Column</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_RESULT__DISCRIMINATOR_COLUMN = 0;
+
+	/**
+	 * The feature id for the '<em><b>Entity Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_RESULT__ENTITY_CLASS = 1;
+
+	/**
+	 * The feature id for the '<em><b>Field Results</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_RESULT__FIELD_RESULTS = 2;
+
+	/**
+	 * The number of structural features of the '<em>Entity Result</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENTITY_RESULT_FEATURE_COUNT = 3;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int EVENT_METHOD__DESCRIPTION = OrmV2_0Package.XML_EVENT_METHOD_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int EVENT_METHOD__METHOD_NAME = OrmV2_0Package.XML_EVENT_METHOD_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Event Method</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int EVENT_METHOD_FEATURE_COUNT = OrmV2_0Package.XML_EVENT_METHOD_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int FIELD_RESULT__NAME = 0;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int FIELD_RESULT__COLUMN = 1;
+
+	/**
+	 * The number of structural features of the '<em>Field Result</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int FIELD_RESULT_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Generator</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATED_VALUE__GENERATOR = 0;
+
+	/**
+	 * The feature id for the '<em><b>Strategy</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATED_VALUE__STRATEGY = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Generated Value</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATED_VALUE_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR__DESCRIPTION = OrmV2_0Package.XML_GENERATOR_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR__NAME = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Initial Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR__INITIAL_VALUE = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR__ALLOCATION_SIZE = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Generator</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR_FEATURE_COUNT = OrmV2_0Package.XML_GENERATOR_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR = 0;
+
+	/**
+	 * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR_CONTAINER__TABLE_GENERATOR = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Generator Container</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR_CONTAINER_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Sequence Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__SEQUENCE_GENERATOR = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Table Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__TABLE_GENERATOR = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Generated Value</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID__GENERATED_VALUE = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 6;
+
+	/**
+	 * The number of structural features of the '<em>Xml Id</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 7;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlIdClassContainer <em>Xml Id Class Container</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlIdClassContainer
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlIdClassContainer()
+	 * @generated
+	 */
+	public static final int XML_ID_CLASS_CONTAINER = 42;
+
+	/**
+	 * The feature id for the '<em><b>Id Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID_CLASS_CONTAINER__ID_CLASS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Id Class Container</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ID_CLASS_CONTAINER_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Strategy</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int INHERITANCE__STRATEGY = 0;
+
+	/**
+	 * The number of structural features of the '<em>Inheritance</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int INHERITANCE_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_COLUMN__COLUMN_DEFINITION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__NAME = ABSTRACT_XML_COLUMN__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__INSERTABLE = ABSTRACT_XML_COLUMN__INSERTABLE;
+
+	/**
+	 * The feature id for the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__NULLABLE = ABSTRACT_XML_COLUMN__NULLABLE;
+
+	/**
+	 * The feature id for the '<em><b>Table</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__TABLE = ABSTRACT_XML_COLUMN__TABLE;
+
+	/**
+	 * The feature id for the '<em><b>Unique</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__UNIQUE = ABSTRACT_XML_COLUMN__UNIQUE;
+
+	/**
+	 * The feature id for the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__UPDATABLE = ABSTRACT_XML_COLUMN__UPDATABLE;
+
+	/**
+	 * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME = ABSTRACT_XML_COLUMN_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Join Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMN_FEATURE_COUNT = ABSTRACT_XML_COLUMN_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Join Columns Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_COLUMNS_MAPPING_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlReferenceTable <em>Xml Reference Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlReferenceTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlReferenceTable()
+	 * @generated
+	 */
+	public static final int XML_REFERENCE_TABLE = 64;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE__NAME = ABSTRACT_XML_REFERENCE_TABLE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE__CATALOG = ABSTRACT_XML_REFERENCE_TABLE__CATALOG;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE__SCHEMA = ABSTRACT_XML_REFERENCE_TABLE__SCHEMA;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_REFERENCE_TABLE__UNIQUE_CONSTRAINTS;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE__JOIN_COLUMNS = ABSTRACT_XML_REFERENCE_TABLE__JOIN_COLUMNS;
+
+	/**
+	 * The feature id for the '<em><b>Inverse Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS = ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Join Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE_FEATURE_COUNT = ABSTRACT_XML_REFERENCE_TABLE_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE_MAPPING__JOIN_TABLE = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Join Table Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JOIN_TABLE_MAPPING_FEATURE_COUNT = 1;
+
+	/**
+	 * The number of structural features of the '<em>Lob</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int LOB_FEATURE_COUNT = 0;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__ACCESS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__NAME = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__TARGET_ENTITY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__FETCH = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__FETCH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__CASCADE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__CASCADE;
+
+	/**
+	 * The feature id for the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAPPED_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__JOIN_TABLE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__ORDER_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__ORDER_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY_CLASS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY_TEMPORAL = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY_ENUMERATED = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS;
+
+	/**
+	 * The feature id for the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY__MAP_KEY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
+
+	/**
+	 * The number of structural features of the '<em>Xml Many To Many</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_FEATURE_COUNT = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__ACCESS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__NAME = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__TARGET_ENTITY = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__FETCH = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__FETCH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__CASCADE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__CASCADE;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__JOIN_TABLE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__JOIN_COLUMNS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
+
+	/**
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID;
+
+	/**
+	 * The feature id for the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__MAPS_ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID;
+
+	/**
+	 * The feature id for the '<em><b>Optional</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE__OPTIONAL = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
+
+	/**
+	 * The number of structural features of the '<em>Xml Many To One</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_ONE_FEATURE_COUNT = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int MAP_KEY__NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Map Key</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int MAP_KEY_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_BY_MAPPING__MAPPED_BY = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Mapped By Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_BY_MAPPING_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__ACCESS = ABSTRACT_XML_TYPE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__CLASS_NAME = ABSTRACT_XML_TYPE_MAPPING__CLASS_NAME;
+
+	/**
+	 * The feature id for the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__METADATA_COMPLETE = ABSTRACT_XML_TYPE_MAPPING__METADATA_COMPLETE;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__DESCRIPTION = ABSTRACT_XML_TYPE_MAPPING__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__ATTRIBUTES = ABSTRACT_XML_TYPE_MAPPING__ATTRIBUTES;
+
+	/**
+	 * The feature id for the '<em><b>Id Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__ID_CLASS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Exclude Default Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The number of structural features of the '<em>Xml Mapped Superclass</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPED_SUPERCLASS_FEATURE_COUNT = ABSTRACT_XML_TYPE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY__DESCRIPTION = OrmV2_0Package.XML_QUERY_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY__NAME = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Query</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY__QUERY = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Hints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY__HINTS = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Query</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_FEATURE_COUNT = OrmV2_0Package.XML_QUERY_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY__DESCRIPTION = XML_QUERY__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY__NAME = XML_QUERY__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Query</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY__QUERY = XML_QUERY__QUERY;
+
+	/**
+	 * The feature id for the '<em><b>Hints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY__HINTS = XML_QUERY__HINTS;
+
+	/**
+	 * The feature id for the '<em><b>Result Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY__RESULT_CLASS = XML_QUERY_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Result Set Mapping</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = XML_QUERY_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Named Native Query</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_NATIVE_QUERY_FEATURE_COUNT = XML_QUERY_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY__DESCRIPTION = XML_QUERY__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY__NAME = XML_QUERY__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Query</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY__QUERY = XML_QUERY__QUERY;
+
+	/**
+	 * The feature id for the '<em><b>Hints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY__HINTS = XML_QUERY__HINTS;
+
+	/**
+	 * The feature id for the '<em><b>Lock Mode</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY__LOCK_MODE = XML_QUERY_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Named Query</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY_FEATURE_COUNT = XML_QUERY_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NULL_ATTRIBUTE_MAPPING__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NULL_ATTRIBUTE_MAPPING__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The number of structural features of the '<em>Xml Null Attribute Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NULL_ATTRIBUTE_MAPPING_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__ACCESS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__NAME = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__TARGET_ENTITY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__TARGET_ENTITY;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__FETCH = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__FETCH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__CASCADE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__CASCADE;
+
+	/**
+	 * The feature id for the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAPPED_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAPPED_BY;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__JOIN_TABLE = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__JOIN_TABLE;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__ORDER_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__ORDER_BY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__ORDER_BY;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY_ATTRIBUTE_OVERRIDES = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ATTRIBUTE_OVERRIDES;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY_CLASS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_CLASS;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY_TEMPORAL = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_TEMPORAL;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY_ENUMERATED = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_ENUMERATED;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY_COLUMN = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY_JOIN_COLUMNS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY_JOIN_COLUMNS;
+
+	/**
+	 * The feature id for the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__MAP_KEY = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__JOIN_COLUMNS = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY__ORPHAN_REMOVAL = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml One To Many</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_FEATURE_COUNT = ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__ACCESS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__NAME = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Target Entity</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__TARGET_ENTITY = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__TARGET_ENTITY;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__FETCH = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__FETCH;
+
+	/**
+	 * The feature id for the '<em><b>Cascade</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__CASCADE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__CASCADE;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__JOIN_TABLE = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_TABLE;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__JOIN_COLUMNS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__JOIN_COLUMNS;
+
+	/**
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__ID;
+
+	/**
+	 * The feature id for the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__MAPS_ID = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__MAPS_ID;
+
+	/**
+	 * The feature id for the '<em><b>Optional</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__OPTIONAL = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL;
+
+	/**
+	 * The feature id for the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__MAPPED_BY = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__ORPHAN_REMOVAL = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml One To One</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE_FEATURE_COUNT = ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint <em>Xml Query Hint</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryHint
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryHint()
+	 * @generated
+	 */
+	public static final int XML_QUERY_HINT = 75;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlSecondaryTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSecondaryTable()
+	 * @generated
+	 */
+	public static final int XML_SECONDARY_TABLE = 76;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator <em>Xml Sequence Generator</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSequenceGenerator()
+	 * @generated
+	 */
+	public static final int XML_SEQUENCE_GENERATOR = 77;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping <em>Sql Result Set Mapping</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.SqlResultSetMapping
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getSqlResultSetMapping()
+	 * @generated
+	 */
+	public static final int SQL_RESULT_SET_MAPPING = 78;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlTable <em>Xml Table</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTable()
+	 * @generated
+	 */
+	public static final int XML_TABLE = 79;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator <em>Xml Table Generator</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator()
+	 * @generated
+	 */
+	public static final int XML_TABLE_GENERATOR = 80;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlTransient <em>Xml Transient</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTransient
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTransient()
+	 * @generated
+	 */
+	public static final int XML_TRANSIENT = 81;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint <em>Xml Unique Constraint</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlUniqueConstraint()
+	 * @generated
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT = 83;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlVersion <em>Xml Version</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlVersion
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlVersion()
+	 * @generated
+	 */
+	public static final int XML_VERSION = 84;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderable <em>Xml Orderable</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOrderable
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable()
+	 * @generated
+	 */
+	public static final int XML_ORDERABLE = 59;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDERABLE__ORDER_COLUMN = OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDERABLE__ORDER_BY = OrmV2_0Package.XML_ORDERABLE_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Orderable</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDERABLE_FEATURE_COUNT = OrmV2_0Package.XML_ORDERABLE_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN__NULLABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN__INSERTABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN__UPDATABLE = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Order Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS = XML_ACCESS_HOLDER__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION = XML_ACCESS_HOLDER_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Delimited Identifiers</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS = XML_ACCESS_HOLDER_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA = XML_ACCESS_HOLDER_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG = XML_ACCESS_HOLDER_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Persist</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST = XML_ACCESS_HOLDER_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Entity Listeners</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS = XML_ACCESS_HOLDER_FEATURE_COUNT + 5;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence Unit Defaults</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS_FEATURE_COUNT = XML_ACCESS_HOLDER_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Persistence Unit Defaults</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence Unit Metadata</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA_FEATURE_COUNT = OrmV2_0Package.XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_REFERENCE_TABLE__JOIN_COLUMNS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Reference Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_REFERENCE_TABLE_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_LOAD__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_LOAD__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Post Load</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_LOAD_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_PERSIST__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_PERSIST__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Post Persist</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_PERSIST_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_REMOVE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_REMOVE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Post Remove</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_REMOVE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_UPDATE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_UPDATE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Post Update</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int POST_UPDATE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_PERSIST__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_PERSIST__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Pre Persist</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_PERSIST_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_REMOVE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_REMOVE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Pre Remove</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_REMOVE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_UPDATE__DESCRIPTION = EVENT_METHOD__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Method Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_UPDATE__METHOD_NAME = EVENT_METHOD__METHOD_NAME;
+
+	/**
+	 * The number of structural features of the '<em>Pre Update</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PRE_UPDATE_FEATURE_COUNT = EVENT_METHOD_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Column Definition</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PRIMARY_KEY_JOIN_COLUMN__COLUMN_DEFINITION = ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PRIMARY_KEY_JOIN_COLUMN__NAME = ABSTRACT_XML_NAMED_COLUMN__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Referenced Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Primary Key Join Column</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PRIMARY_KEY_JOIN_COLUMN_FEATURE_COUNT = ABSTRACT_XML_NAMED_COLUMN_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Named Queries</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_CONTAINER__NAMED_QUERIES = 0;
+
+	/**
+	 * The feature id for the '<em><b>Named Native Queries</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Query Container</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_CONTAINER_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_HINT__DESCRIPTION = OrmV2_0Package.XML_QUERY_HINT_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_HINT__NAME = OrmV2_0Package.XML_QUERY_HINT_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_HINT__VALUE = OrmV2_0Package.XML_QUERY_HINT_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Query Hint</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_HINT_FEATURE_COUNT = OrmV2_0Package.XML_QUERY_HINT_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SECONDARY_TABLE__NAME = ABSTRACT_XML_TABLE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SECONDARY_TABLE__CATALOG = ABSTRACT_XML_TABLE__CATALOG;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SECONDARY_TABLE__SCHEMA = ABSTRACT_XML_TABLE__SCHEMA;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SECONDARY_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS;
+
+	/**
+	 * The feature id for the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS = ABSTRACT_XML_TABLE_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Secondary Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SECONDARY_TABLE_FEATURE_COUNT = ABSTRACT_XML_TABLE_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__DESCRIPTION = XML_GENERATOR__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__NAME = XML_GENERATOR__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Initial Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__INITIAL_VALUE = XML_GENERATOR__INITIAL_VALUE;
+
+	/**
+	 * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE = XML_GENERATOR__ALLOCATION_SIZE;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__CATALOG = XML_GENERATOR_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__SCHEMA = XML_GENERATOR_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Sequence Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR__SEQUENCE_NAME = XML_GENERATOR_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Sequence Generator</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR_FEATURE_COUNT = XML_GENERATOR_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SQL_RESULT_SET_MAPPING__DESCRIPTION = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SQL_RESULT_SET_MAPPING__NAME = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Entity Results</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SQL_RESULT_SET_MAPPING__ENTITY_RESULTS = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Column Results</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SQL_RESULT_SET_MAPPING__COLUMN_RESULTS = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The number of structural features of the '<em>Sql Result Set Mapping</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int SQL_RESULT_SET_MAPPING_FEATURE_COUNT = OrmV2_0Package.XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE__NAME = ABSTRACT_XML_TABLE__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE__CATALOG = ABSTRACT_XML_TABLE__CATALOG;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE__SCHEMA = ABSTRACT_XML_TABLE__SCHEMA;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE__UNIQUE_CONSTRAINTS = ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS;
+
+	/**
+	 * The number of structural features of the '<em>Xml Table</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_FEATURE_COUNT = ABSTRACT_XML_TABLE_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__DESCRIPTION = XML_GENERATOR__DESCRIPTION;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__NAME = XML_GENERATOR__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Initial Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__INITIAL_VALUE = XML_GENERATOR__INITIAL_VALUE;
+
+	/**
+	 * The feature id for the '<em><b>Allocation Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__ALLOCATION_SIZE = XML_GENERATOR__ALLOCATION_SIZE;
+
+	/**
+	 * The feature id for the '<em><b>Table</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__TABLE = XML_GENERATOR_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__CATALOG = XML_GENERATOR_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__SCHEMA = XML_GENERATOR_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Pk Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__PK_COLUMN_NAME = XML_GENERATOR_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Value Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__VALUE_COLUMN_NAME = XML_GENERATOR_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Pk Column Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__PK_COLUMN_VALUE = XML_GENERATOR_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS = XML_GENERATOR_FEATURE_COUNT + 6;
+
+	/**
+	 * The number of structural features of the '<em>Xml Table Generator</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TABLE_GENERATOR_FEATURE_COUNT = XML_GENERATOR_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TRANSIENT__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TRANSIENT__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The number of structural features of the '<em>Xml Transient</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_TRANSIENT_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT__NAME = OrmV2_0Package.XML_UNIQUE_CONSTRAINT_20__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Column Names</b></em>' attribute list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT__COLUMN_NAMES = OrmV2_0Package.XML_UNIQUE_CONSTRAINT_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Unique Constraint</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT_FEATURE_COUNT = OrmV2_0Package.XML_UNIQUE_CONSTRAINT_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION__ACCESS = ABSTRACT_XML_ATTRIBUTE_MAPPING__ACCESS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION__NAME = ABSTRACT_XML_ATTRIBUTE_MAPPING__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION__COLUMN = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION__LOB = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION__TEMPORAL = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION__ENUMERATED = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The number of structural features of the '<em>Xml Version</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_VERSION_FEATURE_COUNT = ABSTRACT_XML_ATTRIBUTE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.AccessType <em>Access Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAccessType()
+	 * @generated
+	 */
+	public static final int ACCESS_TYPE = 85;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.DiscriminatorType <em>Discriminator Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.DiscriminatorType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getDiscriminatorType()
+	 * @generated
+	 */
+	public static final int DISCRIMINATOR_TYPE = 86;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.EnumType <em>Enum Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEnumType()
+	 * @generated
+	 */
+	public static final int ENUM_TYPE = 87;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.FetchType <em>Fetch Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFetchType()
+	 * @generated
+	 */
+	public static final int FETCH_TYPE = 88;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.GenerationType <em>Generation Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.GenerationType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getGenerationType()
+	 * @generated
+	 */
+	public static final int GENERATION_TYPE = 89;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.InheritanceType <em>Inheritance Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.InheritanceType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritanceType()
+	 * @generated
+	 */
+	public static final int INHERITANCE_TYPE = 90;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.TemporalType <em>Temporal Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getTemporalType()
+	 * @generated
+	 */
+	public static final int TEMPORAL_TYPE = 91;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlAttributeMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlEmbeddedEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlMultiRelationshipMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlNamedColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlRelationshipMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlSingleRelationshipMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlTypeMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAccessHolderEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAttributeMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAssociationOverrideEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAssociationOverrideContainerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAttributeOverrideEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAttributeOverrideContainerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass attributesEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlBasicEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass cascadeTypeEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlClassReferenceEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlCollectionTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass columnMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass columnResultEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlConvertibleMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlDiscriminatorColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlElementCollectionEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEmbeddableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEmbeddedEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEmbeddedIdEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEntityEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass entityListenerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass entityListenersEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEntityMappingsEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass entityResultEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass eventMethodEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEventMethodContainerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass fieldResultEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlGeneratedValueEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlGeneratorEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlGeneratorContainerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlIdEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlIdClassContainerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass inheritanceEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlJoinColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlJoinColumnsMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlJoinTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlJoinTableMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass lobEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlManyToManyEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlManyToOneEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass mapKeyEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlMappedByMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlMappedSuperclassEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlNamedNativeQueryEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlNamedQueryEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlNullAttributeMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOneToManyEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOneToOneEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOrderColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOverrideEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceUnitDefaultsEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceUnitMetadataEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractXmlReferenceTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlReferenceTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass postLoadEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass postPersistEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass postRemoveEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass postUpdateEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass prePersistEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass preRemoveEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass preUpdateEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPrimaryKeyJoinColumnEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlQueryEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlQueryContainerEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlQueryHintEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlSecondaryTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlSequenceGeneratorEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass sqlResultSetMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlTableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlTableGeneratorEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlTransientEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlTypeMappingEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlUniqueConstraintEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlVersionEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOrderableEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum accessTypeEEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum discriminatorTypeEEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum enumTypeEEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum fetchTypeEEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum generationTypeEEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum inheritanceTypeEEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum temporalTypeEEnum = null;
+
+	/**
+	 * Creates an instance of the model <b>Package</b>, registered with
+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+	 * package URI value.
+	 * <p>Note: the correct way to create the package is via the static
+	 * factory method {@link #init init()}, which also performs
+	 * initialization of the package, or returns the registered package,
+	 * if one already exists.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.emf.ecore.EPackage.Registry
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#eNS_URI
+	 * @see #init()
+	 * @generated
+	 */
+	private OrmPackage()
+	{
+		super(eNS_URI, OrmFactory.eINSTANCE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static boolean isInited = false;
+
+	/**
+	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+	 * 
+	 * <p>This method is used to initialize {@link OrmPackage#eINSTANCE} when that field is accessed.
+	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #eNS_URI
+	 * @see #createPackageContents()
+	 * @see #initializePackageContents()
+	 * @generated
+	 */
+	public static OrmPackage init()
+	{
+		if (isInited) return (OrmPackage)EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI);
+
+		// Obtain or create and register package
+		OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new OrmPackage());
+
+		isInited = true;
+
+		// Initialize simple dependencies
+		EcorePackage.eINSTANCE.eClass();
+		XMLTypePackage.eINSTANCE.eClass();
+
+		// Obtain or create and register interdependencies
+		CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
+		OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
+		PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
+		PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
+
+		// Create package meta-data objects
+		theOrmPackage.createPackageContents();
+		theCommonPackage.createPackageContents();
+		theOrmV2_0Package.createPackageContents();
+		thePersistencePackage.createPackageContents();
+		thePersistenceV2_0Package.createPackageContents();
+
+		// Initialize created meta-data
+		theOrmPackage.initializePackageContents();
+		theCommonPackage.initializePackageContents();
+		theOrmV2_0Package.initializePackageContents();
+		thePersistencePackage.initializePackageContents();
+		thePersistenceV2_0Package.initializePackageContents();
+
+		// Mark meta-data to indicate it can't be changed
+		theOrmPackage.freeze();
+
+  
+		// Update the registry and return the package
+		EPackage.Registry.INSTANCE.put(OrmPackage.eNS_URI, theOrmPackage);
+		return theOrmPackage;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping <em>Abstract Xml Attribute Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Attribute Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping
+	 * @generated
+	 */
+	public EClass getAbstractXmlAttributeMapping()
+	{
+		return abstractXmlAttributeMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn <em>Abstract Xml Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn
+	 * @generated
+	 */
+	public EClass getAbstractXmlColumn()
+	{
+		return abstractXmlColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getInsertable <em>Insertable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Insertable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getInsertable()
+	 * @see #getAbstractXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlColumn_Insertable()
+	{
+		return (EAttribute)abstractXmlColumnEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getNullable <em>Nullable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Nullable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getNullable()
+	 * @see #getAbstractXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlColumn_Nullable()
+	{
+		return (EAttribute)abstractXmlColumnEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getTable <em>Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getTable()
+	 * @see #getAbstractXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlColumn_Table()
+	{
+		return (EAttribute)abstractXmlColumnEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUnique <em>Unique</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Unique</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUnique()
+	 * @see #getAbstractXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlColumn_Unique()
+	{
+		return (EAttribute)abstractXmlColumnEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUpdatable <em>Updatable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Updatable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn#getUpdatable()
+	 * @see #getAbstractXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlColumn_Updatable()
+	{
+		return (EAttribute)abstractXmlColumnEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded <em>Abstract Xml Embedded</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Embedded</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded
+	 * @generated
+	 */
+	public EClass getAbstractXmlEmbedded()
+	{
+		return abstractXmlEmbeddedEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping <em>Abstract Xml Multi Relationship Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Multi Relationship Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping
+	 * @generated
+	 */
+	public EClass getAbstractXmlMultiRelationshipMapping()
+	{
+		return abstractXmlMultiRelationshipMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey <em>Map Key</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Map Key</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping#getMapKey()
+	 * @see #getAbstractXmlMultiRelationshipMapping()
+	 * @generated
+	 */
+	public EReference getAbstractXmlMultiRelationshipMapping_MapKey()
+	{
+		return (EReference)abstractXmlMultiRelationshipMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn <em>Abstract Xml Named Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Named Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn
+	 * @generated
+	 */
+	public EClass getAbstractXmlNamedColumn()
+	{
+		return abstractXmlNamedColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getColumnDefinition <em>Column Definition</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Column Definition</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getColumnDefinition()
+	 * @see #getAbstractXmlNamedColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlNamedColumn_ColumnDefinition()
+	{
+		return (EAttribute)abstractXmlNamedColumnEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn#getName()
+	 * @see #getAbstractXmlNamedColumn()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlNamedColumn_Name()
+	{
+		return (EAttribute)abstractXmlNamedColumnEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping <em>Abstract Xml Relationship Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Relationship Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping
+	 * @generated
+	 */
+	public EClass getAbstractXmlRelationshipMapping()
+	{
+		return abstractXmlRelationshipMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity <em>Target Entity</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Target Entity</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getTargetEntity()
+	 * @see #getAbstractXmlRelationshipMapping()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlRelationshipMapping_TargetEntity()
+	{
+		return (EAttribute)abstractXmlRelationshipMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getFetch <em>Fetch</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Fetch</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getFetch()
+	 * @see #getAbstractXmlRelationshipMapping()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlRelationshipMapping_Fetch()
+	{
+		return (EAttribute)abstractXmlRelationshipMappingEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getCascade <em>Cascade</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Cascade</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping#getCascade()
+	 * @see #getAbstractXmlRelationshipMapping()
+	 * @generated
+	 */
+	public EReference getAbstractXmlRelationshipMapping_Cascade()
+	{
+		return (EReference)abstractXmlRelationshipMappingEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping <em>Abstract Xml Single Relationship Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Single Relationship Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping
+	 * @generated
+	 */
+	public EClass getAbstractXmlSingleRelationshipMapping()
+	{
+		return abstractXmlSingleRelationshipMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional <em>Optional</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Optional</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping#getOptional()
+	 * @see #getAbstractXmlSingleRelationshipMapping()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlSingleRelationshipMapping_Optional()
+	{
+		return (EAttribute)abstractXmlSingleRelationshipMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable <em>Abstract Xml Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable
+	 * @generated
+	 */
+	public EClass getAbstractXmlTable()
+	{
+		return abstractXmlTableEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getName()
+	 * @see #getAbstractXmlTable()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlTable_Name()
+	{
+		return (EAttribute)abstractXmlTableEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getCatalog <em>Catalog</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Catalog</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getCatalog()
+	 * @see #getAbstractXmlTable()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlTable_Catalog()
+	{
+		return (EAttribute)abstractXmlTableEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getSchema <em>Schema</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Schema</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getSchema()
+	 * @see #getAbstractXmlTable()
+	 * @generated
+	 */
+	public EAttribute getAbstractXmlTable_Schema()
+	{
+		return (EAttribute)abstractXmlTableEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getUniqueConstraints <em>Unique Constraints</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Unique Constraints</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable#getUniqueConstraints()
+	 * @see #getAbstractXmlTable()
+	 * @generated
+	 */
+	public EReference getAbstractXmlTable_UniqueConstraints()
+	{
+		return (EReference)abstractXmlTableEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping <em>Abstract Xml Type Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Type Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping
+	 * @generated
+	 */
+	public EClass getAbstractXmlTypeMapping()
+	{
+		return abstractXmlTypeMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlAccessHolder <em>Xml Access Holder</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Access Holder</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAccessHolder
+	 * @generated
+	 */
+	public EClass getXmlAccessHolder()
+	{
+		return xmlAccessHolderEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlAccessHolder#getAccess <em>Access</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Access</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAccessHolder#getAccess()
+	 * @see #getXmlAccessHolder()
+	 * @generated
+	 */
+	public EAttribute getXmlAccessHolder_Access()
+	{
+		return (EAttribute)xmlAccessHolderEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeMapping <em>Xml Attribute Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Attribute Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeMapping
+	 * @generated
+	 */
+	public EClass getXmlAttributeMapping()
+	{
+		return xmlAttributeMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeMapping#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeMapping#getName()
+	 * @see #getXmlAttributeMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlAttributeMapping_Name()
+	{
+		return (EAttribute)xmlAttributeMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride <em>Xml Association Override</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Association Override</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverride
+	 * @generated
+	 */
+	public EClass getXmlAssociationOverride()
+	{
+		return xmlAssociationOverrideEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer <em>Xml Association Override Container</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Association Override Container</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer
+	 * @generated
+	 */
+	public EClass getXmlAssociationOverrideContainer()
+	{
+		return xmlAssociationOverrideContainerEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer#getAssociationOverrides <em>Association Overrides</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Association Overrides</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer#getAssociationOverrides()
+	 * @see #getXmlAssociationOverrideContainer()
+	 * @generated
+	 */
+	public EReference getXmlAssociationOverrideContainer_AssociationOverrides()
+	{
+		return (EReference)xmlAssociationOverrideContainerEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride <em>Xml Attribute Override</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Attribute Override</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverride
+	 * @generated
+	 */
+	public EClass getXmlAttributeOverride()
+	{
+		return xmlAttributeOverrideEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride#getColumn <em>Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverride#getColumn()
+	 * @see #getXmlAttributeOverride()
+	 * @generated
+	 */
+	public EReference getXmlAttributeOverride_Column()
+	{
+		return (EReference)xmlAttributeOverrideEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer <em>Xml Attribute Override Container</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Attribute Override Container</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer
+	 * @generated
+	 */
+	public EClass getXmlAttributeOverrideContainer()
+	{
+		return xmlAttributeOverrideContainerEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer#getAttributeOverrides <em>Attribute Overrides</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Attribute Overrides</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer#getAttributeOverrides()
+	 * @see #getXmlAttributeOverrideContainer()
+	 * @generated
+	 */
+	public EReference getXmlAttributeOverrideContainer_AttributeOverrides()
+	{
+		return (EReference)xmlAttributeOverrideContainerEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.Attributes <em>Attributes</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Attributes</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes
+	 * @generated
+	 */
+	public EClass getAttributes()
+	{
+		return attributesEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getIds <em>Ids</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Ids</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getIds()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_Ids()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getEmbeddedIds <em>Embedded Ids</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Embedded Ids</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getEmbeddedIds()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_EmbeddedIds()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getBasics <em>Basics</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Basics</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getBasics()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_Basics()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getVersions <em>Versions</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Versions</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getVersions()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_Versions()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getManyToOnes <em>Many To Ones</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Many To Ones</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getManyToOnes()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_ManyToOnes()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getOneToManys <em>One To Manys</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>One To Manys</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getOneToManys()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_OneToManys()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(5);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getOneToOnes <em>One To Ones</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>One To Ones</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getOneToOnes()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_OneToOnes()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(6);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getManyToManys <em>Many To Manys</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Many To Manys</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getManyToManys()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_ManyToManys()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(7);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getEmbeddeds <em>Embeddeds</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Embeddeds</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getEmbeddeds()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_Embeddeds()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(8);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.Attributes#getTransients <em>Transients</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Transients</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Attributes#getTransients()
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	public EReference getAttributes_Transients()
+	{
+		return (EReference)attributesEClass.getEStructuralFeatures().get(9);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlBasic <em>Xml Basic</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Basic</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlBasic
+	 * @generated
+	 */
+	public EClass getXmlBasic()
+	{
+		return xmlBasicEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getFetch <em>Fetch</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Fetch</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlBasic#getFetch()
+	 * @see #getXmlBasic()
+	 * @generated
+	 */
+	public EAttribute getXmlBasic_Fetch()
+	{
+		return (EAttribute)xmlBasicEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getOptional <em>Optional</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Optional</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlBasic#getOptional()
+	 * @see #getXmlBasic()
+	 * @generated
+	 */
+	public EAttribute getXmlBasic_Optional()
+	{
+		return (EAttribute)xmlBasicEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.CascadeType <em>Cascade Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Cascade Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType
+	 * @generated
+	 */
+	public EClass getCascadeType()
+	{
+		return cascadeTypeEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeAll <em>Cascade All</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade All</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeAll()
+	 * @see #getCascadeType()
+	 * @generated
+	 */
+	public EAttribute getCascadeType_CascadeAll()
+	{
+		return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadePersist <em>Cascade Persist</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade Persist</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType#isCascadePersist()
+	 * @see #getCascadeType()
+	 * @generated
+	 */
+	public EAttribute getCascadeType_CascadePersist()
+	{
+		return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeMerge <em>Cascade Merge</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade Merge</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeMerge()
+	 * @see #getCascadeType()
+	 * @generated
+	 */
+	public EAttribute getCascadeType_CascadeMerge()
+	{
+		return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRemove <em>Cascade Remove</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade Remove</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRemove()
+	 * @see #getCascadeType()
+	 * @generated
+	 */
+	public EAttribute getCascadeType_CascadeRemove()
+	{
+		return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRefresh <em>Cascade Refresh</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade Refresh</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.CascadeType#isCascadeRefresh()
+	 * @see #getCascadeType()
+	 * @generated
+	 */
+	public EAttribute getCascadeType_CascadeRefresh()
+	{
+		return (EAttribute)cascadeTypeEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlClassReference <em>Xml Class Reference</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Class Reference</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlClassReference
+	 * @generated
+	 */
+	public EClass getXmlClassReference()
+	{
+		return xmlClassReferenceEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlClassReference#getClassName <em>Class Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Class Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlClassReference#getClassName()
+	 * @see #getXmlClassReference()
+	 * @generated
+	 */
+	public EAttribute getXmlClassReference_ClassName()
+	{
+		return (EAttribute)xmlClassReferenceEClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlCollectionTable <em>Xml Collection Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Collection Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlCollectionTable
+	 * @generated
+	 */
+	public EClass getXmlCollectionTable()
+	{
+		return xmlCollectionTableEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlColumn <em>Xml Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlColumn
+	 * @generated
+	 */
+	public EClass getXmlColumn()
+	{
+		return xmlColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getLength <em>Length</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Length</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlColumn#getLength()
+	 * @see #getXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlColumn_Length()
+	{
+		return (EAttribute)xmlColumnEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getPrecision <em>Precision</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Precision</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlColumn#getPrecision()
+	 * @see #getXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlColumn_Precision()
+	{
+		return (EAttribute)xmlColumnEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getScale <em>Scale</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Scale</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlColumn#getScale()
+	 * @see #getXmlColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlColumn_Scale()
+	{
+		return (EAttribute)xmlColumnEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.ColumnMapping <em>Column Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Column Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.ColumnMapping
+	 * @generated
+	 */
+	public EClass getColumnMapping()
+	{
+		return columnMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.ColumnMapping#getColumn <em>Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.ColumnMapping#getColumn()
+	 * @see #getColumnMapping()
+	 * @generated
+	 */
+	public EReference getColumnMapping_Column()
+	{
+		return (EReference)columnMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.ColumnResult <em>Column Result</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Column Result</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.ColumnResult
+	 * @generated
+	 */
+	public EClass getColumnResult()
+	{
+		return columnResultEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.ColumnResult#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.ColumnResult#getName()
+	 * @see #getColumnResult()
+	 * @generated
+	 */
+	public EAttribute getColumnResult_Name()
+	{
+		return (EAttribute)columnResultEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping <em>Xml Convertible Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Convertible Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping
+	 * @generated
+	 */
+	public EClass getXmlConvertibleMapping()
+	{
+		return xmlConvertibleMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#isLob <em>Lob</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Lob</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#isLob()
+	 * @see #getXmlConvertibleMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlConvertibleMapping_Lob()
+	{
+		return (EAttribute)xmlConvertibleMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getTemporal <em>Temporal</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Temporal</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getTemporal()
+	 * @see #getXmlConvertibleMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlConvertibleMapping_Temporal()
+	{
+		return (EAttribute)xmlConvertibleMappingEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getEnumerated <em>Enumerated</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Enumerated</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getEnumerated()
+	 * @see #getXmlConvertibleMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlConvertibleMapping_Enumerated()
+	{
+		return (EAttribute)xmlConvertibleMappingEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn <em>Xml Discriminator Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Discriminator Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn
+	 * @generated
+	 */
+	public EClass getXmlDiscriminatorColumn()
+	{
+		return xmlDiscriminatorColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Discriminator Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getDiscriminatorType()
+	 * @see #getXmlDiscriminatorColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlDiscriminatorColumn_DiscriminatorType()
+	{
+		return (EAttribute)xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getLength <em>Length</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Length</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getLength()
+	 * @see #getXmlDiscriminatorColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlDiscriminatorColumn_Length()
+	{
+		return (EAttribute)xmlDiscriminatorColumnEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection <em>Xml Element Collection</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Element Collection</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlElementCollection
+	 * @generated
+	 */
+	public EClass getXmlElementCollection()
+	{
+		return xmlElementCollectionEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlEmbeddable <em>Xml Embeddable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Embeddable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEmbeddable
+	 * @generated
+	 */
+	public EClass getXmlEmbeddable()
+	{
+		return xmlEmbeddableEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlEmbedded <em>Xml Embedded</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Embedded</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEmbedded
+	 * @generated
+	 */
+	public EClass getXmlEmbedded()
+	{
+		return xmlEmbeddedEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlEmbeddedId <em>Xml Embedded Id</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Embedded Id</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEmbeddedId
+	 * @generated
+	 */
+	public EClass getXmlEmbeddedId()
+	{
+		return xmlEmbeddedIdEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlEntity <em>Xml Entity</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Entity</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity
+	 * @generated
+	 */
+	public EClass getXmlEntity()
+	{
+		return xmlEntityEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getName()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EAttribute getXmlEntity_Name()
+	{
+		return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getTable <em>Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getTable()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_Table()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getSecondaryTables <em>Secondary Tables</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Secondary Tables</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getSecondaryTables()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_SecondaryTables()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Primary Key Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getPrimaryKeyJoinColumns()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_PrimaryKeyJoinColumns()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getInheritance <em>Inheritance</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Inheritance</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getInheritance()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_Inheritance()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorValue <em>Discriminator Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Discriminator Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorValue()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EAttribute getXmlEntity_DiscriminatorValue()
+	{
+		return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(5);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorColumn <em>Discriminator Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Discriminator Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorColumn()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_DiscriminatorColumn()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(6);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Sql Result Set Mappings</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getSqlResultSetMappings()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_SqlResultSetMappings()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(7);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Exclude Default Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeDefaultListeners()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EAttribute getXmlEntity_ExcludeDefaultListeners()
+	{
+		return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(8);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Exclude Superclass Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeSuperclassListeners()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EAttribute getXmlEntity_ExcludeSuperclassListeners()
+	{
+		return (EAttribute)xmlEntityEClass.getEStructuralFeatures().get(9);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getEntityListeners <em>Entity Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Entity Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntity#getEntityListeners()
+	 * @see #getXmlEntity()
+	 * @generated
+	 */
+	public EReference getXmlEntity_EntityListeners()
+	{
+		return (EReference)xmlEntityEClass.getEStructuralFeatures().get(10);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.EntityListener <em>Entity Listener</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Entity Listener</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityListener
+	 * @generated
+	 */
+	public EClass getEntityListener()
+	{
+		return entityListenerEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.EntityListener#getClassName <em>Class Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Class Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityListener#getClassName()
+	 * @see #getEntityListener()
+	 * @generated
+	 */
+	public EAttribute getEntityListener_ClassName()
+	{
+		return (EAttribute)entityListenerEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.EntityListeners <em>Entity Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Entity Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityListeners
+	 * @generated
+	 */
+	public EClass getEntityListeners()
+	{
+		return entityListenersEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.EntityListeners#getEntityListeners <em>Entity Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Entity Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityListeners#getEntityListeners()
+	 * @see #getEntityListeners()
+	 * @generated
+	 */
+	public EReference getEntityListeners_EntityListeners()
+	{
+		return (EReference)entityListenersEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings <em>Xml Entity Mappings</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Entity Mappings</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings
+	 * @generated
+	 */
+	public EClass getXmlEntityMappings()
+	{
+		return xmlEntityMappingsEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getDescription()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EAttribute getXmlEntityMappings_Description()
+	{
+		return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata <em>Persistence Unit Metadata</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Persistence Unit Metadata</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_PersistenceUnitMetadata()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPackage <em>Package</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Package</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPackage()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EAttribute getXmlEntityMappings_Package()
+	{
+		return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSchema <em>Schema</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Schema</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSchema()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EAttribute getXmlEntityMappings_Schema()
+	{
+		return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getCatalog <em>Catalog</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Catalog</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getCatalog()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EAttribute getXmlEntityMappings_Catalog()
+	{
+		return (EAttribute)xmlEntityMappingsEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSequenceGenerators <em>Sequence Generators</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Sequence Generators</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSequenceGenerators()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_SequenceGenerators()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(5);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getTableGenerators <em>Table Generators</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Table Generators</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getTableGenerators()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_TableGenerators()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(6);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Sql Result Set Mappings</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSqlResultSetMappings()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_SqlResultSetMappings()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(7);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getMappedSuperclasses <em>Mapped Superclasses</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Mapped Superclasses</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getMappedSuperclasses()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_MappedSuperclasses()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(8);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getEntities <em>Entities</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Entities</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getEntities()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_Entities()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(9);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getEmbeddables <em>Embeddables</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Embeddables</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getEmbeddables()
+	 * @see #getXmlEntityMappings()
+	 * @generated
+	 */
+	public EReference getXmlEntityMappings_Embeddables()
+	{
+		return (EReference)xmlEntityMappingsEClass.getEStructuralFeatures().get(10);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.EntityResult <em>Entity Result</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Entity Result</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityResult
+	 * @generated
+	 */
+	public EClass getEntityResult()
+	{
+		return entityResultEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.EntityResult#getDiscriminatorColumn <em>Discriminator Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Discriminator Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityResult#getDiscriminatorColumn()
+	 * @see #getEntityResult()
+	 * @generated
+	 */
+	public EAttribute getEntityResult_DiscriminatorColumn()
+	{
+		return (EAttribute)entityResultEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.EntityResult#getEntityClass <em>Entity Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Entity Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityResult#getEntityClass()
+	 * @see #getEntityResult()
+	 * @generated
+	 */
+	public EAttribute getEntityResult_EntityClass()
+	{
+		return (EAttribute)entityResultEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.EntityResult#getFieldResults <em>Field Results</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Field Results</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EntityResult#getFieldResults()
+	 * @see #getEntityResult()
+	 * @generated
+	 */
+	public EReference getEntityResult_FieldResults()
+	{
+		return (EReference)entityResultEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.EventMethod <em>Event Method</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Event Method</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EventMethod
+	 * @generated
+	 */
+	public EClass getEventMethod()
+	{
+		return eventMethodEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.EventMethod#getMethodName <em>Method Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Method Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EventMethod#getMethodName()
+	 * @see #getEventMethod()
+	 * @generated
+	 */
+	public EAttribute getEventMethod_MethodName()
+	{
+		return (EAttribute)eventMethodEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer <em>Xml Event Method Container</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Event Method Container</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer
+	 * @generated
+	 */
+	public EClass getXmlEventMethodContainer()
+	{
+		return xmlEventMethodContainerEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPrePersist <em>Pre Persist</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Pre Persist</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPrePersist()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PrePersist()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostPersist <em>Post Persist</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Post Persist</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostPersist()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PostPersist()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreRemove <em>Pre Remove</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Pre Remove</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreRemove()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PreRemove()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostRemove <em>Post Remove</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Post Remove</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostRemove()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PostRemove()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreUpdate <em>Pre Update</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Pre Update</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreUpdate()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PreUpdate()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostUpdate <em>Post Update</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Post Update</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostUpdate()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PostUpdate()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(5);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostLoad <em>Post Load</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Post Load</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostLoad()
+	 * @see #getXmlEventMethodContainer()
+	 * @generated
+	 */
+	public EReference getXmlEventMethodContainer_PostLoad()
+	{
+		return (EReference)xmlEventMethodContainerEClass.getEStructuralFeatures().get(6);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.FieldResult <em>Field Result</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Field Result</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.FieldResult
+	 * @generated
+	 */
+	public EClass getFieldResult()
+	{
+		return fieldResultEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.FieldResult#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.FieldResult#getName()
+	 * @see #getFieldResult()
+	 * @generated
+	 */
+	public EAttribute getFieldResult_Name()
+	{
+		return (EAttribute)fieldResultEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.FieldResult#getColumn <em>Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.FieldResult#getColumn()
+	 * @see #getFieldResult()
+	 * @generated
+	 */
+	public EAttribute getFieldResult_Column()
+	{
+		return (EAttribute)fieldResultEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue <em>Xml Generated Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Generated Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratedValue
+	 * @generated
+	 */
+	public EClass getXmlGeneratedValue()
+	{
+		return xmlGeneratedValueEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getGenerator <em>Generator</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Generator</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getGenerator()
+	 * @see #getXmlGeneratedValue()
+	 * @generated
+	 */
+	public EAttribute getXmlGeneratedValue_Generator()
+	{
+		return (EAttribute)xmlGeneratedValueEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getStrategy <em>Strategy</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Strategy</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getStrategy()
+	 * @see #getXmlGeneratedValue()
+	 * @generated
+	 */
+	public EAttribute getXmlGeneratedValue_Strategy()
+	{
+		return (EAttribute)xmlGeneratedValueEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator <em>Xml Generator</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Generator</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGenerator
+	 * @generated
+	 */
+	public EClass getXmlGenerator()
+	{
+		return xmlGeneratorEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGenerator#getName()
+	 * @see #getXmlGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlGenerator_Name()
+	{
+		return (EAttribute)xmlGeneratorEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getInitialValue <em>Initial Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Initial Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGenerator#getInitialValue()
+	 * @see #getXmlGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlGenerator_InitialValue()
+	{
+		return (EAttribute)xmlGeneratorEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getAllocationSize <em>Allocation Size</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Allocation Size</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGenerator#getAllocationSize()
+	 * @see #getXmlGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlGenerator_AllocationSize()
+	{
+		return (EAttribute)xmlGeneratorEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer <em>Xml Generator Container</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Generator Container</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer
+	 * @generated
+	 */
+	public EClass getXmlGeneratorContainer()
+	{
+		return xmlGeneratorContainerEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator <em>Sequence Generator</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Sequence Generator</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator()
+	 * @see #getXmlGeneratorContainer()
+	 * @generated
+	 */
+	public EReference getXmlGeneratorContainer_SequenceGenerator()
+	{
+		return (EReference)xmlGeneratorContainerEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getTableGenerator <em>Table Generator</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Table Generator</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getTableGenerator()
+	 * @see #getXmlGeneratorContainer()
+	 * @generated
+	 */
+	public EReference getXmlGeneratorContainer_TableGenerator()
+	{
+		return (EReference)xmlGeneratorContainerEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlId <em>Xml Id</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Id</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlId
+	 * @generated
+	 */
+	public EClass getXmlId()
+	{
+		return xmlIdEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlId#getGeneratedValue <em>Generated Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Generated Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlId#getGeneratedValue()
+	 * @see #getXmlId()
+	 * @generated
+	 */
+	public EReference getXmlId_GeneratedValue()
+	{
+		return (EReference)xmlIdEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlIdClassContainer <em>Xml Id Class Container</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Id Class Container</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlIdClassContainer
+	 * @generated
+	 */
+	public EClass getXmlIdClassContainer()
+	{
+		return xmlIdClassContainerEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlIdClassContainer#getIdClass <em>Id Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Id Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlIdClassContainer#getIdClass()
+	 * @see #getXmlIdClassContainer()
+	 * @generated
+	 */
+	public EReference getXmlIdClassContainer_IdClass()
+	{
+		return (EReference)xmlIdClassContainerEClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.Inheritance <em>Inheritance</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Inheritance</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Inheritance
+	 * @generated
+	 */
+	public EClass getInheritance()
+	{
+		return inheritanceEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.Inheritance#getStrategy <em>Strategy</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Strategy</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Inheritance#getStrategy()
+	 * @see #getInheritance()
+	 * @generated
+	 */
+	public EAttribute getInheritance_Strategy()
+	{
+		return (EAttribute)inheritanceEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn <em>Xml Join Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Join Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumn
+	 * @generated
+	 */
+	public EClass getXmlJoinColumn()
+	{
+		return xmlJoinColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Referenced Column Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumn#getReferencedColumnName()
+	 * @see #getXmlJoinColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlJoinColumn_ReferencedColumnName()
+	{
+		return (EAttribute)xmlJoinColumnEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping <em>Xml Join Columns Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Join Columns Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping
+	 * @generated
+	 */
+	public EClass getXmlJoinColumnsMapping()
+	{
+		return xmlJoinColumnsMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping#getJoinColumns <em>Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping#getJoinColumns()
+	 * @see #getXmlJoinColumnsMapping()
+	 * @generated
+	 */
+	public EReference getXmlJoinColumnsMapping_JoinColumns()
+	{
+		return (EReference)xmlJoinColumnsMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTable <em>Xml Join Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Join Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTable
+	 * @generated
+	 */
+	public EClass getXmlJoinTable()
+	{
+		return xmlJoinTableEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTable#getInverseJoinColumns <em>Inverse Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Inverse Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTable#getInverseJoinColumns()
+	 * @see #getXmlJoinTable()
+	 * @generated
+	 */
+	public EReference getXmlJoinTable_InverseJoinColumns()
+	{
+		return (EReference)xmlJoinTableEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping <em>Xml Join Table Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Join Table Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping
+	 * @generated
+	 */
+	public EClass getXmlJoinTableMapping()
+	{
+		return xmlJoinTableMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping#getJoinTable <em>Join Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Join Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping#getJoinTable()
+	 * @see #getXmlJoinTableMapping()
+	 * @generated
+	 */
+	public EReference getXmlJoinTableMapping_JoinTable()
+	{
+		return (EReference)xmlJoinTableMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.Lob <em>Lob</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Lob</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.Lob
+	 * @generated
+	 */
+	public EClass getLob()
+	{
+		return lobEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlManyToMany <em>Xml Many To Many</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Many To Many</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlManyToMany
+	 * @generated
+	 */
+	public EClass getXmlManyToMany()
+	{
+		return xmlManyToManyEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlManyToOne <em>Xml Many To One</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Many To One</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlManyToOne
+	 * @generated
+	 */
+	public EClass getXmlManyToOne()
+	{
+		return xmlManyToOneEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.MapKey <em>Map Key</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Map Key</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.MapKey
+	 * @generated
+	 */
+	public EClass getMapKey()
+	{
+		return mapKeyEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.MapKey#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.MapKey#getName()
+	 * @see #getMapKey()
+	 * @generated
+	 */
+	public EAttribute getMapKey_Name()
+	{
+		return (EAttribute)mapKeyEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlMappedByMapping <em>Xml Mapped By Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Mapped By Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedByMapping
+	 * @generated
+	 */
+	public EClass getXmlMappedByMapping()
+	{
+		return xmlMappedByMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlMappedByMapping#getMappedBy <em>Mapped By</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Mapped By</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedByMapping#getMappedBy()
+	 * @see #getXmlMappedByMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlMappedByMapping_MappedBy()
+	{
+		return (EAttribute)xmlMappedByMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass <em>Xml Mapped Superclass</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Mapped Superclass</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass
+	 * @generated
+	 */
+	public EClass getXmlMappedSuperclass()
+	{
+		return xmlMappedSuperclassEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Exclude Default Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners()
+	 * @see #getXmlMappedSuperclass()
+	 * @generated
+	 */
+	public EAttribute getXmlMappedSuperclass_ExcludeDefaultListeners()
+	{
+		return (EAttribute)xmlMappedSuperclassEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Exclude Superclass Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners()
+	 * @see #getXmlMappedSuperclass()
+	 * @generated
+	 */
+	public EAttribute getXmlMappedSuperclass_ExcludeSuperclassListeners()
+	{
+		return (EAttribute)xmlMappedSuperclassEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#getEntityListeners <em>Entity Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Entity Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#getEntityListeners()
+	 * @see #getXmlMappedSuperclass()
+	 * @generated
+	 */
+	public EReference getXmlMappedSuperclass_EntityListeners()
+	{
+		return (EReference)xmlMappedSuperclassEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery <em>Xml Named Native Query</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Named Native Query</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery
+	 * @generated
+	 */
+	public EClass getXmlNamedNativeQuery()
+	{
+		return xmlNamedNativeQueryEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultClass <em>Result Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Result Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultClass()
+	 * @see #getXmlNamedNativeQuery()
+	 * @generated
+	 */
+	public EAttribute getXmlNamedNativeQuery_ResultClass()
+	{
+		return (EAttribute)xmlNamedNativeQueryEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Result Set Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping()
+	 * @see #getXmlNamedNativeQuery()
+	 * @generated
+	 */
+	public EAttribute getXmlNamedNativeQuery_ResultSetMapping()
+	{
+		return (EAttribute)xmlNamedNativeQueryEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery <em>Xml Named Query</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Named Query</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNamedQuery
+	 * @generated
+	 */
+	public EClass getXmlNamedQuery()
+	{
+		return xmlNamedQueryEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping <em>Xml Null Attribute Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Null Attribute Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping
+	 * @generated
+	 */
+	public EClass getXmlNullAttributeMapping()
+	{
+		return xmlNullAttributeMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlOneToMany <em>Xml One To Many</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml One To Many</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOneToMany
+	 * @generated
+	 */
+	public EClass getXmlOneToMany()
+	{
+		return xmlOneToManyEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne <em>Xml One To One</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml One To One</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOneToOne
+	 * @generated
+	 */
+	public EClass getXmlOneToOne()
+	{
+		return xmlOneToOneEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Primary Key Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOneToOne#getPrimaryKeyJoinColumns()
+	 * @see #getXmlOneToOne()
+	 * @generated
+	 */
+	public EReference getXmlOneToOne_PrimaryKeyJoinColumns()
+	{
+		return (EReference)xmlOneToOneEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlOrderColumn <em>Xml Order Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Order Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOrderColumn
+	 * @generated
+	 */
+	public EClass getXmlOrderColumn()
+	{
+		return xmlOrderColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlOverride <em>Xml Override</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Override</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOverride
+	 * @generated
+	 */
+	public EClass getXmlOverride()
+	{
+		return xmlOverrideEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlOverride#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOverride#getName()
+	 * @see #getXmlOverride()
+	 * @generated
+	 */
+	public EAttribute getXmlOverride_Name()
+	{
+		return (EAttribute)xmlOverrideEClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults <em>Xml Persistence Unit Defaults</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence Unit Defaults</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults
+	 * @generated
+	 */
+	public EClass getXmlPersistenceUnitDefaults()
+	{
+		return xmlPersistenceUnitDefaultsEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getSchema <em>Schema</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Schema</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getSchema()
+	 * @see #getXmlPersistenceUnitDefaults()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitDefaults_Schema()
+	{
+		return (EAttribute)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog <em>Catalog</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Catalog</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog()
+	 * @see #getXmlPersistenceUnitDefaults()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitDefaults_Catalog()
+	{
+		return (EAttribute)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist <em>Cascade Persist</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade Persist</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist()
+	 * @see #getXmlPersistenceUnitDefaults()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitDefaults_CascadePersist()
+	{
+		return (EAttribute)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners <em>Entity Listeners</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Entity Listeners</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners()
+	 * @see #getXmlPersistenceUnitDefaults()
+	 * @generated
+	 */
+	public EReference getXmlPersistenceUnitDefaults_EntityListeners()
+	{
+		return (EReference)xmlPersistenceUnitDefaultsEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata <em>Xml Persistence Unit Metadata</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence Unit Metadata</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata
+	 * @generated
+	 */
+	public EClass getXmlPersistenceUnitMetadata()
+	{
+		return xmlPersistenceUnitMetadataEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Xml Mapping Metadata Complete</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete()
+	 * @see #getXmlPersistenceUnitMetadata()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete()
+	{
+		return (EAttribute)xmlPersistenceUnitMetadataEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults <em>Persistence Unit Defaults</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Persistence Unit Defaults</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults()
+	 * @see #getXmlPersistenceUnitMetadata()
+	 * @generated
+	 */
+	public EReference getXmlPersistenceUnitMetadata_PersistenceUnitDefaults()
+	{
+		return (EReference)xmlPersistenceUnitMetadataEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable <em>Abstract Xml Reference Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Xml Reference Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable
+	 * @generated
+	 */
+	public EClass getAbstractXmlReferenceTable()
+	{
+		return abstractXmlReferenceTableEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlReferenceTable <em>Xml Reference Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Reference Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlReferenceTable
+	 * @generated
+	 */
+	public EClass getXmlReferenceTable()
+	{
+		return xmlReferenceTableEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlReferenceTable#getJoinColumns <em>Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlReferenceTable#getJoinColumns()
+	 * @see #getXmlReferenceTable()
+	 * @generated
+	 */
+	public EReference getXmlReferenceTable_JoinColumns()
+	{
+		return (EReference)xmlReferenceTableEClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PostLoad <em>Post Load</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Post Load</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PostLoad
+	 * @generated
+	 */
+	public EClass getPostLoad()
+	{
+		return postLoadEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PostPersist <em>Post Persist</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Post Persist</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PostPersist
+	 * @generated
+	 */
+	public EClass getPostPersist()
+	{
+		return postPersistEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PostRemove <em>Post Remove</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Post Remove</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PostRemove
+	 * @generated
+	 */
+	public EClass getPostRemove()
+	{
+		return postRemoveEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PostUpdate <em>Post Update</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Post Update</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PostUpdate
+	 * @generated
+	 */
+	public EClass getPostUpdate()
+	{
+		return postUpdateEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PrePersist <em>Pre Persist</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Pre Persist</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PrePersist
+	 * @generated
+	 */
+	public EClass getPrePersist()
+	{
+		return prePersistEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PreRemove <em>Pre Remove</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Pre Remove</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PreRemove
+	 * @generated
+	 */
+	public EClass getPreRemove()
+	{
+		return preRemoveEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.PreUpdate <em>Pre Update</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Pre Update</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.PreUpdate
+	 * @generated
+	 */
+	public EClass getPreUpdate()
+	{
+		return preUpdateEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn <em>Xml Primary Key Join Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Primary Key Join Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn
+	 * @generated
+	 */
+	public EClass getXmlPrimaryKeyJoinColumn()
+	{
+		return xmlPrimaryKeyJoinColumnEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Referenced Column Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn#getReferencedColumnName()
+	 * @see #getXmlPrimaryKeyJoinColumn()
+	 * @generated
+	 */
+	public EAttribute getXmlPrimaryKeyJoinColumn_ReferencedColumnName()
+	{
+		return (EAttribute)xmlPrimaryKeyJoinColumnEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlQuery <em>Xml Query</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Query</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQuery
+	 * @generated
+	 */
+	public EClass getXmlQuery()
+	{
+		return xmlQueryEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQuery#getName()
+	 * @see #getXmlQuery()
+	 * @generated
+	 */
+	public EAttribute getXmlQuery_Name()
+	{
+		return (EAttribute)xmlQueryEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getQuery <em>Query</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Query</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQuery#getQuery()
+	 * @see #getXmlQuery()
+	 * @generated
+	 */
+	public EAttribute getXmlQuery_Query()
+	{
+		return (EAttribute)xmlQueryEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getHints <em>Hints</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Hints</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQuery#getHints()
+	 * @see #getXmlQuery()
+	 * @generated
+	 */
+	public EReference getXmlQuery_Hints()
+	{
+		return (EReference)xmlQueryEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer <em>Xml Query Container</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Query Container</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryContainer
+	 * @generated
+	 */
+	public EClass getXmlQueryContainer()
+	{
+		return xmlQueryContainerEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer#getNamedQueries <em>Named Queries</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Named Queries</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryContainer#getNamedQueries()
+	 * @see #getXmlQueryContainer()
+	 * @generated
+	 */
+	public EReference getXmlQueryContainer_NamedQueries()
+	{
+		return (EReference)xmlQueryContainerEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer#getNamedNativeQueries <em>Named Native Queries</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Named Native Queries</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryContainer#getNamedNativeQueries()
+	 * @see #getXmlQueryContainer()
+	 * @generated
+	 */
+	public EReference getXmlQueryContainer_NamedNativeQueries()
+	{
+		return (EReference)xmlQueryContainerEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint <em>Xml Query Hint</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Query Hint</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryHint
+	 * @generated
+	 */
+	public EClass getXmlQueryHint()
+	{
+		return xmlQueryHintEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryHint#getName()
+	 * @see #getXmlQueryHint()
+	 * @generated
+	 */
+	public EAttribute getXmlQueryHint_Name()
+	{
+		return (EAttribute)xmlQueryHintEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getValue <em>Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlQueryHint#getValue()
+	 * @see #getXmlQueryHint()
+	 * @generated
+	 */
+	public EAttribute getXmlQueryHint_Value()
+	{
+		return (EAttribute)xmlQueryHintEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Secondary Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlSecondaryTable
+	 * @generated
+	 */
+	public EClass getXmlSecondaryTable()
+	{
+		return xmlSecondaryTableEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlSecondaryTable#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Primary Key Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlSecondaryTable#getPrimaryKeyJoinColumns()
+	 * @see #getXmlSecondaryTable()
+	 * @generated
+	 */
+	public EReference getXmlSecondaryTable_PrimaryKeyJoinColumns()
+	{
+		return (EReference)xmlSecondaryTableEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator <em>Xml Sequence Generator</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Sequence Generator</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator
+	 * @generated
+	 */
+	public EClass getXmlSequenceGenerator()
+	{
+		return xmlSequenceGeneratorEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getSequenceName <em>Sequence Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Sequence Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getSequenceName()
+	 * @see #getXmlSequenceGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlSequenceGenerator_SequenceName()
+	{
+		return (EAttribute)xmlSequenceGeneratorEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping <em>Sql Result Set Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Sql Result Set Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.SqlResultSetMapping
+	 * @generated
+	 */
+	public EClass getSqlResultSetMapping()
+	{
+		return sqlResultSetMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getName()
+	 * @see #getSqlResultSetMapping()
+	 * @generated
+	 */
+	public EAttribute getSqlResultSetMapping_Name()
+	{
+		return (EAttribute)sqlResultSetMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getEntityResults <em>Entity Results</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Entity Results</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getEntityResults()
+	 * @see #getSqlResultSetMapping()
+	 * @generated
+	 */
+	public EReference getSqlResultSetMapping_EntityResults()
+	{
+		return (EReference)sqlResultSetMappingEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getColumnResults <em>Column Results</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Column Results</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getColumnResults()
+	 * @see #getSqlResultSetMapping()
+	 * @generated
+	 */
+	public EReference getSqlResultSetMapping_ColumnResults()
+	{
+		return (EReference)sqlResultSetMappingEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlTable <em>Xml Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTable
+	 * @generated
+	 */
+	public EClass getXmlTable()
+	{
+		return xmlTableEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator <em>Xml Table Generator</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Table Generator</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator
+	 * @generated
+	 */
+	public EClass getXmlTableGenerator()
+	{
+		return xmlTableGeneratorEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getTable <em>Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getTable()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlTableGenerator_Table()
+	{
+		return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getCatalog <em>Catalog</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Catalog</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getCatalog()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlTableGenerator_Catalog()
+	{
+		return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getSchema <em>Schema</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Schema</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getSchema()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlTableGenerator_Schema()
+	{
+		return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnName <em>Pk Column Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Pk Column Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnName()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlTableGenerator_PkColumnName()
+	{
+		return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getValueColumnName <em>Value Column Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Value Column Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getValueColumnName()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlTableGenerator_ValueColumnName()
+	{
+		return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnValue <em>Pk Column Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Pk Column Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnValue()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EAttribute getXmlTableGenerator_PkColumnValue()
+	{
+		return (EAttribute)xmlTableGeneratorEClass.getEStructuralFeatures().get(5);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getUniqueConstraints <em>Unique Constraints</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Unique Constraints</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getUniqueConstraints()
+	 * @see #getXmlTableGenerator()
+	 * @generated
+	 */
+	public EReference getXmlTableGenerator_UniqueConstraints()
+	{
+		return (EReference)xmlTableGeneratorEClass.getEStructuralFeatures().get(6);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlTransient <em>Xml Transient</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Transient</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTransient
+	 * @generated
+	 */
+	public EClass getXmlTransient()
+	{
+		return xmlTransientEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping <em>Xml Type Mapping</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Type Mapping</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping
+	 * @generated
+	 */
+	public EClass getXmlTypeMapping()
+	{
+		return xmlTypeMappingEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getClassName <em>Class Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Class Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getClassName()
+	 * @see #getXmlTypeMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlTypeMapping_ClassName()
+	{
+		return (EAttribute)xmlTypeMappingEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Metadata Complete</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getMetadataComplete()
+	 * @see #getXmlTypeMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlTypeMapping_MetadataComplete()
+	{
+		return (EAttribute)xmlTypeMappingEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getDescription()
+	 * @see #getXmlTypeMapping()
+	 * @generated
+	 */
+	public EAttribute getXmlTypeMapping_Description()
+	{
+		return (EAttribute)xmlTypeMappingEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getAttributes <em>Attributes</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Attributes</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getAttributes()
+	 * @see #getXmlTypeMapping()
+	 * @generated
+	 */
+	public EReference getXmlTypeMapping_Attributes()
+	{
+		return (EReference)xmlTypeMappingEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint <em>Xml Unique Constraint</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Unique Constraint</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint
+	 * @generated
+	 */
+	public EClass getXmlUniqueConstraint()
+	{
+		return xmlUniqueConstraintEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute list '{@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint#getColumnNames <em>Column Names</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute list '<em>Column Names</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint#getColumnNames()
+	 * @see #getXmlUniqueConstraint()
+	 * @generated
+	 */
+	public EAttribute getXmlUniqueConstraint_ColumnNames()
+	{
+		return (EAttribute)xmlUniqueConstraintEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlVersion <em>Xml Version</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Version</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlVersion
+	 * @generated
+	 */
+	public EClass getXmlVersion()
+	{
+		return xmlVersionEClass;
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.XmlOrderable <em>Xml Orderable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Orderable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOrderable
+	 * @generated
+	 */
+	public EClass getXmlOrderable()
+	{
+		return xmlOrderableEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.XmlOrderable#getOrderBy <em>Order By</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Order By</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.XmlOrderable#getOrderBy()
+	 * @see #getXmlOrderable()
+	 * @generated
+	 */
+	public EAttribute getXmlOrderable_OrderBy()
+	{
+		return (EAttribute)xmlOrderableEClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.AccessType <em>Access Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Access Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @generated
+	 */
+	public EEnum getAccessType()
+	{
+		return accessTypeEEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.DiscriminatorType <em>Discriminator Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Discriminator Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.DiscriminatorType
+	 * @generated
+	 */
+	public EEnum getDiscriminatorType()
+	{
+		return discriminatorTypeEEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.EnumType <em>Enum Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Enum Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @generated
+	 */
+	public EEnum getEnumType()
+	{
+		return enumTypeEEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.FetchType <em>Fetch Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Fetch Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @generated
+	 */
+	public EEnum getFetchType()
+	{
+		return fetchTypeEEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.GenerationType <em>Generation Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Generation Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.GenerationType
+	 * @generated
+	 */
+	public EEnum getGenerationType()
+	{
+		return generationTypeEEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.InheritanceType <em>Inheritance Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Inheritance Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.InheritanceType
+	 * @generated
+	 */
+	public EEnum getInheritanceType()
+	{
+		return inheritanceTypeEEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.TemporalType <em>Temporal Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Temporal Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @generated
+	 */
+	public EEnum getTemporalType()
+	{
+		return temporalTypeEEnum;
+	}
+
+	/**
+	 * Returns the factory that creates the instances of the model.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the factory that creates the instances of the model.
+	 * @generated
+	 */
+	public OrmFactory getOrmFactory()
+	{
+		return (OrmFactory)getEFactoryInstance();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isCreated = false;
+
+	/**
+	 * Creates the meta-model objects for the package.  This method is
+	 * guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void createPackageContents()
+	{
+		if (isCreated) return;
+		isCreated = true;
+
+		// Create classes and their features
+		abstractXmlAttributeMappingEClass = createEClass(ABSTRACT_XML_ATTRIBUTE_MAPPING);
+
+		abstractXmlColumnEClass = createEClass(ABSTRACT_XML_COLUMN);
+		createEAttribute(abstractXmlColumnEClass, ABSTRACT_XML_COLUMN__INSERTABLE);
+		createEAttribute(abstractXmlColumnEClass, ABSTRACT_XML_COLUMN__NULLABLE);
+		createEAttribute(abstractXmlColumnEClass, ABSTRACT_XML_COLUMN__TABLE);
+		createEAttribute(abstractXmlColumnEClass, ABSTRACT_XML_COLUMN__UNIQUE);
+		createEAttribute(abstractXmlColumnEClass, ABSTRACT_XML_COLUMN__UPDATABLE);
+
+		abstractXmlEmbeddedEClass = createEClass(ABSTRACT_XML_EMBEDDED);
+
+		abstractXmlMultiRelationshipMappingEClass = createEClass(ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING);
+		createEReference(abstractXmlMultiRelationshipMappingEClass, ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY);
+
+		abstractXmlNamedColumnEClass = createEClass(ABSTRACT_XML_NAMED_COLUMN);
+		createEAttribute(abstractXmlNamedColumnEClass, ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION);
+		createEAttribute(abstractXmlNamedColumnEClass, ABSTRACT_XML_NAMED_COLUMN__NAME);
+
+		abstractXmlRelationshipMappingEClass = createEClass(ABSTRACT_XML_RELATIONSHIP_MAPPING);
+		createEAttribute(abstractXmlRelationshipMappingEClass, ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY);
+		createEAttribute(abstractXmlRelationshipMappingEClass, ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH);
+		createEReference(abstractXmlRelationshipMappingEClass, ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE);
+
+		abstractXmlSingleRelationshipMappingEClass = createEClass(ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING);
+		createEAttribute(abstractXmlSingleRelationshipMappingEClass, ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL);
+
+		abstractXmlReferenceTableEClass = createEClass(ABSTRACT_XML_REFERENCE_TABLE);
+
+		abstractXmlTableEClass = createEClass(ABSTRACT_XML_TABLE);
+		createEAttribute(abstractXmlTableEClass, ABSTRACT_XML_TABLE__NAME);
+		createEAttribute(abstractXmlTableEClass, ABSTRACT_XML_TABLE__CATALOG);
+		createEAttribute(abstractXmlTableEClass, ABSTRACT_XML_TABLE__SCHEMA);
+		createEReference(abstractXmlTableEClass, ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS);
+
+		abstractXmlTypeMappingEClass = createEClass(ABSTRACT_XML_TYPE_MAPPING);
+
+		xmlAccessHolderEClass = createEClass(XML_ACCESS_HOLDER);
+		createEAttribute(xmlAccessHolderEClass, XML_ACCESS_HOLDER__ACCESS);
+
+		xmlAttributeMappingEClass = createEClass(XML_ATTRIBUTE_MAPPING);
+		createEAttribute(xmlAttributeMappingEClass, XML_ATTRIBUTE_MAPPING__NAME);
+
+		xmlAssociationOverrideEClass = createEClass(XML_ASSOCIATION_OVERRIDE);
+
+		xmlAssociationOverrideContainerEClass = createEClass(XML_ASSOCIATION_OVERRIDE_CONTAINER);
+		createEReference(xmlAssociationOverrideContainerEClass, XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES);
+
+		xmlAttributeOverrideEClass = createEClass(XML_ATTRIBUTE_OVERRIDE);
+		createEReference(xmlAttributeOverrideEClass, XML_ATTRIBUTE_OVERRIDE__COLUMN);
+
+		xmlAttributeOverrideContainerEClass = createEClass(XML_ATTRIBUTE_OVERRIDE_CONTAINER);
+		createEReference(xmlAttributeOverrideContainerEClass, XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES);
+
+		attributesEClass = createEClass(ATTRIBUTES);
+		createEReference(attributesEClass, ATTRIBUTES__IDS);
+		createEReference(attributesEClass, ATTRIBUTES__EMBEDDED_IDS);
+		createEReference(attributesEClass, ATTRIBUTES__BASICS);
+		createEReference(attributesEClass, ATTRIBUTES__VERSIONS);
+		createEReference(attributesEClass, ATTRIBUTES__MANY_TO_ONES);
+		createEReference(attributesEClass, ATTRIBUTES__ONE_TO_MANYS);
+		createEReference(attributesEClass, ATTRIBUTES__ONE_TO_ONES);
+		createEReference(attributesEClass, ATTRIBUTES__MANY_TO_MANYS);
+		createEReference(attributesEClass, ATTRIBUTES__EMBEDDEDS);
+		createEReference(attributesEClass, ATTRIBUTES__TRANSIENTS);
+
+		xmlBasicEClass = createEClass(XML_BASIC);
+		createEAttribute(xmlBasicEClass, XML_BASIC__FETCH);
+		createEAttribute(xmlBasicEClass, XML_BASIC__OPTIONAL);
+
+		cascadeTypeEClass = createEClass(CASCADE_TYPE);
+		createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_ALL);
+		createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_PERSIST);
+		createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_MERGE);
+		createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_REMOVE);
+		createEAttribute(cascadeTypeEClass, CASCADE_TYPE__CASCADE_REFRESH);
+
+		xmlClassReferenceEClass = createEClass(XML_CLASS_REFERENCE);
+		createEAttribute(xmlClassReferenceEClass, XML_CLASS_REFERENCE__CLASS_NAME);
+
+		xmlCollectionTableEClass = createEClass(XML_COLLECTION_TABLE);
+
+		xmlColumnEClass = createEClass(XML_COLUMN);
+		createEAttribute(xmlColumnEClass, XML_COLUMN__LENGTH);
+		createEAttribute(xmlColumnEClass, XML_COLUMN__PRECISION);
+		createEAttribute(xmlColumnEClass, XML_COLUMN__SCALE);
+
+		columnMappingEClass = createEClass(COLUMN_MAPPING);
+		createEReference(columnMappingEClass, COLUMN_MAPPING__COLUMN);
+
+		columnResultEClass = createEClass(COLUMN_RESULT);
+		createEAttribute(columnResultEClass, COLUMN_RESULT__NAME);
+
+		xmlConvertibleMappingEClass = createEClass(XML_CONVERTIBLE_MAPPING);
+		createEAttribute(xmlConvertibleMappingEClass, XML_CONVERTIBLE_MAPPING__LOB);
+		createEAttribute(xmlConvertibleMappingEClass, XML_CONVERTIBLE_MAPPING__TEMPORAL);
+		createEAttribute(xmlConvertibleMappingEClass, XML_CONVERTIBLE_MAPPING__ENUMERATED);
+
+		xmlDiscriminatorColumnEClass = createEClass(XML_DISCRIMINATOR_COLUMN);
+		createEAttribute(xmlDiscriminatorColumnEClass, XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE);
+		createEAttribute(xmlDiscriminatorColumnEClass, XML_DISCRIMINATOR_COLUMN__LENGTH);
+
+		xmlElementCollectionEClass = createEClass(XML_ELEMENT_COLLECTION);
+
+		xmlEmbeddableEClass = createEClass(XML_EMBEDDABLE);
+
+		xmlEmbeddedEClass = createEClass(XML_EMBEDDED);
+
+		xmlEmbeddedIdEClass = createEClass(XML_EMBEDDED_ID);
+
+		xmlEntityEClass = createEClass(XML_ENTITY);
+		createEAttribute(xmlEntityEClass, XML_ENTITY__NAME);
+		createEReference(xmlEntityEClass, XML_ENTITY__TABLE);
+		createEReference(xmlEntityEClass, XML_ENTITY__SECONDARY_TABLES);
+		createEReference(xmlEntityEClass, XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS);
+		createEReference(xmlEntityEClass, XML_ENTITY__INHERITANCE);
+		createEAttribute(xmlEntityEClass, XML_ENTITY__DISCRIMINATOR_VALUE);
+		createEReference(xmlEntityEClass, XML_ENTITY__DISCRIMINATOR_COLUMN);
+		createEReference(xmlEntityEClass, XML_ENTITY__SQL_RESULT_SET_MAPPINGS);
+		createEAttribute(xmlEntityEClass, XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS);
+		createEAttribute(xmlEntityEClass, XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS);
+		createEReference(xmlEntityEClass, XML_ENTITY__ENTITY_LISTENERS);
+
+		entityListenerEClass = createEClass(ENTITY_LISTENER);
+		createEAttribute(entityListenerEClass, ENTITY_LISTENER__CLASS_NAME);
+
+		entityListenersEClass = createEClass(ENTITY_LISTENERS);
+		createEReference(entityListenersEClass, ENTITY_LISTENERS__ENTITY_LISTENERS);
+
+		xmlEntityMappingsEClass = createEClass(XML_ENTITY_MAPPINGS);
+		createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__DESCRIPTION);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA);
+		createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__PACKAGE);
+		createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__SCHEMA);
+		createEAttribute(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__CATALOG);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__TABLE_GENERATORS);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__ENTITIES);
+		createEReference(xmlEntityMappingsEClass, XML_ENTITY_MAPPINGS__EMBEDDABLES);
+
+		entityResultEClass = createEClass(ENTITY_RESULT);
+		createEAttribute(entityResultEClass, ENTITY_RESULT__DISCRIMINATOR_COLUMN);
+		createEAttribute(entityResultEClass, ENTITY_RESULT__ENTITY_CLASS);
+		createEReference(entityResultEClass, ENTITY_RESULT__FIELD_RESULTS);
+
+		eventMethodEClass = createEClass(EVENT_METHOD);
+		createEAttribute(eventMethodEClass, EVENT_METHOD__METHOD_NAME);
+
+		xmlEventMethodContainerEClass = createEClass(XML_EVENT_METHOD_CONTAINER);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__PRE_PERSIST);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_PERSIST);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__PRE_REMOVE);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_REMOVE);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__PRE_UPDATE);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_UPDATE);
+		createEReference(xmlEventMethodContainerEClass, XML_EVENT_METHOD_CONTAINER__POST_LOAD);
+
+		fieldResultEClass = createEClass(FIELD_RESULT);
+		createEAttribute(fieldResultEClass, FIELD_RESULT__NAME);
+		createEAttribute(fieldResultEClass, FIELD_RESULT__COLUMN);
+
+		xmlGeneratedValueEClass = createEClass(XML_GENERATED_VALUE);
+		createEAttribute(xmlGeneratedValueEClass, XML_GENERATED_VALUE__GENERATOR);
+		createEAttribute(xmlGeneratedValueEClass, XML_GENERATED_VALUE__STRATEGY);
+
+		xmlGeneratorEClass = createEClass(XML_GENERATOR);
+		createEAttribute(xmlGeneratorEClass, XML_GENERATOR__NAME);
+		createEAttribute(xmlGeneratorEClass, XML_GENERATOR__INITIAL_VALUE);
+		createEAttribute(xmlGeneratorEClass, XML_GENERATOR__ALLOCATION_SIZE);
+
+		xmlGeneratorContainerEClass = createEClass(XML_GENERATOR_CONTAINER);
+		createEReference(xmlGeneratorContainerEClass, XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR);
+		createEReference(xmlGeneratorContainerEClass, XML_GENERATOR_CONTAINER__TABLE_GENERATOR);
+
+		xmlIdEClass = createEClass(XML_ID);
+		createEReference(xmlIdEClass, XML_ID__GENERATED_VALUE);
+
+		xmlIdClassContainerEClass = createEClass(XML_ID_CLASS_CONTAINER);
+		createEReference(xmlIdClassContainerEClass, XML_ID_CLASS_CONTAINER__ID_CLASS);
+
+		inheritanceEClass = createEClass(INHERITANCE);
+		createEAttribute(inheritanceEClass, INHERITANCE__STRATEGY);
+
+		xmlJoinColumnEClass = createEClass(XML_JOIN_COLUMN);
+		createEAttribute(xmlJoinColumnEClass, XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
+
+		xmlJoinColumnsMappingEClass = createEClass(XML_JOIN_COLUMNS_MAPPING);
+		createEReference(xmlJoinColumnsMappingEClass, XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS);
+
+		xmlJoinTableEClass = createEClass(XML_JOIN_TABLE);
+		createEReference(xmlJoinTableEClass, XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS);
+
+		xmlJoinTableMappingEClass = createEClass(XML_JOIN_TABLE_MAPPING);
+		createEReference(xmlJoinTableMappingEClass, XML_JOIN_TABLE_MAPPING__JOIN_TABLE);
+
+		lobEClass = createEClass(LOB);
+
+		xmlManyToManyEClass = createEClass(XML_MANY_TO_MANY);
+
+		xmlManyToOneEClass = createEClass(XML_MANY_TO_ONE);
+
+		mapKeyEClass = createEClass(MAP_KEY);
+		createEAttribute(mapKeyEClass, MAP_KEY__NAME);
+
+		xmlMappedByMappingEClass = createEClass(XML_MAPPED_BY_MAPPING);
+		createEAttribute(xmlMappedByMappingEClass, XML_MAPPED_BY_MAPPING__MAPPED_BY);
+
+		xmlMappedSuperclassEClass = createEClass(XML_MAPPED_SUPERCLASS);
+		createEAttribute(xmlMappedSuperclassEClass, XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS);
+		createEAttribute(xmlMappedSuperclassEClass, XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS);
+		createEReference(xmlMappedSuperclassEClass, XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS);
+
+		xmlNamedNativeQueryEClass = createEClass(XML_NAMED_NATIVE_QUERY);
+		createEAttribute(xmlNamedNativeQueryEClass, XML_NAMED_NATIVE_QUERY__RESULT_CLASS);
+		createEAttribute(xmlNamedNativeQueryEClass, XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING);
+
+		xmlNamedQueryEClass = createEClass(XML_NAMED_QUERY);
+
+		xmlNullAttributeMappingEClass = createEClass(XML_NULL_ATTRIBUTE_MAPPING);
+
+		xmlOneToManyEClass = createEClass(XML_ONE_TO_MANY);
+
+		xmlOneToOneEClass = createEClass(XML_ONE_TO_ONE);
+		createEReference(xmlOneToOneEClass, XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS);
+
+		xmlOrderableEClass = createEClass(XML_ORDERABLE);
+		createEAttribute(xmlOrderableEClass, XML_ORDERABLE__ORDER_BY);
+
+		xmlOrderColumnEClass = createEClass(XML_ORDER_COLUMN);
+
+		xmlOverrideEClass = createEClass(XML_OVERRIDE);
+		createEAttribute(xmlOverrideEClass, XML_OVERRIDE__NAME);
+
+		xmlPersistenceUnitDefaultsEClass = createEClass(XML_PERSISTENCE_UNIT_DEFAULTS);
+		createEAttribute(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA);
+		createEAttribute(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG);
+		createEAttribute(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST);
+		createEReference(xmlPersistenceUnitDefaultsEClass, XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS);
+
+		xmlPersistenceUnitMetadataEClass = createEClass(XML_PERSISTENCE_UNIT_METADATA);
+		createEAttribute(xmlPersistenceUnitMetadataEClass, XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE);
+		createEReference(xmlPersistenceUnitMetadataEClass, XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS);
+
+		xmlReferenceTableEClass = createEClass(XML_REFERENCE_TABLE);
+		createEReference(xmlReferenceTableEClass, XML_REFERENCE_TABLE__JOIN_COLUMNS);
+
+		postLoadEClass = createEClass(POST_LOAD);
+
+		postPersistEClass = createEClass(POST_PERSIST);
+
+		postRemoveEClass = createEClass(POST_REMOVE);
+
+		postUpdateEClass = createEClass(POST_UPDATE);
+
+		prePersistEClass = createEClass(PRE_PERSIST);
+
+		preRemoveEClass = createEClass(PRE_REMOVE);
+
+		preUpdateEClass = createEClass(PRE_UPDATE);
+
+		xmlPrimaryKeyJoinColumnEClass = createEClass(XML_PRIMARY_KEY_JOIN_COLUMN);
+		createEAttribute(xmlPrimaryKeyJoinColumnEClass, XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME);
+
+		xmlQueryEClass = createEClass(XML_QUERY);
+		createEAttribute(xmlQueryEClass, XML_QUERY__NAME);
+		createEAttribute(xmlQueryEClass, XML_QUERY__QUERY);
+		createEReference(xmlQueryEClass, XML_QUERY__HINTS);
+
+		xmlQueryContainerEClass = createEClass(XML_QUERY_CONTAINER);
+		createEReference(xmlQueryContainerEClass, XML_QUERY_CONTAINER__NAMED_QUERIES);
+		createEReference(xmlQueryContainerEClass, XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES);
+
+		xmlQueryHintEClass = createEClass(XML_QUERY_HINT);
+		createEAttribute(xmlQueryHintEClass, XML_QUERY_HINT__NAME);
+		createEAttribute(xmlQueryHintEClass, XML_QUERY_HINT__VALUE);
+
+		xmlSecondaryTableEClass = createEClass(XML_SECONDARY_TABLE);
+		createEReference(xmlSecondaryTableEClass, XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS);
+
+		xmlSequenceGeneratorEClass = createEClass(XML_SEQUENCE_GENERATOR);
+		createEAttribute(xmlSequenceGeneratorEClass, XML_SEQUENCE_GENERATOR__SEQUENCE_NAME);
+
+		sqlResultSetMappingEClass = createEClass(SQL_RESULT_SET_MAPPING);
+		createEAttribute(sqlResultSetMappingEClass, SQL_RESULT_SET_MAPPING__NAME);
+		createEReference(sqlResultSetMappingEClass, SQL_RESULT_SET_MAPPING__ENTITY_RESULTS);
+		createEReference(sqlResultSetMappingEClass, SQL_RESULT_SET_MAPPING__COLUMN_RESULTS);
+
+		xmlTableEClass = createEClass(XML_TABLE);
+
+		xmlTableGeneratorEClass = createEClass(XML_TABLE_GENERATOR);
+		createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__TABLE);
+		createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__CATALOG);
+		createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__SCHEMA);
+		createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__PK_COLUMN_NAME);
+		createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__VALUE_COLUMN_NAME);
+		createEAttribute(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__PK_COLUMN_VALUE);
+		createEReference(xmlTableGeneratorEClass, XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
+
+		xmlTransientEClass = createEClass(XML_TRANSIENT);
+
+		xmlTypeMappingEClass = createEClass(XML_TYPE_MAPPING);
+		createEAttribute(xmlTypeMappingEClass, XML_TYPE_MAPPING__CLASS_NAME);
+		createEAttribute(xmlTypeMappingEClass, XML_TYPE_MAPPING__METADATA_COMPLETE);
+		createEAttribute(xmlTypeMappingEClass, XML_TYPE_MAPPING__DESCRIPTION);
+		createEReference(xmlTypeMappingEClass, XML_TYPE_MAPPING__ATTRIBUTES);
+
+		xmlUniqueConstraintEClass = createEClass(XML_UNIQUE_CONSTRAINT);
+		createEAttribute(xmlUniqueConstraintEClass, XML_UNIQUE_CONSTRAINT__COLUMN_NAMES);
+
+		xmlVersionEClass = createEClass(XML_VERSION);
+
+		// Create enums
+		accessTypeEEnum = createEEnum(ACCESS_TYPE);
+		discriminatorTypeEEnum = createEEnum(DISCRIMINATOR_TYPE);
+		enumTypeEEnum = createEEnum(ENUM_TYPE);
+		fetchTypeEEnum = createEEnum(FETCH_TYPE);
+		generationTypeEEnum = createEEnum(GENERATION_TYPE);
+		inheritanceTypeEEnum = createEEnum(INHERITANCE_TYPE);
+		temporalTypeEEnum = createEEnum(TEMPORAL_TYPE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isInitialized = false;
+
+	/**
+	 * Complete the initialization of the package and its meta-model.  This
+	 * method is guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void initializePackageContents()
+	{
+		if (isInitialized) return;
+		isInitialized = true;
+
+		// Initialize package
+		setName(eNAME);
+		setNsPrefix(eNS_PREFIX);
+		setNsURI(eNS_URI);
+
+		// Obtain other dependent packages
+		OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI);
+		XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+		CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
+
+		// Add subpackages
+		getESubpackages().add(theOrmV2_0Package);
+
+		// Create type parameters
+
+		// Set bounds for type parameters
+
+		// Add supertypes to classes
+		abstractXmlAttributeMappingEClass.getESuperTypes().add(this.getXmlAttributeMapping());
+		abstractXmlColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
+		abstractXmlEmbeddedEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		abstractXmlEmbeddedEClass.getESuperTypes().add(this.getXmlAttributeOverrideContainer());
+		abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getAbstractXmlRelationshipMapping());
+		abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getXmlMappedByMapping());
+		abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getXmlJoinTableMapping());
+		abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(this.getXmlOrderable());
+		abstractXmlMultiRelationshipMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlMultiRelationshipMapping_2_0());
+		abstractXmlRelationshipMappingEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(this.getAbstractXmlRelationshipMapping());
+		abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(this.getXmlJoinTableMapping());
+		abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(this.getXmlJoinColumnsMapping());
+		abstractXmlSingleRelationshipMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlSingleRelationshipMapping_2_0());
+		abstractXmlReferenceTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
+		abstractXmlReferenceTableEClass.getESuperTypes().add(this.getXmlReferenceTable());
+		abstractXmlTypeMappingEClass.getESuperTypes().add(this.getXmlTypeMapping());
+		xmlAttributeMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAttributeMapping_2_0());
+		xmlAssociationOverrideEClass.getESuperTypes().add(this.getXmlOverride());
+		xmlAssociationOverrideEClass.getESuperTypes().add(this.getXmlJoinColumnsMapping());
+		xmlAssociationOverrideEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAssociationOverride_2_0());
+		xmlAttributeOverrideEClass.getESuperTypes().add(this.getXmlOverride());
+		xmlAttributeOverrideEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAttributeOverride_2_0());
+		attributesEClass.getESuperTypes().add(theOrmV2_0Package.getXmlAttributes_2_0());
+		xmlBasicEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		xmlBasicEClass.getESuperTypes().add(this.getColumnMapping());
+		xmlBasicEClass.getESuperTypes().add(this.getXmlConvertibleMapping());
+		cascadeTypeEClass.getESuperTypes().add(theOrmV2_0Package.getXmlCascadeType_2_0());
+		xmlCollectionTableEClass.getESuperTypes().add(this.getAbstractXmlReferenceTable());
+		xmlCollectionTableEClass.getESuperTypes().add(theOrmV2_0Package.getXmlCollectionTable_2_0());
+		xmlColumnEClass.getESuperTypes().add(this.getAbstractXmlColumn());
+		xmlDiscriminatorColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
+		xmlElementCollectionEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		xmlElementCollectionEClass.getESuperTypes().add(theOrmV2_0Package.getXmlElementCollection_2_0());
+		xmlEmbeddableEClass.getESuperTypes().add(this.getAbstractXmlTypeMapping());
+		xmlEmbeddedEClass.getESuperTypes().add(this.getAbstractXmlEmbedded());
+		xmlEmbeddedEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEmbedded_2_0());
+		xmlEmbeddedIdEClass.getESuperTypes().add(this.getAbstractXmlEmbedded());
+		xmlEntityEClass.getESuperTypes().add(this.getAbstractXmlTypeMapping());
+		xmlEntityEClass.getESuperTypes().add(this.getXmlQueryContainer());
+		xmlEntityEClass.getESuperTypes().add(this.getXmlGeneratorContainer());
+		xmlEntityEClass.getESuperTypes().add(this.getXmlEventMethodContainer());
+		xmlEntityEClass.getESuperTypes().add(this.getXmlAttributeOverrideContainer());
+		xmlEntityEClass.getESuperTypes().add(this.getXmlAssociationOverrideContainer());
+		xmlEntityEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEntity_2_0());
+		xmlEntityEClass.getESuperTypes().add(this.getXmlIdClassContainer());
+		entityListenerEClass.getESuperTypes().add(this.getXmlEventMethodContainer());
+		entityListenerEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEntityListener_2_0());
+		xmlEntityMappingsEClass.getESuperTypes().add(theCommonPackage.getAbstractJpaRootEObject());
+		xmlEntityMappingsEClass.getESuperTypes().add(this.getXmlQueryContainer());
+		xmlEntityMappingsEClass.getESuperTypes().add(this.getXmlAccessHolder());
+		eventMethodEClass.getESuperTypes().add(theOrmV2_0Package.getXmlEventMethod_2_0());
+		xmlGeneratorEClass.getESuperTypes().add(theOrmV2_0Package.getXmlGenerator_2_0());
+		xmlIdEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		xmlIdEClass.getESuperTypes().add(this.getColumnMapping());
+		xmlIdEClass.getESuperTypes().add(this.getXmlConvertibleMapping());
+		xmlIdEClass.getESuperTypes().add(this.getXmlGeneratorContainer());
+		xmlJoinColumnEClass.getESuperTypes().add(this.getAbstractXmlColumn());
+		xmlJoinTableEClass.getESuperTypes().add(this.getAbstractXmlReferenceTable());
+		xmlManyToManyEClass.getESuperTypes().add(this.getAbstractXmlMultiRelationshipMapping());
+		xmlManyToManyEClass.getESuperTypes().add(theOrmV2_0Package.getXmlManyToMany_2_0());
+		xmlManyToOneEClass.getESuperTypes().add(this.getAbstractXmlSingleRelationshipMapping());
+		xmlMappedSuperclassEClass.getESuperTypes().add(this.getAbstractXmlTypeMapping());
+		xmlMappedSuperclassEClass.getESuperTypes().add(this.getXmlIdClassContainer());
+		xmlNamedNativeQueryEClass.getESuperTypes().add(this.getXmlQuery());
+		xmlNamedQueryEClass.getESuperTypes().add(this.getXmlQuery());
+		xmlNamedQueryEClass.getESuperTypes().add(theOrmV2_0Package.getXmlNamedQuery_2_0());
+		xmlNullAttributeMappingEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		xmlOneToManyEClass.getESuperTypes().add(this.getAbstractXmlMultiRelationshipMapping());
+		xmlOneToManyEClass.getESuperTypes().add(this.getXmlJoinColumnsMapping());
+		xmlOneToManyEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOneToMany_2_0());
+		xmlOneToOneEClass.getESuperTypes().add(this.getAbstractXmlSingleRelationshipMapping());
+		xmlOneToOneEClass.getESuperTypes().add(this.getXmlMappedByMapping());
+		xmlOneToOneEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOneToOne_2_0());
+		xmlOrderableEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOrderable_2_0());
+		xmlOrderColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
+		xmlOrderColumnEClass.getESuperTypes().add(theOrmV2_0Package.getXmlOrderColumn_2_0());
+		xmlPersistenceUnitDefaultsEClass.getESuperTypes().add(this.getXmlAccessHolder());
+		xmlPersistenceUnitDefaultsEClass.getESuperTypes().add(theOrmV2_0Package.getXmlPersistenceUnitDefaults_2_0());
+		xmlPersistenceUnitMetadataEClass.getESuperTypes().add(theOrmV2_0Package.getXmlPersistenceUnitMetadata_2_0());
+		postLoadEClass.getESuperTypes().add(this.getEventMethod());
+		postPersistEClass.getESuperTypes().add(this.getEventMethod());
+		postRemoveEClass.getESuperTypes().add(this.getEventMethod());
+		postUpdateEClass.getESuperTypes().add(this.getEventMethod());
+		prePersistEClass.getESuperTypes().add(this.getEventMethod());
+		preRemoveEClass.getESuperTypes().add(this.getEventMethod());
+		preUpdateEClass.getESuperTypes().add(this.getEventMethod());
+		xmlPrimaryKeyJoinColumnEClass.getESuperTypes().add(this.getAbstractXmlNamedColumn());
+		xmlQueryEClass.getESuperTypes().add(theOrmV2_0Package.getXmlQuery_2_0());
+		xmlQueryHintEClass.getESuperTypes().add(theOrmV2_0Package.getXmlQueryHint_2_0());
+		xmlSecondaryTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
+		xmlSequenceGeneratorEClass.getESuperTypes().add(this.getXmlGenerator());
+		xmlSequenceGeneratorEClass.getESuperTypes().add(theOrmV2_0Package.getXmlSequenceGenerator_2_0());
+		sqlResultSetMappingEClass.getESuperTypes().add(theOrmV2_0Package.getXmlSqlResultSetMapping_2_0());
+		xmlTableEClass.getESuperTypes().add(this.getAbstractXmlTable());
+		xmlTableGeneratorEClass.getESuperTypes().add(this.getXmlGenerator());
+		xmlTransientEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		xmlTypeMappingEClass.getESuperTypes().add(this.getXmlAccessHolder());
+		xmlUniqueConstraintEClass.getESuperTypes().add(theOrmV2_0Package.getXmlUniqueConstraint_2_0());
+		xmlVersionEClass.getESuperTypes().add(this.getAbstractXmlAttributeMapping());
+		xmlVersionEClass.getESuperTypes().add(this.getColumnMapping());
+		xmlVersionEClass.getESuperTypes().add(this.getXmlConvertibleMapping());
+
+		// Initialize classes and features; add operations and parameters
+		initEClass(abstractXmlAttributeMappingEClass, AbstractXmlAttributeMapping.class, "AbstractXmlAttributeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(abstractXmlColumnEClass, AbstractXmlColumn.class, "AbstractXmlColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getAbstractXmlColumn_Insertable(), theXMLTypePackage.getBooleanObject(), "insertable", null, 0, 1, AbstractXmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlColumn_Nullable(), theXMLTypePackage.getBooleanObject(), "nullable", null, 0, 1, AbstractXmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlColumn_Table(), theXMLTypePackage.getString(), "table", null, 0, 1, AbstractXmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlColumn_Unique(), theXMLTypePackage.getBooleanObject(), "unique", null, 0, 1, AbstractXmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlColumn_Updatable(), theXMLTypePackage.getBooleanObject(), "updatable", null, 0, 1, AbstractXmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(abstractXmlEmbeddedEClass, AbstractXmlEmbedded.class, "AbstractXmlEmbedded", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(abstractXmlMultiRelationshipMappingEClass, AbstractXmlMultiRelationshipMapping.class, "AbstractXmlMultiRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getAbstractXmlMultiRelationshipMapping_MapKey(), this.getMapKey(), null, "mapKey", null, 0, 1, AbstractXmlMultiRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(abstractXmlNamedColumnEClass, AbstractXmlNamedColumn.class, "AbstractXmlNamedColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getAbstractXmlNamedColumn_ColumnDefinition(), theXMLTypePackage.getString(), "columnDefinition", null, 0, 1, AbstractXmlNamedColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlNamedColumn_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, AbstractXmlNamedColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(abstractXmlRelationshipMappingEClass, AbstractXmlRelationshipMapping.class, "AbstractXmlRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getAbstractXmlRelationshipMapping_TargetEntity(), theXMLTypePackage.getString(), "targetEntity", null, 0, 1, AbstractXmlRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlRelationshipMapping_Fetch(), this.getFetchType(), "fetch", "LAZY", 0, 1, AbstractXmlRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAbstractXmlRelationshipMapping_Cascade(), this.getCascadeType(), null, "cascade", null, 0, 1, AbstractXmlRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(abstractXmlSingleRelationshipMappingEClass, AbstractXmlSingleRelationshipMapping.class, "AbstractXmlSingleRelationshipMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getAbstractXmlSingleRelationshipMapping_Optional(), theXMLTypePackage.getBooleanObject(), "optional", null, 0, 1, AbstractXmlSingleRelationshipMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(abstractXmlReferenceTableEClass, AbstractXmlReferenceTable.class, "AbstractXmlReferenceTable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(abstractXmlTableEClass, AbstractXmlTable.class, "AbstractXmlTable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getAbstractXmlTable_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlTable_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getAbstractXmlTable_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAbstractXmlTable_UniqueConstraints(), this.getXmlUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, AbstractXmlTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(abstractXmlTypeMappingEClass, AbstractXmlTypeMapping.class, "AbstractXmlTypeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlAccessHolderEClass, XmlAccessHolder.class, "XmlAccessHolder", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlAccessHolder_Access(), this.getAccessType(), "access", null, 0, 1, XmlAccessHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlAttributeMappingEClass, XmlAttributeMapping.class, "XmlAttributeMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlAttributeMapping_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlAttributeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlAssociationOverrideEClass, XmlAssociationOverride.class, "XmlAssociationOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlAssociationOverrideContainerEClass, XmlAssociationOverrideContainer.class, "XmlAssociationOverrideContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlAssociationOverrideContainer_AssociationOverrides(), this.getXmlAssociationOverride(), null, "associationOverrides", null, 0, -1, XmlAssociationOverrideContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlAttributeOverrideEClass, XmlAttributeOverride.class, "XmlAttributeOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlAttributeOverride_Column(), this.getXmlColumn(), null, "column", null, 1, 1, XmlAttributeOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlAttributeOverrideContainerEClass, XmlAttributeOverrideContainer.class, "XmlAttributeOverrideContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlAttributeOverrideContainer_AttributeOverrides(), this.getXmlAttributeOverride(), null, "attributeOverrides", null, 0, -1, XmlAttributeOverrideContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(attributesEClass, Attributes.class, "Attributes", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getAttributes_Ids(), this.getXmlId(), null, "ids", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_EmbeddedIds(), this.getXmlEmbeddedId(), null, "embeddedIds", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_Basics(), this.getXmlBasic(), null, "basics", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_Versions(), this.getXmlVersion(), null, "versions", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_ManyToOnes(), this.getXmlManyToOne(), null, "manyToOnes", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_OneToManys(), this.getXmlOneToMany(), null, "oneToManys", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_OneToOnes(), this.getXmlOneToOne(), null, "oneToOnes", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_ManyToManys(), this.getXmlManyToMany(), null, "manyToManys", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_Embeddeds(), this.getXmlEmbedded(), null, "embeddeds", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAttributes_Transients(), this.getXmlTransient(), null, "transients", null, 0, -1, Attributes.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlBasicEClass, XmlBasic.class, "XmlBasic", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlBasic_Fetch(), this.getFetchType(), "fetch", "LAZY", 0, 1, XmlBasic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlBasic_Optional(), theXMLTypePackage.getBooleanObject(), "optional", null, 0, 1, XmlBasic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(cascadeTypeEClass, CascadeType.class, "CascadeType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getCascadeType_CascadeAll(), theXMLTypePackage.getBoolean(), "cascadeAll", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getCascadeType_CascadePersist(), theXMLTypePackage.getBoolean(), "cascadePersist", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getCascadeType_CascadeMerge(), theXMLTypePackage.getBoolean(), "cascadeMerge", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getCascadeType_CascadeRemove(), theXMLTypePackage.getBoolean(), "cascadeRemove", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getCascadeType_CascadeRefresh(), theXMLTypePackage.getBoolean(), "cascadeRefresh", null, 0, 1, CascadeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlClassReferenceEClass, XmlClassReference.class, "XmlClassReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlClassReference_ClassName(), theXMLTypePackage.getString(), "className", null, 1, 1, XmlClassReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlCollectionTableEClass, XmlCollectionTable.class, "XmlCollectionTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlColumnEClass, XmlColumn.class, "XmlColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlColumn_Length(), theXMLTypePackage.getIntObject(), "length", null, 0, 1, XmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlColumn_Precision(), theXMLTypePackage.getIntObject(), "precision", null, 0, 1, XmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlColumn_Scale(), theXMLTypePackage.getIntObject(), "scale", null, 0, 1, XmlColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(columnMappingEClass, ColumnMapping.class, "ColumnMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getColumnMapping_Column(), this.getXmlColumn(), null, "column", null, 0, 1, ColumnMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(columnResultEClass, ColumnResult.class, "ColumnResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getColumnResult_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, ColumnResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlConvertibleMappingEClass, XmlConvertibleMapping.class, "XmlConvertibleMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlConvertibleMapping_Lob(), theXMLTypePackage.getBoolean(), "lob", null, 0, 1, XmlConvertibleMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlConvertibleMapping_Temporal(), this.getTemporalType(), "temporal", null, 0, 1, XmlConvertibleMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlConvertibleMapping_Enumerated(), this.getEnumType(), "enumerated", null, 0, 1, XmlConvertibleMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlDiscriminatorColumnEClass, XmlDiscriminatorColumn.class, "XmlDiscriminatorColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlDiscriminatorColumn_DiscriminatorType(), this.getDiscriminatorType(), "discriminatorType", "STRING", 0, 1, XmlDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlDiscriminatorColumn_Length(), theXMLTypePackage.getIntObject(), "length", null, 0, 1, XmlDiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlElementCollectionEClass, XmlElementCollection.class, "XmlElementCollection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlEmbeddableEClass, XmlEmbeddable.class, "XmlEmbeddable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlEmbeddedEClass, XmlEmbedded.class, "XmlEmbedded", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlEmbeddedIdEClass, XmlEmbeddedId.class, "XmlEmbeddedId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlEntityEClass, XmlEntity.class, "XmlEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlEntity_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_Table(), this.getXmlTable(), null, "table", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_SecondaryTables(), this.getXmlSecondaryTable(), null, "secondaryTables", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_PrimaryKeyJoinColumns(), this.getXmlPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_Inheritance(), this.getInheritance(), null, "inheritance", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlEntity_DiscriminatorValue(), theXMLTypePackage.getString(), "discriminatorValue", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_DiscriminatorColumn(), this.getXmlDiscriminatorColumn(), null, "discriminatorColumn", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_SqlResultSetMappings(), this.getSqlResultSetMapping(), null, "sqlResultSetMappings", null, 0, -1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlEntity_ExcludeDefaultListeners(), theXMLTypePackage.getBoolean(), "excludeDefaultListeners", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlEntity_ExcludeSuperclassListeners(), theXMLTypePackage.getBoolean(), "excludeSuperclassListeners", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntity_EntityListeners(), this.getEntityListeners(), null, "entityListeners", null, 0, 1, XmlEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(entityListenerEClass, EntityListener.class, "EntityListener", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getEntityListener_ClassName(), theXMLTypePackage.getString(), "className", null, 1, 1, EntityListener.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(entityListenersEClass, EntityListeners.class, "EntityListeners", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getEntityListeners_EntityListeners(), this.getEntityListener(), null, "entityListeners", null, 0, -1, EntityListeners.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlEntityMappingsEClass, XmlEntityMappings.class, "XmlEntityMappings", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlEntityMappings_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_PersistenceUnitMetadata(), this.getXmlPersistenceUnitMetadata(), null, "persistenceUnitMetadata", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlEntityMappings_Package(), theXMLTypePackage.getString(), "package", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlEntityMappings_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlEntityMappings_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_SequenceGenerators(), this.getXmlSequenceGenerator(), null, "sequenceGenerators", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_TableGenerators(), this.getXmlTableGenerator(), null, "tableGenerators", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_SqlResultSetMappings(), this.getSqlResultSetMapping(), null, "sqlResultSetMappings", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_MappedSuperclasses(), this.getXmlMappedSuperclass(), null, "mappedSuperclasses", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_Entities(), this.getXmlEntity(), null, "entities", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEntityMappings_Embeddables(), this.getXmlEmbeddable(), null, "embeddables", null, 0, -1, XmlEntityMappings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(entityResultEClass, EntityResult.class, "EntityResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getEntityResult_DiscriminatorColumn(), theXMLTypePackage.getString(), "discriminatorColumn", null, 0, 1, EntityResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getEntityResult_EntityClass(), theXMLTypePackage.getString(), "entityClass", null, 1, 1, EntityResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getEntityResult_FieldResults(), this.getFieldResult(), null, "fieldResults", null, 0, -1, EntityResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(eventMethodEClass, EventMethod.class, "EventMethod", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getEventMethod_MethodName(), theXMLTypePackage.getString(), "methodName", null, 1, 1, EventMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlEventMethodContainerEClass, XmlEventMethodContainer.class, "XmlEventMethodContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlEventMethodContainer_PrePersist(), this.getPrePersist(), null, "prePersist", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEventMethodContainer_PostPersist(), this.getPostPersist(), null, "postPersist", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEventMethodContainer_PreRemove(), this.getPreRemove(), null, "preRemove", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEventMethodContainer_PostRemove(), this.getPostRemove(), null, "postRemove", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEventMethodContainer_PreUpdate(), this.getPreUpdate(), null, "preUpdate", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEventMethodContainer_PostUpdate(), this.getPostUpdate(), null, "postUpdate", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlEventMethodContainer_PostLoad(), this.getPostLoad(), null, "postLoad", null, 0, 1, XmlEventMethodContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(fieldResultEClass, FieldResult.class, "FieldResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getFieldResult_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, FieldResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getFieldResult_Column(), theXMLTypePackage.getString(), "column", null, 1, 1, FieldResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlGeneratedValueEClass, XmlGeneratedValue.class, "XmlGeneratedValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlGeneratedValue_Generator(), theXMLTypePackage.getString(), "generator", null, 0, 1, XmlGeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlGeneratedValue_Strategy(), this.getGenerationType(), "strategy", "TABLE", 0, 1, XmlGeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlGeneratorEClass, XmlGenerator.class, "XmlGenerator", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlGenerator_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlGenerator_InitialValue(), theXMLTypePackage.getIntObject(), "initialValue", null, 0, 1, XmlGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlGenerator_AllocationSize(), theXMLTypePackage.getIntObject(), "allocationSize", null, 0, 1, XmlGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlGeneratorContainerEClass, XmlGeneratorContainer.class, "XmlGeneratorContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlGeneratorContainer_SequenceGenerator(), this.getXmlSequenceGenerator(), null, "sequenceGenerator", null, 0, 1, XmlGeneratorContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlGeneratorContainer_TableGenerator(), this.getXmlTableGenerator(), null, "tableGenerator", null, 0, 1, XmlGeneratorContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlIdEClass, XmlId.class, "XmlId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlId_GeneratedValue(), this.getXmlGeneratedValue(), null, "generatedValue", null, 0, 1, XmlId.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlIdClassContainerEClass, XmlIdClassContainer.class, "XmlIdClassContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlIdClassContainer_IdClass(), this.getXmlClassReference(), null, "idClass", null, 0, 1, XmlIdClassContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(inheritanceEClass, Inheritance.class, "Inheritance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getInheritance_Strategy(), this.getInheritanceType(), "strategy", "SINGLE_TABLE", 0, 1, Inheritance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlJoinColumnEClass, XmlJoinColumn.class, "XmlJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlJoinColumn_ReferencedColumnName(), theXMLTypePackage.getString(), "referencedColumnName", null, 0, 1, XmlJoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlJoinColumnsMappingEClass, XmlJoinColumnsMapping.class, "XmlJoinColumnsMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlJoinColumnsMapping_JoinColumns(), this.getXmlJoinColumn(), null, "joinColumns", null, 0, -1, XmlJoinColumnsMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlJoinTableEClass, XmlJoinTable.class, "XmlJoinTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlJoinTable_InverseJoinColumns(), this.getXmlJoinColumn(), null, "inverseJoinColumns", null, 0, -1, XmlJoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlJoinTableMappingEClass, XmlJoinTableMapping.class, "XmlJoinTableMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlJoinTableMapping_JoinTable(), this.getXmlJoinTable(), null, "joinTable", null, 0, 1, XmlJoinTableMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(lobEClass, Lob.class, "Lob", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlManyToManyEClass, XmlManyToMany.class, "XmlManyToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlManyToOneEClass, XmlManyToOne.class, "XmlManyToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(mapKeyEClass, MapKey.class, "MapKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getMapKey_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, MapKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlMappedByMappingEClass, XmlMappedByMapping.class, "XmlMappedByMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlMappedByMapping_MappedBy(), theXMLTypePackage.getString(), "mappedBy", null, 0, 1, XmlMappedByMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlMappedSuperclassEClass, XmlMappedSuperclass.class, "XmlMappedSuperclass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlMappedSuperclass_ExcludeDefaultListeners(), theXMLTypePackage.getBoolean(), "excludeDefaultListeners", null, 0, 1, XmlMappedSuperclass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlMappedSuperclass_ExcludeSuperclassListeners(), theXMLTypePackage.getBoolean(), "excludeSuperclassListeners", null, 0, 1, XmlMappedSuperclass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlMappedSuperclass_EntityListeners(), this.getEntityListeners(), null, "entityListeners", null, 0, 1, XmlMappedSuperclass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlNamedNativeQueryEClass, XmlNamedNativeQuery.class, "XmlNamedNativeQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlNamedNativeQuery_ResultClass(), theXMLTypePackage.getString(), "resultClass", null, 0, 1, XmlNamedNativeQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlNamedNativeQuery_ResultSetMapping(), theXMLTypePackage.getString(), "resultSetMapping", null, 0, 1, XmlNamedNativeQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlNamedQueryEClass, XmlNamedQuery.class, "XmlNamedQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlNullAttributeMappingEClass, XmlNullAttributeMapping.class, "XmlNullAttributeMapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlOneToManyEClass, XmlOneToMany.class, "XmlOneToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlOneToOneEClass, XmlOneToOne.class, "XmlOneToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlOneToOne_PrimaryKeyJoinColumns(), this.getXmlPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, XmlOneToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlOrderableEClass, XmlOrderable.class, "XmlOrderable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlOrderable_OrderBy(), theXMLTypePackage.getString(), "orderBy", null, 0, 1, XmlOrderable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlOrderColumnEClass, XmlOrderColumn.class, "XmlOrderColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlOverrideEClass, XmlOverride.class, "XmlOverride", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlOverride_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPersistenceUnitDefaultsEClass, XmlPersistenceUnitDefaults.class, "XmlPersistenceUnitDefaults", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPersistenceUnitDefaults_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnitDefaults_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnitDefaults_CascadePersist(), theXMLTypePackage.getBoolean(), "cascadePersist", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlPersistenceUnitDefaults_EntityListeners(), this.getEntityListeners(), null, "entityListeners", null, 0, 1, XmlPersistenceUnitDefaults.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPersistenceUnitMetadataEClass, XmlPersistenceUnitMetadata.class, "XmlPersistenceUnitMetadata", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete(), theXMLTypePackage.getBoolean(), "xmlMappingMetadataComplete", null, 0, 1, XmlPersistenceUnitMetadata.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlPersistenceUnitMetadata_PersistenceUnitDefaults(), this.getXmlPersistenceUnitDefaults(), null, "persistenceUnitDefaults", null, 0, 1, XmlPersistenceUnitMetadata.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlReferenceTableEClass, XmlReferenceTable.class, "XmlReferenceTable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlReferenceTable_JoinColumns(), this.getXmlJoinColumn(), null, "joinColumns", null, 0, -1, XmlReferenceTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(postLoadEClass, PostLoad.class, "PostLoad", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(postPersistEClass, PostPersist.class, "PostPersist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(postRemoveEClass, PostRemove.class, "PostRemove", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(postUpdateEClass, PostUpdate.class, "PostUpdate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(prePersistEClass, PrePersist.class, "PrePersist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(preRemoveEClass, PreRemove.class, "PreRemove", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(preUpdateEClass, PreUpdate.class, "PreUpdate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlPrimaryKeyJoinColumnEClass, XmlPrimaryKeyJoinColumn.class, "XmlPrimaryKeyJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPrimaryKeyJoinColumn_ReferencedColumnName(), theXMLTypePackage.getString(), "referencedColumnName", null, 0, 1, XmlPrimaryKeyJoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlQueryEClass, XmlQuery.class, "XmlQuery", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlQuery_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlQuery_Query(), theXMLTypePackage.getString(), "query", null, 1, 1, XmlQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlQuery_Hints(), this.getXmlQueryHint(), null, "hints", null, 0, -1, XmlQuery.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlQueryContainerEClass, XmlQueryContainer.class, "XmlQueryContainer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlQueryContainer_NamedQueries(), this.getXmlNamedQuery(), null, "namedQueries", null, 0, -1, XmlQueryContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlQueryContainer_NamedNativeQueries(), this.getXmlNamedNativeQuery(), null, "namedNativeQueries", null, 0, -1, XmlQueryContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlQueryHintEClass, XmlQueryHint.class, "XmlQueryHint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlQueryHint_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlQueryHint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlQueryHint_Value(), theXMLTypePackage.getString(), "value", null, 1, 1, XmlQueryHint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlSecondaryTableEClass, XmlSecondaryTable.class, "XmlSecondaryTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlSecondaryTable_PrimaryKeyJoinColumns(), this.getXmlPrimaryKeyJoinColumn(), null, "primaryKeyJoinColumns", null, 0, -1, XmlSecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlSequenceGeneratorEClass, XmlSequenceGenerator.class, "XmlSequenceGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlSequenceGenerator_SequenceName(), theXMLTypePackage.getString(), "sequenceName", null, 0, 1, XmlSequenceGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(sqlResultSetMappingEClass, SqlResultSetMapping.class, "SqlResultSetMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getSqlResultSetMapping_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, SqlResultSetMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getSqlResultSetMapping_EntityResults(), this.getEntityResult(), null, "entityResults", null, 0, -1, SqlResultSetMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getSqlResultSetMapping_ColumnResults(), this.getColumnResult(), null, "columnResults", null, 0, -1, SqlResultSetMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlTableEClass, XmlTable.class, "XmlTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlTableGeneratorEClass, XmlTableGenerator.class, "XmlTableGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlTableGenerator_Table(), theXMLTypePackage.getString(), "table", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTableGenerator_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTableGenerator_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTableGenerator_PkColumnName(), theXMLTypePackage.getString(), "pkColumnName", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTableGenerator_ValueColumnName(), theXMLTypePackage.getString(), "valueColumnName", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTableGenerator_PkColumnValue(), theXMLTypePackage.getString(), "pkColumnValue", null, 0, 1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlTableGenerator_UniqueConstraints(), this.getXmlUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, XmlTableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlTransientEClass, XmlTransient.class, "XmlTransient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlTypeMappingEClass, XmlTypeMapping.class, "XmlTypeMapping", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlTypeMapping_ClassName(), theXMLTypePackage.getString(), "className", null, 1, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTypeMapping_MetadataComplete(), theXMLTypePackage.getBooleanObject(), "metadataComplete", null, 0, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlTypeMapping_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlTypeMapping_Attributes(), this.getAttributes(), null, "attributes", null, 0, 1, XmlTypeMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlUniqueConstraintEClass, XmlUniqueConstraint.class, "XmlUniqueConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlUniqueConstraint_ColumnNames(), theXMLTypePackage.getString(), "columnNames", null, 1, -1, XmlUniqueConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlVersionEClass, XmlVersion.class, "XmlVersion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		// Initialize enums and add enum literals
+		initEEnum(accessTypeEEnum, AccessType.class, "AccessType");
+		addEEnumLiteral(accessTypeEEnum, AccessType.PROPERTY);
+		addEEnumLiteral(accessTypeEEnum, AccessType.FIELD);
+
+		initEEnum(discriminatorTypeEEnum, DiscriminatorType.class, "DiscriminatorType");
+		addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.STRING);
+		addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.CHAR);
+		addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.INTEGER);
+
+		initEEnum(enumTypeEEnum, EnumType.class, "EnumType");
+		addEEnumLiteral(enumTypeEEnum, EnumType.ORDINAL);
+		addEEnumLiteral(enumTypeEEnum, EnumType.STRING);
+
+		initEEnum(fetchTypeEEnum, FetchType.class, "FetchType");
+		addEEnumLiteral(fetchTypeEEnum, FetchType.LAZY);
+		addEEnumLiteral(fetchTypeEEnum, FetchType.EAGER);
+
+		initEEnum(generationTypeEEnum, GenerationType.class, "GenerationType");
+		addEEnumLiteral(generationTypeEEnum, GenerationType.TABLE);
+		addEEnumLiteral(generationTypeEEnum, GenerationType.SEQUENCE);
+		addEEnumLiteral(generationTypeEEnum, GenerationType.IDENTITY);
+		addEEnumLiteral(generationTypeEEnum, GenerationType.AUTO);
+
+		initEEnum(inheritanceTypeEEnum, InheritanceType.class, "InheritanceType");
+		addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.SINGLE_TABLE);
+		addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.JOINED);
+		addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.TABLE_PER_CLASS);
+
+		initEEnum(temporalTypeEEnum, TemporalType.class, "TemporalType");
+		addEEnumLiteral(temporalTypeEEnum, TemporalType.DATE);
+		addEEnumLiteral(temporalTypeEEnum, TemporalType.TIME);
+		addEEnumLiteral(temporalTypeEEnum, TemporalType.TIMESTAMP);
+
+		// Create resource
+		createResource(eNS_URI);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * Defines literals for the meta objects that represent
+	 * <ul>
+	 *   <li>each class,</li>
+	 *   <li>each feature of each class,</li>
+	 *   <li>each enum,</li>
+	 *   <li>and each data type</li>
+	 * </ul>
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public interface Literals
+	{
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping <em>Abstract Xml Attribute Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlAttributeMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlAttributeMapping()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_ATTRIBUTE_MAPPING = eINSTANCE.getAbstractXmlAttributeMapping();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlColumn <em>Abstract Xml Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlColumn()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_COLUMN = eINSTANCE.getAbstractXmlColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Insertable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_COLUMN__INSERTABLE = eINSTANCE.getAbstractXmlColumn_Insertable();
+
+		/**
+		 * The meta object literal for the '<em><b>Nullable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_COLUMN__NULLABLE = eINSTANCE.getAbstractXmlColumn_Nullable();
+
+		/**
+		 * The meta object literal for the '<em><b>Table</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_COLUMN__TABLE = eINSTANCE.getAbstractXmlColumn_Table();
+
+		/**
+		 * The meta object literal for the '<em><b>Unique</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_COLUMN__UNIQUE = eINSTANCE.getAbstractXmlColumn_Unique();
+
+		/**
+		 * The meta object literal for the '<em><b>Updatable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_COLUMN__UPDATABLE = eINSTANCE.getAbstractXmlColumn_Updatable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded <em>Abstract Xml Embedded</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlEmbedded
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlEmbedded()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_EMBEDDED = eINSTANCE.getAbstractXmlEmbedded();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping <em>Abstract Xml Multi Relationship Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlMultiRelationshipMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlMultiRelationshipMapping()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING = eINSTANCE.getAbstractXmlMultiRelationshipMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ABSTRACT_XML_MULTI_RELATIONSHIP_MAPPING__MAP_KEY = eINSTANCE.getAbstractXmlMultiRelationshipMapping_MapKey();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn <em>Abstract Xml Named Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlNamedColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlNamedColumn()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_NAMED_COLUMN = eINSTANCE.getAbstractXmlNamedColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Column Definition</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_NAMED_COLUMN__COLUMN_DEFINITION = eINSTANCE.getAbstractXmlNamedColumn_ColumnDefinition();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_NAMED_COLUMN__NAME = eINSTANCE.getAbstractXmlNamedColumn_Name();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping <em>Abstract Xml Relationship Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlRelationshipMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlRelationshipMapping()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_RELATIONSHIP_MAPPING = eINSTANCE.getAbstractXmlRelationshipMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Target Entity</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_RELATIONSHIP_MAPPING__TARGET_ENTITY = eINSTANCE.getAbstractXmlRelationshipMapping_TargetEntity();
+
+		/**
+		 * The meta object literal for the '<em><b>Fetch</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_RELATIONSHIP_MAPPING__FETCH = eINSTANCE.getAbstractXmlRelationshipMapping_Fetch();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ABSTRACT_XML_RELATIONSHIP_MAPPING__CASCADE = eINSTANCE.getAbstractXmlRelationshipMapping_Cascade();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping <em>Abstract Xml Single Relationship Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlSingleRelationshipMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlSingleRelationshipMapping()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING = eINSTANCE.getAbstractXmlSingleRelationshipMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Optional</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_SINGLE_RELATIONSHIP_MAPPING__OPTIONAL = eINSTANCE.getAbstractXmlSingleRelationshipMapping_Optional();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTable <em>Abstract Xml Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTable()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_TABLE = eINSTANCE.getAbstractXmlTable();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_TABLE__NAME = eINSTANCE.getAbstractXmlTable_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_TABLE__CATALOG = eINSTANCE.getAbstractXmlTable_Catalog();
+
+		/**
+		 * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ABSTRACT_XML_TABLE__SCHEMA = eINSTANCE.getAbstractXmlTable_Schema();
+
+		/**
+		 * The meta object literal for the '<em><b>Unique Constraints</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ABSTRACT_XML_TABLE__UNIQUE_CONSTRAINTS = eINSTANCE.getAbstractXmlTable_UniqueConstraints();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping <em>Abstract Xml Type Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlTypeMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlTypeMapping()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_TYPE_MAPPING = eINSTANCE.getAbstractXmlTypeMapping();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlAccessHolder <em>Xml Access Holder</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlAccessHolder
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder()
+		 * @generated
+		 */
+		public static final EClass XML_ACCESS_HOLDER = eINSTANCE.getXmlAccessHolder();
+
+		/**
+		 * The meta object literal for the '<em><b>Access</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ACCESS_HOLDER__ACCESS = eINSTANCE.getXmlAccessHolder_Access();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeMapping <em>Xml Attribute Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeMapping()
+		 * @generated
+		 */
+		public static final EClass XML_ATTRIBUTE_MAPPING = eINSTANCE.getXmlAttributeMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ATTRIBUTE_MAPPING__NAME = eINSTANCE.getXmlAttributeMapping_Name();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride <em>Xml Association Override</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverride
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverride()
+		 * @generated
+		 */
+		public static final EClass XML_ASSOCIATION_OVERRIDE = eINSTANCE.getXmlAssociationOverride();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer <em>Xml Association Override Container</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer()
+		 * @generated
+		 */
+		public static final EClass XML_ASSOCIATION_OVERRIDE_CONTAINER = eINSTANCE.getXmlAssociationOverrideContainer();
+
+		/**
+		 * The meta object literal for the '<em><b>Association Overrides</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES = eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride <em>Xml Attribute Override</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverride
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverride()
+		 * @generated
+		 */
+		public static final EClass XML_ATTRIBUTE_OVERRIDE = eINSTANCE.getXmlAttributeOverride();
+
+		/**
+		 * The meta object literal for the '<em><b>Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ATTRIBUTE_OVERRIDE__COLUMN = eINSTANCE.getXmlAttributeOverride_Column();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer <em>Xml Attribute Override Container</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer()
+		 * @generated
+		 */
+		public static final EClass XML_ATTRIBUTE_OVERRIDE_CONTAINER = eINSTANCE.getXmlAttributeOverrideContainer();
+
+		/**
+		 * The meta object literal for the '<em><b>Attribute Overrides</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES = eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.Attributes <em>Attributes</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.Attributes
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAttributes()
+		 * @generated
+		 */
+		public static final EClass ATTRIBUTES = eINSTANCE.getAttributes();
+
+		/**
+		 * The meta object literal for the '<em><b>Ids</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__IDS = eINSTANCE.getAttributes_Ids();
+
+		/**
+		 * The meta object literal for the '<em><b>Embedded Ids</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__EMBEDDED_IDS = eINSTANCE.getAttributes_EmbeddedIds();
+
+		/**
+		 * The meta object literal for the '<em><b>Basics</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__BASICS = eINSTANCE.getAttributes_Basics();
+
+		/**
+		 * The meta object literal for the '<em><b>Versions</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__VERSIONS = eINSTANCE.getAttributes_Versions();
+
+		/**
+		 * The meta object literal for the '<em><b>Many To Ones</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__MANY_TO_ONES = eINSTANCE.getAttributes_ManyToOnes();
+
+		/**
+		 * The meta object literal for the '<em><b>One To Manys</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__ONE_TO_MANYS = eINSTANCE.getAttributes_OneToManys();
+
+		/**
+		 * The meta object literal for the '<em><b>One To Ones</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__ONE_TO_ONES = eINSTANCE.getAttributes_OneToOnes();
+
+		/**
+		 * The meta object literal for the '<em><b>Many To Manys</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__MANY_TO_MANYS = eINSTANCE.getAttributes_ManyToManys();
+
+		/**
+		 * The meta object literal for the '<em><b>Embeddeds</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__EMBEDDEDS = eINSTANCE.getAttributes_Embeddeds();
+
+		/**
+		 * The meta object literal for the '<em><b>Transients</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ATTRIBUTES__TRANSIENTS = eINSTANCE.getAttributes_Transients();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic <em>Xml Basic</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlBasic
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlBasic()
+		 * @generated
+		 */
+		public static final EClass XML_BASIC = eINSTANCE.getXmlBasic();
+
+		/**
+		 * The meta object literal for the '<em><b>Fetch</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_BASIC__FETCH = eINSTANCE.getXmlBasic_Fetch();
+
+		/**
+		 * The meta object literal for the '<em><b>Optional</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_BASIC__OPTIONAL = eINSTANCE.getXmlBasic_Optional();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.CascadeType <em>Cascade Type</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.CascadeType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getCascadeType()
+		 * @generated
+		 */
+		public static final EClass CASCADE_TYPE = eINSTANCE.getCascadeType();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade All</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute CASCADE_TYPE__CASCADE_ALL = eINSTANCE.getCascadeType_CascadeAll();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade Persist</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute CASCADE_TYPE__CASCADE_PERSIST = eINSTANCE.getCascadeType_CascadePersist();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade Merge</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute CASCADE_TYPE__CASCADE_MERGE = eINSTANCE.getCascadeType_CascadeMerge();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade Remove</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute CASCADE_TYPE__CASCADE_REMOVE = eINSTANCE.getCascadeType_CascadeRemove();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade Refresh</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute CASCADE_TYPE__CASCADE_REFRESH = eINSTANCE.getCascadeType_CascadeRefresh();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlClassReference <em>Xml Class Reference</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlClassReference
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlClassReference()
+		 * @generated
+		 */
+		public static final EClass XML_CLASS_REFERENCE = eINSTANCE.getXmlClassReference();
+
+		/**
+		 * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_CLASS_REFERENCE__CLASS_NAME = eINSTANCE.getXmlClassReference_ClassName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlCollectionTable <em>Xml Collection Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlCollectionTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlCollectionTable()
+		 * @generated
+		 */
+		public static final EClass XML_COLLECTION_TABLE = eINSTANCE.getXmlCollectionTable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlColumn <em>Xml Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlColumn()
+		 * @generated
+		 */
+		public static final EClass XML_COLUMN = eINSTANCE.getXmlColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Length</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_COLUMN__LENGTH = eINSTANCE.getXmlColumn_Length();
+
+		/**
+		 * The meta object literal for the '<em><b>Precision</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_COLUMN__PRECISION = eINSTANCE.getXmlColumn_Precision();
+
+		/**
+		 * The meta object literal for the '<em><b>Scale</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_COLUMN__SCALE = eINSTANCE.getXmlColumn_Scale();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.ColumnMapping <em>Column Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.ColumnMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping()
+		 * @generated
+		 */
+		public static final EClass COLUMN_MAPPING = eINSTANCE.getColumnMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference COLUMN_MAPPING__COLUMN = eINSTANCE.getColumnMapping_Column();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.ColumnResult <em>Column Result</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.ColumnResult
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnResult()
+		 * @generated
+		 */
+		public static final EClass COLUMN_RESULT = eINSTANCE.getColumnResult();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute COLUMN_RESULT__NAME = eINSTANCE.getColumnResult_Name();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping <em>Xml Convertible Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping()
+		 * @generated
+		 */
+		public static final EClass XML_CONVERTIBLE_MAPPING = eINSTANCE.getXmlConvertibleMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Lob</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_CONVERTIBLE_MAPPING__LOB = eINSTANCE.getXmlConvertibleMapping_Lob();
+
+		/**
+		 * The meta object literal for the '<em><b>Temporal</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_CONVERTIBLE_MAPPING__TEMPORAL = eINSTANCE.getXmlConvertibleMapping_Temporal();
+
+		/**
+		 * The meta object literal for the '<em><b>Enumerated</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_CONVERTIBLE_MAPPING__ENUMERATED = eINSTANCE.getXmlConvertibleMapping_Enumerated();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn <em>Xml Discriminator Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn()
+		 * @generated
+		 */
+		public static final EClass XML_DISCRIMINATOR_COLUMN = eINSTANCE.getXmlDiscriminatorColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Discriminator Type</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE = eINSTANCE.getXmlDiscriminatorColumn_DiscriminatorType();
+
+		/**
+		 * The meta object literal for the '<em><b>Length</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_DISCRIMINATOR_COLUMN__LENGTH = eINSTANCE.getXmlDiscriminatorColumn_Length();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection <em>Xml Element Collection</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlElementCollection
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection()
+		 * @generated
+		 */
+		public static final EClass XML_ELEMENT_COLLECTION = eINSTANCE.getXmlElementCollection();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlEmbeddable <em>Xml Embeddable</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlEmbeddable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbeddable()
+		 * @generated
+		 */
+		public static final EClass XML_EMBEDDABLE = eINSTANCE.getXmlEmbeddable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlEmbedded <em>Xml Embedded</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlEmbedded
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbedded()
+		 * @generated
+		 */
+		public static final EClass XML_EMBEDDED = eINSTANCE.getXmlEmbedded();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlEmbeddedId <em>Xml Embedded Id</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlEmbeddedId
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbeddedId()
+		 * @generated
+		 */
+		public static final EClass XML_EMBEDDED_ID = eINSTANCE.getXmlEmbeddedId();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity <em>Xml Entity</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlEntity
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity()
+		 * @generated
+		 */
+		public static final EClass XML_ENTITY = eINSTANCE.getXmlEntity();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY__NAME = eINSTANCE.getXmlEntity_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Table</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__TABLE = eINSTANCE.getXmlEntity_Table();
+
+		/**
+		 * The meta object literal for the '<em><b>Secondary Tables</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__SECONDARY_TABLES = eINSTANCE.getXmlEntity_SecondaryTables();
+
+		/**
+		 * The meta object literal for the '<em><b>Primary Key Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS = eINSTANCE.getXmlEntity_PrimaryKeyJoinColumns();
+
+		/**
+		 * The meta object literal for the '<em><b>Inheritance</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__INHERITANCE = eINSTANCE.getXmlEntity_Inheritance();
+
+		/**
+		 * The meta object literal for the '<em><b>Discriminator Value</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY__DISCRIMINATOR_VALUE = eINSTANCE.getXmlEntity_DiscriminatorValue();
+
+		/**
+		 * The meta object literal for the '<em><b>Discriminator Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__DISCRIMINATOR_COLUMN = eINSTANCE.getXmlEntity_DiscriminatorColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__SQL_RESULT_SET_MAPPINGS = eINSTANCE.getXmlEntity_SqlResultSetMappings();
+
+		/**
+		 * The meta object literal for the '<em><b>Exclude Default Listeners</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS = eINSTANCE.getXmlEntity_ExcludeDefaultListeners();
+
+		/**
+		 * The meta object literal for the '<em><b>Exclude Superclass Listeners</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS = eINSTANCE.getXmlEntity_ExcludeSuperclassListeners();
+
+		/**
+		 * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY__ENTITY_LISTENERS = eINSTANCE.getXmlEntity_EntityListeners();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.EntityListener <em>Entity Listener</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.EntityListener
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListener()
+		 * @generated
+		 */
+		public static final EClass ENTITY_LISTENER = eINSTANCE.getEntityListener();
+
+		/**
+		 * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ENTITY_LISTENER__CLASS_NAME = eINSTANCE.getEntityListener_ClassName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.EntityListeners <em>Entity Listeners</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.EntityListeners
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityListeners()
+		 * @generated
+		 */
+		public static final EClass ENTITY_LISTENERS = eINSTANCE.getEntityListeners();
+
+		/**
+		 * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ENTITY_LISTENERS__ENTITY_LISTENERS = eINSTANCE.getEntityListeners_EntityListeners();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings <em>Xml Entity Mappings</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlEntityMappings
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings()
+		 * @generated
+		 */
+		public static final EClass XML_ENTITY_MAPPINGS = eINSTANCE.getXmlEntityMappings();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY_MAPPINGS__DESCRIPTION = eINSTANCE.getXmlEntityMappings_Description();
+
+		/**
+		 * The meta object literal for the '<em><b>Persistence Unit Metadata</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA = eINSTANCE.getXmlEntityMappings_PersistenceUnitMetadata();
+
+		/**
+		 * The meta object literal for the '<em><b>Package</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY_MAPPINGS__PACKAGE = eINSTANCE.getXmlEntityMappings_Package();
+
+		/**
+		 * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY_MAPPINGS__SCHEMA = eINSTANCE.getXmlEntityMappings_Schema();
+
+		/**
+		 * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY_MAPPINGS__CATALOG = eINSTANCE.getXmlEntityMappings_Catalog();
+
+		/**
+		 * The meta object literal for the '<em><b>Sequence Generators</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS = eINSTANCE.getXmlEntityMappings_SequenceGenerators();
+
+		/**
+		 * The meta object literal for the '<em><b>Table Generators</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__TABLE_GENERATORS = eINSTANCE.getXmlEntityMappings_TableGenerators();
+
+		/**
+		 * The meta object literal for the '<em><b>Sql Result Set Mappings</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS = eINSTANCE.getXmlEntityMappings_SqlResultSetMappings();
+
+		/**
+		 * The meta object literal for the '<em><b>Mapped Superclasses</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES = eINSTANCE.getXmlEntityMappings_MappedSuperclasses();
+
+		/**
+		 * The meta object literal for the '<em><b>Entities</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__ENTITIES = eINSTANCE.getXmlEntityMappings_Entities();
+
+		/**
+		 * The meta object literal for the '<em><b>Embeddables</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ENTITY_MAPPINGS__EMBEDDABLES = eINSTANCE.getXmlEntityMappings_Embeddables();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.EntityResult <em>Entity Result</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.EntityResult
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEntityResult()
+		 * @generated
+		 */
+		public static final EClass ENTITY_RESULT = eINSTANCE.getEntityResult();
+
+		/**
+		 * The meta object literal for the '<em><b>Discriminator Column</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ENTITY_RESULT__DISCRIMINATOR_COLUMN = eINSTANCE.getEntityResult_DiscriminatorColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Entity Class</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute ENTITY_RESULT__ENTITY_CLASS = eINSTANCE.getEntityResult_EntityClass();
+
+		/**
+		 * The meta object literal for the '<em><b>Field Results</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference ENTITY_RESULT__FIELD_RESULTS = eINSTANCE.getEntityResult_FieldResults();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.EventMethod <em>Event Method</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.EventMethod
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEventMethod()
+		 * @generated
+		 */
+		public static final EClass EVENT_METHOD = eINSTANCE.getEventMethod();
+
+		/**
+		 * The meta object literal for the '<em><b>Method Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute EVENT_METHOD__METHOD_NAME = eINSTANCE.getEventMethod_MethodName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer <em>Xml Event Method Container</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer()
+		 * @generated
+		 */
+		public static final EClass XML_EVENT_METHOD_CONTAINER = eINSTANCE.getXmlEventMethodContainer();
+
+		/**
+		 * The meta object literal for the '<em><b>Pre Persist</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__PRE_PERSIST = eINSTANCE.getXmlEventMethodContainer_PrePersist();
+
+		/**
+		 * The meta object literal for the '<em><b>Post Persist</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__POST_PERSIST = eINSTANCE.getXmlEventMethodContainer_PostPersist();
+
+		/**
+		 * The meta object literal for the '<em><b>Pre Remove</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__PRE_REMOVE = eINSTANCE.getXmlEventMethodContainer_PreRemove();
+
+		/**
+		 * The meta object literal for the '<em><b>Post Remove</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__POST_REMOVE = eINSTANCE.getXmlEventMethodContainer_PostRemove();
+
+		/**
+		 * The meta object literal for the '<em><b>Pre Update</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__PRE_UPDATE = eINSTANCE.getXmlEventMethodContainer_PreUpdate();
+
+		/**
+		 * The meta object literal for the '<em><b>Post Update</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__POST_UPDATE = eINSTANCE.getXmlEventMethodContainer_PostUpdate();
+
+		/**
+		 * The meta object literal for the '<em><b>Post Load</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_EVENT_METHOD_CONTAINER__POST_LOAD = eINSTANCE.getXmlEventMethodContainer_PostLoad();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.FieldResult <em>Field Result</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.FieldResult
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFieldResult()
+		 * @generated
+		 */
+		public static final EClass FIELD_RESULT = eINSTANCE.getFieldResult();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute FIELD_RESULT__NAME = eINSTANCE.getFieldResult_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Column</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute FIELD_RESULT__COLUMN = eINSTANCE.getFieldResult_Column();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue <em>Xml Generated Value</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratedValue
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratedValue()
+		 * @generated
+		 */
+		public static final EClass XML_GENERATED_VALUE = eINSTANCE.getXmlGeneratedValue();
+
+		/**
+		 * The meta object literal for the '<em><b>Generator</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_GENERATED_VALUE__GENERATOR = eINSTANCE.getXmlGeneratedValue_Generator();
+
+		/**
+		 * The meta object literal for the '<em><b>Strategy</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_GENERATED_VALUE__STRATEGY = eINSTANCE.getXmlGeneratedValue_Strategy();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator <em>Xml Generator</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlGenerator
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator()
+		 * @generated
+		 */
+		public static final EClass XML_GENERATOR = eINSTANCE.getXmlGenerator();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_GENERATOR__NAME = eINSTANCE.getXmlGenerator_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Initial Value</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_GENERATOR__INITIAL_VALUE = eINSTANCE.getXmlGenerator_InitialValue();
+
+		/**
+		 * The meta object literal for the '<em><b>Allocation Size</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_GENERATOR__ALLOCATION_SIZE = eINSTANCE.getXmlGenerator_AllocationSize();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer <em>Xml Generator Container</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer()
+		 * @generated
+		 */
+		public static final EClass XML_GENERATOR_CONTAINER = eINSTANCE.getXmlGeneratorContainer();
+
+		/**
+		 * The meta object literal for the '<em><b>Sequence Generator</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR = eINSTANCE.getXmlGeneratorContainer_SequenceGenerator();
+
+		/**
+		 * The meta object literal for the '<em><b>Table Generator</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_GENERATOR_CONTAINER__TABLE_GENERATOR = eINSTANCE.getXmlGeneratorContainer_TableGenerator();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlId <em>Xml Id</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlId
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlId()
+		 * @generated
+		 */
+		public static final EClass XML_ID = eINSTANCE.getXmlId();
+
+		/**
+		 * The meta object literal for the '<em><b>Generated Value</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ID__GENERATED_VALUE = eINSTANCE.getXmlId_GeneratedValue();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlIdClassContainer <em>Xml Id Class Container</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlIdClassContainer
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlIdClassContainer()
+		 * @generated
+		 */
+		public static final EClass XML_ID_CLASS_CONTAINER = eINSTANCE.getXmlIdClassContainer();
+
+		/**
+		 * The meta object literal for the '<em><b>Id Class</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ID_CLASS_CONTAINER__ID_CLASS = eINSTANCE.getXmlIdClassContainer_IdClass();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.Inheritance <em>Inheritance</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.Inheritance
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritance()
+		 * @generated
+		 */
+		public static final EClass INHERITANCE = eINSTANCE.getInheritance();
+
+		/**
+		 * The meta object literal for the '<em><b>Strategy</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute INHERITANCE__STRATEGY = eINSTANCE.getInheritance_Strategy();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn <em>Xml Join Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumn()
+		 * @generated
+		 */
+		public static final EClass XML_JOIN_COLUMN = eINSTANCE.getXmlJoinColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Referenced Column Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME = eINSTANCE.getXmlJoinColumn_ReferencedColumnName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping <em>Xml Join Columns Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping()
+		 * @generated
+		 */
+		public static final EClass XML_JOIN_COLUMNS_MAPPING = eINSTANCE.getXmlJoinColumnsMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS = eINSTANCE.getXmlJoinColumnsMapping_JoinColumns();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTable <em>Xml Join Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTable()
+		 * @generated
+		 */
+		public static final EClass XML_JOIN_TABLE = eINSTANCE.getXmlJoinTable();
+
+		/**
+		 * The meta object literal for the '<em><b>Inverse Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS = eINSTANCE.getXmlJoinTable_InverseJoinColumns();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping <em>Xml Join Table Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTableMapping()
+		 * @generated
+		 */
+		public static final EClass XML_JOIN_TABLE_MAPPING = eINSTANCE.getXmlJoinTableMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Join Table</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_JOIN_TABLE_MAPPING__JOIN_TABLE = eINSTANCE.getXmlJoinTableMapping_JoinTable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.Lob <em>Lob</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.Lob
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getLob()
+		 * @generated
+		 */
+		public static final EClass LOB = eINSTANCE.getLob();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlManyToMany <em>Xml Many To Many</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlManyToMany
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlManyToMany()
+		 * @generated
+		 */
+		public static final EClass XML_MANY_TO_MANY = eINSTANCE.getXmlManyToMany();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlManyToOne <em>Xml Many To One</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlManyToOne
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlManyToOne()
+		 * @generated
+		 */
+		public static final EClass XML_MANY_TO_ONE = eINSTANCE.getXmlManyToOne();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.MapKey <em>Map Key</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.MapKey
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getMapKey()
+		 * @generated
+		 */
+		public static final EClass MAP_KEY = eINSTANCE.getMapKey();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute MAP_KEY__NAME = eINSTANCE.getMapKey_Name();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedByMapping <em>Xml Mapped By Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlMappedByMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedByMapping()
+		 * @generated
+		 */
+		public static final EClass XML_MAPPED_BY_MAPPING = eINSTANCE.getXmlMappedByMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Mapped By</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MAPPED_BY_MAPPING__MAPPED_BY = eINSTANCE.getXmlMappedByMapping_MappedBy();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass <em>Xml Mapped Superclass</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedSuperclass()
+		 * @generated
+		 */
+		public static final EClass XML_MAPPED_SUPERCLASS = eINSTANCE.getXmlMappedSuperclass();
+
+		/**
+		 * The meta object literal for the '<em><b>Exclude Default Listeners</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS = eINSTANCE.getXmlMappedSuperclass_ExcludeDefaultListeners();
+
+		/**
+		 * The meta object literal for the '<em><b>Exclude Superclass Listeners</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS = eINSTANCE.getXmlMappedSuperclass_ExcludeSuperclassListeners();
+
+		/**
+		 * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS = eINSTANCE.getXmlMappedSuperclass_EntityListeners();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery <em>Xml Named Native Query</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedNativeQuery()
+		 * @generated
+		 */
+		public static final EClass XML_NAMED_NATIVE_QUERY = eINSTANCE.getXmlNamedNativeQuery();
+
+		/**
+		 * The meta object literal for the '<em><b>Result Class</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_NAMED_NATIVE_QUERY__RESULT_CLASS = eINSTANCE.getXmlNamedNativeQuery_ResultClass();
+
+		/**
+		 * The meta object literal for the '<em><b>Result Set Mapping</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = eINSTANCE.getXmlNamedNativeQuery_ResultSetMapping();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery <em>Xml Named Query</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlNamedQuery
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedQuery()
+		 * @generated
+		 */
+		public static final EClass XML_NAMED_QUERY = eINSTANCE.getXmlNamedQuery();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping <em>Xml Null Attribute Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlNullAttributeMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNullAttributeMapping()
+		 * @generated
+		 */
+		public static final EClass XML_NULL_ATTRIBUTE_MAPPING = eINSTANCE.getXmlNullAttributeMapping();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToMany <em>Xml One To Many</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlOneToMany
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToMany()
+		 * @generated
+		 */
+		public static final EClass XML_ONE_TO_MANY = eINSTANCE.getXmlOneToMany();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne <em>Xml One To One</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlOneToOne
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToOne()
+		 * @generated
+		 */
+		public static final EClass XML_ONE_TO_ONE = eINSTANCE.getXmlOneToOne();
+
+		/**
+		 * The meta object literal for the '<em><b>Primary Key Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS = eINSTANCE.getXmlOneToOne_PrimaryKeyJoinColumns();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderColumn <em>Xml Order Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlOrderColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderColumn()
+		 * @generated
+		 */
+		public static final EClass XML_ORDER_COLUMN = eINSTANCE.getXmlOrderColumn();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlOverride <em>Xml Override</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlOverride
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOverride()
+		 * @generated
+		 */
+		public static final EClass XML_OVERRIDE = eINSTANCE.getXmlOverride();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_OVERRIDE__NAME = eINSTANCE.getXmlOverride_Name();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults <em>Xml Persistence Unit Defaults</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE_UNIT_DEFAULTS = eINSTANCE.getXmlPersistenceUnitDefaults();
+
+		/**
+		 * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA = eINSTANCE.getXmlPersistenceUnitDefaults_Schema();
+
+		/**
+		 * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG = eINSTANCE.getXmlPersistenceUnitDefaults_Catalog();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade Persist</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST = eINSTANCE.getXmlPersistenceUnitDefaults_CascadePersist();
+
+		/**
+		 * The meta object literal for the '<em><b>Entity Listeners</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS = eINSTANCE.getXmlPersistenceUnitDefaults_EntityListeners();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata <em>Xml Persistence Unit Metadata</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE_UNIT_METADATA = eINSTANCE.getXmlPersistenceUnitMetadata();
+
+		/**
+		 * The meta object literal for the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE = eINSTANCE.getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete();
+
+		/**
+		 * The meta object literal for the '<em><b>Persistence Unit Defaults</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS = eINSTANCE.getXmlPersistenceUnitMetadata_PersistenceUnitDefaults();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable <em>Abstract Xml Reference Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AbstractXmlReferenceTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAbstractXmlReferenceTable()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_XML_REFERENCE_TABLE = eINSTANCE.getAbstractXmlReferenceTable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlReferenceTable <em>Xml Reference Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlReferenceTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlReferenceTable()
+		 * @generated
+		 */
+		public static final EClass XML_REFERENCE_TABLE = eINSTANCE.getXmlReferenceTable();
+
+		/**
+		 * The meta object literal for the '<em><b>Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_REFERENCE_TABLE__JOIN_COLUMNS = eINSTANCE.getXmlReferenceTable_JoinColumns();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PostLoad <em>Post Load</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PostLoad
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostLoad()
+		 * @generated
+		 */
+		public static final EClass POST_LOAD = eINSTANCE.getPostLoad();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PostPersist <em>Post Persist</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PostPersist
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostPersist()
+		 * @generated
+		 */
+		public static final EClass POST_PERSIST = eINSTANCE.getPostPersist();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PostRemove <em>Post Remove</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PostRemove
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostRemove()
+		 * @generated
+		 */
+		public static final EClass POST_REMOVE = eINSTANCE.getPostRemove();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PostUpdate <em>Post Update</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PostUpdate
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostUpdate()
+		 * @generated
+		 */
+		public static final EClass POST_UPDATE = eINSTANCE.getPostUpdate();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PrePersist <em>Pre Persist</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PrePersist
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPrePersist()
+		 * @generated
+		 */
+		public static final EClass PRE_PERSIST = eINSTANCE.getPrePersist();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PreRemove <em>Pre Remove</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PreRemove
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPreRemove()
+		 * @generated
+		 */
+		public static final EClass PRE_REMOVE = eINSTANCE.getPreRemove();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.PreUpdate <em>Pre Update</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.PreUpdate
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPreUpdate()
+		 * @generated
+		 */
+		public static final EClass PRE_UPDATE = eINSTANCE.getPreUpdate();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn <em>Xml Primary Key Join Column</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn()
+		 * @generated
+		 */
+		public static final EClass XML_PRIMARY_KEY_JOIN_COLUMN = eINSTANCE.getXmlPrimaryKeyJoinColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Referenced Column Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME = eINSTANCE.getXmlPrimaryKeyJoinColumn_ReferencedColumnName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlQuery <em>Xml Query</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlQuery
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery()
+		 * @generated
+		 */
+		public static final EClass XML_QUERY = eINSTANCE.getXmlQuery();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_QUERY__NAME = eINSTANCE.getXmlQuery_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Query</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_QUERY__QUERY = eINSTANCE.getXmlQuery_Query();
+
+		/**
+		 * The meta object literal for the '<em><b>Hints</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_QUERY__HINTS = eINSTANCE.getXmlQuery_Hints();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer <em>Xml Query Container</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlQueryContainer
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer()
+		 * @generated
+		 */
+		public static final EClass XML_QUERY_CONTAINER = eINSTANCE.getXmlQueryContainer();
+
+		/**
+		 * The meta object literal for the '<em><b>Named Queries</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_QUERY_CONTAINER__NAMED_QUERIES = eINSTANCE.getXmlQueryContainer_NamedQueries();
+
+		/**
+		 * The meta object literal for the '<em><b>Named Native Queries</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES = eINSTANCE.getXmlQueryContainer_NamedNativeQueries();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint <em>Xml Query Hint</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlQueryHint
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryHint()
+		 * @generated
+		 */
+		public static final EClass XML_QUERY_HINT = eINSTANCE.getXmlQueryHint();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_QUERY_HINT__NAME = eINSTANCE.getXmlQueryHint_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_QUERY_HINT__VALUE = eINSTANCE.getXmlQueryHint_Value();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlSecondaryTable <em>Xml Secondary Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlSecondaryTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSecondaryTable()
+		 * @generated
+		 */
+		public static final EClass XML_SECONDARY_TABLE = eINSTANCE.getXmlSecondaryTable();
+
+		/**
+		 * The meta object literal for the '<em><b>Primary Key Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS = eINSTANCE.getXmlSecondaryTable_PrimaryKeyJoinColumns();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator <em>Xml Sequence Generator</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSequenceGenerator()
+		 * @generated
+		 */
+		public static final EClass XML_SEQUENCE_GENERATOR = eINSTANCE.getXmlSequenceGenerator();
+
+		/**
+		 * The meta object literal for the '<em><b>Sequence Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_SEQUENCE_GENERATOR__SEQUENCE_NAME = eINSTANCE.getXmlSequenceGenerator_SequenceName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping <em>Sql Result Set Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.SqlResultSetMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getSqlResultSetMapping()
+		 * @generated
+		 */
+		public static final EClass SQL_RESULT_SET_MAPPING = eINSTANCE.getSqlResultSetMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute SQL_RESULT_SET_MAPPING__NAME = eINSTANCE.getSqlResultSetMapping_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Entity Results</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference SQL_RESULT_SET_MAPPING__ENTITY_RESULTS = eINSTANCE.getSqlResultSetMapping_EntityResults();
+
+		/**
+		 * The meta object literal for the '<em><b>Column Results</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference SQL_RESULT_SET_MAPPING__COLUMN_RESULTS = eINSTANCE.getSqlResultSetMapping_ColumnResults();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlTable <em>Xml Table</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlTable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTable()
+		 * @generated
+		 */
+		public static final EClass XML_TABLE = eINSTANCE.getXmlTable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator <em>Xml Table Generator</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlTableGenerator
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator()
+		 * @generated
+		 */
+		public static final EClass XML_TABLE_GENERATOR = eINSTANCE.getXmlTableGenerator();
+
+		/**
+		 * The meta object literal for the '<em><b>Table</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TABLE_GENERATOR__TABLE = eINSTANCE.getXmlTableGenerator_Table();
+
+		/**
+		 * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TABLE_GENERATOR__CATALOG = eINSTANCE.getXmlTableGenerator_Catalog();
+
+		/**
+		 * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TABLE_GENERATOR__SCHEMA = eINSTANCE.getXmlTableGenerator_Schema();
+
+		/**
+		 * The meta object literal for the '<em><b>Pk Column Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TABLE_GENERATOR__PK_COLUMN_NAME = eINSTANCE.getXmlTableGenerator_PkColumnName();
+
+		/**
+		 * The meta object literal for the '<em><b>Value Column Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TABLE_GENERATOR__VALUE_COLUMN_NAME = eINSTANCE.getXmlTableGenerator_ValueColumnName();
+
+		/**
+		 * The meta object literal for the '<em><b>Pk Column Value</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TABLE_GENERATOR__PK_COLUMN_VALUE = eINSTANCE.getXmlTableGenerator_PkColumnValue();
+
+		/**
+		 * The meta object literal for the '<em><b>Unique Constraints</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS = eINSTANCE.getXmlTableGenerator_UniqueConstraints();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlTransient <em>Xml Transient</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlTransient
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTransient()
+		 * @generated
+		 */
+		public static final EClass XML_TRANSIENT = eINSTANCE.getXmlTransient();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping <em>Xml Type Mapping</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlTypeMapping
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping()
+		 * @generated
+		 */
+		public static final EClass XML_TYPE_MAPPING = eINSTANCE.getXmlTypeMapping();
+
+		/**
+		 * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TYPE_MAPPING__CLASS_NAME = eINSTANCE.getXmlTypeMapping_ClassName();
+
+		/**
+		 * The meta object literal for the '<em><b>Metadata Complete</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TYPE_MAPPING__METADATA_COMPLETE = eINSTANCE.getXmlTypeMapping_MetadataComplete();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_TYPE_MAPPING__DESCRIPTION = eINSTANCE.getXmlTypeMapping_Description();
+
+		/**
+		 * The meta object literal for the '<em><b>Attributes</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_TYPE_MAPPING__ATTRIBUTES = eINSTANCE.getXmlTypeMapping_Attributes();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint <em>Xml Unique Constraint</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlUniqueConstraint()
+		 * @generated
+		 */
+		public static final EClass XML_UNIQUE_CONSTRAINT = eINSTANCE.getXmlUniqueConstraint();
+
+		/**
+		 * The meta object literal for the '<em><b>Column Names</b></em>' attribute list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_UNIQUE_CONSTRAINT__COLUMN_NAMES = eINSTANCE.getXmlUniqueConstraint_ColumnNames();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlVersion <em>Xml Version</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlVersion
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlVersion()
+		 * @generated
+		 */
+		public static final EClass XML_VERSION = eINSTANCE.getXmlVersion();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderable <em>Xml Orderable</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.XmlOrderable
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable()
+		 * @generated
+		 */
+		public static final EClass XML_ORDERABLE = eINSTANCE.getXmlOrderable();
+
+		/**
+		 * The meta object literal for the '<em><b>Order By</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ORDERABLE__ORDER_BY = eINSTANCE.getXmlOrderable_OrderBy();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.AccessType <em>Access Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.AccessType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getAccessType()
+		 * @generated
+		 */
+		public static final EEnum ACCESS_TYPE = eINSTANCE.getAccessType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.DiscriminatorType <em>Discriminator Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.DiscriminatorType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getDiscriminatorType()
+		 * @generated
+		 */
+		public static final EEnum DISCRIMINATOR_TYPE = eINSTANCE.getDiscriminatorType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.EnumType <em>Enum Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.EnumType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getEnumType()
+		 * @generated
+		 */
+		public static final EEnum ENUM_TYPE = eINSTANCE.getEnumType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.FetchType <em>Fetch Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.FetchType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getFetchType()
+		 * @generated
+		 */
+		public static final EEnum FETCH_TYPE = eINSTANCE.getFetchType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.GenerationType <em>Generation Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.GenerationType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getGenerationType()
+		 * @generated
+		 */
+		public static final EEnum GENERATION_TYPE = eINSTANCE.getGenerationType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.InheritanceType <em>Inheritance Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.InheritanceType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getInheritanceType()
+		 * @generated
+		 */
+		public static final EEnum INHERITANCE_TYPE = eINSTANCE.getInheritanceType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.TemporalType <em>Temporal Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+		 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getTemporalType()
+		 * @generated
+		 */
+		public static final EEnum TEMPORAL_TYPE = eINSTANCE.getTemporalType();
+
+	}
+
+} //OrmPackage
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmXmlResourceFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmXmlResourceFactory.java
new file mode 100644
index 0000000..60986dc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/OrmXmlResourceFactory.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.wst.common.internal.emf.resource.Renderer;
+import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public class OrmXmlResourceFactory
+	extends TranslatorResourceFactory
+{
+	public OrmXmlResourceFactory() {
+		this(RendererFactory.getDefaultRendererFactory());
+	}
+	
+	public OrmXmlResourceFactory(RendererFactory aRendererFactory) {
+		super(aRendererFactory);
+	}
+	
+	public OrmXmlResourceFactory(RendererFactory aRendererFactory, boolean listeningForUpdates) {
+		super(aRendererFactory, listeningForUpdates);
+	}
+	
+	
+	@Override
+	protected TranslatorResource createResource(URI uri, Renderer renderer) {
+		return new JpaXmlResource(uri, renderer, JptCorePlugin.ORM_XML_CONTENT_TYPE, XmlEntityMappings.getRootTranslator());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostLoad.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostLoad.java
new file mode 100644
index 0000000..5e68add
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostLoad.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Post Load</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostLoad()
+ * @model kind="class"
+ * @generated
+ */
+public class PostLoad extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PostLoad()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.POST_LOAD;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.POST_LOAD,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostLoad());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java
new file mode 100644
index 0000000..fe88de4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostPersist.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Post Persist</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostPersist()
+ * @model kind="class"
+ * @generated
+ */
+public class PostPersist extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PostPersist()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.POST_PERSIST;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.POST_PERSIST,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostPersist());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostRemove.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostRemove.java
new file mode 100644
index 0000000..09d3974
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostRemove.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Post Remove</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostRemove()
+ * @model kind="class"
+ * @generated
+ */
+public class PostRemove extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PostRemove()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.POST_REMOVE;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.POST_REMOVE,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostRemove());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostUpdate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostUpdate.java
new file mode 100644
index 0000000..3474b25
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PostUpdate.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Post Update</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPostUpdate()
+ * @model kind="class"
+ * @generated
+ */
+public class PostUpdate extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PostUpdate()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.POST_UPDATE;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.POST_UPDATE,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PostUpdate());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PrePersist.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PrePersist.java
new file mode 100644
index 0000000..9d7362d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PrePersist.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pre Persist</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPrePersist()
+ * @model kind="class"
+ * @generated
+ */
+public class PrePersist extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PrePersist()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.PRE_PERSIST;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.PRE_PERSIST,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PrePersist());
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PreRemove.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PreRemove.java
new file mode 100644
index 0000000..68dd63f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PreRemove.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pre Remove</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPreRemove()
+ * @model kind="class"
+ * @generated
+ */
+public class PreRemove extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PreRemove()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.PRE_REMOVE;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.PRE_REMOVE,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PreRemove());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PreUpdate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PreUpdate.java
new file mode 100644
index 0000000..e0b42fb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/PreUpdate.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pre Update</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getPreUpdate()
+ * @model kind="class"
+ * @generated
+ */
+public class PreUpdate extends EventMethod
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected PreUpdate()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.PRE_UPDATE;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	public static Translator buildTranslator() {
+		return buildTranslator(
+			JPA.PRE_UPDATE,
+			OrmPackage.eINSTANCE.getXmlEventMethodContainer_PreUpdate());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/SqlResultSetMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/SqlResultSetMapping.java
new file mode 100644
index 0000000..17ae570
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/SqlResultSetMapping.java
@@ -0,0 +1,418 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Sql Result Set Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getEntityResults <em>Entity Results</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getColumnResults <em>Column Results</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getSqlResultSetMapping()
+ * @model kind="class"
+ * @generated
+ */
+public class SqlResultSetMapping extends AbstractJpaEObject implements XmlSqlResultSetMapping_2_0
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getEntityResults() <em>Entity Results</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityResults()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<EntityResult> entityResults;
+
+	/**
+	 * The cached value of the '{@link #getColumnResults() <em>Column Results</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumnResults()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<ColumnResult> columnResults;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected SqlResultSetMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.SQL_RESULT_SET_MAPPING;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSqlResultSetMapping_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getSqlResultSetMapping_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.SQL_RESULT_SET_MAPPING__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entity Results</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.EntityResult}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entity Results</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entity Results</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getSqlResultSetMapping_EntityResults()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<EntityResult> getEntityResults()
+	{
+		if (entityResults == null)
+		{
+			entityResults = new EObjectContainmentEList<EntityResult>(EntityResult.class, this, OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS);
+		}
+		return entityResults;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column Results</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.ColumnResult}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column Results</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column Results</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getSqlResultSetMapping_ColumnResults()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<ColumnResult> getColumnResults()
+	{
+		if (columnResults == null)
+		{
+			columnResults = new EObjectContainmentEList<ColumnResult>(ColumnResult.class, this, OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS);
+		}
+		return columnResults;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
+				return ((InternalEList<?>)getEntityResults()).basicRemove(otherEnd, msgs);
+			case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
+				return ((InternalEList<?>)getColumnResults()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
+				return getName();
+			case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
+				return getEntityResults();
+			case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
+				return getColumnResults();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
+				getEntityResults().clear();
+				getEntityResults().addAll((Collection<? extends EntityResult>)newValue);
+				return;
+			case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
+				getColumnResults().clear();
+				getColumnResults().addAll((Collection<? extends ColumnResult>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
+				getEntityResults().clear();
+				return;
+			case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
+				getColumnResults().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.SQL_RESULT_SET_MAPPING__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.SQL_RESULT_SET_MAPPING__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.SQL_RESULT_SET_MAPPING__ENTITY_RESULTS:
+				return entityResults != null && !entityResults.isEmpty();
+			case OrmPackage.SQL_RESULT_SET_MAPPING__COLUMN_RESULTS:
+				return columnResults != null && !columnResults.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", name: ");
+		result.append(name);
+		result.append(')');
+		return result.toString();
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildDescriptionTranslator(),
+			buildEntityResultTranslator(),
+			buildColumnResultTranslator()
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getSqlResultSetMapping_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlSqlResultSetMapping_2_0_Description());
+	}
+	
+	protected static Translator buildEntityResultTranslator() {
+		return EntityResult.buildTranslator(JPA.ENTITY_RESULT, OrmPackage.eINSTANCE.getSqlResultSetMapping_EntityResults());
+	}
+	
+	protected static Translator buildColumnResultTranslator() {
+		return ColumnResult.buildTranslator(JPA.COLUMN_RESULT, OrmPackage.eINSTANCE.getSqlResultSetMapping_ColumnResults());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/TemporalType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/TemporalType.java
new file mode 100644
index 0000000..7b9b8dd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/TemporalType.java
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Temporal Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getTemporalType()
+ * @model
+ * @generated
+ */
+public enum TemporalType implements Enumerator
+{
+	/**
+	 * The '<em><b>DATE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #DATE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	DATE(0, "DATE", "DATE"),
+
+	/**
+	 * The '<em><b>TIME</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #TIME_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	TIME(1, "TIME", "TIME"),
+
+	/**
+	 * The '<em><b>TIMESTAMP</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #TIMESTAMP_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	TIMESTAMP(2, "TIMESTAMP", "TIMESTAMP");
+
+	/**
+	 * The '<em><b>DATE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>DATE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #DATE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int DATE_VALUE = 0;
+
+	/**
+	 * The '<em><b>TIME</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>TIME</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #TIME
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int TIME_VALUE = 1;
+
+	/**
+	 * The '<em><b>TIMESTAMP</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>TIMESTAMP</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #TIMESTAMP
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int TIMESTAMP_VALUE = 2;
+
+	/**
+	 * An array of all the '<em><b>Temporal Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final TemporalType[] VALUES_ARRAY =
+		new TemporalType[]
+		{
+			DATE,
+			TIME,
+			TIMESTAMP,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Temporal Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<TemporalType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Temporal Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static TemporalType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			TemporalType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Temporal Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static TemporalType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			TemporalType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Temporal Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static TemporalType get(int value)
+	{
+		switch (value)
+		{
+			case DATE_VALUE: return DATE;
+			case TIME_VALUE: return TIME;
+			case TIMESTAMP_VALUE: return TIMESTAMP;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private TemporalType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //TemporalType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAccessHolder.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAccessHolder.java
new file mode 100644
index 0000000..b35703a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAccessHolder.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Access Holder</b></em>'.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlAccessHolder#getAccess <em>Access</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlAccessHolder extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Access</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.AccessType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Access</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #setAccess(AccessType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
+	 * @model
+	 * @generated
+	 */
+	AccessType getAccess();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAccessHolder#getAccess <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #getAccess()
+	 * @generated
+	 */
+	void setAccess(AccessType value);
+
+} // XmlAccessHolder
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAssociationOverride.java
new file mode 100644
index 0000000..c5a0332
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAssociationOverride.java
@@ -0,0 +1,501 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Association Override Impl</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverride()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlAssociationOverride extends AbstractJpaEObject implements XmlOverride, XmlJoinColumnsMapping, XmlAssociationOverride_2_0
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> joinColumns;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getJoinTable() <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlJoinTable joinTable;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlAssociationOverride()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ASSOCIATION_OVERRIDE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping_JoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getJoinColumns()
+	{
+		if (joinColumns == null)
+		{
+			joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS);
+		}
+		return joinColumns;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverride_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Table</em>' containment reference.
+	 * @see #setJoinTable(XmlJoinTable)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverride_2_0_JoinTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlJoinTable getJoinTable()
+	{
+		return joinTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetJoinTable(XmlJoinTable newJoinTable, NotificationChain msgs)
+	{
+		XmlJoinTable oldJoinTable = joinTable;
+		joinTable = newJoinTable;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, oldJoinTable, newJoinTable);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride#getJoinTable <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Join Table</em>' containment reference.
+	 * @see #getJoinTable()
+	 * @generated
+	 */
+	public void setJoinTable(XmlJoinTable newJoinTable)
+	{
+		if (newJoinTable != joinTable)
+		{
+			NotificationChain msgs = null;
+			if (joinTable != null)
+				msgs = ((InternalEObject)joinTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, null, msgs);
+			if (newJoinTable != null)
+				msgs = ((InternalEObject)newJoinTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, null, msgs);
+			msgs = basicSetJoinTable(newJoinTable, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE, newJoinTable, newJoinTable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOverride_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME, oldName, name));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
+				return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
+				return basicSetJoinTable(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
+				return getName();
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
+				return getJoinColumns();
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
+				return getJoinTable();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
+				setJoinTable((XmlJoinTable)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				return;
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
+				setJoinTable((XmlJoinTable)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS:
+				return joinColumns != null && !joinColumns.isEmpty();
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE:
+				return joinTable != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlJoinColumnsMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS: return OrmPackage.XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAssociationOverride_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION: return OrmV2_0Package.XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION;
+				case OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE: return OrmV2_0Package.XML_ASSOCIATION_OVERRIDE_20__JOIN_TABLE;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlJoinColumnsMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS: return OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAssociationOverride_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION: return OrmPackage.XML_ASSOCIATION_OVERRIDE__DESCRIPTION;
+				case OrmV2_0Package.XML_ASSOCIATION_OVERRIDE_20__JOIN_TABLE: return OrmPackage.XML_ASSOCIATION_OVERRIDE__JOIN_TABLE;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(", description: ");
+		result.append(description);
+		result.append(')');
+		return result.toString();
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildDescriptionTranslator(),
+			buildJoinColumnTranslator(),
+			buildJoinTableTranslator()
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlOverride_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlAssociationOverride_2_0_Description());
+	}
+	
+	protected static Translator buildJoinColumnTranslator() {
+		return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinColumnsMapping_JoinColumns());
+	}	
+	
+	protected static Translator buildJoinTableTranslator() {
+		return XmlJoinTable.buildTranslator(JPA.JOIN_TABLE, OrmV2_0Package.eINSTANCE.getXmlAssociationOverride_2_0_JoinTable());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAssociationOverrideContainer.java
new file mode 100644
index 0000000..b66f596
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAssociationOverrideContainer.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Association Override Container</b></em>'.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer#getAssociationOverrides <em>Association Overrides</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlAssociationOverrideContainer extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Association Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlAssociationOverride> getAssociationOverrides();
+
+} // XmlAssociationOverrideContainer
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeMapping.java
new file mode 100644
index 0000000..2e8d3c1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeMapping.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Attribute Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlAttributeMapping#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlAttributeMapping extends XmlAttributeMapping_2_0
+{
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeMapping_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeMapping#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	void setName(String value);
+	
+	TextRange getNameTextRange();
+	
+	//TODO unsure about this api, might change soon
+	String getMappingKey();
+
+} // XmlAttributeMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeOverride.java
new file mode 100644
index 0000000..28593c0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeOverride.java
@@ -0,0 +1,433 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Attribute Override</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride#getColumn <em>Column</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverride()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlAttributeOverride extends AbstractJpaEObject implements XmlOverride, XmlAttributeOverride_2_0
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn column;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlAttributeOverride()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ATTRIBUTE_OVERRIDE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverride_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverride_Column()
+	 * @model containment="true" required="true"
+	 * @generated
+	 */
+	public XmlColumn getColumn()
+	{
+		return column;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
+	{
+		XmlColumn oldColumn = column;
+		column = newColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, oldColumn, newColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	public void setColumn(XmlColumn newColumn)
+	{
+		if (newColumn != column)
+		{
+			NotificationChain msgs = null;
+			if (column != null)
+				msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, null, msgs);
+			if (newColumn != null)
+				msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, null, msgs);
+			msgs = basicSetColumn(newColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN, newColumn, newColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOverride_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME, oldName, name));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
+				return basicSetColumn(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
+				return getName();
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
+				return getColumn();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
+				setColumn((XmlColumn)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
+				setColumn((XmlColumn)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_ATTRIBUTE_OVERRIDE__COLUMN:
+				return column != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlAttributeOverride_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION: return OrmV2_0Package.XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlAttributeOverride_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION: return OrmPackage.XML_ATTRIBUTE_OVERRIDE__DESCRIPTION;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(", description: ");
+		result.append(description);
+		result.append(')');
+		return result.toString();
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildDescriptionTranslator(),
+			buildColumnTranslator()
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlOverride_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlAttributeOverride_2_0_Description());
+	}
+	
+	protected static Translator buildColumnTranslator() {
+		return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getXmlAttributeOverride_Column());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeOverrideContainer.java
new file mode 100644
index 0000000..fe13a6f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlAttributeOverrideContainer.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Attribute Override Container</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer#getAttributeOverrides <em>Attribute Overrides</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlAttributeOverrideContainer extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlAttributeOverride> getAttributeOverrides();
+
+} // XmlAttributeOverrideContainer
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlBasic.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlBasic.java
new file mode 100644
index 0000000..731e0b1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlBasic.java
@@ -0,0 +1,687 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.BooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Basic Impl</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getFetch <em>Fetch</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getOptional <em>Optional</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlBasic()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlBasic extends AbstractXmlAttributeMapping implements ColumnMapping, XmlConvertibleMapping
+{
+	/**
+	 * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn column;
+
+	/**
+	 * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean LOB_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean lob = LOB_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final TemporalType TEMPORAL_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTemporal()
+	 * @generated
+	 * @ordered
+	 */
+	protected TemporalType temporal = TEMPORAL_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final EnumType ENUMERATED_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected EnumType enumerated = ENUMERATED_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final FetchType FETCH_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFetch()
+	 * @generated
+	 * @ordered
+	 */
+	protected FetchType fetch = FETCH_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getOptional() <em>Optional</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOptional()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean OPTIONAL_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getOptional() <em>Optional</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOptional()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean optional = OPTIONAL_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlBasic()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_BASIC;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping_Column()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlColumn getColumn()
+	{
+		return column;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
+	{
+		XmlColumn oldColumn = column;
+		column = newColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__COLUMN, oldColumn, newColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	public void setColumn(XmlColumn newColumn)
+	{
+		if (newColumn != column)
+		{
+			NotificationChain msgs = null;
+			if (column != null)
+				msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_BASIC__COLUMN, null, msgs);
+			if (newColumn != null)
+				msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_BASIC__COLUMN, null, msgs);
+			msgs = basicSetColumn(newColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__COLUMN, newColumn, newColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lob</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lob</em>' attribute.
+	 * @see #setLob(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isLob()
+	{
+		return lob;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#isLob <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lob</em>' attribute.
+	 * @see #isLob()
+	 * @generated
+	 */
+	public void setLob(boolean newLob)
+	{
+		boolean oldLob = lob;
+		lob = newLob;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__LOB, oldLob, lob));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
+	 * @model
+	 * @generated
+	 */
+	public TemporalType getTemporal()
+	{
+		return temporal;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getTemporal <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getTemporal()
+	 * @generated
+	 */
+	public void setTemporal(TemporalType newTemporal)
+	{
+		TemporalType oldTemporal = temporal;
+		temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__TEMPORAL, oldTemporal, temporal));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
+	 * @model
+	 * @generated
+	 */
+	public EnumType getEnumerated()
+	{
+		return enumerated;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getEnumerated <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getEnumerated()
+	 * @generated
+	 */
+	public void setEnumerated(EnumType newEnumerated)
+	{
+		EnumType oldEnumerated = enumerated;
+		enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__ENUMERATED, oldEnumerated, enumerated));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Fetch</b></em>' attribute.
+	 * The default value is <code>"LAZY"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.FetchType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #setFetch(FetchType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlBasic_Fetch()
+	 * @model default="LAZY"
+	 * @generated
+	 */
+	public FetchType getFetch()
+	{
+		return fetch;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getFetch <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #getFetch()
+	 * @generated
+	 */
+	public void setFetch(FetchType newFetch)
+	{
+		FetchType oldFetch = fetch;
+		fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__FETCH, oldFetch, fetch));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Optional</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Optional</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Optional</em>' attribute.
+	 * @see #setOptional(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlBasic_Optional()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getOptional()
+	{
+		return optional;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlBasic#getOptional <em>Optional</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Optional</em>' attribute.
+	 * @see #getOptional()
+	 * @generated
+	 */
+	public void setOptional(Boolean newOptional)
+	{
+		Boolean oldOptional = optional;
+		optional = newOptional;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_BASIC__OPTIONAL, oldOptional, optional));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_BASIC__COLUMN:
+				return basicSetColumn(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_BASIC__COLUMN:
+				return getColumn();
+			case OrmPackage.XML_BASIC__LOB:
+				return isLob();
+			case OrmPackage.XML_BASIC__TEMPORAL:
+				return getTemporal();
+			case OrmPackage.XML_BASIC__ENUMERATED:
+				return getEnumerated();
+			case OrmPackage.XML_BASIC__FETCH:
+				return getFetch();
+			case OrmPackage.XML_BASIC__OPTIONAL:
+				return getOptional();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_BASIC__COLUMN:
+				setColumn((XmlColumn)newValue);
+				return;
+			case OrmPackage.XML_BASIC__LOB:
+				setLob((Boolean)newValue);
+				return;
+			case OrmPackage.XML_BASIC__TEMPORAL:
+				setTemporal((TemporalType)newValue);
+				return;
+			case OrmPackage.XML_BASIC__ENUMERATED:
+				setEnumerated((EnumType)newValue);
+				return;
+			case OrmPackage.XML_BASIC__FETCH:
+				setFetch((FetchType)newValue);
+				return;
+			case OrmPackage.XML_BASIC__OPTIONAL:
+				setOptional((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_BASIC__COLUMN:
+				setColumn((XmlColumn)null);
+				return;
+			case OrmPackage.XML_BASIC__LOB:
+				setLob(LOB_EDEFAULT);
+				return;
+			case OrmPackage.XML_BASIC__TEMPORAL:
+				setTemporal(TEMPORAL_EDEFAULT);
+				return;
+			case OrmPackage.XML_BASIC__ENUMERATED:
+				setEnumerated(ENUMERATED_EDEFAULT);
+				return;
+			case OrmPackage.XML_BASIC__FETCH:
+				setFetch(FETCH_EDEFAULT);
+				return;
+			case OrmPackage.XML_BASIC__OPTIONAL:
+				setOptional(OPTIONAL_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_BASIC__COLUMN:
+				return column != null;
+			case OrmPackage.XML_BASIC__LOB:
+				return lob != LOB_EDEFAULT;
+			case OrmPackage.XML_BASIC__TEMPORAL:
+				return temporal != TEMPORAL_EDEFAULT;
+			case OrmPackage.XML_BASIC__ENUMERATED:
+				return enumerated != ENUMERATED_EDEFAULT;
+			case OrmPackage.XML_BASIC__FETCH:
+				return fetch != FETCH_EDEFAULT;
+			case OrmPackage.XML_BASIC__OPTIONAL:
+				return OPTIONAL_EDEFAULT == null ? optional != null : !OPTIONAL_EDEFAULT.equals(optional);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == ColumnMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_BASIC__COLUMN: return OrmPackage.COLUMN_MAPPING__COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_BASIC__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
+				case OrmPackage.XML_BASIC__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
+				case OrmPackage.XML_BASIC__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == ColumnMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.COLUMN_MAPPING__COLUMN: return OrmPackage.XML_BASIC__COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_BASIC__LOB;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_BASIC__TEMPORAL;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_BASIC__ENUMERATED;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (lob: ");
+		result.append(lob);
+		result.append(", temporal: ");
+		result.append(temporal);
+		result.append(", enumerated: ");
+		result.append(enumerated);
+		result.append(", fetch: ");
+		result.append(fetch);
+		result.append(", optional: ");
+		result.append(optional);
+		result.append(')');
+		return result.toString();
+	}
+
+	public TextRange getEnumeratedTextRange() {
+		return getAttributeTextRange(JPA.ENUMERATED);
+	}
+
+	public TextRange getLobTextRange() {
+		return getAttributeTextRange(JPA.LOB);
+	}
+	
+	public TextRange getTemporalTextRange() {
+		return getAttributeTextRange(JPA.TEMPORAL);
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildFetchTranslator(),
+			buildOptionalTranslator(),
+			buildAccessTranslator(),
+			buildColumnTranslator(), 
+			buildLobTranslator(),
+			buildTemporalTranslator(),
+			buildEnumeratedTranslator()
+		};
+	}
+	
+	protected static Translator buildFetchTranslator() {
+		return new Translator(JPA.FETCH, OrmPackage.eINSTANCE.getXmlBasic_Fetch(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildOptionalTranslator() {
+		return new BooleanTranslator(JPA.OPTIONAL, OrmPackage.eINSTANCE.getXmlBasic_Optional(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildColumnTranslator() {
+		return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getColumnMapping_Column());
+	}
+	
+	protected static Translator buildLobTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.LOB, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Lob());
+	}
+	
+	protected static Translator buildTemporalTranslator() {
+		return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
+	}
+	
+	protected static Translator buildEnumeratedTranslator() {
+		return new Translator(JPA.ENUMERATED, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Enumerated());
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlClassReference.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlClassReference.java
new file mode 100644
index 0000000..26cad87
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlClassReference.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Class Reference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlClassReference#getClassName <em>Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlClassReference()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlClassReference extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClassName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CLASS_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClassName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String className = CLASS_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlClassReference()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_CLASS_REFERENCE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Class Name</em>' attribute.
+	 * @see #setClassName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlClassReference_ClassName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getClassName()
+	{
+		return className;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlClassReference#getClassName <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Class Name</em>' attribute.
+	 * @see #getClassName()
+	 * @generated
+	 */
+	public void setClassName(String newClassName)
+	{
+		String oldClassName = className;
+		className = newClassName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME, oldClassName, className));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
+				return getClassName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
+				setClassName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
+				setClassName(CLASS_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_CLASS_REFERENCE__CLASS_NAME:
+				return CLASS_NAME_EDEFAULT == null ? className != null : !CLASS_NAME_EDEFAULT.equals(className);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (className: ");
+		result.append(className);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	public TextRange getClassNameTextRange() {
+		return getAttributeTextRange(JPA.CLASS);
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildClassTranslator()};
+	}
+	
+	private static Translator buildClassTranslator() {
+		return new Translator(JPA.CLASS, OrmPackage.eINSTANCE.getXmlClassReference_ClassName(), Translator.DOM_ATTRIBUTE);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlCollectionTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlCollectionTable.java
new file mode 100644
index 0000000..586b077
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlCollectionTable.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Collection Table</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlCollectionTable()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlCollectionTable extends AbstractXmlReferenceTable implements XmlCollectionTable_2_0
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlCollectionTable()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_COLLECTION_TABLE;
+	}
+
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildCatalogTranslator(),
+			buildSchemaTranslator(),
+			buildJoinColumnTranslator(),
+			buildUniqueConstraintTranslator()
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlColumn.java
new file mode 100644
index 0000000..4ae94bb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlColumn.java
@@ -0,0 +1,375 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Column Impl</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getLength <em>Length</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getPrecision <em>Precision</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getScale <em>Scale</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlColumn()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlColumn extends AbstractXmlColumn
+{
+	/**
+	 * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getLength()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer LENGTH_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getLength()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer length = LENGTH_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getPrecision() <em>Precision</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrecision()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer PRECISION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getPrecision() <em>Precision</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrecision()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer precision = PRECISION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getScale() <em>Scale</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getScale()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer SCALE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getScale() <em>Scale</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getScale()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer scale = SCALE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Length</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Length</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Length</em>' attribute.
+	 * @see #setLength(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlColumn_Length()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getLength()
+	{
+		return length;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getLength <em>Length</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Length</em>' attribute.
+	 * @see #getLength()
+	 * @generated
+	 */
+	public void setLength(Integer newLength)
+	{
+		Integer oldLength = length;
+		length = newLength;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_COLUMN__LENGTH, oldLength, length));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Precision</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Precision</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Precision</em>' attribute.
+	 * @see #setPrecision(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlColumn_Precision()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getPrecision()
+	{
+		return precision;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getPrecision <em>Precision</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Precision</em>' attribute.
+	 * @see #getPrecision()
+	 * @generated
+	 */
+	public void setPrecision(Integer newPrecision)
+	{
+		Integer oldPrecision = precision;
+		precision = newPrecision;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_COLUMN__PRECISION, oldPrecision, precision));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Scale</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Scale</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Scale</em>' attribute.
+	 * @see #setScale(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlColumn_Scale()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getScale()
+	{
+		return scale;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlColumn#getScale <em>Scale</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Scale</em>' attribute.
+	 * @see #getScale()
+	 * @generated
+	 */
+	public void setScale(Integer newScale)
+	{
+		Integer oldScale = scale;
+		scale = newScale;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_COLUMN__SCALE, oldScale, scale));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_COLUMN__LENGTH:
+				return getLength();
+			case OrmPackage.XML_COLUMN__PRECISION:
+				return getPrecision();
+			case OrmPackage.XML_COLUMN__SCALE:
+				return getScale();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_COLUMN__LENGTH:
+				setLength((Integer)newValue);
+				return;
+			case OrmPackage.XML_COLUMN__PRECISION:
+				setPrecision((Integer)newValue);
+				return;
+			case OrmPackage.XML_COLUMN__SCALE:
+				setScale((Integer)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_COLUMN__LENGTH:
+				setLength(LENGTH_EDEFAULT);
+				return;
+			case OrmPackage.XML_COLUMN__PRECISION:
+				setPrecision(PRECISION_EDEFAULT);
+				return;
+			case OrmPackage.XML_COLUMN__SCALE:
+				setScale(SCALE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_COLUMN__LENGTH:
+				return LENGTH_EDEFAULT == null ? length != null : !LENGTH_EDEFAULT.equals(length);
+			case OrmPackage.XML_COLUMN__PRECISION:
+				return PRECISION_EDEFAULT == null ? precision != null : !PRECISION_EDEFAULT.equals(precision);
+			case OrmPackage.XML_COLUMN__SCALE:
+				return SCALE_EDEFAULT == null ? scale != null : !SCALE_EDEFAULT.equals(scale);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (length: ");
+		result.append(length);
+		result.append(", precision: ");
+		result.append(precision);
+		result.append(", scale: ");
+		result.append(scale);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildUniqueTranslator(),
+			buildNullableTranslator(),
+			buildInsertableTranslator(),
+			buildUpdatableTranslator(),
+			buildColumnDefinitionTranslator(),
+			buildTableTranslator(),
+			buildLengthTranslator(),
+			buildPrecisionTranslator(),
+			buildScaleTranslator(),
+		};
+	}
+	
+	protected static Translator buildLengthTranslator() {
+		return new Translator(JPA.LENGTH, OrmPackage.eINSTANCE.getXmlColumn_Length(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildPrecisionTranslator() {
+		return new Translator(JPA.PRECISION, OrmPackage.eINSTANCE.getXmlColumn_Precision(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildScaleTranslator() {
+		return new Translator(JPA.SCALE, OrmPackage.eINSTANCE.getXmlColumn_Scale(), Translator.DOM_ATTRIBUTE);
+	}
+} // ColumnImpl
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlConvertibleMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlConvertibleMapping.java
new file mode 100644
index 0000000..91839ed
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlConvertibleMapping.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Convertible Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#isLob <em>Lob</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getTemporal <em>Temporal</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getEnumerated <em>Enumerated</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlConvertibleMapping extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lob</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lob</em>' attribute.
+	 * @see #setLob(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	boolean isLob();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#isLob <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lob</em>' attribute.
+	 * @see #isLob()
+	 * @generated
+	 */
+	void setLob(boolean value);
+
+	/**
+	 * Returns the value of the '<em><b>Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
+	 * @model
+	 * @generated
+	 */
+	TemporalType getTemporal();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getTemporal <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getTemporal()
+	 * @generated
+	 */
+	void setTemporal(TemporalType value);
+
+	/**
+	 * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
+	 * @model
+	 * @generated
+	 */
+	EnumType getEnumerated();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping#getEnumerated <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getEnumerated()
+	 * @generated
+	 */
+	void setEnumerated(EnumType value);
+
+	/**
+	 * Return the {@link TextRange} for the enumerated element.  If the enumerated element 
+	 * does not exist return the {@link TextRange} for the basic element.
+	 */
+	TextRange getEnumeratedTextRange();
+	
+	/**
+	 * Return the {@link TextRange} for the temporal element.  If the temporal element 
+	 * does not exist return the {@link TextRange} for the basic element.
+	 */
+	TextRange getTemporalTextRange();
+	
+	/**
+	 * Return the {@link TextRange} for the lob element.  If the lob element 
+	 * does not exist return the {@link TextRange} for the basic element.
+	 */
+	TextRange getLobTextRange();
+
+} // ConvertableMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlDiscriminatorColumn.java
new file mode 100644
index 0000000..990d335
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlDiscriminatorColumn.java
@@ -0,0 +1,297 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Discriminator Column</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getLength <em>Length</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlDiscriminatorColumn extends AbstractXmlNamedColumn
+{
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final DiscriminatorType DISCRIMINATOR_TYPE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDiscriminatorType() <em>Discriminator Type</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDiscriminatorType()
+	 * @generated
+	 * @ordered
+	 */
+	protected DiscriminatorType discriminatorType = DISCRIMINATOR_TYPE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getLength() <em>Length</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getLength()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer LENGTH_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getLength() <em>Length</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getLength()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer length = LENGTH_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlDiscriminatorColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_DISCRIMINATOR_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Discriminator Type</b></em>' attribute.
+	 * The default value is <code>"STRING"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.DiscriminatorType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Discriminator Type</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Discriminator Type</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.DiscriminatorType
+	 * @see #setDiscriminatorType(DiscriminatorType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn_DiscriminatorType()
+	 * @model default="STRING"
+	 * @generated
+	 */
+	public DiscriminatorType getDiscriminatorType()
+	{
+		return discriminatorType;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getDiscriminatorType <em>Discriminator Type</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Discriminator Type</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.DiscriminatorType
+	 * @see #getDiscriminatorType()
+	 * @generated
+	 */
+	public void setDiscriminatorType(DiscriminatorType newDiscriminatorType)
+	{
+		DiscriminatorType oldDiscriminatorType = discriminatorType;
+		discriminatorType = newDiscriminatorType == null ? DISCRIMINATOR_TYPE_EDEFAULT : newDiscriminatorType;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE, oldDiscriminatorType, discriminatorType));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Length</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Length</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Length</em>' attribute.
+	 * @see #setLength(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlDiscriminatorColumn_Length()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getLength()
+	{
+		return length;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlDiscriminatorColumn#getLength <em>Length</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Length</em>' attribute.
+	 * @see #getLength()
+	 * @generated
+	 */
+	public void setLength(Integer newLength)
+	{
+		Integer oldLength = length;
+		length = newLength;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH, oldLength, length));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
+				return getDiscriminatorType();
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH:
+				return getLength();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
+				setDiscriminatorType((DiscriminatorType)newValue);
+				return;
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH:
+				setLength((Integer)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
+				setDiscriminatorType(DISCRIMINATOR_TYPE_EDEFAULT);
+				return;
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH:
+				setLength(LENGTH_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__DISCRIMINATOR_TYPE:
+				return discriminatorType != DISCRIMINATOR_TYPE_EDEFAULT;
+			case OrmPackage.XML_DISCRIMINATOR_COLUMN__LENGTH:
+				return LENGTH_EDEFAULT == null ? length != null : !LENGTH_EDEFAULT.equals(length);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (discriminatorType: ");
+		result.append(discriminatorType);
+		result.append(", length: ");
+		result.append(length);
+		result.append(')');
+		return result.toString();
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildDiscrminiatorTypeTranslator(),
+			buildColumnDefinitionTranslator(),
+			buildLengthTranslator()
+		};
+	}
+	
+	protected static Translator buildDiscrminiatorTypeTranslator() {
+		return new Translator(JPA.DISCRIMINATOR_TYPE, OrmPackage.eINSTANCE.getXmlDiscriminatorColumn_DiscriminatorType(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildLengthTranslator() {
+		return new Translator(JPA.LENGTH, OrmPackage.eINSTANCE.getXmlDiscriminatorColumn_Length(), Translator.DOM_ATTRIBUTE);
+	}
+} // DiscriminatorColumn
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlElementCollection.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlElementCollection.java
new file mode 100644
index 0000000..3103bc7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlElementCollection.java
@@ -0,0 +1,1634 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.BooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.jpa2.MappingKeys2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Element Collection</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlElementCollection extends AbstractXmlAttributeMapping implements XmlElementCollection_2_0
+{
+	/**
+	 * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean LOB_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean lob = LOB_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final TemporalType TEMPORAL_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTemporal()
+	 * @generated
+	 * @ordered
+	 */
+	protected TemporalType temporal = TEMPORAL_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final EnumType ENUMERATED_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected EnumType enumerated = ENUMERATED_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getOrderColumn() <em>Order Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrderColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlOrderColumn orderColumn;
+
+	/**
+	 * The default value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrderBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String ORDER_BY_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getOrderBy() <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrderBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected String orderBy = ORDER_BY_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getAttributeOverrides() <em>Attribute Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAttributeOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAttributeOverride> attributeOverrides;
+
+	/**
+	 * The cached value of the '{@link #getAssociationOverrides() <em>Association Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAssociationOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAssociationOverride> associationOverrides;
+
+	/**
+	 * The cached value of the '{@link #getMapKeyAttributeOverrides() <em>Map Key Attribute Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyAttributeOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAttributeOverride> mapKeyAttributeOverrides;
+
+	/**
+	 * The default value of the '{@link #getTargetClass() <em>Target Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTargetClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String TARGET_CLASS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTargetClass() <em>Target Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTargetClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected String targetClass = TARGET_CLASS_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final FetchType FETCH_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getFetch() <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFetch()
+	 * @generated
+	 * @ordered
+	 */
+	protected FetchType fetch = FETCH_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getMapKey() <em>Map Key</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKey()
+	 * @generated
+	 * @ordered
+	 */
+	protected MapKey mapKey;
+
+	/**
+	 * The cached value of the '{@link #getMapKeyClass() <em>Map Key Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlClassReference mapKeyClass;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final TemporalType MAP_KEY_TEMPORAL_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getMapKeyTemporal() <em>Map Key Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyTemporal()
+	 * @generated
+	 * @ordered
+	 */
+	protected TemporalType mapKeyTemporal = MAP_KEY_TEMPORAL_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final EnumType MAP_KEY_ENUMERATED_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getMapKeyEnumerated() <em>Map Key Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected EnumType mapKeyEnumerated = MAP_KEY_ENUMERATED_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getMapKeyColumn() <em>Map Key Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn mapKeyColumn;
+
+	/**
+	 * The cached value of the '{@link #getMapKeyJoinColumns() <em>Map Key Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMapKeyJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> mapKeyJoinColumns;
+
+	/**
+	 * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn column;
+
+	/**
+	 * The cached value of the '{@link #getCollectionTable() <em>Collection Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCollectionTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlCollectionTable collectionTable;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlElementCollection()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ELEMENT_COLLECTION;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lob</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lob</em>' attribute.
+	 * @see #setLob(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isLob()
+	{
+		return lob;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#isLob <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lob</em>' attribute.
+	 * @see #isLob()
+	 * @generated
+	 */
+	public void setLob(boolean newLob)
+	{
+		boolean oldLob = lob;
+		lob = newLob;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__LOB, oldLob, lob));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
+	 * @model
+	 * @generated
+	 */
+	public TemporalType getTemporal()
+	{
+		return temporal;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getTemporal <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getTemporal()
+	 * @generated
+	 */
+	public void setTemporal(TemporalType newTemporal)
+	{
+		TemporalType oldTemporal = temporal;
+		temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL, oldTemporal, temporal));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
+	 * @model
+	 * @generated
+	 */
+	public EnumType getEnumerated()
+	{
+		return enumerated;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getEnumerated <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getEnumerated()
+	 * @generated
+	 */
+	public void setEnumerated(EnumType newEnumerated)
+	{
+		EnumType oldEnumerated = enumerated;
+		enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED, oldEnumerated, enumerated));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Target Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Target Class</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Target Class</em>' attribute.
+	 * @see #setTargetClass(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_TargetClass()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getTargetClass()
+	{
+		return targetClass;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getTargetClass <em>Target Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Target Class</em>' attribute.
+	 * @see #getTargetClass()
+	 * @generated
+	 */
+	public void setTargetClass(String newTargetClass)
+	{
+		String oldTargetClass = targetClass;
+		targetClass = newTargetClass;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS, oldTargetClass, targetClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Fetch</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.FetchType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #setFetch(FetchType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_Fetch()
+	 * @model
+	 * @generated
+	 */
+	public FetchType getFetch()
+	{
+		return fetch;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getFetch <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #getFetch()
+	 * @generated
+	 */
+	public void setFetch(FetchType newFetch)
+	{
+		FetchType oldFetch = fetch;
+		fetch = newFetch == null ? FETCH_EDEFAULT : newFetch;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__FETCH, oldFetch, fetch));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Order By</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Order By</em>' attribute.
+	 * @see #setOrderBy(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable_OrderBy()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getOrderBy()
+	{
+		return orderBy;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getOrderBy <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Order By</em>' attribute.
+	 * @see #getOrderBy()
+	 * @generated
+	 */
+	public void setOrderBy(String newOrderBy)
+	{
+		String oldOrderBy = orderBy;
+		orderBy = newOrderBy;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY, oldOrderBy, orderBy));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAttributeOverride> getAttributeOverrides()
+	{
+		if (attributeOverrides == null)
+		{
+			attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES);
+		}
+		return attributeOverrides;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Association Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAssociationOverride> getAssociationOverrides()
+	{
+		if (associationOverrides == null)
+		{
+			associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES);
+		}
+		return associationOverrides;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAttributeOverride> getMapKeyAttributeOverrides()
+	{
+		if (mapKeyAttributeOverrides == null)
+		{
+			mapKeyAttributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES);
+		}
+		return mapKeyAttributeOverrides;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Order Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Order Column</em>' containment reference.
+	 * @see #setOrderColumn(XmlOrderColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable_2_0_OrderColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlOrderColumn getOrderColumn()
+	{
+		return orderColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetOrderColumn(XmlOrderColumn newOrderColumn, NotificationChain msgs)
+	{
+		XmlOrderColumn oldOrderColumn = orderColumn;
+		orderColumn = newOrderColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, oldOrderColumn, newOrderColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getOrderColumn <em>Order Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Order Column</em>' containment reference.
+	 * @see #getOrderColumn()
+	 * @generated
+	 */
+	public void setOrderColumn(XmlOrderColumn newOrderColumn)
+	{
+		if (newOrderColumn != orderColumn)
+		{
+			NotificationChain msgs = null;
+			if (orderColumn != null)
+				msgs = ((InternalEObject)orderColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, null, msgs);
+			if (newOrderColumn != null)
+				msgs = ((InternalEObject)newOrderColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, null, msgs);
+			msgs = basicSetOrderColumn(newOrderColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN, newOrderColumn, newOrderColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key</em>' containment reference.
+	 * @see #setMapKey(MapKey)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKey()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public MapKey getMapKey()
+	{
+		return mapKey;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetMapKey(MapKey newMapKey, NotificationChain msgs)
+	{
+		MapKey oldMapKey = mapKey;
+		mapKey = newMapKey;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, oldMapKey, newMapKey);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getMapKey <em>Map Key</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key</em>' containment reference.
+	 * @see #getMapKey()
+	 * @generated
+	 */
+	public void setMapKey(MapKey newMapKey)
+	{
+		if (newMapKey != mapKey)
+		{
+			NotificationChain msgs = null;
+			if (mapKey != null)
+				msgs = ((InternalEObject)mapKey).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, null, msgs);
+			if (newMapKey != null)
+				msgs = ((InternalEObject)newMapKey).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, null, msgs);
+			msgs = basicSetMapKey(newMapKey, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY, newMapKey, newMapKey));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #setMapKeyClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlClassReference getMapKeyClass()
+	{
+		return mapKeyClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetMapKeyClass(XmlClassReference newMapKeyClass, NotificationChain msgs)
+	{
+		XmlClassReference oldMapKeyClass = mapKeyClass;
+		mapKeyClass = newMapKeyClass;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, oldMapKeyClass, newMapKeyClass);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getMapKeyClass <em>Map Key Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #getMapKeyClass()
+	 * @generated
+	 */
+	public void setMapKeyClass(XmlClassReference newMapKeyClass)
+	{
+		if (newMapKeyClass != mapKeyClass)
+		{
+			NotificationChain msgs = null;
+			if (mapKeyClass != null)
+				msgs = ((InternalEObject)mapKeyClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, null, msgs);
+			if (newMapKeyClass != null)
+				msgs = ((InternalEObject)newMapKeyClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, null, msgs);
+			msgs = basicSetMapKeyClass(newMapKeyClass, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS, newMapKeyClass, newMapKeyClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setMapKeyTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyTemporal()
+	 * @model
+	 * @generated
+	 */
+	public TemporalType getMapKeyTemporal()
+	{
+		return mapKeyTemporal;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getMapKeyTemporal()
+	 * @generated
+	 */
+	public void setMapKeyTemporal(TemporalType newMapKeyTemporal)
+	{
+		TemporalType oldMapKeyTemporal = mapKeyTemporal;
+		mapKeyTemporal = newMapKeyTemporal == null ? MAP_KEY_TEMPORAL_EDEFAULT : newMapKeyTemporal;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL, oldMapKeyTemporal, mapKeyTemporal));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setMapKeyEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyEnumerated()
+	 * @model
+	 * @generated
+	 */
+	public EnumType getMapKeyEnumerated()
+	{
+		return mapKeyEnumerated;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getMapKeyEnumerated()
+	 * @generated
+	 */
+	public void setMapKeyEnumerated(EnumType newMapKeyEnumerated)
+	{
+		EnumType oldMapKeyEnumerated = mapKeyEnumerated;
+		mapKeyEnumerated = newMapKeyEnumerated == null ? MAP_KEY_ENUMERATED_EDEFAULT : newMapKeyEnumerated;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED, oldMapKeyEnumerated, mapKeyEnumerated));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #setMapKeyColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlColumn getMapKeyColumn()
+	{
+		return mapKeyColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetMapKeyColumn(XmlColumn newMapKeyColumn, NotificationChain msgs)
+	{
+		XmlColumn oldMapKeyColumn = mapKeyColumn;
+		mapKeyColumn = newMapKeyColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, oldMapKeyColumn, newMapKeyColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #getMapKeyColumn()
+	 * @generated
+	 */
+	public void setMapKeyColumn(XmlColumn newMapKeyColumn)
+	{
+		if (newMapKeyColumn != mapKeyColumn)
+		{
+			NotificationChain msgs = null;
+			if (mapKeyColumn != null)
+				msgs = ((InternalEObject)mapKeyColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, null, msgs);
+			if (newMapKeyColumn != null)
+				msgs = ((InternalEObject)newMapKeyColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, null, msgs);
+			msgs = basicSetMapKeyColumn(newMapKeyColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN, newMapKeyColumn, newMapKeyColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_MapKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getMapKeyJoinColumns()
+	{
+		if (mapKeyJoinColumns == null)
+		{
+			mapKeyJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS);
+		}
+		return mapKeyJoinColumns;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_Column()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlColumn getColumn()
+	{
+		return column;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
+	{
+		XmlColumn oldColumn = column;
+		column = newColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, oldColumn, newColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	public void setColumn(XmlColumn newColumn)
+	{
+		if (newColumn != column)
+		{
+			NotificationChain msgs = null;
+			if (column != null)
+				msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, null, msgs);
+			if (newColumn != null)
+				msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, null, msgs);
+			msgs = basicSetColumn(newColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLUMN, newColumn, newColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Collection Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Collection Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Collection Table</em>' containment reference.
+	 * @see #setCollectionTable(XmlCollectionTable)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlElementCollection_2_0_CollectionTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlCollectionTable getCollectionTable()
+	{
+		return collectionTable;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetCollectionTable(XmlCollectionTable newCollectionTable, NotificationChain msgs)
+	{
+		XmlCollectionTable oldCollectionTable = collectionTable;
+		collectionTable = newCollectionTable;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, oldCollectionTable, newCollectionTable);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlElementCollection#getCollectionTable <em>Collection Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Collection Table</em>' containment reference.
+	 * @see #getCollectionTable()
+	 * @generated
+	 */
+	public void setCollectionTable(XmlCollectionTable newCollectionTable)
+	{
+		if (newCollectionTable != collectionTable)
+		{
+			NotificationChain msgs = null;
+			if (collectionTable != null)
+				msgs = ((InternalEObject)collectionTable).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, null, msgs);
+			if (newCollectionTable != null)
+				msgs = ((InternalEObject)newCollectionTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, null, msgs);
+			msgs = basicSetCollectionTable(newCollectionTable, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE, newCollectionTable, newCollectionTable));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
+				return basicSetOrderColumn(null, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
+				return ((InternalEList<?>)getAttributeOverrides()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
+				return ((InternalEList<?>)getAssociationOverrides()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				return ((InternalEList<?>)getMapKeyAttributeOverrides()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
+				return basicSetMapKey(null, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
+				return basicSetMapKeyClass(null, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
+				return basicSetMapKeyColumn(null, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
+				return ((InternalEList<?>)getMapKeyJoinColumns()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
+				return basicSetColumn(null, msgs);
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
+				return basicSetCollectionTable(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
+				return isLob();
+			case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
+				return getTemporal();
+			case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
+				return getEnumerated();
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
+				return getOrderColumn();
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
+				return getOrderBy();
+			case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
+				return getAttributeOverrides();
+			case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
+				return getAssociationOverrides();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				return getMapKeyAttributeOverrides();
+			case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
+				return getTargetClass();
+			case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
+				return getFetch();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
+				return getMapKey();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
+				return getMapKeyClass();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
+				return getMapKeyTemporal();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
+				return getMapKeyEnumerated();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
+				return getMapKeyColumn();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
+				return getMapKeyJoinColumns();
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
+				return getColumn();
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
+				return getCollectionTable();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
+				setLob((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
+				setTemporal((TemporalType)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
+				setEnumerated((EnumType)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
+				setOrderColumn((XmlOrderColumn)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
+				setOrderBy((String)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
+				getAttributeOverrides().clear();
+				getAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
+				getAssociationOverrides().clear();
+				getAssociationOverrides().addAll((Collection<? extends XmlAssociationOverride>)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				getMapKeyAttributeOverrides().clear();
+				getMapKeyAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
+				setTargetClass((String)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
+				setFetch((FetchType)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
+				setMapKey((MapKey)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
+				setMapKeyClass((XmlClassReference)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
+				setMapKeyTemporal((TemporalType)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
+				setMapKeyEnumerated((EnumType)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
+				setMapKeyColumn((XmlColumn)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
+				getMapKeyJoinColumns().clear();
+				getMapKeyJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
+				setColumn((XmlColumn)newValue);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
+				setCollectionTable((XmlCollectionTable)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
+				setLob(LOB_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
+				setTemporal(TEMPORAL_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
+				setEnumerated(ENUMERATED_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
+				setOrderColumn((XmlOrderColumn)null);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
+				setOrderBy(ORDER_BY_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
+				getAttributeOverrides().clear();
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
+				getAssociationOverrides().clear();
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				getMapKeyAttributeOverrides().clear();
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
+				setTargetClass(TARGET_CLASS_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
+				setFetch(FETCH_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
+				setMapKey((MapKey)null);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
+				setMapKeyClass((XmlClassReference)null);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
+				setMapKeyTemporal(MAP_KEY_TEMPORAL_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
+				setMapKeyEnumerated(MAP_KEY_ENUMERATED_EDEFAULT);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
+				setMapKeyColumn((XmlColumn)null);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
+				getMapKeyJoinColumns().clear();
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
+				setColumn((XmlColumn)null);
+				return;
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
+				setCollectionTable((XmlCollectionTable)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ELEMENT_COLLECTION__LOB:
+				return lob != LOB_EDEFAULT;
+			case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL:
+				return temporal != TEMPORAL_EDEFAULT;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED:
+				return enumerated != ENUMERATED_EDEFAULT;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN:
+				return orderColumn != null;
+			case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY:
+				return ORDER_BY_EDEFAULT == null ? orderBy != null : !ORDER_BY_EDEFAULT.equals(orderBy);
+			case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES:
+				return attributeOverrides != null && !attributeOverrides.isEmpty();
+			case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES:
+				return associationOverrides != null && !associationOverrides.isEmpty();
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES:
+				return mapKeyAttributeOverrides != null && !mapKeyAttributeOverrides.isEmpty();
+			case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS:
+				return TARGET_CLASS_EDEFAULT == null ? targetClass != null : !TARGET_CLASS_EDEFAULT.equals(targetClass);
+			case OrmPackage.XML_ELEMENT_COLLECTION__FETCH:
+				return fetch != FETCH_EDEFAULT;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY:
+				return mapKey != null;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS:
+				return mapKeyClass != null;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL:
+				return mapKeyTemporal != MAP_KEY_TEMPORAL_EDEFAULT;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED:
+				return mapKeyEnumerated != MAP_KEY_ENUMERATED_EDEFAULT;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN:
+				return mapKeyColumn != null;
+			case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS:
+				return mapKeyJoinColumns != null && !mapKeyJoinColumns.isEmpty();
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN:
+				return column != null;
+			case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE:
+				return collectionTable != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
+				case OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
+				case OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN: return OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY: return OrmPackage.XML_ORDERABLE__ORDER_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAttributeOverrideContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAssociationOverrideContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlElementCollection_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__TARGET_CLASS;
+				case OrmPackage.XML_ELEMENT_COLLECTION__FETCH: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__FETCH;
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY;
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS;
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_TEMPORAL;
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_ENUMERATED;
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN;
+				case OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS;
+				case OrmPackage.XML_ELEMENT_COLLECTION__COLUMN: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLUMN;
+				case OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE: return OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_ELEMENT_COLLECTION__LOB;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_ELEMENT_COLLECTION__TEMPORAL;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_ELEMENT_COLLECTION__ENUMERATED;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ORDERABLE_20__ORDER_COLUMN: return OrmPackage.XML_ELEMENT_COLLECTION__ORDER_COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrderable.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ORDERABLE__ORDER_BY: return OrmPackage.XML_ELEMENT_COLLECTION__ORDER_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAttributeOverrideContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ELEMENT_COLLECTION__ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAssociationOverrideContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ELEMENT_COLLECTION__ASSOCIATION_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlMapKeyAttributeOverrideContainer_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlElementCollection_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__TARGET_CLASS: return OrmPackage.XML_ELEMENT_COLLECTION__TARGET_CLASS;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__FETCH: return OrmPackage.XML_ELEMENT_COLLECTION__FETCH;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_CLASS;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_TEMPORAL: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_TEMPORAL;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_ENUMERATED: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_ENUMERATED;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_COLUMN;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS: return OrmPackage.XML_ELEMENT_COLLECTION__MAP_KEY_JOIN_COLUMNS;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLUMN: return OrmPackage.XML_ELEMENT_COLLECTION__COLUMN;
+				case OrmV2_0Package.XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE: return OrmPackage.XML_ELEMENT_COLLECTION__COLLECTION_TABLE;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (lob: ");
+		result.append(lob);
+		result.append(", temporal: ");
+		result.append(temporal);
+		result.append(", enumerated: ");
+		result.append(enumerated);
+		result.append(", orderBy: ");
+		result.append(orderBy);
+		result.append(", targetClass: ");
+		result.append(targetClass);
+		result.append(", fetch: ");
+		result.append(fetch);
+		result.append(", mapKeyTemporal: ");
+		result.append(mapKeyTemporal);
+		result.append(", mapKeyEnumerated: ");
+		result.append(mapKeyEnumerated);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// **************** XmlAttributeMapping impl ******************************
+	
+	public String getMappingKey() {
+		return MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** validation support ************************************
+	
+	public TextRange getEnumeratedTextRange() {
+		return getAttributeTextRange(JPA2_0.ENUMERATED);
+	}
+	
+	public TextRange getLobTextRange() {
+		return getAttributeTextRange(JPA2_0.LOB);
+	}
+	
+	public TextRange getTemporalTextRange() {
+		return getAttributeTextRange(JPA2_0.TEMPORAL);
+	}
+	
+	public TextRange getTargetClassTextRange() {
+		return getAttributeTextRange(JPA2_0.TARGET_CLASS);
+	}
+	
+	// **************** translators *******************************************
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildTargetClassTranslator(),
+			buildFetchTranslator(),
+			buildAccessTranslator(),
+			buildOrderByTranslator(),
+			buildOrderColumnTranslator(),
+			buildMapKeyTranslator(),
+			buildMapKeyClassTranslator(),
+			buildMapKeyTemporalTranslator(),
+			buildMapKeyEnumeratedTranslator(),
+			buildMapKeyAttributeOverrideTranslator(),
+			XmlColumn.buildTranslator(JPA2_0.MAP_KEY_COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyColumn()),
+			XmlJoinColumn.buildTranslator(JPA2_0.MAP_KEY_JOIN_COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyJoinColumns()),
+			XmlColumn.buildTranslator(JPA.COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_Column()),
+			buildTemporalTranslator(),
+			buildEnumeratedTranslator(),
+			buildLobTranslator(),
+			buildAttributeOverrideTranslator(),
+			buildAssociationOverrideTranslator(),
+			XmlCollectionTable.buildTranslator(JPA2_0.COLLECTION_TABLE, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_CollectionTable())
+		};
+	}
+	
+	protected static Translator buildTargetClassTranslator() {
+		return new Translator(JPA2_0.TARGET_CLASS, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_TargetClass(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildFetchTranslator() {
+		return new Translator(JPA.FETCH, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_Fetch(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildOrderByTranslator() {
+		return new Translator(JPA.ORDER_BY, OrmPackage.eINSTANCE.getXmlOrderable_OrderBy());
+	}
+	
+	protected static Translator buildOrderColumnTranslator() {
+		return XmlOrderColumn.buildTranslator(JPA2_0.ORDER_COLUMN, OrmV2_0Package.eINSTANCE.getXmlOrderable_2_0_OrderColumn());
+	}
+	
+	protected static Translator buildColumnTranslator() {
+		return XmlColumn.buildTranslator(JPA.COLUMN, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_Column());
+	}
+	
+	protected static Translator buildLobTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.LOB, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Lob());
+	}
+	
+	protected static Translator buildTemporalTranslator() {
+		return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
+	}
+	
+	protected static Translator buildEnumeratedTranslator() {
+		return new Translator(JPA.ENUMERATED, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Enumerated());
+	}
+	
+	protected static Translator buildMapKeyTranslator() {
+		return MapKey.buildTranslator(JPA.MAP_KEY, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKey());
+	}
+	
+	protected static Translator buildMapKeyClassTranslator() {
+		return XmlClassReference.buildTranslator(JPA2_0.MAP_KEY_CLASS, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyClass());
+	}
+	
+	protected static Translator buildMapKeyTemporalTranslator() {
+		return new Translator(JPA2_0.MAP_KEY_TEMPORAL, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyTemporal());
+	}
+	
+	protected static Translator buildMapKeyEnumeratedTranslator() {
+		return new Translator(JPA2_0.MAP_KEY_ENUMERATED, OrmV2_0Package.eINSTANCE.getXmlElementCollection_2_0_MapKeyEnumerated());
+	}	
+	
+	protected static Translator buildAttributeOverrideTranslator() {
+		return XmlAttributeOverride.buildTranslator(JPA.ATTRIBUTE_OVERRIDE, OrmPackage.eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides());
+	}
+	
+	protected static Translator buildAssociationOverrideTranslator() {
+		return XmlAssociationOverride.buildTranslator(JPA.ASSOCIATION_OVERRIDE, OrmPackage.eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides());
+	}
+	
+	protected static Translator buildMapKeyAttributeOverrideTranslator() {
+		return XmlAttributeOverride.buildTranslator(JPA2_0.MAP_KEY_ATTRIBUTE_OVERRIDE, OrmV2_0Package.eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbeddable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbeddable.java
new file mode 100644
index 0000000..f1f277b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbeddable.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Embeddable</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbeddable()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlEmbeddable extends AbstractXmlTypeMapping
+{
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlEmbeddable()
+	{
+		super();
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY;
+	}
+	
+	public XmlEntityMappings getEntityMappings() {
+		return (XmlEntityMappings) eContainer();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_EMBEDDABLE;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildClassTranslator(),
+			buildAccessTranslator(),
+			buildMetadataCompleteTranslator(),
+			buildDescriptionTranslator(),
+			buildAttributesTranslator()
+		};
+	}
+	
+	protected static Translator buildAccessTranslator() {
+		return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access(), Translator.DOM_ATTRIBUTE);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbedded.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbedded.java
new file mode 100644
index 0000000..463de74
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbedded.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Embedded</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbedded()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlEmbedded extends AbstractXmlEmbedded implements XmlEmbedded_2_0
+{
+	/**
+	 * The cached value of the '{@link #getAssociationOverrides() <em>Association Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAssociationOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAssociationOverride> associationOverrides;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlEmbedded()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_EMBEDDED;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Association Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAssociationOverride> getAssociationOverrides()
+	{
+		if (associationOverrides == null)
+		{
+			associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES);
+		}
+		return associationOverrides;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
+				return ((InternalEList<?>)getAssociationOverrides()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
+				return getAssociationOverrides();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
+				getAssociationOverrides().clear();
+				getAssociationOverrides().addAll((Collection<? extends XmlAssociationOverride>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
+				getAssociationOverrides().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES:
+				return associationOverrides != null && !associationOverrides.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlAssociationOverrideContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlEmbedded_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlAssociationOverrideContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES: return OrmPackage.XML_EMBEDDED__ASSOCIATION_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlEmbedded_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	public String getMappingKey() {
+		return MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildAccessTranslator(),
+			buildAttributeOverrideTranslator(),
+			buildAssociationOverrideTranslator()
+		};
+	}
+	
+	protected static Translator buildAssociationOverrideTranslator() {
+		return XmlAssociationOverride.buildTranslator(JPA.ASSOCIATION_OVERRIDE, OrmPackage.eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbeddedId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbeddedId.java
new file mode 100644
index 0000000..289142a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEmbeddedId.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Embedded Id</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEmbeddedId()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlEmbeddedId extends AbstractXmlEmbedded
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlEmbeddedId()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_EMBEDDED_ID;
+	}
+
+	public String getMappingKey() {
+		return MappingKeys.EMBEDDED_ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildAccessTranslator(),
+			buildAttributeOverrideTranslator()
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEntity.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEntity.java
new file mode 100644
index 0000000..f181ec1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEntity.java
@@ -0,0 +1,2312 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getTable <em>Table</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getSecondaryTables <em>Secondary Tables</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getInheritance <em>Inheritance</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorValue <em>Discriminator Value</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorColumn <em>Discriminator Column</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getEntityListeners <em>Entity Listeners</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlEntity extends AbstractXmlTypeMapping implements XmlQueryContainer, XmlGeneratorContainer, XmlEventMethodContainer, XmlAttributeOverrideContainer, XmlAssociationOverrideContainer, XmlEntity_2_0, XmlIdClassContainer
+{
+
+	/**
+	 * The cached value of the '{@link #getNamedQueries() <em>Named Queries</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamedQueries()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlNamedQuery> namedQueries;
+
+	/**
+	 * The cached value of the '{@link #getNamedNativeQueries() <em>Named Native Queries</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamedNativeQueries()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlNamedNativeQuery> namedNativeQueries;
+
+	/**
+	 * The cached value of the '{@link #getSequenceGenerator() <em>Sequence Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSequenceGenerator()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlSequenceGenerator sequenceGenerator;
+
+	/**
+	 * The cached value of the '{@link #getTableGenerator() <em>Table Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTableGenerator()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlTableGenerator tableGenerator;
+
+	/**
+	 * The cached value of the '{@link #getPrePersist() <em>Pre Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrePersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected PrePersist prePersist;
+
+	/**
+	 * The cached value of the '{@link #getPostPersist() <em>Post Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostPersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostPersist postPersist;
+
+	/**
+	 * The cached value of the '{@link #getPreRemove() <em>Pre Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPreRemove()
+	 * @generated
+	 * @ordered
+	 */
+	protected PreRemove preRemove;
+
+	/**
+	 * The cached value of the '{@link #getPostRemove() <em>Post Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostRemove()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostRemove postRemove;
+
+	/**
+	 * The cached value of the '{@link #getPreUpdate() <em>Pre Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPreUpdate()
+	 * @generated
+	 * @ordered
+	 */
+	protected PreUpdate preUpdate;
+
+	/**
+	 * The cached value of the '{@link #getPostUpdate() <em>Post Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostUpdate()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostUpdate postUpdate;
+
+	/**
+	 * The cached value of the '{@link #getPostLoad() <em>Post Load</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPostLoad()
+	 * @generated
+	 * @ordered
+	 */
+	protected PostLoad postLoad;
+
+	/**
+	 * The cached value of the '{@link #getAttributeOverrides() <em>Attribute Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAttributeOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAttributeOverride> attributeOverrides;
+
+	/**
+	 * The cached value of the '{@link #getAssociationOverrides() <em>Association Overrides</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAssociationOverrides()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlAssociationOverride> associationOverrides;
+
+	/**
+	 * The default value of the '{@link #getCacheable() <em>Cacheable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCacheable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean CACHEABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getCacheable() <em>Cacheable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCacheable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean cacheable = CACHEABLE_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getIdClass() <em>Id Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getIdClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlClassReference idClass;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getTable() <em>Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlTable table;
+
+	/**
+	 * The cached value of the '{@link #getSecondaryTables() <em>Secondary Tables</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSecondaryTables()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlSecondaryTable> secondaryTables;
+
+	/**
+	 * The cached value of the '{@link #getPrimaryKeyJoinColumns() <em>Primary Key Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrimaryKeyJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns;
+
+	/**
+	 * The cached value of the '{@link #getInheritance() <em>Inheritance</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInheritance()
+	 * @generated
+	 * @ordered
+	 */
+	protected Inheritance inheritance;
+
+	/**
+	 * The default value of the '{@link #getDiscriminatorValue() <em>Discriminator Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDiscriminatorValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DISCRIMINATOR_VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDiscriminatorValue() <em>Discriminator Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDiscriminatorValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected String discriminatorValue = DISCRIMINATOR_VALUE_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getDiscriminatorColumn() <em>Discriminator Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDiscriminatorColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlDiscriminatorColumn discriminatorColumn;
+
+	/**
+	 * The cached value of the '{@link #getSqlResultSetMappings() <em>Sql Result Set Mappings</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSqlResultSetMappings()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<SqlResultSetMapping> sqlResultSetMappings;
+
+	/**
+	 * The default value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeDefaultListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean EXCLUDE_DEFAULT_LISTENERS_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeDefaultListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean excludeDefaultListeners = EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeSuperclassListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeSuperclassListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean excludeSuperclassListeners = EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected EntityListeners entityListeners;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlEntity()
+	{
+		super();
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.ENTITY_TYPE_MAPPING_KEY;
+	}
+
+	public XmlEntityMappings entityMappings() {
+		return (XmlEntityMappings) eContainer();
+	}
+	
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ENTITY;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table</em>' containment reference.
+	 * @see #setTable(XmlTable)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_Table()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlTable getTable()
+	{
+		return table;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetTable(XmlTable newTable, NotificationChain msgs)
+	{
+		XmlTable oldTable = table;
+		table = newTable;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE, oldTable, newTable);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getTable <em>Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Table</em>' containment reference.
+	 * @see #getTable()
+	 * @generated
+	 */
+	public void setTable(XmlTable newTable)
+	{
+		if (newTable != table)
+		{
+			NotificationChain msgs = null;
+			if (table != null)
+				msgs = ((InternalEObject)table).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE, null, msgs);
+			if (newTable != null)
+				msgs = ((InternalEObject)newTable).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE, null, msgs);
+			msgs = basicSetTable(newTable, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE, newTable, newTable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Secondary Tables</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlSecondaryTable}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Secondary Tables</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Secondary Tables</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_SecondaryTables()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlSecondaryTable> getSecondaryTables()
+	{
+		if (secondaryTables == null)
+		{
+			secondaryTables = new EObjectContainmentEList<XmlSecondaryTable>(XmlSecondaryTable.class, this, OrmPackage.XML_ENTITY__SECONDARY_TABLES);
+		}
+		return secondaryTables;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_PrimaryKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
+	{
+		if (primaryKeyJoinColumns == null)
+		{
+			primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS);
+		}
+		return primaryKeyJoinColumns;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Id Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Id Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Id Class</em>' containment reference.
+	 * @see #setIdClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlIdClassContainer_IdClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlClassReference getIdClass()
+	{
+		return idClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetIdClass(XmlClassReference newIdClass, NotificationChain msgs)
+	{
+		XmlClassReference oldIdClass = idClass;
+		idClass = newIdClass;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ID_CLASS, oldIdClass, newIdClass);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getIdClass <em>Id Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Id Class</em>' containment reference.
+	 * @see #getIdClass()
+	 * @generated
+	 */
+	public void setIdClass(XmlClassReference newIdClass)
+	{
+		if (newIdClass != idClass)
+		{
+			NotificationChain msgs = null;
+			if (idClass != null)
+				msgs = ((InternalEObject)idClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ID_CLASS, null, msgs);
+			if (newIdClass != null)
+				msgs = ((InternalEObject)newIdClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ID_CLASS, null, msgs);
+			msgs = basicSetIdClass(newIdClass, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ID_CLASS, newIdClass, newIdClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Inheritance</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Inheritance</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Inheritance</em>' containment reference.
+	 * @see #setInheritance(Inheritance)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_Inheritance()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public Inheritance getInheritance()
+	{
+		return inheritance;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetInheritance(Inheritance newInheritance, NotificationChain msgs)
+	{
+		Inheritance oldInheritance = inheritance;
+		inheritance = newInheritance;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__INHERITANCE, oldInheritance, newInheritance);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getInheritance <em>Inheritance</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Inheritance</em>' containment reference.
+	 * @see #getInheritance()
+	 * @generated
+	 */
+	public void setInheritance(Inheritance newInheritance)
+	{
+		if (newInheritance != inheritance)
+		{
+			NotificationChain msgs = null;
+			if (inheritance != null)
+				msgs = ((InternalEObject)inheritance).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__INHERITANCE, null, msgs);
+			if (newInheritance != null)
+				msgs = ((InternalEObject)newInheritance).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__INHERITANCE, null, msgs);
+			msgs = basicSetInheritance(newInheritance, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__INHERITANCE, newInheritance, newInheritance));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Discriminator Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Discriminator Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Discriminator Value</em>' attribute.
+	 * @see #setDiscriminatorValue(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_DiscriminatorValue()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDiscriminatorValue()
+	{
+		return discriminatorValue;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorValue <em>Discriminator Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Discriminator Value</em>' attribute.
+	 * @see #getDiscriminatorValue()
+	 * @generated
+	 */
+	public void setDiscriminatorValue(String newDiscriminatorValue)
+	{
+		String oldDiscriminatorValue = discriminatorValue;
+		discriminatorValue = newDiscriminatorValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE, oldDiscriminatorValue, discriminatorValue));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Discriminator Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Discriminator Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Discriminator Column</em>' containment reference.
+	 * @see #setDiscriminatorColumn(XmlDiscriminatorColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_DiscriminatorColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlDiscriminatorColumn getDiscriminatorColumn()
+	{
+		return discriminatorColumn;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetDiscriminatorColumn(XmlDiscriminatorColumn newDiscriminatorColumn, NotificationChain msgs)
+	{
+		XmlDiscriminatorColumn oldDiscriminatorColumn = discriminatorColumn;
+		discriminatorColumn = newDiscriminatorColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, oldDiscriminatorColumn, newDiscriminatorColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getDiscriminatorColumn <em>Discriminator Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Discriminator Column</em>' containment reference.
+	 * @see #getDiscriminatorColumn()
+	 * @generated
+	 */
+	public void setDiscriminatorColumn(XmlDiscriminatorColumn newDiscriminatorColumn)
+	{
+		if (newDiscriminatorColumn != discriminatorColumn)
+		{
+			NotificationChain msgs = null;
+			if (discriminatorColumn != null)
+				msgs = ((InternalEObject)discriminatorColumn).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, null, msgs);
+			if (newDiscriminatorColumn != null)
+				msgs = ((InternalEObject)newDiscriminatorColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, null, msgs);
+			msgs = basicSetDiscriminatorColumn(newDiscriminatorColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN, newDiscriminatorColumn, newDiscriminatorColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sequence Generator</em>' containment reference.
+	 * @see #setSequenceGenerator(XmlSequenceGenerator)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer_SequenceGenerator()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlSequenceGenerator getSequenceGenerator()
+	{
+		return sequenceGenerator;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetSequenceGenerator(XmlSequenceGenerator newSequenceGenerator, NotificationChain msgs)
+	{
+		XmlSequenceGenerator oldSequenceGenerator = sequenceGenerator;
+		sequenceGenerator = newSequenceGenerator;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, oldSequenceGenerator, newSequenceGenerator);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
+	 * @see #getSequenceGenerator()
+	 * @generated
+	 */
+	public void setSequenceGenerator(XmlSequenceGenerator newSequenceGenerator)
+	{
+		if (newSequenceGenerator != sequenceGenerator)
+		{
+			NotificationChain msgs = null;
+			if (sequenceGenerator != null)
+				msgs = ((InternalEObject)sequenceGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, null, msgs);
+			if (newSequenceGenerator != null)
+				msgs = ((InternalEObject)newSequenceGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, null, msgs);
+			msgs = basicSetSequenceGenerator(newSequenceGenerator, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR, newSequenceGenerator, newSequenceGenerator));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table Generator</em>' containment reference.
+	 * @see #setTableGenerator(XmlTableGenerator)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer_TableGenerator()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlTableGenerator getTableGenerator()
+	{
+		return tableGenerator;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetTableGenerator(XmlTableGenerator newTableGenerator, NotificationChain msgs)
+	{
+		XmlTableGenerator oldTableGenerator = tableGenerator;
+		tableGenerator = newTableGenerator;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE_GENERATOR, oldTableGenerator, newTableGenerator);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getTableGenerator <em>Table Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Table Generator</em>' containment reference.
+	 * @see #getTableGenerator()
+	 * @generated
+	 */
+	public void setTableGenerator(XmlTableGenerator newTableGenerator)
+	{
+		if (newTableGenerator != tableGenerator)
+		{
+			NotificationChain msgs = null;
+			if (tableGenerator != null)
+				msgs = ((InternalEObject)tableGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE_GENERATOR, null, msgs);
+			if (newTableGenerator != null)
+				msgs = ((InternalEObject)newTableGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__TABLE_GENERATOR, null, msgs);
+			msgs = basicSetTableGenerator(newTableGenerator, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__TABLE_GENERATOR, newTableGenerator, newTableGenerator));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Named Queries</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Named Queries</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedQueries()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlNamedQuery> getNamedQueries()
+	{
+		if (namedQueries == null)
+		{
+			namedQueries = new EObjectContainmentEList<XmlNamedQuery>(XmlNamedQuery.class, this, OrmPackage.XML_ENTITY__NAMED_QUERIES);
+		}
+		return namedQueries;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Named Native Queries</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Named Native Queries</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedNativeQueries()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlNamedNativeQuery> getNamedNativeQueries()
+	{
+		if (namedNativeQueries == null)
+		{
+			namedNativeQueries = new EObjectContainmentEList<XmlNamedNativeQuery>(XmlNamedNativeQuery.class, this, OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES);
+		}
+		return namedNativeQueries;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sql Result Set Mappings</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sql Result Set Mappings</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_SqlResultSetMappings()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<SqlResultSetMapping> getSqlResultSetMappings()
+	{
+		if (sqlResultSetMappings == null)
+		{
+			sqlResultSetMappings = new EObjectContainmentEList<SqlResultSetMapping>(SqlResultSetMapping.class, this, OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS);
+		}
+		return sqlResultSetMappings;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Exclude Default Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Exclude Default Listeners</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Exclude Default Listeners</em>' attribute.
+	 * @see #setExcludeDefaultListeners(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_ExcludeDefaultListeners()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isExcludeDefaultListeners()
+	{
+		return excludeDefaultListeners;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Exclude Default Listeners</em>' attribute.
+	 * @see #isExcludeDefaultListeners()
+	 * @generated
+	 */
+	public void setExcludeDefaultListeners(boolean newExcludeDefaultListeners)
+	{
+		boolean oldExcludeDefaultListeners = excludeDefaultListeners;
+		excludeDefaultListeners = newExcludeDefaultListeners;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS, oldExcludeDefaultListeners, excludeDefaultListeners));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Exclude Superclass Listeners</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Exclude Superclass Listeners</em>' attribute.
+	 * @see #setExcludeSuperclassListeners(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_ExcludeSuperclassListeners()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isExcludeSuperclassListeners()
+	{
+		return excludeSuperclassListeners;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Exclude Superclass Listeners</em>' attribute.
+	 * @see #isExcludeSuperclassListeners()
+	 * @generated
+	 */
+	public void setExcludeSuperclassListeners(boolean newExcludeSuperclassListeners)
+	{
+		boolean oldExcludeSuperclassListeners = excludeSuperclassListeners;
+		excludeSuperclassListeners = newExcludeSuperclassListeners;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS, oldExcludeSuperclassListeners, excludeSuperclassListeners));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entity Listeners</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entity Listeners</em>' containment reference.
+	 * @see #setEntityListeners(EntityListeners)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntity_EntityListeners()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EntityListeners getEntityListeners()
+	{
+		return entityListeners;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetEntityListeners(EntityListeners newEntityListeners, NotificationChain msgs)
+	{
+		EntityListeners oldEntityListeners = entityListeners;
+		entityListeners = newEntityListeners;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ENTITY_LISTENERS, oldEntityListeners, newEntityListeners);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getEntityListeners <em>Entity Listeners</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Entity Listeners</em>' containment reference.
+	 * @see #getEntityListeners()
+	 * @generated
+	 */
+	public void setEntityListeners(EntityListeners newEntityListeners)
+	{
+		if (newEntityListeners != entityListeners)
+		{
+			NotificationChain msgs = null;
+			if (entityListeners != null)
+				msgs = ((InternalEObject)entityListeners).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ENTITY_LISTENERS, null, msgs);
+			if (newEntityListeners != null)
+				msgs = ((InternalEObject)newEntityListeners).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__ENTITY_LISTENERS, null, msgs);
+			msgs = basicSetEntityListeners(newEntityListeners, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__ENTITY_LISTENERS, newEntityListeners, newEntityListeners));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pre Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Persist</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Persist</em>' containment reference.
+	 * @see #setPrePersist(PrePersist)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PrePersist()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PrePersist getPrePersist()
+	{
+		return prePersist;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPrePersist(PrePersist newPrePersist, NotificationChain msgs)
+	{
+		PrePersist oldPrePersist = prePersist;
+		prePersist = newPrePersist;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_PERSIST, oldPrePersist, newPrePersist);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPrePersist <em>Pre Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Persist</em>' containment reference.
+	 * @see #getPrePersist()
+	 * @generated
+	 */
+	public void setPrePersist(PrePersist newPrePersist)
+	{
+		if (newPrePersist != prePersist)
+		{
+			NotificationChain msgs = null;
+			if (prePersist != null)
+				msgs = ((InternalEObject)prePersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_PERSIST, null, msgs);
+			if (newPrePersist != null)
+				msgs = ((InternalEObject)newPrePersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_PERSIST, null, msgs);
+			msgs = basicSetPrePersist(newPrePersist, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_PERSIST, newPrePersist, newPrePersist));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Persist</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Persist</em>' containment reference.
+	 * @see #setPostPersist(PostPersist)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostPersist()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostPersist getPostPersist()
+	{
+		return postPersist;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostPersist(PostPersist newPostPersist, NotificationChain msgs)
+	{
+		PostPersist oldPostPersist = postPersist;
+		postPersist = newPostPersist;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_PERSIST, oldPostPersist, newPostPersist);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPostPersist <em>Post Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Persist</em>' containment reference.
+	 * @see #getPostPersist()
+	 * @generated
+	 */
+	public void setPostPersist(PostPersist newPostPersist)
+	{
+		if (newPostPersist != postPersist)
+		{
+			NotificationChain msgs = null;
+			if (postPersist != null)
+				msgs = ((InternalEObject)postPersist).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_PERSIST, null, msgs);
+			if (newPostPersist != null)
+				msgs = ((InternalEObject)newPostPersist).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_PERSIST, null, msgs);
+			msgs = basicSetPostPersist(newPostPersist, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_PERSIST, newPostPersist, newPostPersist));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pre Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Remove</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Remove</em>' containment reference.
+	 * @see #setPreRemove(PreRemove)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreRemove()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PreRemove getPreRemove()
+	{
+		return preRemove;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPreRemove(PreRemove newPreRemove, NotificationChain msgs)
+	{
+		PreRemove oldPreRemove = preRemove;
+		preRemove = newPreRemove;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_REMOVE, oldPreRemove, newPreRemove);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPreRemove <em>Pre Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Remove</em>' containment reference.
+	 * @see #getPreRemove()
+	 * @generated
+	 */
+	public void setPreRemove(PreRemove newPreRemove)
+	{
+		if (newPreRemove != preRemove)
+		{
+			NotificationChain msgs = null;
+			if (preRemove != null)
+				msgs = ((InternalEObject)preRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_REMOVE, null, msgs);
+			if (newPreRemove != null)
+				msgs = ((InternalEObject)newPreRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_REMOVE, null, msgs);
+			msgs = basicSetPreRemove(newPreRemove, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_REMOVE, newPreRemove, newPreRemove));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Remove</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Remove</em>' containment reference.
+	 * @see #setPostRemove(PostRemove)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostRemove()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostRemove getPostRemove()
+	{
+		return postRemove;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostRemove(PostRemove newPostRemove, NotificationChain msgs)
+	{
+		PostRemove oldPostRemove = postRemove;
+		postRemove = newPostRemove;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_REMOVE, oldPostRemove, newPostRemove);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPostRemove <em>Post Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Remove</em>' containment reference.
+	 * @see #getPostRemove()
+	 * @generated
+	 */
+	public void setPostRemove(PostRemove newPostRemove)
+	{
+		if (newPostRemove != postRemove)
+		{
+			NotificationChain msgs = null;
+			if (postRemove != null)
+				msgs = ((InternalEObject)postRemove).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_REMOVE, null, msgs);
+			if (newPostRemove != null)
+				msgs = ((InternalEObject)newPostRemove).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_REMOVE, null, msgs);
+			msgs = basicSetPostRemove(newPostRemove, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_REMOVE, newPostRemove, newPostRemove));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pre Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Update</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Update</em>' containment reference.
+	 * @see #setPreUpdate(PreUpdate)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreUpdate()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PreUpdate getPreUpdate()
+	{
+		return preUpdate;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPreUpdate(PreUpdate newPreUpdate, NotificationChain msgs)
+	{
+		PreUpdate oldPreUpdate = preUpdate;
+		preUpdate = newPreUpdate;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_UPDATE, oldPreUpdate, newPreUpdate);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPreUpdate <em>Pre Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Update</em>' containment reference.
+	 * @see #getPreUpdate()
+	 * @generated
+	 */
+	public void setPreUpdate(PreUpdate newPreUpdate)
+	{
+		if (newPreUpdate != preUpdate)
+		{
+			NotificationChain msgs = null;
+			if (preUpdate != null)
+				msgs = ((InternalEObject)preUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_UPDATE, null, msgs);
+			if (newPreUpdate != null)
+				msgs = ((InternalEObject)newPreUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__PRE_UPDATE, null, msgs);
+			msgs = basicSetPreUpdate(newPreUpdate, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__PRE_UPDATE, newPreUpdate, newPreUpdate));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Update</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Update</em>' containment reference.
+	 * @see #setPostUpdate(PostUpdate)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostUpdate()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostUpdate getPostUpdate()
+	{
+		return postUpdate;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostUpdate(PostUpdate newPostUpdate, NotificationChain msgs)
+	{
+		PostUpdate oldPostUpdate = postUpdate;
+		postUpdate = newPostUpdate;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_UPDATE, oldPostUpdate, newPostUpdate);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPostUpdate <em>Post Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Update</em>' containment reference.
+	 * @see #getPostUpdate()
+	 * @generated
+	 */
+	public void setPostUpdate(PostUpdate newPostUpdate)
+	{
+		if (newPostUpdate != postUpdate)
+		{
+			NotificationChain msgs = null;
+			if (postUpdate != null)
+				msgs = ((InternalEObject)postUpdate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_UPDATE, null, msgs);
+			if (newPostUpdate != null)
+				msgs = ((InternalEObject)newPostUpdate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_UPDATE, null, msgs);
+			msgs = basicSetPostUpdate(newPostUpdate, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_UPDATE, newPostUpdate, newPostUpdate));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Post Load</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Load</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Load</em>' containment reference.
+	 * @see #setPostLoad(PostLoad)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostLoad()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public PostLoad getPostLoad()
+	{
+		return postLoad;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPostLoad(PostLoad newPostLoad, NotificationChain msgs)
+	{
+		PostLoad oldPostLoad = postLoad;
+		postLoad = newPostLoad;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_LOAD, oldPostLoad, newPostLoad);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getPostLoad <em>Post Load</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Load</em>' containment reference.
+	 * @see #getPostLoad()
+	 * @generated
+	 */
+	public void setPostLoad(PostLoad newPostLoad)
+	{
+		if (newPostLoad != postLoad)
+		{
+			NotificationChain msgs = null;
+			if (postLoad != null)
+				msgs = ((InternalEObject)postLoad).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_LOAD, null, msgs);
+			if (newPostLoad != null)
+				msgs = ((InternalEObject)newPostLoad).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY__POST_LOAD, null, msgs);
+			msgs = basicSetPostLoad(newPostLoad, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__POST_LOAD, newPostLoad, newPostLoad));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAttributeOverrideContainer_AttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAttributeOverride> getAttributeOverrides()
+	{
+		if (attributeOverrides == null)
+		{
+			attributeOverrides = new EObjectContainmentEList<XmlAttributeOverride>(XmlAttributeOverride.class, this, OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES);
+		}
+		return attributeOverrides;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAssociationOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Association Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Association Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAssociationOverrideContainer_AssociationOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlAssociationOverride> getAssociationOverrides()
+	{
+		if (associationOverrides == null)
+		{
+			associationOverrides = new EObjectContainmentEList<XmlAssociationOverride>(XmlAssociationOverride.class, this, OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES);
+		}
+		return associationOverrides;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cacheable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cacheable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cacheable</em>' attribute.
+	 * @see #setCacheable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlCacheable_2_0_Cacheable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getCacheable()
+	{
+		return cacheable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntity#getCacheable <em>Cacheable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cacheable</em>' attribute.
+	 * @see #getCacheable()
+	 * @generated
+	 */
+	public void setCacheable(Boolean newCacheable)
+	{
+		Boolean oldCacheable = cacheable;
+		cacheable = newCacheable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY__CACHEABLE, oldCacheable, cacheable));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY__NAMED_QUERIES:
+				return ((InternalEList<?>)getNamedQueries()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
+				return ((InternalEList<?>)getNamedNativeQueries()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
+				return basicSetSequenceGenerator(null, msgs);
+			case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
+				return basicSetTableGenerator(null, msgs);
+			case OrmPackage.XML_ENTITY__PRE_PERSIST:
+				return basicSetPrePersist(null, msgs);
+			case OrmPackage.XML_ENTITY__POST_PERSIST:
+				return basicSetPostPersist(null, msgs);
+			case OrmPackage.XML_ENTITY__PRE_REMOVE:
+				return basicSetPreRemove(null, msgs);
+			case OrmPackage.XML_ENTITY__POST_REMOVE:
+				return basicSetPostRemove(null, msgs);
+			case OrmPackage.XML_ENTITY__PRE_UPDATE:
+				return basicSetPreUpdate(null, msgs);
+			case OrmPackage.XML_ENTITY__POST_UPDATE:
+				return basicSetPostUpdate(null, msgs);
+			case OrmPackage.XML_ENTITY__POST_LOAD:
+				return basicSetPostLoad(null, msgs);
+			case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
+				return ((InternalEList<?>)getAttributeOverrides()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
+				return ((InternalEList<?>)getAssociationOverrides()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__ID_CLASS:
+				return basicSetIdClass(null, msgs);
+			case OrmPackage.XML_ENTITY__TABLE:
+				return basicSetTable(null, msgs);
+			case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
+				return ((InternalEList<?>)getSecondaryTables()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
+				return ((InternalEList<?>)getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__INHERITANCE:
+				return basicSetInheritance(null, msgs);
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
+				return basicSetDiscriminatorColumn(null, msgs);
+			case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
+				return ((InternalEList<?>)getSqlResultSetMappings()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
+				return basicSetEntityListeners(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY__NAMED_QUERIES:
+				return getNamedQueries();
+			case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
+				return getNamedNativeQueries();
+			case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
+				return getSequenceGenerator();
+			case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
+				return getTableGenerator();
+			case OrmPackage.XML_ENTITY__PRE_PERSIST:
+				return getPrePersist();
+			case OrmPackage.XML_ENTITY__POST_PERSIST:
+				return getPostPersist();
+			case OrmPackage.XML_ENTITY__PRE_REMOVE:
+				return getPreRemove();
+			case OrmPackage.XML_ENTITY__POST_REMOVE:
+				return getPostRemove();
+			case OrmPackage.XML_ENTITY__PRE_UPDATE:
+				return getPreUpdate();
+			case OrmPackage.XML_ENTITY__POST_UPDATE:
+				return getPostUpdate();
+			case OrmPackage.XML_ENTITY__POST_LOAD:
+				return getPostLoad();
+			case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
+				return getAttributeOverrides();
+			case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
+				return getAssociationOverrides();
+			case OrmPackage.XML_ENTITY__CACHEABLE:
+				return getCacheable();
+			case OrmPackage.XML_ENTITY__ID_CLASS:
+				return getIdClass();
+			case OrmPackage.XML_ENTITY__NAME:
+				return getName();
+			case OrmPackage.XML_ENTITY__TABLE:
+				return getTable();
+			case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
+				return getSecondaryTables();
+			case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
+				return getPrimaryKeyJoinColumns();
+			case OrmPackage.XML_ENTITY__INHERITANCE:
+				return getInheritance();
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
+				return getDiscriminatorValue();
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
+				return getDiscriminatorColumn();
+			case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
+				return getSqlResultSetMappings();
+			case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
+				return isExcludeDefaultListeners();
+			case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
+				return isExcludeSuperclassListeners();
+			case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
+				return getEntityListeners();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY__NAMED_QUERIES:
+				getNamedQueries().clear();
+				getNamedQueries().addAll((Collection<? extends XmlNamedQuery>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
+				getNamedNativeQueries().clear();
+				getNamedNativeQueries().addAll((Collection<? extends XmlNamedNativeQuery>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
+				setSequenceGenerator((XmlSequenceGenerator)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
+				setTableGenerator((XmlTableGenerator)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__PRE_PERSIST:
+				setPrePersist((PrePersist)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__POST_PERSIST:
+				setPostPersist((PostPersist)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__PRE_REMOVE:
+				setPreRemove((PreRemove)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__POST_REMOVE:
+				setPostRemove((PostRemove)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__PRE_UPDATE:
+				setPreUpdate((PreUpdate)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__POST_UPDATE:
+				setPostUpdate((PostUpdate)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__POST_LOAD:
+				setPostLoad((PostLoad)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
+				getAttributeOverrides().clear();
+				getAttributeOverrides().addAll((Collection<? extends XmlAttributeOverride>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
+				getAssociationOverrides().clear();
+				getAssociationOverrides().addAll((Collection<? extends XmlAssociationOverride>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__CACHEABLE:
+				setCacheable((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__ID_CLASS:
+				setIdClass((XmlClassReference)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__TABLE:
+				setTable((XmlTable)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
+				getSecondaryTables().clear();
+				getSecondaryTables().addAll((Collection<? extends XmlSecondaryTable>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
+				getPrimaryKeyJoinColumns().clear();
+				getPrimaryKeyJoinColumns().addAll((Collection<? extends XmlPrimaryKeyJoinColumn>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__INHERITANCE:
+				setInheritance((Inheritance)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
+				setDiscriminatorValue((String)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
+				setDiscriminatorColumn((XmlDiscriminatorColumn)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
+				getSqlResultSetMappings().clear();
+				getSqlResultSetMappings().addAll((Collection<? extends SqlResultSetMapping>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
+				setExcludeDefaultListeners((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
+				setExcludeSuperclassListeners((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
+				setEntityListeners((EntityListeners)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY__NAMED_QUERIES:
+				getNamedQueries().clear();
+				return;
+			case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
+				getNamedNativeQueries().clear();
+				return;
+			case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
+				setSequenceGenerator((XmlSequenceGenerator)null);
+				return;
+			case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
+				setTableGenerator((XmlTableGenerator)null);
+				return;
+			case OrmPackage.XML_ENTITY__PRE_PERSIST:
+				setPrePersist((PrePersist)null);
+				return;
+			case OrmPackage.XML_ENTITY__POST_PERSIST:
+				setPostPersist((PostPersist)null);
+				return;
+			case OrmPackage.XML_ENTITY__PRE_REMOVE:
+				setPreRemove((PreRemove)null);
+				return;
+			case OrmPackage.XML_ENTITY__POST_REMOVE:
+				setPostRemove((PostRemove)null);
+				return;
+			case OrmPackage.XML_ENTITY__PRE_UPDATE:
+				setPreUpdate((PreUpdate)null);
+				return;
+			case OrmPackage.XML_ENTITY__POST_UPDATE:
+				setPostUpdate((PostUpdate)null);
+				return;
+			case OrmPackage.XML_ENTITY__POST_LOAD:
+				setPostLoad((PostLoad)null);
+				return;
+			case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
+				getAttributeOverrides().clear();
+				return;
+			case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
+				getAssociationOverrides().clear();
+				return;
+			case OrmPackage.XML_ENTITY__CACHEABLE:
+				setCacheable(CACHEABLE_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY__ID_CLASS:
+				setIdClass((XmlClassReference)null);
+				return;
+			case OrmPackage.XML_ENTITY__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY__TABLE:
+				setTable((XmlTable)null);
+				return;
+			case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
+				getSecondaryTables().clear();
+				return;
+			case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
+				getPrimaryKeyJoinColumns().clear();
+				return;
+			case OrmPackage.XML_ENTITY__INHERITANCE:
+				setInheritance((Inheritance)null);
+				return;
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
+				setDiscriminatorValue(DISCRIMINATOR_VALUE_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
+				setDiscriminatorColumn((XmlDiscriminatorColumn)null);
+				return;
+			case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
+				getSqlResultSetMappings().clear();
+				return;
+			case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
+				setExcludeDefaultListeners(EXCLUDE_DEFAULT_LISTENERS_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
+				setExcludeSuperclassListeners(EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
+				setEntityListeners((EntityListeners)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY__NAMED_QUERIES:
+				return namedQueries != null && !namedQueries.isEmpty();
+			case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES:
+				return namedNativeQueries != null && !namedNativeQueries.isEmpty();
+			case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR:
+				return sequenceGenerator != null;
+			case OrmPackage.XML_ENTITY__TABLE_GENERATOR:
+				return tableGenerator != null;
+			case OrmPackage.XML_ENTITY__PRE_PERSIST:
+				return prePersist != null;
+			case OrmPackage.XML_ENTITY__POST_PERSIST:
+				return postPersist != null;
+			case OrmPackage.XML_ENTITY__PRE_REMOVE:
+				return preRemove != null;
+			case OrmPackage.XML_ENTITY__POST_REMOVE:
+				return postRemove != null;
+			case OrmPackage.XML_ENTITY__PRE_UPDATE:
+				return preUpdate != null;
+			case OrmPackage.XML_ENTITY__POST_UPDATE:
+				return postUpdate != null;
+			case OrmPackage.XML_ENTITY__POST_LOAD:
+				return postLoad != null;
+			case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES:
+				return attributeOverrides != null && !attributeOverrides.isEmpty();
+			case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES:
+				return associationOverrides != null && !associationOverrides.isEmpty();
+			case OrmPackage.XML_ENTITY__CACHEABLE:
+				return CACHEABLE_EDEFAULT == null ? cacheable != null : !CACHEABLE_EDEFAULT.equals(cacheable);
+			case OrmPackage.XML_ENTITY__ID_CLASS:
+				return idClass != null;
+			case OrmPackage.XML_ENTITY__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_ENTITY__TABLE:
+				return table != null;
+			case OrmPackage.XML_ENTITY__SECONDARY_TABLES:
+				return secondaryTables != null && !secondaryTables.isEmpty();
+			case OrmPackage.XML_ENTITY__PRIMARY_KEY_JOIN_COLUMNS:
+				return primaryKeyJoinColumns != null && !primaryKeyJoinColumns.isEmpty();
+			case OrmPackage.XML_ENTITY__INHERITANCE:
+				return inheritance != null;
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_VALUE:
+				return DISCRIMINATOR_VALUE_EDEFAULT == null ? discriminatorValue != null : !DISCRIMINATOR_VALUE_EDEFAULT.equals(discriminatorValue);
+			case OrmPackage.XML_ENTITY__DISCRIMINATOR_COLUMN:
+				return discriminatorColumn != null;
+			case OrmPackage.XML_ENTITY__SQL_RESULT_SET_MAPPINGS:
+				return sqlResultSetMappings != null && !sqlResultSetMappings.isEmpty();
+			case OrmPackage.XML_ENTITY__EXCLUDE_DEFAULT_LISTENERS:
+				return excludeDefaultListeners != EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
+			case OrmPackage.XML_ENTITY__EXCLUDE_SUPERCLASS_LISTENERS:
+				return excludeSuperclassListeners != EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
+			case OrmPackage.XML_ENTITY__ENTITY_LISTENERS:
+				return entityListeners != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlQueryContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__NAMED_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES;
+				case OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlGeneratorContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR;
+				case OrmPackage.XML_ENTITY__TABLE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlEventMethodContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__PRE_PERSIST: return OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_PERSIST;
+				case OrmPackage.XML_ENTITY__POST_PERSIST: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_PERSIST;
+				case OrmPackage.XML_ENTITY__PRE_REMOVE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_REMOVE;
+				case OrmPackage.XML_ENTITY__POST_REMOVE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_REMOVE;
+				case OrmPackage.XML_ENTITY__PRE_UPDATE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_UPDATE;
+				case OrmPackage.XML_ENTITY__POST_UPDATE: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_UPDATE;
+				case OrmPackage.XML_ENTITY__POST_LOAD: return OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_LOAD;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAttributeOverrideContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAssociationOverrideContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlCacheable_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__CACHEABLE: return OrmV2_0Package.XML_CACHEABLE_20__CACHEABLE;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlEntity_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlIdClassContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY__ID_CLASS: return OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlQueryContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES: return OrmPackage.XML_ENTITY__NAMED_QUERIES;
+				case OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES: return OrmPackage.XML_ENTITY__NAMED_NATIVE_QUERIES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlGeneratorContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR: return OrmPackage.XML_ENTITY__SEQUENCE_GENERATOR;
+				case OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR: return OrmPackage.XML_ENTITY__TABLE_GENERATOR;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlEventMethodContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_PERSIST: return OrmPackage.XML_ENTITY__PRE_PERSIST;
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_PERSIST: return OrmPackage.XML_ENTITY__POST_PERSIST;
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_REMOVE: return OrmPackage.XML_ENTITY__PRE_REMOVE;
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_REMOVE: return OrmPackage.XML_ENTITY__POST_REMOVE;
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__PRE_UPDATE: return OrmPackage.XML_ENTITY__PRE_UPDATE;
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_UPDATE: return OrmPackage.XML_ENTITY__POST_UPDATE;
+				case OrmPackage.XML_EVENT_METHOD_CONTAINER__POST_LOAD: return OrmPackage.XML_ENTITY__POST_LOAD;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAttributeOverrideContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ATTRIBUTE_OVERRIDE_CONTAINER__ATTRIBUTE_OVERRIDES: return OrmPackage.XML_ENTITY__ATTRIBUTE_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAssociationOverrideContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES: return OrmPackage.XML_ENTITY__ASSOCIATION_OVERRIDES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlCacheable_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_CACHEABLE_20__CACHEABLE: return OrmPackage.XML_ENTITY__CACHEABLE;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlEntity_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlIdClassContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS: return OrmPackage.XML_ENTITY__ID_CLASS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (cacheable: ");
+		result.append(cacheable);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", discriminatorValue: ");
+		result.append(discriminatorValue);
+		result.append(", excludeDefaultListeners: ");
+		result.append(excludeDefaultListeners);
+		result.append(", excludeSuperclassListeners: ");
+		result.append(excludeSuperclassListeners);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getDiscriminatorValueTextRange() {
+		return getElementTextRange(JPA.DISCRIMINATOR_VALUE);
+	}
+	
+	public TextRange getInheritanceStrategyTextRange() {
+		return getInheritance() != null ? getInheritance().getStrategyTextRange() : getValidationTextRange();
+	}
+	
+	public TextRange getCacheableTextRange() {
+		return getAttributeTextRange(JPA2_0.CACHEABLE);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildClassTranslator(),
+			buildAccessTranslator(),
+			buildCacheableTranslator(),
+			buildMetadataCompleteTranslator(),
+			buildDescriptionTranslator(),
+			buildTableTranslator(),
+			buildSecondaryTableTranslator(),
+			buildPrimaryKeyJoinColumnTranslator(),
+			buildIdClassTranslator(),
+			buildInheritanceTranslator(),
+			buildDiscriminatorValueTranslator(),
+			buildDiscriminatorColumnTranslator(),
+			buildSequenceGeneratorTranslator(),
+			buildTableGeneratorTranslator(),
+			buildNamedQueryTranslator(),
+			buildNamedNativeQueryTranslator(),
+			buildSqlResultSetMappingTranslator(),
+			buildExcludeDefaultListenersTranslator(),
+			buildExcludeSuperclassListenersTranslator(),
+			buildEntityListenersTranslator(),
+			PrePersist.buildTranslator(),
+			PostPersist.buildTranslator(),
+			PreRemove.buildTranslator(),
+			PostRemove.buildTranslator(),
+			PreUpdate.buildTranslator(),
+			PostUpdate.buildTranslator(),
+			PostLoad.buildTranslator(),
+			buildAttributeOverrideTranslator(),
+			buildAssociationOverrideTranslator(),
+			Attributes.buildTranslator()
+		};
+	}
+
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlEntity_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildAccessTranslator() {
+		return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildCacheableTranslator() {
+		return new Translator(JPA2_0.CACHEABLE, OrmV2_0Package.eINSTANCE.getXmlCacheable_2_0_Cacheable(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildTableTranslator() {
+		return XmlTable.buildTranslator(JPA.TABLE, OrmPackage.eINSTANCE.getXmlEntity_Table());
+	}
+	
+	protected static Translator buildSecondaryTableTranslator() {
+		return XmlSecondaryTable.buildTranslator(JPA.SECONDARY_TABLE, OrmPackage.eINSTANCE.getXmlEntity_SecondaryTables());
+	}	
+	
+	protected static Translator buildPrimaryKeyJoinColumnTranslator() {
+		return XmlPrimaryKeyJoinColumn.buildTranslator(JPA.PRIMARY_KEY_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlEntity_PrimaryKeyJoinColumns());
+	}
+	
+	protected static Translator buildIdClassTranslator() {
+		return XmlClassReference.buildTranslator(JPA.ID_CLASS, OrmPackage.eINSTANCE.getXmlIdClassContainer_IdClass());
+	}
+	
+	protected static Translator buildInheritanceTranslator() {
+		return Inheritance.buildTranslator(JPA.INHERITANCE, OrmPackage.eINSTANCE.getXmlEntity_Inheritance());
+	}
+	
+	protected static Translator buildDiscriminatorValueTranslator() {
+		return new Translator(JPA.DISCRIMINATOR_VALUE, OrmPackage.eINSTANCE.getXmlEntity_DiscriminatorValue());
+	}
+	
+	protected static Translator buildDiscriminatorColumnTranslator() {
+		return XmlDiscriminatorColumn.buildTranslator(JPA.DISCRIMINATOR_COLUMN, OrmPackage.eINSTANCE.getXmlEntity_DiscriminatorColumn());
+	}
+	
+	protected static Translator buildSequenceGeneratorTranslator() {
+		return XmlSequenceGenerator.buildTranslator(JPA.SEQUENCE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_SequenceGenerator());
+	}
+	
+	protected static Translator buildTableGeneratorTranslator() {
+		return XmlTableGenerator.buildTranslator(JPA.TABLE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_TableGenerator());
+	}
+	
+	protected static Translator buildNamedQueryTranslator() {
+		return XmlNamedQuery.buildTranslator(JPA.NAMED_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedQueries());
+	}
+	
+	protected static Translator buildNamedNativeQueryTranslator() {
+		return XmlNamedNativeQuery.buildTranslator(JPA.NAMED_NATIVE_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedNativeQueries());
+	}
+	
+	protected static Translator buildSqlResultSetMappingTranslator() {
+		return SqlResultSetMapping.buildTranslator(JPA.SQL_RESULT_SET_MAPPING, OrmPackage.eINSTANCE.getXmlEntity_SqlResultSetMappings());
+	}
+	
+	protected static Translator buildExcludeDefaultListenersTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.EXCLUDE_DEFAULT_LISTENERS, OrmPackage.eINSTANCE.getXmlEntity_ExcludeDefaultListeners());
+	}
+	
+	protected static Translator buildExcludeSuperclassListenersTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.EXCLUDE_SUPERCLASS_LISTENERS, OrmPackage.eINSTANCE.getXmlEntity_ExcludeSuperclassListeners());
+	}
+	
+	protected static Translator buildEntityListenersTranslator() {
+		return EntityListeners.buildTranslator(JPA.ENTITY_LISTENERS, OrmPackage.eINSTANCE.getXmlEntity_EntityListeners());
+	}
+
+	protected static Translator buildPrePersistTranslator() {
+		return PrePersist.buildTranslator();
+	}
+
+	protected static Translator buildPostPersistTranslator() {
+		return PostPersist.buildTranslator();
+	}
+
+	protected static Translator buildPreRemoveTranslator() {
+		return PreRemove.buildTranslator();
+	}
+
+	protected static Translator buildPostRemoveTranslator() {
+		return PostRemove.buildTranslator();
+	}
+	
+	protected static Translator buildPreUpdateTranslator() {
+		return PreUpdate.buildTranslator();
+	}
+	
+	protected static Translator buildPostUpdateTranslator() {
+		return PostUpdate.buildTranslator();
+	}
+
+	protected static Translator buildPostLoadTranslator() {
+		return PostLoad.buildTranslator();
+	}
+		
+	protected static Translator buildAttributeOverrideTranslator() {
+		return XmlAttributeOverride.buildTranslator(JPA.ATTRIBUTE_OVERRIDE, OrmPackage.eINSTANCE.getXmlAttributeOverrideContainer_AttributeOverrides());
+	}
+	
+	protected static Translator buildAssociationOverrideTranslator() {
+		return XmlAssociationOverride.buildTranslator(JPA.ASSOCIATION_OVERRIDE, OrmPackage.eINSTANCE.getXmlAssociationOverrideContainer_AssociationOverrides());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEntityMappings.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEntityMappings.java
new file mode 100644
index 0000000..7afface
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEntityMappings.java
@@ -0,0 +1,1108 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleRootTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Entity Mappings</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getDescription <em>Description</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata <em>Persistence Unit Metadata</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPackage <em>Package</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSchema <em>Schema</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getCatalog <em>Catalog</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSequenceGenerators <em>Sequence Generators</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getTableGenerators <em>Table Generators</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSqlResultSetMappings <em>Sql Result Set Mappings</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getMappedSuperclasses <em>Mapped Superclasses</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getEntities <em>Entities</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getEmbeddables <em>Embeddables</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlEntityMappings extends AbstractJpaRootEObject implements XmlQueryContainer, XmlAccessHolder
+{
+	/**
+	 * The cached value of the '{@link #getNamedQueries() <em>Named Queries</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamedQueries()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlNamedQuery> namedQueries;
+
+	/**
+	 * The cached value of the '{@link #getNamedNativeQueries() <em>Named Native Queries</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamedNativeQueries()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlNamedNativeQuery> namedNativeQueries;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final AccessType ACCESS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAccess()
+	 * @generated
+	 * @ordered
+	 */
+	protected AccessType access = ACCESS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getPersistenceUnitMetadata() <em>Persistence Unit Metadata</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPersistenceUnitMetadata()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlPersistenceUnitMetadata persistenceUnitMetadata;
+
+	/**
+	 * The default value of the '{@link #getPackage() <em>Package</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPackage()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String PACKAGE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getPackage() <em>Package</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPackage()
+	 * @generated
+	 * @ordered
+	 */
+	protected String package_ = PACKAGE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCHEMA_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected String schema = SCHEMA_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CATALOG_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected String catalog = CATALOG_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getSequenceGenerators() <em>Sequence Generators</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSequenceGenerators()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlSequenceGenerator> sequenceGenerators;
+
+	/**
+	 * The cached value of the '{@link #getTableGenerators() <em>Table Generators</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTableGenerators()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlTableGenerator> tableGenerators;
+
+	/**
+	 * The cached value of the '{@link #getSqlResultSetMappings() <em>Sql Result Set Mappings</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSqlResultSetMappings()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<SqlResultSetMapping> sqlResultSetMappings;
+
+	/**
+	 * The cached value of the '{@link #getMappedSuperclasses() <em>Mapped Superclasses</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMappedSuperclasses()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlMappedSuperclass> mappedSuperclasses;
+
+	/**
+	 * The cached value of the '{@link #getEntities() <em>Entities</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntities()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlEntity> entities;
+
+	/**
+	 * The cached value of the '{@link #getEmbeddables() <em>Embeddables</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEmbeddables()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlEmbeddable> embeddables;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlEntityMappings()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ENTITY_MAPPINGS;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Named Queries</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Named Queries</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedQueries()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlNamedQuery> getNamedQueries()
+	{
+		if (namedQueries == null)
+		{
+			namedQueries = new EObjectContainmentEList<XmlNamedQuery>(XmlNamedQuery.class, this, OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES);
+		}
+		return namedQueries;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Named Native Queries</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Named Native Queries</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedNativeQueries()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlNamedNativeQuery> getNamedNativeQueries()
+	{
+		if (namedNativeQueries == null)
+		{
+			namedNativeQueries = new EObjectContainmentEList<XmlNamedNativeQuery>(XmlNamedNativeQuery.class, this, OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES);
+		}
+		return namedNativeQueries;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Persistence Unit Metadata</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>XmlPersistence Unit Metadata</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Persistence Unit Metadata</em>' containment reference.
+	 * @see #setPersistenceUnitMetadata(XmlPersistenceUnitMetadata)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_PersistenceUnitMetadata()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlPersistenceUnitMetadata getPersistenceUnitMetadata()
+	{
+		return persistenceUnitMetadata;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPersistenceUnitMetadata(XmlPersistenceUnitMetadata newPersistenceUnitMetadata, NotificationChain msgs)
+	{
+		XmlPersistenceUnitMetadata oldPersistenceUnitMetadata = persistenceUnitMetadata;
+		persistenceUnitMetadata = newPersistenceUnitMetadata;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, oldPersistenceUnitMetadata, newPersistenceUnitMetadata);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPersistenceUnitMetadata <em>Persistence Unit Metadata</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Persistence Unit Metadata</em>' containment reference.
+	 * @see #getPersistenceUnitMetadata()
+	 * @generated
+	 */
+	public void setPersistenceUnitMetadata(XmlPersistenceUnitMetadata newPersistenceUnitMetadata)
+	{
+		if (newPersistenceUnitMetadata != persistenceUnitMetadata)
+		{
+			NotificationChain msgs = null;
+			if (persistenceUnitMetadata != null)
+				msgs = ((InternalEObject)persistenceUnitMetadata).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, null, msgs);
+			if (newPersistenceUnitMetadata != null)
+				msgs = ((InternalEObject)newPersistenceUnitMetadata).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, null, msgs);
+			msgs = basicSetPersistenceUnitMetadata(newPersistenceUnitMetadata, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA, newPersistenceUnitMetadata, newPersistenceUnitMetadata));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Package</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Package</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Package</em>' attribute.
+	 * @see #setPackage(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Package()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getPackage()
+	{
+		return package_;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getPackage <em>Package</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Package</em>' attribute.
+	 * @see #getPackage()
+	 * @generated
+	 */
+	public void setPackage(String newPackage)
+	{
+		String oldPackage = package_;
+		package_ = newPackage;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE, oldPackage, package_));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema</em>' attribute.
+	 * @see #setSchema(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Schema()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getSchema()
+	{
+		return schema;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getSchema <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema</em>' attribute.
+	 * @see #getSchema()
+	 * @generated
+	 */
+	public void setSchema(String newSchema)
+	{
+		String oldSchema = schema;
+		schema = newSchema;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA, oldSchema, schema));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Catalog</em>' attribute.
+	 * @see #setCatalog(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Catalog()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getCatalog()
+	{
+		return catalog;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getCatalog <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Catalog</em>' attribute.
+	 * @see #getCatalog()
+	 * @generated
+	 */
+	public void setCatalog(String newCatalog)
+	{
+		String oldCatalog = catalog;
+		catalog = newCatalog;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__CATALOG, oldCatalog, catalog));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Access</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.AccessType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Access</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #setAccess(AccessType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
+	 * @model
+	 * @generated
+	 */
+	public AccessType getAccess()
+	{
+		return access;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEntityMappings#getAccess <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #getAccess()
+	 * @generated
+	 */
+	public void setAccess(AccessType newAccess)
+	{
+		AccessType oldAccess = access;
+		access = newAccess == null ? ACCESS_EDEFAULT : newAccess;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ENTITY_MAPPINGS__ACCESS, oldAccess, access));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Sequence Generators</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sequence Generators</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sequence Generators</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_SequenceGenerators()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlSequenceGenerator> getSequenceGenerators()
+	{
+		if (sequenceGenerators == null)
+		{
+			sequenceGenerators = new EObjectContainmentEList<XmlSequenceGenerator>(XmlSequenceGenerator.class, this, OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS);
+		}
+		return sequenceGenerators;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Table Generators</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table Generators</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table Generators</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_TableGenerators()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlTableGenerator> getTableGenerators()
+	{
+		if (tableGenerators == null)
+		{
+			tableGenerators = new EObjectContainmentEList<XmlTableGenerator>(XmlTableGenerator.class, this, OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS);
+		}
+		return tableGenerators;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Sql Result Set Mappings</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.SqlResultSetMapping}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sql Result Set Mappings</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sql Result Set Mappings</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_SqlResultSetMappings()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<SqlResultSetMapping> getSqlResultSetMappings()
+	{
+		if (sqlResultSetMappings == null)
+		{
+			sqlResultSetMappings = new EObjectContainmentEList<SqlResultSetMapping>(SqlResultSetMapping.class, this, OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS);
+		}
+		return sqlResultSetMappings;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Mapped Superclasses</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Mapped Superclasses</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Mapped Superclasses</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_MappedSuperclasses()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlMappedSuperclass> getMappedSuperclasses()
+	{
+		if (mappedSuperclasses == null)
+		{
+			mappedSuperclasses = new EObjectContainmentEList<XmlMappedSuperclass>(XmlMappedSuperclass.class, this, OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES);
+		}
+		return mappedSuperclasses;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entities</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlEntity}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entities</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entities</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Entities()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlEntity> getEntities()
+	{
+		if (entities == null)
+		{
+			entities = new EObjectContainmentEList<XmlEntity>(XmlEntity.class, this, OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES);
+		}
+		return entities;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Embeddables</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlEmbeddable}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Embeddables</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Embeddables</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEntityMappings_Embeddables()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlEmbeddable> getEmbeddables()
+	{
+		if (embeddables == null)
+		{
+			embeddables = new EObjectContainmentEList<XmlEmbeddable>(XmlEmbeddable.class, this, OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES);
+		}
+		return embeddables;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
+				return ((InternalEList<?>)getNamedQueries()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
+				return ((InternalEList<?>)getNamedNativeQueries()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
+				return basicSetPersistenceUnitMetadata(null, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
+				return ((InternalEList<?>)getSequenceGenerators()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
+				return ((InternalEList<?>)getTableGenerators()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
+				return ((InternalEList<?>)getSqlResultSetMappings()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
+				return ((InternalEList<?>)getMappedSuperclasses()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
+				return ((InternalEList<?>)getEntities()).basicRemove(otherEnd, msgs);
+			case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
+				return ((InternalEList<?>)getEmbeddables()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
+				return getNamedQueries();
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
+				return getNamedNativeQueries();
+			case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
+				return getAccess();
+			case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
+				return getPersistenceUnitMetadata();
+			case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
+				return getPackage();
+			case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
+				return getSchema();
+			case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
+				return getCatalog();
+			case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
+				return getSequenceGenerators();
+			case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
+				return getTableGenerators();
+			case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
+				return getSqlResultSetMappings();
+			case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
+				return getMappedSuperclasses();
+			case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
+				return getEntities();
+			case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
+				return getEmbeddables();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
+				getNamedQueries().clear();
+				getNamedQueries().addAll((Collection<? extends XmlNamedQuery>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
+				getNamedNativeQueries().clear();
+				getNamedNativeQueries().addAll((Collection<? extends XmlNamedNativeQuery>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
+				setAccess((AccessType)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
+				setPersistenceUnitMetadata((XmlPersistenceUnitMetadata)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
+				setPackage((String)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
+				setSchema((String)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
+				setCatalog((String)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
+				getSequenceGenerators().clear();
+				getSequenceGenerators().addAll((Collection<? extends XmlSequenceGenerator>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
+				getTableGenerators().clear();
+				getTableGenerators().addAll((Collection<? extends XmlTableGenerator>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
+				getSqlResultSetMappings().clear();
+				getSqlResultSetMappings().addAll((Collection<? extends SqlResultSetMapping>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
+				getMappedSuperclasses().clear();
+				getMappedSuperclasses().addAll((Collection<? extends XmlMappedSuperclass>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
+				getEntities().clear();
+				getEntities().addAll((Collection<? extends XmlEntity>)newValue);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
+				getEmbeddables().clear();
+				getEmbeddables().addAll((Collection<? extends XmlEmbeddable>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
+				getNamedQueries().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
+				getNamedNativeQueries().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
+				setAccess(ACCESS_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
+				setPersistenceUnitMetadata((XmlPersistenceUnitMetadata)null);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
+				setPackage(PACKAGE_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
+				setSchema(SCHEMA_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
+				setCatalog(CATALOG_EDEFAULT);
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
+				getSequenceGenerators().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
+				getTableGenerators().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
+				getSqlResultSetMappings().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
+				getMappedSuperclasses().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
+				getEntities().clear();
+				return;
+			case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
+				getEmbeddables().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES:
+				return namedQueries != null && !namedQueries.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES:
+				return namedNativeQueries != null && !namedNativeQueries.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS:
+				return access != ACCESS_EDEFAULT;
+			case OrmPackage.XML_ENTITY_MAPPINGS__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_ENTITY_MAPPINGS__PERSISTENCE_UNIT_METADATA:
+				return persistenceUnitMetadata != null;
+			case OrmPackage.XML_ENTITY_MAPPINGS__PACKAGE:
+				return PACKAGE_EDEFAULT == null ? package_ != null : !PACKAGE_EDEFAULT.equals(package_);
+			case OrmPackage.XML_ENTITY_MAPPINGS__SCHEMA:
+				return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
+			case OrmPackage.XML_ENTITY_MAPPINGS__CATALOG:
+				return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
+			case OrmPackage.XML_ENTITY_MAPPINGS__SEQUENCE_GENERATORS:
+				return sequenceGenerators != null && !sequenceGenerators.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__TABLE_GENERATORS:
+				return tableGenerators != null && !tableGenerators.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__SQL_RESULT_SET_MAPPINGS:
+				return sqlResultSetMappings != null && !sqlResultSetMappings.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__MAPPED_SUPERCLASSES:
+				return mappedSuperclasses != null && !mappedSuperclasses.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__ENTITIES:
+				return entities != null && !entities.isEmpty();
+			case OrmPackage.XML_ENTITY_MAPPINGS__EMBEDDABLES:
+				return embeddables != null && !embeddables.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+	
+	
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlQueryContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES;
+				case OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES: return OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAccessHolder.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ENTITY_MAPPINGS__ACCESS: return OrmPackage.XML_ACCESS_HOLDER__ACCESS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlQueryContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_QUERY_CONTAINER__NAMED_QUERIES: return OrmPackage.XML_ENTITY_MAPPINGS__NAMED_QUERIES;
+				case OrmPackage.XML_QUERY_CONTAINER__NAMED_NATIVE_QUERIES: return OrmPackage.XML_ENTITY_MAPPINGS__NAMED_NATIVE_QUERIES;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlAccessHolder.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ACCESS_HOLDER__ACCESS: return OrmPackage.XML_ENTITY_MAPPINGS__ACCESS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	// **************** overrides **********************************************
+	
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (access: ");
+		result.append(access);
+		result.append(", description: ");
+		result.append(description);
+		result.append(", package: ");
+		result.append(package_);
+		result.append(", schema: ");
+		result.append(schema);
+		result.append(", catalog: ");
+		result.append(catalog);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public List<XmlTypeMapping> getTypeMappings() {
+		// convert lists to arrays to avoid ConcurrentModificationException while adding to result list
+		ArrayList<XmlTypeMapping> typeMappings = new ArrayList<XmlTypeMapping>();
+		CollectionTools.addAll(typeMappings, this.getMappedSuperclasses().toArray(EMPTY_XML_TYPE_MAPPING_ARRAY));
+		CollectionTools.addAll(typeMappings, this.getEntities().toArray(EMPTY_XML_TYPE_MAPPING_ARRAY));
+		CollectionTools.addAll(typeMappings, this.getEmbeddables().toArray(EMPTY_XML_TYPE_MAPPING_ARRAY));
+		return typeMappings;
+	}
+	
+	private static final XmlTypeMapping[] EMPTY_XML_TYPE_MAPPING_ARRAY = new XmlTypeMapping[0];
+	
+	
+	// **************** version -> schema location mapping ********************
+	
+	private static String namespace = JPA.SCHEMA_NAMESPACE;
+	
+	@Override
+	protected String getNamespace() {
+		return namespace;
+	}
+	
+	private static Map<String, String> versionsToSchemaLocations = buildVersionsToSchemaLocations();
+	
+	private static Map<String, String> buildVersionsToSchemaLocations() {
+		Map<String, String> map = new HashMap<String, String>();
+		map.put(JPA.SCHEMA_VERSION, JPA.SCHEMA_LOCATION);
+		map.put(JPA2_0.SCHEMA_VERSION, JPA2_0.SCHEMA_LOCATION);
+		return map;
+	}
+	
+	@Override
+	protected String getSchemaLocationForVersion(String version) {
+		return versionsToSchemaLocations.get(version);
+	}
+	
+	
+	// **************** translators *******************************************
+	
+	public static Translator getRootTranslator() {
+		return ROOT_TRANSLATOR;
+	}
+	
+	private static final Translator ROOT_TRANSLATOR = buildRootTranslator();
+	
+	private static Translator buildRootTranslator() {
+		return new SimpleRootTranslator(
+				JPA.ENTITY_MAPPINGS,
+				OrmPackage.eINSTANCE.getXmlEntityMappings(),
+				buildTranslatorChildren()
+			);
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildVersionTranslator(versionsToSchemaLocations),
+			buildNamespaceTranslator(namespace),
+			buildSchemaNamespaceTranslator(),
+			buildSchemaLocationTranslator(namespace, versionsToSchemaLocations),
+			buildDescriptionTranslator(),
+			XmlPersistenceUnitMetadata.buildTranslator(JPA2_0.PERSISTENCE_UNIT_METADATA, OrmPackage.eINSTANCE.getXmlEntityMappings_PersistenceUnitMetadata()),
+			buildPackageTranslator(),
+			buildSchemaTranslator(),
+			buildCatalogTranslator(),
+			buildAccessTranslator(),
+			XmlSequenceGenerator.buildTranslator(JPA2_0.SEQUENCE_GENERATOR, OrmPackage.eINSTANCE.getXmlEntityMappings_SequenceGenerators()),
+			XmlTableGenerator.buildTranslator(JPA2_0.TABLE_GENERATOR, OrmPackage.eINSTANCE.getXmlEntityMappings_TableGenerators()),
+			XmlNamedQuery.buildTranslator(JPA2_0.NAMED_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedQueries()),
+			XmlNamedNativeQuery.buildTranslator(JPA2_0.NAMED_NATIVE_QUERY, OrmPackage.eINSTANCE.getXmlQueryContainer_NamedNativeQueries()),
+			SqlResultSetMapping.buildTranslator(JPA2_0.SQL_RESULT_SET_MAPPING, OrmPackage.eINSTANCE.getXmlEntityMappings_SqlResultSetMappings()),
+			XmlMappedSuperclass.buildTranslator(JPA2_0.MAPPED_SUPERCLASS, OrmPackage.eINSTANCE.getXmlEntityMappings_MappedSuperclasses()),
+			XmlEntity.buildTranslator(JPA2_0.ENTITY, OrmPackage.eINSTANCE.getXmlEntityMappings_Entities()),
+			XmlEmbeddable.buildTranslator(JPA2_0.EMBEDDABLE, OrmPackage.eINSTANCE.getXmlEntityMappings_Embeddables()),
+		};
+	}
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmPackage.eINSTANCE.getXmlEntityMappings_Description());
+	}
+		
+	protected static Translator buildPackageTranslator() {
+		return new Translator(JPA.PACKAGE, OrmPackage.eINSTANCE.getXmlEntityMappings_Package());
+	}
+	
+	protected static Translator buildSchemaTranslator() {
+		return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getXmlEntityMappings_Schema());
+	}
+	
+	protected static Translator buildCatalogTranslator() {
+		return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getXmlEntityMappings_Catalog());
+	}
+	
+	protected static Translator buildAccessTranslator() {
+		return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEventMethodContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEventMethodContainer.java
new file mode 100644
index 0000000..0ec6f30
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlEventMethodContainer.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c)2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Event Method Container</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPrePersist <em>Pre Persist</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostPersist <em>Post Persist</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreRemove <em>Pre Remove</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostRemove <em>Post Remove</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreUpdate <em>Pre Update</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostUpdate <em>Post Update</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostLoad <em>Post Load</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlEventMethodContainer extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Pre Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Persist</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Persist</em>' containment reference.
+	 * @see #setPrePersist(PrePersist)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PrePersist()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PrePersist getPrePersist();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPrePersist <em>Pre Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Persist</em>' containment reference.
+	 * @see #getPrePersist()
+	 * @generated
+	 */
+	void setPrePersist(PrePersist value);
+
+	/**
+	 * Returns the value of the '<em><b>Post Persist</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Persist</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Persist</em>' containment reference.
+	 * @see #setPostPersist(PostPersist)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostPersist()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PostPersist getPostPersist();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostPersist <em>Post Persist</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Persist</em>' containment reference.
+	 * @see #getPostPersist()
+	 * @generated
+	 */
+	void setPostPersist(PostPersist value);
+
+	/**
+	 * Returns the value of the '<em><b>Pre Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Remove</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Remove</em>' containment reference.
+	 * @see #setPreRemove(PreRemove)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreRemove()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PreRemove getPreRemove();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreRemove <em>Pre Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Remove</em>' containment reference.
+	 * @see #getPreRemove()
+	 * @generated
+	 */
+	void setPreRemove(PreRemove value);
+
+	/**
+	 * Returns the value of the '<em><b>Post Remove</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Remove</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Remove</em>' containment reference.
+	 * @see #setPostRemove(PostRemove)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostRemove()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PostRemove getPostRemove();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostRemove <em>Post Remove</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Remove</em>' containment reference.
+	 * @see #getPostRemove()
+	 * @generated
+	 */
+	void setPostRemove(PostRemove value);
+
+	/**
+	 * Returns the value of the '<em><b>Pre Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pre Update</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pre Update</em>' containment reference.
+	 * @see #setPreUpdate(PreUpdate)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PreUpdate()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PreUpdate getPreUpdate();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPreUpdate <em>Pre Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pre Update</em>' containment reference.
+	 * @see #getPreUpdate()
+	 * @generated
+	 */
+	void setPreUpdate(PreUpdate value);
+
+	/**
+	 * Returns the value of the '<em><b>Post Update</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Update</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Update</em>' containment reference.
+	 * @see #setPostUpdate(PostUpdate)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostUpdate()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PostUpdate getPostUpdate();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostUpdate <em>Post Update</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Update</em>' containment reference.
+	 * @see #getPostUpdate()
+	 * @generated
+	 */
+	void setPostUpdate(PostUpdate value);
+
+	/**
+	 * Returns the value of the '<em><b>Post Load</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Post Load</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Post Load</em>' containment reference.
+	 * @see #setPostLoad(PostLoad)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlEventMethodContainer_PostLoad()
+	 * @model containment="true"
+	 * @generated
+	 */
+	PostLoad getPostLoad();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlEventMethodContainer#getPostLoad <em>Post Load</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Post Load</em>' containment reference.
+	 * @see #getPostLoad()
+	 * @generated
+	 */
+	void setPostLoad(PostLoad value);
+
+} // XmlEventMethodContainer
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGeneratedValue.java
new file mode 100644
index 0000000..6b1d6db
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGeneratedValue.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Generated Value</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getGenerator <em>Generator</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getStrategy <em>Strategy</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratedValue()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlGeneratedValue extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getGenerator() <em>Generator</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getGenerator()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String GENERATOR_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getGenerator() <em>Generator</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getGenerator()
+	 * @generated
+	 * @ordered
+	 */
+	protected String generator = GENERATOR_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final GenerationType STRATEGY_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getStrategy() <em>Strategy</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getStrategy()
+	 * @generated
+	 * @ordered
+	 */
+	protected GenerationType strategy = STRATEGY_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlGeneratedValue()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_GENERATED_VALUE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Generator</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Generator</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Generator</em>' attribute.
+	 * @see #setGenerator(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratedValue_Generator()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getGenerator()
+	{
+		return generator;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getGenerator <em>Generator</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Generator</em>' attribute.
+	 * @see #getGenerator()
+	 * @generated
+	 */
+	public void setGenerator(String newGenerator)
+	{
+		String oldGenerator = generator;
+		generator = newGenerator;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_GENERATED_VALUE__GENERATOR, oldGenerator, generator));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Strategy</b></em>' attribute.
+	 * The default value is <code>"TABLE"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.GenerationType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Strategy</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Strategy</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.GenerationType
+	 * @see #setStrategy(GenerationType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratedValue_Strategy()
+	 * @model default="TABLE"
+	 * @generated
+	 */
+	public GenerationType getStrategy()
+	{
+		return strategy;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratedValue#getStrategy <em>Strategy</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Strategy</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.GenerationType
+	 * @see #getStrategy()
+	 * @generated
+	 */
+	public void setStrategy(GenerationType newStrategy)
+	{
+		GenerationType oldStrategy = strategy;
+		strategy = newStrategy == null ? STRATEGY_EDEFAULT : newStrategy;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_GENERATED_VALUE__STRATEGY, oldStrategy, strategy));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
+				return getGenerator();
+			case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
+				return getStrategy();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
+				setGenerator((String)newValue);
+				return;
+			case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
+				setStrategy((GenerationType)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
+				setGenerator(GENERATOR_EDEFAULT);
+				return;
+			case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
+				setStrategy(STRATEGY_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_GENERATED_VALUE__GENERATOR:
+				return GENERATOR_EDEFAULT == null ? generator != null : !GENERATOR_EDEFAULT.equals(generator);
+			case OrmPackage.XML_GENERATED_VALUE__STRATEGY:
+				return strategy != STRATEGY_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (generator: ");
+		result.append(generator);
+		result.append(", strategy: ");
+		result.append(strategy);
+		result.append(')');
+		return result.toString();
+	}
+
+	public TextRange getGeneratorTextRange() {
+		return getAttributeTextRange(JPA.GENERATOR);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildStrategyTranslator(),
+			buildGeneratorTranslator()
+		};
+	}
+
+	protected static Translator buildStrategyTranslator() {
+		return new Translator(JPA.STRATEGY, OrmPackage.eINSTANCE.getXmlGeneratedValue_Strategy(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildGeneratorTranslator() {
+		return new Translator(JPA.GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratedValue_Generator(), Translator.DOM_ATTRIBUTE);
+	}
+} // GeneratedValue
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGenerator.java
new file mode 100644
index 0000000..1f53424
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGenerator.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Generator</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getInitialValue <em>Initial Value</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getAllocationSize <em>Allocation Size</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlGenerator extends XmlGenerator_2_0
+{
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	void setName(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Initial Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Initial Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Initial Value</em>' attribute.
+	 * @see #setInitialValue(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_InitialValue()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	Integer getInitialValue();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getInitialValue <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Initial Value</em>' attribute.
+	 * @see #getInitialValue()
+	 * @generated
+	 */
+	void setInitialValue(Integer value);
+
+	/**
+	 * Returns the value of the '<em><b>Allocation Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Allocation Size</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Allocation Size</em>' attribute.
+	 * @see #setAllocationSize(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_AllocationSize()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	Integer getAllocationSize();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGenerator#getAllocationSize <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Allocation Size</em>' attribute.
+	 * @see #getAllocationSize()
+	 * @generated
+	 */
+	void setAllocationSize(Integer value);
+	
+	public TextRange getNameTextRange();
+	
+	boolean isVirtual();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGeneratorContainer.java
new file mode 100644
index 0000000..6072fbc
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlGeneratorContainer.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Generator Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator <em>Sequence Generator</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getTableGenerator <em>Table Generator</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlGeneratorContainer extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sequence Generator</em>' containment reference.
+	 * @see #setSequenceGenerator(XmlSequenceGenerator)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer_SequenceGenerator()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlSequenceGenerator getSequenceGenerator();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
+	 * @see #getSequenceGenerator()
+	 * @generated
+	 */
+	void setSequenceGenerator(XmlSequenceGenerator value);
+
+	/**
+	 * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table Generator</em>' containment reference.
+	 * @see #setTableGenerator(XmlTableGenerator)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer_TableGenerator()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlTableGenerator getTableGenerator();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlGeneratorContainer#getTableGenerator <em>Table Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Table Generator</em>' containment reference.
+	 * @see #getTableGenerator()
+	 * @generated
+	 */
+	void setTableGenerator(XmlTableGenerator value);
+
+} // XmlGeneratorContainer
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlId.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlId.java
new file mode 100644
index 0000000..ebb34f3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlId.java
@@ -0,0 +1,805 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Id</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlId#getGeneratedValue <em>Generated Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlId()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlId extends AbstractXmlAttributeMapping implements ColumnMapping, XmlConvertibleMapping, XmlGeneratorContainer
+{
+	/**
+	 * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn column;
+	/**
+	 * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean LOB_EDEFAULT = false;
+	/**
+	 * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean lob = LOB_EDEFAULT;
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final TemporalType TEMPORAL_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTemporal()
+	 * @generated
+	 * @ordered
+	 */
+	protected TemporalType temporal = TEMPORAL_EDEFAULT;
+	/**
+	 * The default value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final EnumType ENUMERATED_EDEFAULT = EnumType.ORDINAL;
+	/**
+	 * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected EnumType enumerated = ENUMERATED_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getSequenceGenerator() <em>Sequence Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSequenceGenerator()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlSequenceGenerator sequenceGenerator;
+	/**
+	 * The cached value of the '{@link #getTableGenerator() <em>Table Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTableGenerator()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlTableGenerator tableGenerator;
+	/**
+	 * The cached value of the '{@link #getGeneratedValue() <em>Generated Value</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getGeneratedValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlGeneratedValue generatedValue;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlId()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ID;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping_Column()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlColumn getColumn()
+	{
+		return column;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
+	{
+		XmlColumn oldColumn = column;
+		column = newColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__COLUMN, oldColumn, newColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	public void setColumn(XmlColumn newColumn)
+	{
+		if (newColumn != column)
+		{
+			NotificationChain msgs = null;
+			if (column != null)
+				msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__COLUMN, null, msgs);
+			if (newColumn != null)
+				msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__COLUMN, null, msgs);
+			msgs = basicSetColumn(newColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__COLUMN, newColumn, newColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lob</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lob</em>' attribute.
+	 * @see #setLob(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isLob()
+	{
+		return lob;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#isLob <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lob</em>' attribute.
+	 * @see #isLob()
+	 * @generated
+	 */
+	public void setLob(boolean newLob)
+	{
+		boolean oldLob = lob;
+		lob = newLob;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__LOB, oldLob, lob));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
+	 * @model
+	 * @generated
+	 */
+	public TemporalType getTemporal()
+	{
+		return temporal;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#getTemporal <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getTemporal()
+	 * @generated
+	 */
+	public void setTemporal(TemporalType newTemporal)
+	{
+		TemporalType oldTemporal = temporal;
+		temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__TEMPORAL, oldTemporal, temporal));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
+	 * @model
+	 * @generated
+	 */
+	public EnumType getEnumerated()
+	{
+		return enumerated;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#getEnumerated <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getEnumerated()
+	 * @generated
+	 */
+	public void setEnumerated(EnumType newEnumerated)
+	{
+		EnumType oldEnumerated = enumerated;
+		enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__ENUMERATED, oldEnumerated, enumerated));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Generated Value</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Generated Value</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Generated Value</em>' containment reference.
+	 * @see #setGeneratedValue(XmlGeneratedValue)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlId_GeneratedValue()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlGeneratedValue getGeneratedValue()
+	{
+		return generatedValue;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetGeneratedValue(XmlGeneratedValue newGeneratedValue, NotificationChain msgs)
+	{
+		XmlGeneratedValue oldGeneratedValue = generatedValue;
+		generatedValue = newGeneratedValue;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__GENERATED_VALUE, oldGeneratedValue, newGeneratedValue);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#getGeneratedValue <em>Generated Value</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Generated Value</em>' containment reference.
+	 * @see #getGeneratedValue()
+	 * @generated
+	 */
+	public void setGeneratedValue(XmlGeneratedValue newGeneratedValue)
+	{
+		if (newGeneratedValue != generatedValue)
+		{
+			NotificationChain msgs = null;
+			if (generatedValue != null)
+				msgs = ((InternalEObject)generatedValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__GENERATED_VALUE, null, msgs);
+			if (newGeneratedValue != null)
+				msgs = ((InternalEObject)newGeneratedValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__GENERATED_VALUE, null, msgs);
+			msgs = basicSetGeneratedValue(newGeneratedValue, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__GENERATED_VALUE, newGeneratedValue, newGeneratedValue));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Table Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table Generator</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table Generator</em>' containment reference.
+	 * @see #setTableGenerator(XmlTableGenerator)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer_TableGenerator()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlTableGenerator getTableGenerator()
+	{
+		return tableGenerator;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetTableGenerator(XmlTableGenerator newTableGenerator, NotificationChain msgs)
+	{
+		XmlTableGenerator oldTableGenerator = tableGenerator;
+		tableGenerator = newTableGenerator;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__TABLE_GENERATOR, oldTableGenerator, newTableGenerator);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#getTableGenerator <em>Table Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Table Generator</em>' containment reference.
+	 * @see #getTableGenerator()
+	 * @generated
+	 */
+	public void setTableGenerator(XmlTableGenerator newTableGenerator)
+	{
+		if (newTableGenerator != tableGenerator)
+		{
+			NotificationChain msgs = null;
+			if (tableGenerator != null)
+				msgs = ((InternalEObject)tableGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__TABLE_GENERATOR, null, msgs);
+			if (newTableGenerator != null)
+				msgs = ((InternalEObject)newTableGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__TABLE_GENERATOR, null, msgs);
+			msgs = basicSetTableGenerator(newTableGenerator, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__TABLE_GENERATOR, newTableGenerator, newTableGenerator));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Sequence Generator</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sequence Generator</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sequence Generator</em>' containment reference.
+	 * @see #setSequenceGenerator(XmlSequenceGenerator)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGeneratorContainer_SequenceGenerator()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlSequenceGenerator getSequenceGenerator()
+	{
+		return sequenceGenerator;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetSequenceGenerator(XmlSequenceGenerator newSequenceGenerator, NotificationChain msgs)
+	{
+		XmlSequenceGenerator oldSequenceGenerator = sequenceGenerator;
+		sequenceGenerator = newSequenceGenerator;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__SEQUENCE_GENERATOR, oldSequenceGenerator, newSequenceGenerator);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlId#getSequenceGenerator <em>Sequence Generator</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Sequence Generator</em>' containment reference.
+	 * @see #getSequenceGenerator()
+	 * @generated
+	 */
+	public void setSequenceGenerator(XmlSequenceGenerator newSequenceGenerator)
+	{
+		if (newSequenceGenerator != sequenceGenerator)
+		{
+			NotificationChain msgs = null;
+			if (sequenceGenerator != null)
+				msgs = ((InternalEObject)sequenceGenerator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__SEQUENCE_GENERATOR, null, msgs);
+			if (newSequenceGenerator != null)
+				msgs = ((InternalEObject)newSequenceGenerator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_ID__SEQUENCE_GENERATOR, null, msgs);
+			msgs = basicSetSequenceGenerator(newSequenceGenerator, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ID__SEQUENCE_GENERATOR, newSequenceGenerator, newSequenceGenerator));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ID__COLUMN:
+				return basicSetColumn(null, msgs);
+			case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
+				return basicSetSequenceGenerator(null, msgs);
+			case OrmPackage.XML_ID__TABLE_GENERATOR:
+				return basicSetTableGenerator(null, msgs);
+			case OrmPackage.XML_ID__GENERATED_VALUE:
+				return basicSetGeneratedValue(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ID__COLUMN:
+				return getColumn();
+			case OrmPackage.XML_ID__LOB:
+				return isLob();
+			case OrmPackage.XML_ID__TEMPORAL:
+				return getTemporal();
+			case OrmPackage.XML_ID__ENUMERATED:
+				return getEnumerated();
+			case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
+				return getSequenceGenerator();
+			case OrmPackage.XML_ID__TABLE_GENERATOR:
+				return getTableGenerator();
+			case OrmPackage.XML_ID__GENERATED_VALUE:
+				return getGeneratedValue();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ID__COLUMN:
+				setColumn((XmlColumn)newValue);
+				return;
+			case OrmPackage.XML_ID__LOB:
+				setLob((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ID__TEMPORAL:
+				setTemporal((TemporalType)newValue);
+				return;
+			case OrmPackage.XML_ID__ENUMERATED:
+				setEnumerated((EnumType)newValue);
+				return;
+			case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
+				setSequenceGenerator((XmlSequenceGenerator)newValue);
+				return;
+			case OrmPackage.XML_ID__TABLE_GENERATOR:
+				setTableGenerator((XmlTableGenerator)newValue);
+				return;
+			case OrmPackage.XML_ID__GENERATED_VALUE:
+				setGeneratedValue((XmlGeneratedValue)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ID__COLUMN:
+				setColumn((XmlColumn)null);
+				return;
+			case OrmPackage.XML_ID__LOB:
+				setLob(LOB_EDEFAULT);
+				return;
+			case OrmPackage.XML_ID__TEMPORAL:
+				setTemporal(TEMPORAL_EDEFAULT);
+				return;
+			case OrmPackage.XML_ID__ENUMERATED:
+				setEnumerated(ENUMERATED_EDEFAULT);
+				return;
+			case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
+				setSequenceGenerator((XmlSequenceGenerator)null);
+				return;
+			case OrmPackage.XML_ID__TABLE_GENERATOR:
+				setTableGenerator((XmlTableGenerator)null);
+				return;
+			case OrmPackage.XML_ID__GENERATED_VALUE:
+				setGeneratedValue((XmlGeneratedValue)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ID__COLUMN:
+				return column != null;
+			case OrmPackage.XML_ID__LOB:
+				return lob != LOB_EDEFAULT;
+			case OrmPackage.XML_ID__TEMPORAL:
+				return temporal != TEMPORAL_EDEFAULT;
+			case OrmPackage.XML_ID__ENUMERATED:
+				return enumerated != ENUMERATED_EDEFAULT;
+			case OrmPackage.XML_ID__SEQUENCE_GENERATOR:
+				return sequenceGenerator != null;
+			case OrmPackage.XML_ID__TABLE_GENERATOR:
+				return tableGenerator != null;
+			case OrmPackage.XML_ID__GENERATED_VALUE:
+				return generatedValue != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == ColumnMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ID__COLUMN: return OrmPackage.COLUMN_MAPPING__COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ID__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
+				case OrmPackage.XML_ID__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
+				case OrmPackage.XML_ID__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlGeneratorContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ID__SEQUENCE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR;
+				case OrmPackage.XML_ID__TABLE_GENERATOR: return OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == ColumnMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.COLUMN_MAPPING__COLUMN: return OrmPackage.XML_ID__COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_ID__LOB;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_ID__TEMPORAL;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_ID__ENUMERATED;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlGeneratorContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_GENERATOR_CONTAINER__SEQUENCE_GENERATOR: return OrmPackage.XML_ID__SEQUENCE_GENERATOR;
+				case OrmPackage.XML_GENERATOR_CONTAINER__TABLE_GENERATOR: return OrmPackage.XML_ID__TABLE_GENERATOR;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (lob: ");
+		result.append(lob);
+		result.append(", temporal: ");
+		result.append(temporal);
+		result.append(", enumerated: ");
+		result.append(enumerated);
+		result.append(')');
+		return result.toString();
+	}
+
+	public TextRange getEnumeratedTextRange() {
+		return getAttributeTextRange(JPA.ENUMERATED);
+	}
+
+	public TextRange getLobTextRange() {
+		throw new UnsupportedOperationException("lob not supported by id mappings");
+	}
+	
+	public TextRange getTemporalTextRange() {
+		throw new UnsupportedOperationException("temporal not supported by id mappings");
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.ID_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildAccessTranslator(),
+			buildColumnTranslator(),
+			buildGeneratedValueTranslator(),
+			buildTemporalTranslator(),
+			buildTableGeneratorTranslator(),
+			buildSequenceGeneratorTranslator()
+		};
+	}
+	
+	protected static Translator buildColumnTranslator() {
+		return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getColumnMapping_Column());
+	}
+	
+	protected static Translator buildGeneratedValueTranslator() {
+		return XmlGeneratedValue.buildTranslator(JPA.GENERATED_VALUE, OrmPackage.eINSTANCE.getXmlId_GeneratedValue());
+	}
+	
+	protected static Translator buildTemporalTranslator() {
+		return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
+	}
+	
+	protected static Translator buildTableGeneratorTranslator() {
+		return XmlTableGenerator.buildTranslator(JPA.TABLE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_TableGenerator());
+	}
+	
+	protected static Translator buildSequenceGeneratorTranslator() {
+		return XmlSequenceGenerator.buildTranslator(JPA.SEQUENCE_GENERATOR, OrmPackage.eINSTANCE.getXmlGeneratorContainer_SequenceGenerator());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlIdClassContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlIdClassContainer.java
new file mode 100644
index 0000000..6a50879
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlIdClassContainer.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Id Class Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlIdClassContainer#getIdClass <em>Id Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlIdClassContainer()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlIdClassContainer extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Id Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Id Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Id Class</em>' containment reference.
+	 * @see #setIdClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlIdClassContainer_IdClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlClassReference getIdClass();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlIdClassContainer#getIdClass <em>Id Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Id Class</em>' containment reference.
+	 * @see #getIdClass()
+	 * @generated
+	 */
+	void setIdClass(XmlClassReference value);
+
+} // XmlIdClassContainer
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinColumn.java
new file mode 100644
index 0000000..31484c4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinColumn.java
@@ -0,0 +1,234 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Join Column</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumn()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlJoinColumn extends AbstractXmlColumn
+{
+	/**
+	 * The default value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getReferencedColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String REFERENCED_COLUMN_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getReferencedColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String referencedColumnName = REFERENCED_COLUMN_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlJoinColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_JOIN_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Referenced Column Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Referenced Column Name</em>' attribute.
+	 * @see #setReferencedColumnName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumn_ReferencedColumnName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getReferencedColumnName()
+	{
+		return referencedColumnName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Referenced Column Name</em>' attribute.
+	 * @see #getReferencedColumnName()
+	 * @generated
+	 */
+	public void setReferencedColumnName(String newReferencedColumnName)
+	{
+		String oldReferencedColumnName = referencedColumnName;
+		referencedColumnName = newReferencedColumnName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME, oldReferencedColumnName, referencedColumnName));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				return getReferencedColumnName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				setReferencedColumnName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				setReferencedColumnName(REFERENCED_COLUMN_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				return REFERENCED_COLUMN_NAME_EDEFAULT == null ? referencedColumnName != null : !REFERENCED_COLUMN_NAME_EDEFAULT.equals(referencedColumnName);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (referencedColumnName: ");
+		result.append(referencedColumnName);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getReferencedColumnNameTextRange() {
+		return getAttributeTextRange(JPA.REFERENCED_COLUMN_NAME);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildReferencedColumnNameTranslator(),
+			buildUniqueTranslator(),
+			buildNullableTranslator(),
+			buildInsertableTranslator(),
+			buildUpdatableTranslator(),
+			buildColumnDefinitionTranslator(),
+			buildTableTranslator(),
+		};
+	}
+	
+	protected static Translator buildReferencedColumnNameTranslator() {
+		return new Translator(JPA.REFERENCED_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlJoinColumn_ReferencedColumnName(), Translator.DOM_ATTRIBUTE);
+	}
+} // JoinColumn
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinColumnsMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinColumnsMapping.java
new file mode 100644
index 0000000..e264fa4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinColumnsMapping.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Join Columns Mapping</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlJoinColumnsMapping#getJoinColumns <em>Join Columns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlJoinColumnsMapping extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping_JoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlJoinColumn> getJoinColumns();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinTable.java
new file mode 100644
index 0000000..535ef95
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinTable.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Join Table</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlJoinTable#getInverseJoinColumns <em>Inverse Join Columns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTable()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlJoinTable extends AbstractXmlReferenceTable
+{
+	/**
+	 * The cached value of the '{@link #getInverseJoinColumns() <em>Inverse Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInverseJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> inverseJoinColumns;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlJoinTable()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_JOIN_TABLE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Inverse Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Inverse Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Inverse Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTable_InverseJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getInverseJoinColumns()
+	{
+		if (inverseJoinColumns == null)
+		{
+			inverseJoinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS);
+		}
+		return inverseJoinColumns;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
+				return ((InternalEList<?>)getInverseJoinColumns()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
+				return getInverseJoinColumns();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
+				getInverseJoinColumns().clear();
+				getInverseJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
+				getInverseJoinColumns().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_JOIN_TABLE__INVERSE_JOIN_COLUMNS:
+				return inverseJoinColumns != null && !inverseJoinColumns.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	public boolean isSpecified() {
+		return true;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildCatalogTranslator(),
+			buildSchemaTranslator(),
+			buildJoinColumnTranslator(),
+			buildInverseJoinColumnTranslator(),
+			buildUniqueConstraintTranslator()
+		};
+	}
+	
+	protected static Translator buildInverseJoinColumnTranslator() {
+		return XmlJoinColumn.buildTranslator(JPA.INVERSE_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinTable_InverseJoinColumns());
+	}
+
+} // JoinTable
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinTableMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinTableMapping.java
new file mode 100644
index 0000000..f378d53
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlJoinTableMapping.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Join Table Mapping</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping#getJoinTable <em>Join Table</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTableMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlJoinTableMapping extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Table</em>' containment reference.
+	 * @see #setJoinTable(XmlJoinTable)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinTableMapping_JoinTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlJoinTable getJoinTable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlJoinTableMapping#getJoinTable <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Join Table</em>' containment reference.
+	 * @see #getJoinTable()
+	 * @generated
+	 */
+	void setJoinTable(XmlJoinTable value);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlManyToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlManyToMany.java
new file mode 100644
index 0000000..c76542e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlManyToMany.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Many To Many</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlManyToMany()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlManyToMany extends AbstractXmlMultiRelationshipMapping implements XmlManyToMany_2_0
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlManyToMany()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_MANY_TO_MANY;
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildTargetEntityTranslator(),
+			buildFetchTranslator(),
+			buildAccessTranslator(),
+			buildMappedByTranslator(),
+			buildOrderByTranslator(),
+			buildOrderColumnTranslator(),		
+			buildMapKeyTranslator(),
+			buildMapKeyClassTranslator(),
+			buildMapKeyTemporalTranslator(),
+			buildMapKeyEnumeratedTranslator(),
+			buildMapKeyAttributeOverrideTranslator(),
+			buildMapKeyColumnTranslator(),
+			buildMapKeyJoinColumnTranslator(),
+			buildJoinTableTranslator(),
+			buildCascadeTranslator()
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlManyToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlManyToOne.java
new file mode 100644
index 0000000..a4eeaa6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlManyToOne.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Many To One</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlManyToOne()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlManyToOne extends AbstractXmlSingleRelationshipMapping
+{
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlManyToOne()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_MANY_TO_ONE;
+	}
+
+	// **************** XmlAttributeMapping impl ******************************
+
+	public String getMappingKey() {
+		return MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** translators *******************************************
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildTargetEntityTranslator(),
+			buildFetchTranslator(),
+			buildOptionalTranslator(),
+			buildAccessTranslator(),
+			buildMapsIdTranslator(),
+			buildIdTranslator(),
+			buildJoinColumnTranslator(),
+			buildJoinTableTranslator(),
+			buildCascadeTranslator()
+		};
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlMappedByMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlMappedByMapping.java
new file mode 100644
index 0000000..c1f70f7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlMappedByMapping.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Ownable Relationship Mapping</b></em>'.
+ * <p>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlMappedByMapping#getMappedBy <em>Mapped By</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedByMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlMappedByMapping extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Mapped By</em>' attribute.
+	 * @see #setMappedBy(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedByMapping_MappedBy()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getMappedBy();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedByMapping#getMappedBy <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Mapped By</em>' attribute.
+	 * @see #getMappedBy()
+	 * @generated
+	 */
+	void setMappedBy(String value);
+
+	TextRange getMappedByTextRange();	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlMappedSuperclass.java
new file mode 100644
index 0000000..e8d4b3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlMappedSuperclass.java
@@ -0,0 +1,574 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mapped Superclass</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#getEntityListeners <em>Entity Listeners</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedSuperclass()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlMappedSuperclass extends AbstractXmlTypeMapping implements XmlIdClassContainer
+{
+
+	/**
+	 * The cached value of the '{@link #getIdClass() <em>Id Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getIdClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlClassReference idClass;
+
+	/**
+	 * The default value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeDefaultListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean EXCLUDE_DEFAULT_LISTENERS_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isExcludeDefaultListeners() <em>Exclude Default Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeDefaultListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean excludeDefaultListeners = EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeSuperclassListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isExcludeSuperclassListeners() <em>Exclude Superclass Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isExcludeSuperclassListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean excludeSuperclassListeners = EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected EntityListeners entityListeners;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlMappedSuperclass()
+	{
+		super();
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY;
+	}
+
+	public XmlEntityMappings entityMappings() {
+		return (XmlEntityMappings) eContainer();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_MAPPED_SUPERCLASS;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Id Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Id Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Id Class</em>' containment reference.
+	 * @see #setIdClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlIdClassContainer_IdClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlClassReference getIdClass()
+	{
+		return idClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetIdClass(XmlClassReference newIdClass, NotificationChain msgs)
+	{
+		XmlClassReference oldIdClass = idClass;
+		idClass = newIdClass;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, oldIdClass, newIdClass);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#getIdClass <em>Id Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Id Class</em>' containment reference.
+	 * @see #getIdClass()
+	 * @generated
+	 */
+	public void setIdClass(XmlClassReference newIdClass)
+	{
+		if (newIdClass != idClass)
+		{
+			NotificationChain msgs = null;
+			if (idClass != null)
+				msgs = ((InternalEObject)idClass).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, null, msgs);
+			if (newIdClass != null)
+				msgs = ((InternalEObject)newIdClass).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, null, msgs);
+			msgs = basicSetIdClass(newIdClass, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS, newIdClass, newIdClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Exclude Default Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Exclude Default Listeners</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Exclude Default Listeners</em>' attribute.
+	 * @see #setExcludeDefaultListeners(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedSuperclass_ExcludeDefaultListeners()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isExcludeDefaultListeners()
+	{
+		return excludeDefaultListeners;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeDefaultListeners <em>Exclude Default Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Exclude Default Listeners</em>' attribute.
+	 * @see #isExcludeDefaultListeners()
+	 * @generated
+	 */
+	public void setExcludeDefaultListeners(boolean newExcludeDefaultListeners)
+	{
+		boolean oldExcludeDefaultListeners = excludeDefaultListeners;
+		excludeDefaultListeners = newExcludeDefaultListeners;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS, oldExcludeDefaultListeners, excludeDefaultListeners));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Exclude Superclass Listeners</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Exclude Superclass Listeners</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Exclude Superclass Listeners</em>' attribute.
+	 * @see #setExcludeSuperclassListeners(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedSuperclass_ExcludeSuperclassListeners()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isExcludeSuperclassListeners()
+	{
+		return excludeSuperclassListeners;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#isExcludeSuperclassListeners <em>Exclude Superclass Listeners</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Exclude Superclass Listeners</em>' attribute.
+	 * @see #isExcludeSuperclassListeners()
+	 * @generated
+	 */
+	public void setExcludeSuperclassListeners(boolean newExcludeSuperclassListeners)
+	{
+		boolean oldExcludeSuperclassListeners = excludeSuperclassListeners;
+		excludeSuperclassListeners = newExcludeSuperclassListeners;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS, oldExcludeSuperclassListeners, excludeSuperclassListeners));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entity Listeners</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entity Listeners</em>' containment reference.
+	 * @see #setEntityListeners(EntityListeners)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedSuperclass_EntityListeners()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EntityListeners getEntityListeners()
+	{
+		return entityListeners;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetEntityListeners(EntityListeners newEntityListeners, NotificationChain msgs)
+	{
+		EntityListeners oldEntityListeners = entityListeners;
+		entityListeners = newEntityListeners;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, oldEntityListeners, newEntityListeners);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlMappedSuperclass#getEntityListeners <em>Entity Listeners</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Entity Listeners</em>' containment reference.
+	 * @see #getEntityListeners()
+	 * @generated
+	 */
+	public void setEntityListeners(EntityListeners newEntityListeners)
+	{
+		if (newEntityListeners != entityListeners)
+		{
+			NotificationChain msgs = null;
+			if (entityListeners != null)
+				msgs = ((InternalEObject)entityListeners).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, null, msgs);
+			if (newEntityListeners != null)
+				msgs = ((InternalEObject)newEntityListeners).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, null, msgs);
+			msgs = basicSetEntityListeners(newEntityListeners, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS, newEntityListeners, newEntityListeners));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
+				return basicSetIdClass(null, msgs);
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
+				return basicSetEntityListeners(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
+				return getIdClass();
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
+				return isExcludeDefaultListeners();
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
+				return isExcludeSuperclassListeners();
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
+				return getEntityListeners();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
+				setIdClass((XmlClassReference)newValue);
+				return;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
+				setExcludeDefaultListeners((Boolean)newValue);
+				return;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
+				setExcludeSuperclassListeners((Boolean)newValue);
+				return;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
+				setEntityListeners((EntityListeners)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
+				setIdClass((XmlClassReference)null);
+				return;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
+				setExcludeDefaultListeners(EXCLUDE_DEFAULT_LISTENERS_EDEFAULT);
+				return;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
+				setExcludeSuperclassListeners(EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT);
+				return;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
+				setEntityListeners((EntityListeners)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS:
+				return idClass != null;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_DEFAULT_LISTENERS:
+				return excludeDefaultListeners != EXCLUDE_DEFAULT_LISTENERS_EDEFAULT;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__EXCLUDE_SUPERCLASS_LISTENERS:
+				return excludeSuperclassListeners != EXCLUDE_SUPERCLASS_LISTENERS_EDEFAULT;
+			case OrmPackage.XML_MAPPED_SUPERCLASS__ENTITY_LISTENERS:
+				return entityListeners != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlIdClassContainer.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS: return OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlIdClassContainer.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_ID_CLASS_CONTAINER__ID_CLASS: return OrmPackage.XML_MAPPED_SUPERCLASS__ID_CLASS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (excludeDefaultListeners: ");
+		result.append(excludeDefaultListeners);
+		result.append(", excludeSuperclassListeners: ");
+		result.append(excludeSuperclassListeners);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildClassTranslator(),
+			buildAccessTranslator(),
+			buildMetadataCompleteTranslator(),
+			buildDescriptionTranslator(),
+			buildIdClassTranslator(),
+			buildExcludeDefaultListenersTranslator(),
+			buildExcludeSuperclassListenersTranslator(),
+			buildEntityListenersTranslator(),
+			PrePersist.buildTranslator(),
+			PostPersist.buildTranslator(),
+			PreRemove.buildTranslator(),
+			PostRemove.buildTranslator(),
+			PreUpdate.buildTranslator(),
+			PostUpdate.buildTranslator(),
+			PostLoad.buildTranslator(),
+			Attributes.buildTranslator()
+		};
+	}
+	
+	protected static Translator buildAccessTranslator() {
+		return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildIdClassTranslator() {
+		return XmlClassReference.buildTranslator(JPA.ID_CLASS, OrmPackage.eINSTANCE.getXmlIdClassContainer_IdClass());
+	}
+	
+	protected static Translator buildExcludeDefaultListenersTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.EXCLUDE_DEFAULT_LISTENERS, OrmPackage.eINSTANCE.getXmlMappedSuperclass_ExcludeDefaultListeners());
+	}
+	
+	protected static Translator buildExcludeSuperclassListenersTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.EXCLUDE_SUPERCLASS_LISTENERS, OrmPackage.eINSTANCE.getXmlMappedSuperclass_ExcludeSuperclassListeners());
+	}
+	
+	protected static Translator buildEntityListenersTranslator() {
+		return EntityListeners.buildTranslator(JPA.ENTITY_LISTENERS, OrmPackage.eINSTANCE.getXmlMappedSuperclass_EntityListeners());
+	}
+	
+	protected static Translator buildPrePersistTranslator() {
+		return PrePersist.buildTranslator();
+	}
+
+	protected static Translator buildPostPersistTranslator() {
+		return PostPersist.buildTranslator();
+	}
+
+	protected static Translator buildPreRemoveTranslator() {
+		return PreRemove.buildTranslator();
+	}
+
+	protected static Translator buildPostRemoveTranslator() {
+		return PostRemove.buildTranslator();
+	}
+	
+	protected static Translator buildPreUpdateTranslator() {
+		return PreUpdate.buildTranslator();
+	}
+	
+	protected static Translator buildPostUpdateTranslator() {
+		return PostUpdate.buildTranslator();
+	}
+
+	protected static Translator buildPostLoadTranslator() {
+		return PostLoad.buildTranslator();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNamedNativeQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNamedNativeQuery.java
new file mode 100644
index 0000000..52efa15
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNamedNativeQuery.java
@@ -0,0 +1,586 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Named Native Query</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultClass <em>Result Class</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedNativeQuery()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlNamedNativeQuery extends AbstractJpaEObject implements XmlQuery
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getQuery()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String QUERY_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getQuery()
+	 * @generated
+	 * @ordered
+	 */
+	protected String query = QUERY_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getHints() <em>Hints</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getHints()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlQueryHint> hints;
+
+	/**
+	 * The default value of the '{@link #getResultClass() <em>Result Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getResultClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String RESULT_CLASS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getResultClass() <em>Result Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getResultClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected String resultClass = RESULT_CLASS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getResultSetMapping() <em>Result Set Mapping</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getResultSetMapping()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String RESULT_SET_MAPPING_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getResultSetMapping() <em>Result Set Mapping</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getResultSetMapping()
+	 * @generated
+	 * @ordered
+	 */
+	protected String resultSetMapping = RESULT_SET_MAPPING_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlNamedNativeQuery()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_NAMED_NATIVE_QUERY;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Result Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Result Class</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Result Class</em>' attribute.
+	 * @see #setResultClass(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedNativeQuery_ResultClass()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getResultClass()
+	{
+		return resultClass;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultClass <em>Result Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Result Class</em>' attribute.
+	 * @see #getResultClass()
+	 * @generated
+	 */
+	public void setResultClass(String newResultClass)
+	{
+		String oldResultClass = resultClass;
+		resultClass = newResultClass;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS, oldResultClass, resultClass));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Result Set Mapping</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Result Set Mapping</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Result Set Mapping</em>' attribute.
+	 * @see #setResultSetMapping(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedNativeQuery_ResultSetMapping()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getResultSetMapping()
+	{
+		return resultSetMapping;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getResultSetMapping <em>Result Set Mapping</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Result Set Mapping</em>' attribute.
+	 * @see #getResultSetMapping()
+	 * @generated
+	 */
+	public void setResultSetMapping(String newResultSetMapping)
+	{
+		String oldResultSetMapping = resultSetMapping;
+		resultSetMapping = newResultSetMapping;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING, oldResultSetMapping, resultSetMapping));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Query</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Query</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Query</em>' attribute.
+	 * @see #setQuery(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Query()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getQuery()
+	{
+		return query;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery#getQuery <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Query</em>' attribute.
+	 * @see #getQuery()
+	 * @generated
+	 */
+	public void setQuery(String newQuery)
+	{
+		String oldQuery = query;
+		query = newQuery;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY, oldQuery, query));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlQueryHint}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Hints</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Hints</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Hints()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlQueryHint> getHints()
+	{
+		if (hints == null)
+		{
+			hints = new EObjectContainmentEList<XmlQueryHint>(XmlQueryHint.class, this, OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS);
+		}
+		return hints;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
+				return ((InternalEList<?>)getHints()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
+				return getName();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
+				return getQuery();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
+				return getHints();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
+				return getResultClass();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
+				return getResultSetMapping();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
+				setQuery((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
+				getHints().clear();
+				getHints().addAll((Collection<? extends XmlQueryHint>)newValue);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
+				setResultClass((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
+				setResultSetMapping((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
+				setQuery(QUERY_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
+				getHints().clear();
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
+				setResultClass(RESULT_CLASS_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
+				setResultSetMapping(RESULT_SET_MAPPING_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__QUERY:
+				return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__HINTS:
+				return hints != null && !hints.isEmpty();
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_CLASS:
+				return RESULT_CLASS_EDEFAULT == null ? resultClass != null : !RESULT_CLASS_EDEFAULT.equals(resultClass);
+			case OrmPackage.XML_NAMED_NATIVE_QUERY__RESULT_SET_MAPPING:
+				return RESULT_SET_MAPPING_EDEFAULT == null ? resultSetMapping != null : !RESULT_SET_MAPPING_EDEFAULT.equals(resultSetMapping);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", query: ");
+		result.append(query);
+		result.append(", resultClass: ");
+		result.append(resultClass);
+		result.append(", resultSetMapping: ");
+		result.append(resultSetMapping);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildResultClassTranslator(),
+			buildResultSetMappingTranslator(),
+			buildDescriptionTranslator(),
+			buildQueryTranslator(),
+			buildHintTranslator()
+		};
+	}
+
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlQuery_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildResultClassTranslator() {
+		return new Translator(JPA.RESULT_CLASS, OrmPackage.eINSTANCE.getXmlNamedNativeQuery_ResultClass(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildResultSetMappingTranslator() {
+		return new Translator(JPA.RESULT_SET_MAPPING, OrmPackage.eINSTANCE.getXmlNamedNativeQuery_ResultSetMapping(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlQuery_2_0_Description());
+	}
+	
+	protected static Translator buildQueryTranslator() {
+		return new Translator(JPA.QUERY, OrmPackage.eINSTANCE.getXmlQuery_Query());
+	}
+	
+	protected static Translator buildHintTranslator() {
+		return XmlQueryHint.buildTranslator(JPA.HINT, OrmPackage.eINSTANCE.getXmlQuery_Hints());
+	}
+}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNamedQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNamedQuery.java
new file mode 100644
index 0000000..d8729d6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNamedQuery.java
@@ -0,0 +1,542 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Named Query</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedQuery()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlNamedQuery extends AbstractJpaEObject implements XmlQuery, XmlNamedQuery_2_0
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getQuery() <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getQuery()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String QUERY_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getQuery() <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getQuery()
+	 * @generated
+	 * @ordered
+	 */
+	protected String query = QUERY_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getHints() <em>Hints</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getHints()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlQueryHint> hints;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final LockModeType_2_0 LOCK_MODE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getLockMode() <em>Lock Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getLockMode()
+	 * @generated
+	 * @ordered
+	 */
+	protected LockModeType_2_0 lockMode = LOCK_MODE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlNamedQuery()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_NAMED_QUERY;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Query</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Query</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Query</em>' attribute.
+	 * @see #setQuery(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Query()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getQuery()
+	{
+		return query;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery#getQuery <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Query</em>' attribute.
+	 * @see #getQuery()
+	 * @generated
+	 */
+	public void setQuery(String newQuery)
+	{
+		String oldQuery = query;
+		query = newQuery;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__QUERY, oldQuery, query));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlQueryHint}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Hints</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Hints</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Hints()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlQueryHint> getHints()
+	{
+		if (hints == null)
+		{
+			hints = new EObjectContainmentEList<XmlQueryHint>(XmlQueryHint.class, this, OrmPackage.XML_NAMED_QUERY__HINTS);
+		}
+		return hints;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Lock Mode</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lock Mode</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lock Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+	 * @see #setLockMode(LockModeType_2_0)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNamedQuery_2_0_LockMode()
+	 * @model
+	 * @generated
+	 */
+	public LockModeType_2_0 getLockMode()
+	{
+		return lockMode;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery#getLockMode <em>Lock Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lock Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+	 * @see #getLockMode()
+	 * @generated
+	 */
+	public void setLockMode(LockModeType_2_0 newLockMode)
+	{
+		LockModeType_2_0 oldLockMode = lockMode;
+		lockMode = newLockMode == null ? LOCK_MODE_EDEFAULT : newLockMode;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_NAMED_QUERY__LOCK_MODE, oldLockMode, lockMode));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_QUERY__HINTS:
+				return ((InternalEList<?>)getHints()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_NAMED_QUERY__NAME:
+				return getName();
+			case OrmPackage.XML_NAMED_QUERY__QUERY:
+				return getQuery();
+			case OrmPackage.XML_NAMED_QUERY__HINTS:
+				return getHints();
+			case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
+				return getLockMode();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__QUERY:
+				setQuery((String)newValue);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__HINTS:
+				getHints().clear();
+				getHints().addAll((Collection<? extends XmlQueryHint>)newValue);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
+				setLockMode((LockModeType_2_0)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__QUERY:
+				setQuery(QUERY_EDEFAULT);
+				return;
+			case OrmPackage.XML_NAMED_QUERY__HINTS:
+				getHints().clear();
+				return;
+			case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
+				setLockMode(LOCK_MODE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_NAMED_QUERY__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_NAMED_QUERY__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_NAMED_QUERY__QUERY:
+				return QUERY_EDEFAULT == null ? query != null : !QUERY_EDEFAULT.equals(query);
+			case OrmPackage.XML_NAMED_QUERY__HINTS:
+				return hints != null && !hints.isEmpty();
+			case OrmPackage.XML_NAMED_QUERY__LOCK_MODE:
+				return lockMode != LOCK_MODE_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlNamedQuery_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_NAMED_QUERY__LOCK_MODE: return OrmV2_0Package.XML_NAMED_QUERY_20__LOCK_MODE;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlNamedQuery_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_NAMED_QUERY_20__LOCK_MODE: return OrmPackage.XML_NAMED_QUERY__LOCK_MODE;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", query: ");
+		result.append(query);
+		result.append(", lockMode: ");
+		result.append(lockMode);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildDescriptionTranslator(),
+			buildQueryTranslator(),
+			buildLockModeTranslator(),
+			XmlQueryHint.buildTranslator(JPA2_0.HINT, OrmPackage.eINSTANCE.getXmlQuery_Hints()),
+		};
+	}
+
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlQuery_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlQuery_2_0_Description());
+	}
+	
+	protected static Translator buildQueryTranslator() {
+		return new Translator(JPA.QUERY, OrmPackage.eINSTANCE.getXmlQuery_Query());
+	}
+	
+	protected static Translator buildLockModeTranslator() {
+		return new Translator(JPA2_0.NAMED_QUERY__LOCK_MODE, OrmV2_0Package.eINSTANCE.getXmlNamedQuery_2_0_LockMode());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNullAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNullAttributeMapping.java
new file mode 100644
index 0000000..7e4e172
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlNullAttributeMapping.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Null Attribute Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlNullAttributeMapping()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class XmlNullAttributeMapping extends AbstractXmlAttributeMapping
+{
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlNullAttributeMapping()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_NULL_ATTRIBUTE_MAPPING;
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOneToMany.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOneToMany.java
new file mode 100644
index 0000000..cf31202
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOneToMany.java
@@ -0,0 +1,376 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>One To Many</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToMany()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlOneToMany extends AbstractXmlMultiRelationshipMapping implements XmlJoinColumnsMapping, XmlOneToMany_2_0
+{
+
+	/**
+	 * The cached value of the '{@link #getJoinColumns() <em>Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJoinColumn> joinColumns;
+
+	/**
+	 * The default value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean ORPHAN_REMOVAL_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean orphanRemoval = ORPHAN_REMOVAL_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlOneToMany()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ONE_TO_MANY;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlJoinColumnsMapping_JoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJoinColumn> getJoinColumns()
+	{
+		if (joinColumns == null)
+		{
+			joinColumns = new EObjectContainmentEList<XmlJoinColumn>(XmlJoinColumn.class, this, OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS);
+		}
+		return joinColumns;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Orphan Removal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Orphan Removal</em>' attribute.
+	 * @see #setOrphanRemoval(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrphanRemovable_2_0_OrphanRemoval()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getOrphanRemoval()
+	{
+		return orphanRemoval;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToMany#getOrphanRemoval <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Orphan Removal</em>' attribute.
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 */
+	public void setOrphanRemoval(Boolean newOrphanRemoval)
+	{
+		Boolean oldOrphanRemoval = orphanRemoval;
+		orphanRemoval = newOrphanRemoval;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL, oldOrphanRemoval, orphanRemoval));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
+				return ((InternalEList<?>)getJoinColumns()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
+				return getJoinColumns();
+			case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
+				return getOrphanRemoval();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				getJoinColumns().addAll((Collection<? extends XmlJoinColumn>)newValue);
+				return;
+			case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
+				setOrphanRemoval((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
+				getJoinColumns().clear();
+				return;
+			case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
+				setOrphanRemoval(ORPHAN_REMOVAL_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS:
+				return joinColumns != null && !joinColumns.isEmpty();
+			case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL:
+				return ORPHAN_REMOVAL_EDEFAULT == null ? orphanRemoval != null : !ORPHAN_REMOVAL_EDEFAULT.equals(orphanRemoval);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlJoinColumnsMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS: return OrmPackage.XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrphanRemovable_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL: return OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOneToMany_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlJoinColumnsMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_JOIN_COLUMNS_MAPPING__JOIN_COLUMNS: return OrmPackage.XML_ONE_TO_MANY__JOIN_COLUMNS;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrphanRemovable_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL: return OrmPackage.XML_ONE_TO_MANY__ORPHAN_REMOVAL;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOneToMany_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (orphanRemoval: ");
+		result.append(orphanRemoval);
+		result.append(')');
+		return result.toString();
+	}
+
+	public String getMappingKey() {
+		return MappingKeys.ONE_TO_MANY_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildTargetEntityTranslator(),
+			buildFetchTranslator(),
+			buildAccessTranslator(),
+			buildMappedByTranslator(),
+			buildOrphanRemovalTranslator(),
+			buildOrderByTranslator(),
+			buildOrderColumnTranslator(),		
+			buildMapKeyTranslator(),
+			buildMapKeyClassTranslator(),		
+			buildMapKeyTemporalTranslator(),
+			buildMapKeyEnumeratedTranslator(),
+			buildMapKeyAttributeOverrideTranslator(),		
+			buildMapKeyColumnTranslator(),		
+			buildMapKeyJoinColumnTranslator(),		
+			buildJoinTableTranslator(),
+			buildJoinColumnTranslator(),
+			buildCascadeTranslator()
+		};
+	}
+	
+	protected static Translator buildOrphanRemovalTranslator() {
+		return new Translator(JPA2_0.ORPHAN_REMOVAL, OrmV2_0Package.eINSTANCE.getXmlOrphanRemovable_2_0_OrphanRemoval(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildJoinColumnTranslator() {
+		return XmlJoinColumn.buildTranslator(JPA.JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlJoinColumnsMapping_JoinColumns());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOneToOne.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOneToOne.java
new file mode 100644
index 0000000..980050b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOneToOne.java
@@ -0,0 +1,457 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>One To One</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToOne()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlOneToOne extends AbstractXmlSingleRelationshipMapping implements XmlMappedByMapping, XmlOneToOne_2_0
+{
+
+	/**
+	 * The default value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMappedBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String MAPPED_BY_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getMappedBy() <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMappedBy()
+	 * @generated
+	 * @ordered
+	 */
+	protected String mappedBy = MAPPED_BY_EDEFAULT;
+	/**
+	 * The default value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean ORPHAN_REMOVAL_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getOrphanRemoval() <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean orphanRemoval = ORPHAN_REMOVAL_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getPrimaryKeyJoinColumns() <em>Primary Key Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrimaryKeyJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlOneToOne()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ONE_TO_ONE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Mapped By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Mapped By</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Mapped By</em>' attribute.
+	 * @see #setMappedBy(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlMappedByMapping_MappedBy()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getMappedBy()
+	{
+		return mappedBy;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne#getMappedBy <em>Mapped By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Mapped By</em>' attribute.
+	 * @see #getMappedBy()
+	 * @generated
+	 */
+	public void setMappedBy(String newMappedBy)
+	{
+		String oldMappedBy = mappedBy;
+		mappedBy = newMappedBy;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ONE_TO_ONE__MAPPED_BY, oldMappedBy, mappedBy));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Orphan Removal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Orphan Removal</em>' attribute.
+	 * @see #setOrphanRemoval(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrphanRemovable_2_0_OrphanRemoval()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getOrphanRemoval()
+	{
+		return orphanRemoval;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOneToOne#getOrphanRemoval <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Orphan Removal</em>' attribute.
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 */
+	public void setOrphanRemoval(Boolean newOrphanRemoval)
+	{
+		Boolean oldOrphanRemoval = orphanRemoval;
+		orphanRemoval = newOrphanRemoval;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL, oldOrphanRemoval, orphanRemoval));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOneToOne_PrimaryKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
+	{
+		if (primaryKeyJoinColumns == null)
+		{
+			primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS);
+		}
+		return primaryKeyJoinColumns;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
+				return ((InternalEList<?>)getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
+				return getMappedBy();
+			case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
+				return getOrphanRemoval();
+			case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
+				return getPrimaryKeyJoinColumns();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
+				setMappedBy((String)newValue);
+				return;
+			case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
+				setOrphanRemoval((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
+				getPrimaryKeyJoinColumns().clear();
+				getPrimaryKeyJoinColumns().addAll((Collection<? extends XmlPrimaryKeyJoinColumn>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
+				setMappedBy(MAPPED_BY_EDEFAULT);
+				return;
+			case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
+				setOrphanRemoval(ORPHAN_REMOVAL_EDEFAULT);
+				return;
+			case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
+				getPrimaryKeyJoinColumns().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY:
+				return MAPPED_BY_EDEFAULT == null ? mappedBy != null : !MAPPED_BY_EDEFAULT.equals(mappedBy);
+			case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL:
+				return ORPHAN_REMOVAL_EDEFAULT == null ? orphanRemoval != null : !ORPHAN_REMOVAL_EDEFAULT.equals(orphanRemoval);
+			case OrmPackage.XML_ONE_TO_ONE__PRIMARY_KEY_JOIN_COLUMNS:
+				return primaryKeyJoinColumns != null && !primaryKeyJoinColumns.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlMappedByMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ONE_TO_ONE__MAPPED_BY: return OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrphanRemovable_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL: return OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOneToOne_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlMappedByMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_MAPPED_BY_MAPPING__MAPPED_BY: return OrmPackage.XML_ONE_TO_ONE__MAPPED_BY;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOrphanRemovable_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL: return OrmPackage.XML_ONE_TO_ONE__ORPHAN_REMOVAL;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlOneToOne_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (mappedBy: ");
+		result.append(mappedBy);
+		result.append(", orphanRemoval: ");
+		result.append(orphanRemoval);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// **************** XmlAttributeMapping impl ******************************
+
+	public String getMappingKey() {
+		return MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	
+	// **************** validation support ************************************
+	
+	public TextRange getMappedByTextRange() {
+		return getAttributeTextRange(JPA.MAPPED_BY);
+	}
+	
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildTargetEntityTranslator(),
+			buildFetchTranslator(),
+			buildOptionalTranslator(),
+			buildAccessTranslator(),
+			buildMappedByTranslator(),
+			buildOrphanRemovalTranslator(),
+			buildMapsIdTranslator(),
+			buildIdTranslator(),
+			buildPrimaryKeyJoinColumnTranslator(),
+			buildJoinColumnTranslator(),
+			buildJoinTableTranslator(),
+			buildCascadeTranslator()
+		};
+	}
+	
+	protected static Translator buildMappedByTranslator() {
+		return new Translator(JPA.MAPPED_BY, OrmPackage.eINSTANCE.getXmlMappedByMapping_MappedBy(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildOrphanRemovalTranslator() {
+		return new Translator(JPA2_0.ORPHAN_REMOVAL, OrmV2_0Package.eINSTANCE.getXmlOrphanRemovable_2_0_OrphanRemoval(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildPrimaryKeyJoinColumnTranslator() {
+		return XmlPrimaryKeyJoinColumn.buildTranslator(JPA.PRIMARY_KEY_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlOneToOne_PrimaryKeyJoinColumns());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOrderColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOrderColumn.java
new file mode 100644
index 0000000..7452e2f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOrderColumn.java
@@ -0,0 +1,404 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.BooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Order Column</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderColumn()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlOrderColumn extends AbstractXmlNamedColumn implements XmlOrderColumn_2_0
+{
+	/**
+	 * The default value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNullable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean NULLABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getNullable() <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNullable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean nullable = NULLABLE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInsertable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean INSERTABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getInsertable() <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInsertable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean insertable = INSERTABLE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUpdatable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean UPDATABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getUpdatable() <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUpdatable()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean updatable = UPDATABLE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlOrderColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_ORDER_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Nullable</em>' attribute.
+	 * @see #setNullable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderColumn_2_0_Nullable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getNullable()
+	{
+		return nullable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderColumn#getNullable <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Nullable</em>' attribute.
+	 * @see #getNullable()
+	 * @generated
+	 */
+	public void setNullable(Boolean newNullable)
+	{
+		Boolean oldNullable = nullable;
+		nullable = newNullable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_COLUMN__NULLABLE, oldNullable, nullable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Insertable</em>' attribute.
+	 * @see #setInsertable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderColumn_2_0_Insertable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getInsertable()
+	{
+		return insertable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderColumn#getInsertable <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Insertable</em>' attribute.
+	 * @see #getInsertable()
+	 * @generated
+	 */
+	public void setInsertable(Boolean newInsertable)
+	{
+		Boolean oldInsertable = insertable;
+		insertable = newInsertable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_COLUMN__INSERTABLE, oldInsertable, insertable));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Updatable</em>' attribute.
+	 * @see #setUpdatable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderColumn_2_0_Updatable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getUpdatable()
+	{
+		return updatable;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderColumn#getUpdatable <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Updatable</em>' attribute.
+	 * @see #getUpdatable()
+	 * @generated
+	 */
+	public void setUpdatable(Boolean newUpdatable)
+	{
+		Boolean oldUpdatable = updatable;
+		updatable = newUpdatable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_ORDER_COLUMN__UPDATABLE, oldUpdatable, updatable));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
+				return getNullable();
+			case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
+				return getInsertable();
+			case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
+				return getUpdatable();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
+				setNullable((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
+				setInsertable((Boolean)newValue);
+				return;
+			case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
+				setUpdatable((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
+				setNullable(NULLABLE_EDEFAULT);
+				return;
+			case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
+				setInsertable(INSERTABLE_EDEFAULT);
+				return;
+			case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
+				setUpdatable(UPDATABLE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_ORDER_COLUMN__NULLABLE:
+				return NULLABLE_EDEFAULT == null ? nullable != null : !NULLABLE_EDEFAULT.equals(nullable);
+			case OrmPackage.XML_ORDER_COLUMN__INSERTABLE:
+				return INSERTABLE_EDEFAULT == null ? insertable != null : !INSERTABLE_EDEFAULT.equals(insertable);
+			case OrmPackage.XML_ORDER_COLUMN__UPDATABLE:
+				return UPDATABLE_EDEFAULT == null ? updatable != null : !UPDATABLE_EDEFAULT.equals(updatable);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlOrderColumn_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_ORDER_COLUMN__NULLABLE: return OrmV2_0Package.XML_ORDER_COLUMN_20__NULLABLE;
+				case OrmPackage.XML_ORDER_COLUMN__INSERTABLE: return OrmV2_0Package.XML_ORDER_COLUMN_20__INSERTABLE;
+				case OrmPackage.XML_ORDER_COLUMN__UPDATABLE: return OrmV2_0Package.XML_ORDER_COLUMN_20__UPDATABLE;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlOrderColumn_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_ORDER_COLUMN_20__NULLABLE: return OrmPackage.XML_ORDER_COLUMN__NULLABLE;
+				case OrmV2_0Package.XML_ORDER_COLUMN_20__INSERTABLE: return OrmPackage.XML_ORDER_COLUMN__INSERTABLE;
+				case OrmV2_0Package.XML_ORDER_COLUMN_20__UPDATABLE: return OrmPackage.XML_ORDER_COLUMN__UPDATABLE;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (nullable: ");
+		result.append(nullable);
+		result.append(", insertable: ");
+		result.append(insertable);
+		result.append(", updatable: ");
+		result.append(updatable);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildNullableTranslator(),
+			buildInsertableTranslator(),
+			buildUpdatableTranslator(),
+			buildColumnDefinitionTranslator(),
+		};
+	}
+		
+	protected static Translator buildNullableTranslator() {
+		return new BooleanTranslator(JPA.NULLABLE, OrmV2_0Package.eINSTANCE.getXmlOrderColumn_2_0_Nullable(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildInsertableTranslator() {
+		return new BooleanTranslator(JPA.INSERTABLE, OrmV2_0Package.eINSTANCE.getXmlOrderColumn_2_0_Insertable(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildUpdatableTranslator() {
+		return new BooleanTranslator(JPA.UPDATABLE, OrmV2_0Package.eINSTANCE.getXmlOrderColumn_2_0_Updatable(), Translator.DOM_ATTRIBUTE);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOrderable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOrderable.java
new file mode 100644
index 0000000..0cfbcbf
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOrderable.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Orderable</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlOrderable#getOrderBy <em>Order By</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlOrderable extends XmlOrderable_2_0
+{
+	/**
+	 * Returns the value of the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Order By</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Order By</em>' attribute.
+	 * @see #setOrderBy(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOrderable_OrderBy()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getOrderBy();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOrderable#getOrderBy <em>Order By</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Order By</em>' attribute.
+	 * @see #getOrderBy()
+	 * @generated
+	 */
+	void setOrderBy(String value);
+
+} // XmlOrderable
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOverride.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOverride.java
new file mode 100644
index 0000000..ec3c36f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlOverride.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Override</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlOverride#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOverride()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlOverride extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlOverride_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlOverride#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	void setName(String value);
+
+} // XmlOverride
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPersistenceUnitDefaults.java
new file mode 100644
index 0000000..dbc04b5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPersistenceUnitDefaults.java
@@ -0,0 +1,727 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>XmlPersistence Unit Defaults</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getSchema <em>Schema</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog <em>Catalog</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist <em>Cascade Persist</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners <em>Entity Listeners</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlPersistenceUnitDefaults extends AbstractJpaEObject implements XmlAccessHolder, XmlPersistenceUnitDefaults_2_0
+{
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final AccessType ACCESS_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getAccess() <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAccess()
+	 * @generated
+	 * @ordered
+	 */
+	protected AccessType access = ACCESS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isDelimitedIdentifiers() <em>Delimited Identifiers</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isDelimitedIdentifiers()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean DELIMITED_IDENTIFIERS_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isDelimitedIdentifiers() <em>Delimited Identifiers</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isDelimitedIdentifiers()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean delimitedIdentifiers = DELIMITED_IDENTIFIERS_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCHEMA_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected String schema = SCHEMA_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CATALOG_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected String catalog = CATALOG_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadePersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean CASCADE_PERSIST_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isCascadePersist() <em>Cascade Persist</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isCascadePersist()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean cascadePersist = CASCADE_PERSIST_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getEntityListeners() <em>Entity Listeners</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEntityListeners()
+	 * @generated
+	 * @ordered
+	 */
+	protected EntityListeners entityListeners;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlPersistenceUnitDefaults()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_PERSISTENCE_UNIT_DEFAULTS;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema</em>' attribute.
+	 * @see #setSchema(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_Schema()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getSchema()
+	{
+		return schema;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getSchema <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema</em>' attribute.
+	 * @see #getSchema()
+	 * @generated
+	 */
+	public void setSchema(String newSchema)
+	{
+		String oldSchema = schema;
+		schema = newSchema;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA, oldSchema, schema));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Catalog</em>' attribute.
+	 * @see #setCatalog(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_Catalog()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getCatalog()
+	{
+		return catalog;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getCatalog <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Catalog</em>' attribute.
+	 * @see #getCatalog()
+	 * @generated
+	 */
+	public void setCatalog(String newCatalog)
+	{
+		String oldCatalog = catalog;
+		catalog = newCatalog;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG, oldCatalog, catalog));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Access</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.AccessType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Access</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #setAccess(AccessType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlAccessHolder_Access()
+	 * @model
+	 * @generated
+	 */
+	public AccessType getAccess()
+	{
+		return access;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getAccess <em>Access</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Access</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.AccessType
+	 * @see #getAccess()
+	 * @generated
+	 */
+	public void setAccess(AccessType newAccess)
+	{
+		AccessType oldAccess = access;
+		access = newAccess == null ? ACCESS_EDEFAULT : newAccess;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS, oldAccess, access));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Delimited Identifiers</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Delimited Identifiers</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Delimited Identifiers</em>' attribute.
+	 * @see #setDelimitedIdentifiers(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isDelimitedIdentifiers()
+	{
+		return delimitedIdentifiers;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#isDelimitedIdentifiers <em>Delimited Identifiers</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Delimited Identifiers</em>' attribute.
+	 * @see #isDelimitedIdentifiers()
+	 * @generated
+	 */
+	public void setDelimitedIdentifiers(boolean newDelimitedIdentifiers)
+	{
+		boolean oldDelimitedIdentifiers = delimitedIdentifiers;
+		delimitedIdentifiers = newDelimitedIdentifiers;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS, oldDelimitedIdentifiers, delimitedIdentifiers));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Cascade Persist</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Persist</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Persist</em>' attribute.
+	 * @see #setCascadePersist(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_CascadePersist()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isCascadePersist()
+	{
+		return cascadePersist;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#isCascadePersist <em>Cascade Persist</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Persist</em>' attribute.
+	 * @see #isCascadePersist()
+	 * @generated
+	 */
+	public void setCascadePersist(boolean newCascadePersist)
+	{
+		boolean oldCascadePersist = cascadePersist;
+		cascadePersist = newCascadePersist;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST, oldCascadePersist, cascadePersist));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Entity Listeners</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Entity Listeners</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Entity Listeners</em>' containment reference.
+	 * @see #setEntityListeners(EntityListeners)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitDefaults_EntityListeners()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EntityListeners getEntityListeners()
+	{
+		return entityListeners;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetEntityListeners(EntityListeners newEntityListeners, NotificationChain msgs)
+	{
+		EntityListeners oldEntityListeners = entityListeners;
+		entityListeners = newEntityListeners;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, oldEntityListeners, newEntityListeners);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitDefaults#getEntityListeners <em>Entity Listeners</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Entity Listeners</em>' containment reference.
+	 * @see #getEntityListeners()
+	 * @generated
+	 */
+	public void setEntityListeners(EntityListeners newEntityListeners)
+	{
+		if (newEntityListeners != entityListeners)
+		{
+			NotificationChain msgs = null;
+			if (entityListeners != null)
+				msgs = ((InternalEObject)entityListeners).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, null, msgs);
+			if (newEntityListeners != null)
+				msgs = ((InternalEObject)newEntityListeners).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, null, msgs);
+			msgs = basicSetEntityListeners(newEntityListeners, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS, newEntityListeners, newEntityListeners));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
+				return basicSetEntityListeners(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
+				return getAccess();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
+				return isDelimitedIdentifiers();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
+				return getSchema();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
+				return getCatalog();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
+				return isCascadePersist();
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
+				return getEntityListeners();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
+				setAccess((AccessType)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
+				setDelimitedIdentifiers((Boolean)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
+				setSchema((String)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
+				setCatalog((String)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
+				setCascadePersist((Boolean)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
+				setEntityListeners((EntityListeners)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
+				setAccess(ACCESS_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
+				setDelimitedIdentifiers(DELIMITED_IDENTIFIERS_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
+				setSchema(SCHEMA_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
+				setCatalog(CATALOG_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
+				setCascadePersist(CASCADE_PERSIST_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
+				setEntityListeners((EntityListeners)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ACCESS:
+				return access != ACCESS_EDEFAULT;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS:
+				return delimitedIdentifiers != DELIMITED_IDENTIFIERS_EDEFAULT;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__SCHEMA:
+				return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CATALOG:
+				return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__CASCADE_PERSIST:
+				return cascadePersist != CASCADE_PERSIST_EDEFAULT;
+			case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__ENTITY_LISTENERS:
+				return entityListeners != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlPersistenceUnitDefaults_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION: return OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION;
+				case OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS: return OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlPersistenceUnitDefaults_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION: return OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DESCRIPTION;
+				case OrmV2_0Package.XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS: return OrmPackage.XML_PERSISTENCE_UNIT_DEFAULTS__DELIMITED_IDENTIFIERS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (access: ");
+		result.append(access);
+		result.append(", description: ");
+		result.append(description);
+		result.append(", delimitedIdentifiers: ");
+		result.append(delimitedIdentifiers);
+		result.append(", schema: ");
+		result.append(schema);
+		result.append(", catalog: ");
+		result.append(catalog);
+		result.append(", cascadePersist: ");
+		result.append(cascadePersist);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildDescriptionTranslator(),
+			buildSchemaTranslator(),
+			buildCatalogTranslator(),
+			buildDelimitedIdentifiersTranslator(),
+			buildAccessTranslator(),
+			buildCascadePersistTranslator(),
+			buildEntityListenersTranslator()
+		};
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlPersistenceUnitDefaults_2_0_Description());
+	}
+	
+	protected static Translator buildSchemaTranslator() {
+		return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_Schema());
+	}
+	
+	protected static Translator buildCatalogTranslator() {
+		return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_Catalog());
+	}
+	
+	protected static Translator buildDelimitedIdentifiersTranslator() {
+		return new EmptyTagBooleanTranslator(JPA2_0.DELIMITIED_IDENTIFIERS, OrmV2_0Package.eINSTANCE.getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers());
+	}
+	
+	protected static Translator buildAccessTranslator() {
+		return new Translator(JPA.ACCESS, OrmPackage.eINSTANCE.getXmlAccessHolder_Access());
+	}
+	
+	protected static Translator buildCascadePersistTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.CASCADE_PERSIST, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_CascadePersist());
+	}
+
+	protected static Translator buildEntityListenersTranslator() {
+		return EntityListeners.buildTranslator(JPA.ENTITY_LISTENERS, OrmPackage.eINSTANCE.getXmlPersistenceUnitDefaults_EntityListeners());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPersistenceUnitMetadata.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPersistenceUnitMetadata.java
new file mode 100644
index 0000000..c0bf2e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPersistenceUnitMetadata.java
@@ -0,0 +1,394 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.EmptyTagBooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>XmlPersistence Unit Metadata</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults <em>Persistence Unit Defaults</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlPersistenceUnitMetadata extends AbstractJpaEObject implements XmlPersistenceUnitMetadata_2_0
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #isXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isXmlMappingMetadataComplete()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean XML_MAPPING_METADATA_COMPLETE_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isXmlMappingMetadataComplete() <em>Xml Mapping Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isXmlMappingMetadataComplete()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean xmlMappingMetadataComplete = XML_MAPPING_METADATA_COMPLETE_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getPersistenceUnitDefaults() <em>Persistence Unit Defaults</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPersistenceUnitDefaults()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlPersistenceUnitDefaults persistenceUnitDefaults;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlPersistenceUnitMetadata()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_PERSISTENCE_UNIT_METADATA;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Xml Mapping Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Xml Mapping Metadata Complete</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Xml Mapping Metadata Complete</em>' attribute.
+	 * @see #setXmlMappingMetadataComplete(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isXmlMappingMetadataComplete()
+	{
+		return xmlMappingMetadataComplete;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#isXmlMappingMetadataComplete <em>Xml Mapping Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Xml Mapping Metadata Complete</em>' attribute.
+	 * @see #isXmlMappingMetadataComplete()
+	 * @generated
+	 */
+	public void setXmlMappingMetadataComplete(boolean newXmlMappingMetadataComplete)
+	{
+		boolean oldXmlMappingMetadataComplete = xmlMappingMetadataComplete;
+		xmlMappingMetadataComplete = newXmlMappingMetadataComplete;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE, oldXmlMappingMetadataComplete, xmlMappingMetadataComplete));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Persistence Unit Defaults</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>XmlPersistence Unit Defaults</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Persistence Unit Defaults</em>' containment reference.
+	 * @see #setPersistenceUnitDefaults(XmlPersistenceUnitDefaults)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPersistenceUnitMetadata_PersistenceUnitDefaults()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlPersistenceUnitDefaults getPersistenceUnitDefaults()
+	{
+		return persistenceUnitDefaults;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetPersistenceUnitDefaults(XmlPersistenceUnitDefaults newPersistenceUnitDefaults, NotificationChain msgs)
+	{
+		XmlPersistenceUnitDefaults oldPersistenceUnitDefaults = persistenceUnitDefaults;
+		persistenceUnitDefaults = newPersistenceUnitDefaults;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, oldPersistenceUnitDefaults, newPersistenceUnitDefaults);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPersistenceUnitMetadata#getPersistenceUnitDefaults <em>Persistence Unit Defaults</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Persistence Unit Defaults</em>' containment reference.
+	 * @see #getPersistenceUnitDefaults()
+	 * @generated
+	 */
+	public void setPersistenceUnitDefaults(XmlPersistenceUnitDefaults newPersistenceUnitDefaults)
+	{
+		if (newPersistenceUnitDefaults != persistenceUnitDefaults)
+		{
+			NotificationChain msgs = null;
+			if (persistenceUnitDefaults != null)
+				msgs = ((InternalEObject)persistenceUnitDefaults).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, null, msgs);
+			if (newPersistenceUnitDefaults != null)
+				msgs = ((InternalEObject)newPersistenceUnitDefaults).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, null, msgs);
+			msgs = basicSetPersistenceUnitDefaults(newPersistenceUnitDefaults, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS, newPersistenceUnitDefaults, newPersistenceUnitDefaults));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
+				return basicSetPersistenceUnitDefaults(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
+				return isXmlMappingMetadataComplete();
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
+				return getPersistenceUnitDefaults();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
+				setXmlMappingMetadataComplete((Boolean)newValue);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
+				setPersistenceUnitDefaults((XmlPersistenceUnitDefaults)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
+				setXmlMappingMetadataComplete(XML_MAPPING_METADATA_COMPLETE_EDEFAULT);
+				return;
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
+				setPersistenceUnitDefaults((XmlPersistenceUnitDefaults)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__XML_MAPPING_METADATA_COMPLETE:
+				return xmlMappingMetadataComplete != XML_MAPPING_METADATA_COMPLETE_EDEFAULT;
+			case OrmPackage.XML_PERSISTENCE_UNIT_METADATA__PERSISTENCE_UNIT_DEFAULTS:
+				return persistenceUnitDefaults != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", xmlMappingMetadataComplete: ");
+		result.append(xmlMappingMetadataComplete);
+		result.append(')');
+		return result.toString();
+	}
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildDescriptionTranslator(),
+			buildXmlMappingMetadataCompleteTranslator(),
+			XmlPersistenceUnitDefaults.buildTranslator(JPA.PERSISTENCE_UNIT_DEFAULTS, OrmPackage.eINSTANCE.getXmlPersistenceUnitMetadata_PersistenceUnitDefaults())
+		};
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlPersistenceUnitMetadata_2_0_Description());
+	}
+
+	protected static Translator buildXmlMappingMetadataCompleteTranslator() {
+		return new EmptyTagBooleanTranslator(JPA.XML_MAPPING_METADATA_COMPLETE, OrmPackage.eINSTANCE.getXmlPersistenceUnitMetadata_XmlMappingMetadataComplete());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPrimaryKeyJoinColumn.java
new file mode 100644
index 0000000..1c3bee5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlPrimaryKeyJoinColumn.java
@@ -0,0 +1,230 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Primary Key Join Column Impl</b></em>'.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlPrimaryKeyJoinColumn extends AbstractXmlNamedColumn
+{
+	/**
+	 * The default value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getReferencedColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String REFERENCED_COLUMN_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getReferencedColumnName() <em>Referenced Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getReferencedColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String referencedColumnName = REFERENCED_COLUMN_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlPrimaryKeyJoinColumn()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_PRIMARY_KEY_JOIN_COLUMN;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Referenced Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Referenced Column Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Referenced Column Name</em>' attribute.
+	 * @see #setReferencedColumnName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlPrimaryKeyJoinColumn_ReferencedColumnName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getReferencedColumnName()
+	{
+		return referencedColumnName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn#getReferencedColumnName <em>Referenced Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Referenced Column Name</em>' attribute.
+	 * @see #getReferencedColumnName()
+	 * @generated
+	 */
+	public void setReferencedColumnName(String newReferencedColumnName)
+	{
+		String oldReferencedColumnName = referencedColumnName;
+		referencedColumnName = newReferencedColumnName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME, oldReferencedColumnName, referencedColumnName));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				return getReferencedColumnName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				setReferencedColumnName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				setReferencedColumnName(REFERENCED_COLUMN_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_PRIMARY_KEY_JOIN_COLUMN__REFERENCED_COLUMN_NAME:
+				return REFERENCED_COLUMN_NAME_EDEFAULT == null ? referencedColumnName != null : !REFERENCED_COLUMN_NAME_EDEFAULT.equals(referencedColumnName);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (referencedColumnName: ");
+		result.append(referencedColumnName);
+		result.append(')');
+		return result.toString();
+	}
+
+	public TextRange getReferencedColumnNameTextRange() {
+		return getAttributeTextRange(JPA.REFERENCED_COLUMN_NAME);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildReferencedColumnNameTranslator(),
+			buildColumnDefinitionTranslator(),
+		};
+	}
+	
+	protected static Translator buildReferencedColumnNameTranslator() {
+		return new Translator(JPA.REFERENCED_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlPrimaryKeyJoinColumn_ReferencedColumnName(), Translator.DOM_ATTRIBUTE);
+	}
+	
+} // XmlPrimaryKeyJoinColumnImpl
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQuery.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQuery.java
new file mode 100644
index 0000000..93e64f1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQuery.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Query</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getQuery <em>Query</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getHints <em>Hints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlQuery extends XmlQuery_2_0
+{
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	void setName(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Query</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Query</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Query</em>' attribute.
+	 * @see #setQuery(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Query()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getQuery();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlQuery#getQuery <em>Query</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Query</em>' attribute.
+	 * @see #getQuery()
+	 * @generated
+	 */
+	void setQuery(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Hints</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlQueryHint}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Hints</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Hints</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQuery_Hints()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlQueryHint> getHints();
+	
+	public TextRange getNameTextRange();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQueryContainer.java
new file mode 100644
index 0000000..ab7411c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQueryContainer.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Queries Holder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer#getNamedQueries <em>Named Queries</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQueryContainer#getNamedNativeQueries <em>Named Native Queries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlQueryContainer extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Named Queries</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlNamedQuery}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Named Queries</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Named Queries</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedQueries()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlNamedQuery> getNamedQueries();
+
+	/**
+	 * Returns the value of the '<em><b>Named Native Queries</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlNamedNativeQuery}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Named Native Queries</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Named Native Queries</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryContainer_NamedNativeQueries()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlNamedNativeQuery> getNamedNativeQueries();
+
+} // XmlQueriesHolder
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQueryHint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQueryHint.java
new file mode 100644
index 0000000..53ef6bd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlQueryHint.java
@@ -0,0 +1,366 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Query Hint</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryHint()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlQueryHint extends AbstractJpaEObject implements XmlQueryHint_2_0
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected String value = VALUE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlQueryHint()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_QUERY_HINT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryHint_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_QUERY_HINT__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryHint_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_QUERY_HINT__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Value</em>' attribute.
+	 * @see #setValue(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlQueryHint_Value()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getValue()
+	{
+		return value;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlQueryHint#getValue <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Value</em>' attribute.
+	 * @see #getValue()
+	 * @generated
+	 */
+	public void setValue(String newValue)
+	{
+		String oldValue = value;
+		value = newValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_QUERY_HINT__VALUE, oldValue, value));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_QUERY_HINT__NAME:
+				return getName();
+			case OrmPackage.XML_QUERY_HINT__VALUE:
+				return getValue();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_QUERY_HINT__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_QUERY_HINT__VALUE:
+				setValue((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_QUERY_HINT__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_QUERY_HINT__VALUE:
+				setValue(VALUE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_QUERY_HINT__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_QUERY_HINT__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_QUERY_HINT__VALUE:
+				return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", value: ");
+		result.append(value);
+		result.append(')');
+		return result.toString();
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildValueTranslator(),
+			buildDescriptionTranslator()
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlQueryHint_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildValueTranslator() {
+		return new Translator(JPA.VALUE, OrmPackage.eINSTANCE.getXmlQueryHint_Value(), Translator.DOM_ATTRIBUTE);
+	}
+
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA2_0.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlQueryHint_2_0_Description());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlReferenceTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlReferenceTable.java
new file mode 100644
index 0000000..725a137
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlReferenceTable.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Reference Table</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlReferenceTable#getJoinColumns <em>Join Columns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlReferenceTable()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlReferenceTable extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlReferenceTable_JoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlJoinColumn> getJoinColumns();
+
+} // XmlReferenceTable
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlSecondaryTable.java
new file mode 100644
index 0000000..fb55b50
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlSecondaryTable.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Secondary Table Impl</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlSecondaryTable#getPrimaryKeyJoinColumns <em>Primary Key Join Columns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSecondaryTable()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlSecondaryTable extends AbstractXmlTable
+{
+	/**
+	 * The cached value of the '{@link #getPrimaryKeyJoinColumns() <em>Primary Key Join Columns</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPrimaryKeyJoinColumns()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlPrimaryKeyJoinColumn> primaryKeyJoinColumns;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlSecondaryTable()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_SECONDARY_TABLE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Primary Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlPrimaryKeyJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Primary Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Primary Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSecondaryTable_PrimaryKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
+	{
+		if (primaryKeyJoinColumns == null)
+		{
+			primaryKeyJoinColumns = new EObjectContainmentEList<XmlPrimaryKeyJoinColumn>(XmlPrimaryKeyJoinColumn.class, this, OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS);
+		}
+		return primaryKeyJoinColumns;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
+				return ((InternalEList<?>)getPrimaryKeyJoinColumns()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
+				return getPrimaryKeyJoinColumns();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
+				getPrimaryKeyJoinColumns().clear();
+				getPrimaryKeyJoinColumns().addAll((Collection<? extends XmlPrimaryKeyJoinColumn>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
+				getPrimaryKeyJoinColumns().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SECONDARY_TABLE__PRIMARY_KEY_JOIN_COLUMNS:
+				return primaryKeyJoinColumns != null && !primaryKeyJoinColumns.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildCatalogTranslator(),
+			buildSchemaTranslator(),
+			buildPrimaryKeyJoinColumnsTranslator(),
+			buildUniqueConstraintTranslator()
+		};
+	}
+	
+	protected static Translator buildPrimaryKeyJoinColumnsTranslator() {
+		return XmlPrimaryKeyJoinColumn.buildTranslator(JPA.PRIMARY_KEY_JOIN_COLUMN, OrmPackage.eINSTANCE.getXmlSecondaryTable_PrimaryKeyJoinColumns());
+	}
+
+} // XmlSecondaryTableImpl
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlSequenceGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlSequenceGenerator.java
new file mode 100644
index 0000000..7427678
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlSequenceGenerator.java
@@ -0,0 +1,705 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Sequence Generator</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getSequenceName <em>Sequence Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSequenceGenerator()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlSequenceGenerator extends AbstractJpaEObject implements XmlGenerator, XmlSequenceGenerator_2_0
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInitialValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer INITIAL_VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInitialValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer initialValue = INITIAL_VALUE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAllocationSize()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer ALLOCATION_SIZE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAllocationSize()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer allocationSize = ALLOCATION_SIZE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CATALOG_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected String catalog = CATALOG_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCHEMA_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected String schema = SCHEMA_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSequenceName() <em>Sequence Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSequenceName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SEQUENCE_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSequenceName() <em>Sequence Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSequenceName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String sequenceName = SEQUENCE_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlSequenceGenerator()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_SEQUENCE_GENERATOR;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Sequence Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Sequence Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Sequence Name</em>' attribute.
+	 * @see #setSequenceName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSequenceGenerator_SequenceName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getSequenceName()
+	{
+		return sequenceName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getSequenceName <em>Sequence Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Sequence Name</em>' attribute.
+	 * @see #getSequenceName()
+	 * @generated
+	 */
+	public void setSequenceName(String newSequenceName)
+	{
+		String oldSequenceName = sequenceName;
+		sequenceName = newSequenceName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME, oldSequenceName, sequenceName));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Initial Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Initial Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Initial Value</em>' attribute.
+	 * @see #setInitialValue(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_InitialValue()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getInitialValue()
+	{
+		return initialValue;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getInitialValue <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Initial Value</em>' attribute.
+	 * @see #getInitialValue()
+	 * @generated
+	 */
+	public void setInitialValue(Integer newInitialValue)
+	{
+		Integer oldInitialValue = initialValue;
+		initialValue = newInitialValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE, oldInitialValue, initialValue));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Allocation Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Allocation Size</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Allocation Size</em>' attribute.
+	 * @see #setAllocationSize(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_AllocationSize()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getAllocationSize()
+	{
+		return allocationSize;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getAllocationSize <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Allocation Size</em>' attribute.
+	 * @see #getAllocationSize()
+	 * @generated
+	 */
+	public void setAllocationSize(Integer newAllocationSize)
+	{
+		Integer oldAllocationSize = allocationSize;
+		allocationSize = newAllocationSize;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE, oldAllocationSize, allocationSize));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Catalog</em>' attribute.
+	 * @see #setCatalog(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSequenceGenerator_2_0_Catalog()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getCatalog()
+	{
+		return catalog;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getCatalog <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Catalog</em>' attribute.
+	 * @see #getCatalog()
+	 * @generated
+	 */
+	public void setCatalog(String newCatalog)
+	{
+		String oldCatalog = catalog;
+		catalog = newCatalog;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG, oldCatalog, catalog));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema</em>' attribute.
+	 * @see #setSchema(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlSequenceGenerator_2_0_Schema()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getSchema()
+	{
+		return schema;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlSequenceGenerator#getSchema <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema</em>' attribute.
+	 * @see #getSchema()
+	 * @generated
+	 */
+	public void setSchema(String newSchema)
+	{
+		String oldSchema = schema;
+		schema = newSchema;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA, oldSchema, schema));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
+				return getName();
+			case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
+				return getInitialValue();
+			case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
+				return getAllocationSize();
+			case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
+				return getCatalog();
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
+				return getSchema();
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
+				return getSequenceName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
+				setInitialValue((Integer)newValue);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
+				setAllocationSize((Integer)newValue);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
+				setCatalog((String)newValue);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
+				setSchema((String)newValue);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
+				setSequenceName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
+				setInitialValue(INITIAL_VALUE_EDEFAULT);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
+				setAllocationSize(ALLOCATION_SIZE_EDEFAULT);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
+				setCatalog(CATALOG_EDEFAULT);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
+				setSchema(SCHEMA_EDEFAULT);
+				return;
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
+				setSequenceName(SEQUENCE_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_SEQUENCE_GENERATOR__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_SEQUENCE_GENERATOR__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_SEQUENCE_GENERATOR__INITIAL_VALUE:
+				return INITIAL_VALUE_EDEFAULT == null ? initialValue != null : !INITIAL_VALUE_EDEFAULT.equals(initialValue);
+			case OrmPackage.XML_SEQUENCE_GENERATOR__ALLOCATION_SIZE:
+				return ALLOCATION_SIZE_EDEFAULT == null ? allocationSize != null : !ALLOCATION_SIZE_EDEFAULT.equals(allocationSize);
+			case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG:
+				return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA:
+				return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
+			case OrmPackage.XML_SEQUENCE_GENERATOR__SEQUENCE_NAME:
+				return SEQUENCE_NAME_EDEFAULT == null ? sequenceName != null : !SEQUENCE_NAME_EDEFAULT.equals(sequenceName);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlSequenceGenerator_2_0.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG: return OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__CATALOG;
+				case OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA: return OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__SCHEMA;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == XmlSequenceGenerator_2_0.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__CATALOG: return OrmPackage.XML_SEQUENCE_GENERATOR__CATALOG;
+				case OrmV2_0Package.XML_SEQUENCE_GENERATOR_20__SCHEMA: return OrmPackage.XML_SEQUENCE_GENERATOR__SCHEMA;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", initialValue: ");
+		result.append(initialValue);
+		result.append(", allocationSize: ");
+		result.append(allocationSize);
+		result.append(", catalog: ");
+		result.append(catalog);
+		result.append(", schema: ");
+		result.append(schema);
+		result.append(", sequenceName: ");
+		result.append(sequenceName);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	public boolean isVirtual() {
+		return false;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName, 
+			structuralFeature, 
+			Translator.END_TAG_NO_INDENT, 
+			buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildSequenceNameTranslator(),
+			buildInitialValueTranslator(),
+			buildAllocationSizeTranslator(),
+			buildCatalogTranslator(),
+			buildSchemaTranslator(),
+			buildDescriptionTranslator(),
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlGenerator_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildSequenceNameTranslator() {
+		return new Translator(JPA.SEQUENCE_NAME, OrmPackage.eINSTANCE.getXmlSequenceGenerator_SequenceName(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildInitialValueTranslator() {
+		return new Translator(JPA.INITIAL_VALUE, OrmPackage.eINSTANCE.getXmlGenerator_InitialValue(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildAllocationSizeTranslator() {
+		return new Translator(JPA.ALLOCATION_SIZE, OrmPackage.eINSTANCE.getXmlGenerator_AllocationSize(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlGenerator_2_0_Description());
+	}
+
+	protected static Translator buildCatalogTranslator() {
+		return new Translator(JPA.CATALOG, OrmV2_0Package.eINSTANCE.getXmlSequenceGenerator_2_0_Catalog(), Translator.DOM_ATTRIBUTE);
+	}
+
+	protected static Translator buildSchemaTranslator() {
+		return new Translator(JPA.SCHEMA, OrmV2_0Package.eINSTANCE.getXmlSequenceGenerator_2_0_Schema(), Translator.DOM_ATTRIBUTE);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTable.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTable.java
new file mode 100644
index 0000000..5b2c147
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTable.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Table</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTable()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlTable extends AbstractXmlTable
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlTable()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_TABLE;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildCatalogTranslator(),
+			buildSchemaTranslator(),
+			buildUniqueConstraintTranslator()
+		};
+	}
+	
+} // Table
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTableGenerator.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTableGenerator.java
new file mode 100644
index 0000000..8ab04ba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTableGenerator.java
@@ -0,0 +1,950 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Table Generator</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getTable <em>Table</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getCatalog <em>Catalog</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getSchema <em>Schema</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnName <em>Pk Column Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getValueColumnName <em>Value Column Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnValue <em>Pk Column Value</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getUniqueConstraints <em>Unique Constraints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlTableGenerator extends AbstractJpaEObject implements XmlGenerator
+{
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInitialValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer INITIAL_VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getInitialValue() <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getInitialValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer initialValue = INITIAL_VALUE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAllocationSize()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Integer ALLOCATION_SIZE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getAllocationSize() <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAllocationSize()
+	 * @generated
+	 * @ordered
+	 */
+	protected Integer allocationSize = ALLOCATION_SIZE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getTable() <em>Table</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String TABLE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTable() <em>Table</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTable()
+	 * @generated
+	 * @ordered
+	 */
+	protected String table = TABLE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String CATALOG_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getCatalog() <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getCatalog()
+	 * @generated
+	 * @ordered
+	 */
+	protected String catalog = CATALOG_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCHEMA_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSchema() <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchema()
+	 * @generated
+	 * @ordered
+	 */
+	protected String schema = SCHEMA_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getPkColumnName() <em>Pk Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPkColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String PK_COLUMN_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getPkColumnName() <em>Pk Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPkColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String pkColumnName = PK_COLUMN_NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getValueColumnName() <em>Value Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValueColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String VALUE_COLUMN_NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getValueColumnName() <em>Value Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValueColumnName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String valueColumnName = VALUE_COLUMN_NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getPkColumnValue() <em>Pk Column Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPkColumnValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String PK_COLUMN_VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getPkColumnValue() <em>Pk Column Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPkColumnValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected String pkColumnValue = PK_COLUMN_VALUE_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getUniqueConstraints() <em>Unique Constraints</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getUniqueConstraints()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlUniqueConstraint> uniqueConstraints;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlTableGenerator()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_TABLE_GENERATOR;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Table</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Table</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Table</em>' attribute.
+	 * @see #setTable(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_Table()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getTable()
+	{
+		return table;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getTable <em>Table</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Table</em>' attribute.
+	 * @see #getTable()
+	 * @generated
+	 */
+	public void setTable(String newTable)
+	{
+		String oldTable = table;
+		table = newTable;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__TABLE, oldTable, table));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Catalog</em>' attribute.
+	 * @see #setCatalog(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_Catalog()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getCatalog()
+	{
+		return catalog;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getCatalog <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Catalog</em>' attribute.
+	 * @see #getCatalog()
+	 * @generated
+	 */
+	public void setCatalog(String newCatalog)
+	{
+		String oldCatalog = catalog;
+		catalog = newCatalog;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__CATALOG, oldCatalog, catalog));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema</em>' attribute.
+	 * @see #setSchema(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_Schema()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getSchema()
+	{
+		return schema;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getSchema <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema</em>' attribute.
+	 * @see #getSchema()
+	 * @generated
+	 */
+	public void setSchema(String newSchema)
+	{
+		String oldSchema = schema;
+		schema = newSchema;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__SCHEMA, oldSchema, schema));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pk Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pk Column Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pk Column Name</em>' attribute.
+	 * @see #setPkColumnName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_PkColumnName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getPkColumnName()
+	{
+		return pkColumnName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnName <em>Pk Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pk Column Name</em>' attribute.
+	 * @see #getPkColumnName()
+	 * @generated
+	 */
+	public void setPkColumnName(String newPkColumnName)
+	{
+		String oldPkColumnName = pkColumnName;
+		pkColumnName = newPkColumnName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME, oldPkColumnName, pkColumnName));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Value Column Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Value Column Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Value Column Name</em>' attribute.
+	 * @see #setValueColumnName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_ValueColumnName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getValueColumnName()
+	{
+		return valueColumnName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getValueColumnName <em>Value Column Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Value Column Name</em>' attribute.
+	 * @see #getValueColumnName()
+	 * @generated
+	 */
+	public void setValueColumnName(String newValueColumnName)
+	{
+		String oldValueColumnName = valueColumnName;
+		valueColumnName = newValueColumnName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME, oldValueColumnName, valueColumnName));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Pk Column Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Pk Column Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Pk Column Value</em>' attribute.
+	 * @see #setPkColumnValue(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_PkColumnValue()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getPkColumnValue()
+	{
+		return pkColumnValue;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getPkColumnValue <em>Pk Column Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Pk Column Value</em>' attribute.
+	 * @see #getPkColumnValue()
+	 * @generated
+	 */
+	public void setPkColumnValue(String newPkColumnValue)
+	{
+		String oldPkColumnValue = pkColumnValue;
+		pkColumnValue = newPkColumnValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE, oldPkColumnValue, pkColumnValue));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Initial Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Initial Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Initial Value</em>' attribute.
+	 * @see #setInitialValue(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_InitialValue()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getInitialValue()
+	{
+		return initialValue;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getInitialValue <em>Initial Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Initial Value</em>' attribute.
+	 * @see #getInitialValue()
+	 * @generated
+	 */
+	public void setInitialValue(Integer newInitialValue)
+	{
+		Integer oldInitialValue = initialValue;
+		initialValue = newInitialValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE, oldInitialValue, initialValue));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Allocation Size</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Allocation Size</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Allocation Size</em>' attribute.
+	 * @see #setAllocationSize(Integer)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlGenerator_AllocationSize()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.IntObject"
+	 * @generated
+	 */
+	public Integer getAllocationSize()
+	{
+		return allocationSize;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTableGenerator#getAllocationSize <em>Allocation Size</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Allocation Size</em>' attribute.
+	 * @see #getAllocationSize()
+	 * @generated
+	 */
+	public void setAllocationSize(Integer newAllocationSize)
+	{
+		Integer oldAllocationSize = allocationSize;
+		allocationSize = newAllocationSize;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE, oldAllocationSize, allocationSize));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Unique Constraints</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Unique Constraints</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Unique Constraints</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTableGenerator_UniqueConstraints()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlUniqueConstraint> getUniqueConstraints()
+	{
+		if (uniqueConstraints == null)
+		{
+			uniqueConstraints = new EObjectContainmentEList<XmlUniqueConstraint>(XmlUniqueConstraint.class, this, OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS);
+		}
+		return uniqueConstraints;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
+				return ((InternalEList<?>)getUniqueConstraints()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
+				return getDescription();
+			case OrmPackage.XML_TABLE_GENERATOR__NAME:
+				return getName();
+			case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
+				return getInitialValue();
+			case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
+				return getAllocationSize();
+			case OrmPackage.XML_TABLE_GENERATOR__TABLE:
+				return getTable();
+			case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
+				return getCatalog();
+			case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
+				return getSchema();
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
+				return getPkColumnName();
+			case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
+				return getValueColumnName();
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
+				return getPkColumnValue();
+			case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
+				return getUniqueConstraints();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
+				setInitialValue((Integer)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
+				setAllocationSize((Integer)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__TABLE:
+				setTable((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
+				setCatalog((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
+				setSchema((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
+				setPkColumnName((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
+				setValueColumnName((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
+				setPkColumnValue((String)newValue);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
+				getUniqueConstraints().clear();
+				getUniqueConstraints().addAll((Collection<? extends XmlUniqueConstraint>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
+				setInitialValue(INITIAL_VALUE_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
+				setAllocationSize(ALLOCATION_SIZE_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__TABLE:
+				setTable(TABLE_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
+				setCatalog(CATALOG_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
+				setSchema(SCHEMA_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
+				setPkColumnName(PK_COLUMN_NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
+				setValueColumnName(VALUE_COLUMN_NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
+				setPkColumnValue(PK_COLUMN_VALUE_EDEFAULT);
+				return;
+			case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
+				getUniqueConstraints().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_TABLE_GENERATOR__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case OrmPackage.XML_TABLE_GENERATOR__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_TABLE_GENERATOR__INITIAL_VALUE:
+				return INITIAL_VALUE_EDEFAULT == null ? initialValue != null : !INITIAL_VALUE_EDEFAULT.equals(initialValue);
+			case OrmPackage.XML_TABLE_GENERATOR__ALLOCATION_SIZE:
+				return ALLOCATION_SIZE_EDEFAULT == null ? allocationSize != null : !ALLOCATION_SIZE_EDEFAULT.equals(allocationSize);
+			case OrmPackage.XML_TABLE_GENERATOR__TABLE:
+				return TABLE_EDEFAULT == null ? table != null : !TABLE_EDEFAULT.equals(table);
+			case OrmPackage.XML_TABLE_GENERATOR__CATALOG:
+				return CATALOG_EDEFAULT == null ? catalog != null : !CATALOG_EDEFAULT.equals(catalog);
+			case OrmPackage.XML_TABLE_GENERATOR__SCHEMA:
+				return SCHEMA_EDEFAULT == null ? schema != null : !SCHEMA_EDEFAULT.equals(schema);
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_NAME:
+				return PK_COLUMN_NAME_EDEFAULT == null ? pkColumnName != null : !PK_COLUMN_NAME_EDEFAULT.equals(pkColumnName);
+			case OrmPackage.XML_TABLE_GENERATOR__VALUE_COLUMN_NAME:
+				return VALUE_COLUMN_NAME_EDEFAULT == null ? valueColumnName != null : !VALUE_COLUMN_NAME_EDEFAULT.equals(valueColumnName);
+			case OrmPackage.XML_TABLE_GENERATOR__PK_COLUMN_VALUE:
+				return PK_COLUMN_VALUE_EDEFAULT == null ? pkColumnValue != null : !PK_COLUMN_VALUE_EDEFAULT.equals(pkColumnValue);
+			case OrmPackage.XML_TABLE_GENERATOR__UNIQUE_CONSTRAINTS:
+				return uniqueConstraints != null && !uniqueConstraints.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (description: ");
+		result.append(description);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", initialValue: ");
+		result.append(initialValue);
+		result.append(", allocationSize: ");
+		result.append(allocationSize);
+		result.append(", table: ");
+		result.append(table);
+		result.append(", catalog: ");
+		result.append(catalog);
+		result.append(", schema: ");
+		result.append(schema);
+		result.append(", pkColumnName: ");
+		result.append(pkColumnName);
+		result.append(", valueColumnName: ");
+		result.append(valueColumnName);
+		result.append(", pkColumnValue: ");
+		result.append(pkColumnValue);
+		result.append(')');
+		return result.toString();
+	}
+	
+	public TextRange getNameTextRange() {
+		return getAttributeTextRange(JPA.NAME);
+	}
+	
+	public boolean isVirtual() {
+		return false;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildTableTranslator(),
+			buildCatalogTranslator(),
+			buildSchemaTranslator(),
+			buildPkColumnNameTranslator(),
+			buildValueColumnNameTranslator(),
+			buildPkColumnValueTranslator(),
+			buildInitialValueTranslator(),
+			buildAllocationSizeTranslator(),
+			buildDescriptionTranslator(),
+			XmlUniqueConstraint.buildTranslator(JPA.UNIQUE_CONSTRAINT, OrmPackage.eINSTANCE.getXmlTableGenerator_UniqueConstraints())
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmPackage.eINSTANCE.getXmlGenerator_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildTableTranslator() {
+		return new Translator(JPA.TABLE, OrmPackage.eINSTANCE.getXmlTableGenerator_Table(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildCatalogTranslator() {
+		return new Translator(JPA.CATALOG, OrmPackage.eINSTANCE.getXmlTableGenerator_Catalog(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildSchemaTranslator() {
+		return new Translator(JPA.SCHEMA, OrmPackage.eINSTANCE.getXmlTableGenerator_Schema(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildPkColumnNameTranslator() {
+		return new Translator(JPA.PK_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlTableGenerator_PkColumnName(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildValueColumnNameTranslator() {
+		return new Translator(JPA.VALUE_COLUMN_NAME, OrmPackage.eINSTANCE.getXmlTableGenerator_ValueColumnName(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildPkColumnValueTranslator() {
+		return new Translator(JPA.PK_COLUMN_VALUE, OrmPackage.eINSTANCE.getXmlTableGenerator_PkColumnValue(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildInitialValueTranslator() {
+		return new Translator(JPA.INITIAL_VALUE, OrmPackage.eINSTANCE.getXmlGenerator_InitialValue(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildAllocationSizeTranslator() {
+		return new Translator(JPA.ALLOCATION_SIZE, OrmPackage.eINSTANCE.getXmlGenerator_AllocationSize(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(JPA.DESCRIPTION, OrmV2_0Package.eINSTANCE.getXmlGenerator_2_0_Description());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTransient.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTransient.java
new file mode 100644
index 0000000..5be9c03
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTransient.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Transient</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTransient()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlTransient extends AbstractXmlAttributeMapping
+{
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlTransient()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_TRANSIENT;
+	}
+
+	public String getMappingKey() {
+		return MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+			elementName,
+			structuralFeature,
+			Translator.END_TAG_NO_INDENT,
+			buildTranslatorChildren()
+		);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator()
+		};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTypeMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTypeMapping.java
new file mode 100644
index 0000000..e8a71a6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlTypeMapping.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Type Mapping</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ *
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getClassName <em>Class Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getDescription <em>Description</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getAttributes <em>Attributes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlTypeMapping extends XmlAccessHolder
+{
+	/**
+	 * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Class Name</em>' attribute.
+	 * @see #setClassName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_ClassName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getClassName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getClassName <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Class Name</em>' attribute.
+	 * @see #getClassName()
+	 * @generated
+	 */
+	void setClassName(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Metadata Complete</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Metadata Complete</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Metadata Complete</em>' attribute.
+	 * @see #setMetadataComplete(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_MetadataComplete()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getMetadataComplete();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getMetadataComplete <em>Metadata Complete</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Metadata Complete</em>' attribute.
+	 * @see #getMetadataComplete()
+	 * @generated
+	 */
+	void setMetadataComplete(Boolean value);
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Attributes</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Attributes</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Attributes</em>' containment reference.
+	 * @see #setAttributes(Attributes)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlTypeMapping_Attributes()
+	 * @model containment="true"
+	 * @generated
+	 */
+	Attributes getAttributes();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlTypeMapping#getAttributes <em>Attributes</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Attributes</em>' containment reference.
+	 * @see #getAttributes()
+	 * @generated
+	 */
+	void setAttributes(Attributes value);
+	
+	TextRange getClassTextRange();
+
+	TextRange getAttributesTextRange();
+
+	//TODO not happy with this, or the corresponding one in XmlAttributeMapping
+	String getMappingKey();
+} // XmlTypeMapping
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlUniqueConstraint.java
new file mode 100644
index 0000000..9662e2e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlUniqueConstraint.java
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EDataTypeEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Unique Constraint</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint#getColumnNames <em>Column Names</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlUniqueConstraint()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlUniqueConstraint extends AbstractJpaEObject implements XmlUniqueConstraint_2_0
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+	/**
+	 * The cached value of the '{@link #getColumnNames() <em>Column Names</em>}' attribute list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumnNames()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<String> columnNames;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlUniqueConstraint()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_UNIQUE_CONSTRAINT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlUniqueConstraint_2_0_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlUniqueConstraint#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_UNIQUE_CONSTRAINT__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column Names</b></em>' attribute list.
+	 * The list contents are of type {@link java.lang.String}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column Names</em>' attribute list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column Names</em>' attribute list.
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlUniqueConstraint_ColumnNames()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public EList<String> getColumnNames()
+	{
+		if (columnNames == null)
+		{
+			columnNames = new EDataTypeEList<String>(String.class, this, OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES);
+		}
+		return columnNames;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
+				return getName();
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
+				return getColumnNames();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
+				setName((String)newValue);
+				return;
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
+				getColumnNames().clear();
+				getColumnNames().addAll((Collection<? extends String>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
+				getColumnNames().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case OrmPackage.XML_UNIQUE_CONSTRAINT__COLUMN_NAMES:
+				return columnNames != null && !columnNames.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(", columnNames: ");
+		result.append(columnNames);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildColumnNameTranslator(),
+		};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(JPA.NAME, OrmV2_0Package.eINSTANCE.getXmlUniqueConstraint_2_0_Name(), Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildColumnNameTranslator() {
+		return new Translator(JPA.COLUMN_NAME, OrmPackage.eINSTANCE.getXmlUniqueConstraint_ColumnNames());
+	}	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlVersion.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlVersion.java
new file mode 100644
index 0000000..846deb9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/XmlVersion.java
@@ -0,0 +1,523 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.MappingKeys;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Version</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlVersion()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlVersion extends AbstractXmlAttributeMapping implements ColumnMapping, XmlConvertibleMapping
+{
+	/**
+	 * The cached value of the '{@link #getColumn() <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getColumn()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlColumn column;
+	/**
+	 * The default value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean LOB_EDEFAULT = false;
+	/**
+	 * The cached value of the '{@link #isLob() <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isLob()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean lob = LOB_EDEFAULT;
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final TemporalType TEMPORAL_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTemporal() <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTemporal()
+	 * @generated
+	 * @ordered
+	 */
+	protected TemporalType temporal = TEMPORAL_EDEFAULT;
+	/**
+	 * The default value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final EnumType ENUMERATED_EDEFAULT = EnumType.ORDINAL;
+	/**
+	 * The cached value of the '{@link #getEnumerated() <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getEnumerated()
+	 * @generated
+	 * @ordered
+	 */
+	protected EnumType enumerated = ENUMERATED_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlVersion()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return OrmPackage.Literals.XML_VERSION;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getColumnMapping_Column()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlColumn getColumn()
+	{
+		return column;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetColumn(XmlColumn newColumn, NotificationChain msgs)
+	{
+		XmlColumn oldColumn = column;
+		column = newColumn;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__COLUMN, oldColumn, newColumn);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlVersion#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	public void setColumn(XmlColumn newColumn)
+	{
+		if (newColumn != column)
+		{
+			NotificationChain msgs = null;
+			if (column != null)
+				msgs = ((InternalEObject)column).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_VERSION__COLUMN, null, msgs);
+			if (newColumn != null)
+				msgs = ((InternalEObject)newColumn).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OrmPackage.XML_VERSION__COLUMN, null, msgs);
+			msgs = basicSetColumn(newColumn, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__COLUMN, newColumn, newColumn));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lob</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lob</em>' attribute.
+	 * @see #setLob(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Lob()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	public boolean isLob()
+	{
+		return lob;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlVersion#isLob <em>Lob</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lob</em>' attribute.
+	 * @see #isLob()
+	 * @generated
+	 */
+	public void setLob(boolean newLob)
+	{
+		boolean oldLob = lob;
+		lob = newLob;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__LOB, oldLob, lob));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Temporal()
+	 * @model
+	 * @generated
+	 */
+	public TemporalType getTemporal()
+	{
+		return temporal;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlVersion#getTemporal <em>Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getTemporal()
+	 * @generated
+	 */
+	public void setTemporal(TemporalType newTemporal)
+	{
+		TemporalType oldTemporal = temporal;
+		temporal = newTemporal == null ? TEMPORAL_EDEFAULT : newTemporal;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__TEMPORAL, oldTemporal, temporal));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.OrmPackage#getXmlConvertibleMapping_Enumerated()
+	 * @model
+	 * @generated
+	 */
+	public EnumType getEnumerated()
+	{
+		return enumerated;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.XmlVersion#getEnumerated <em>Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getEnumerated()
+	 * @generated
+	 */
+	public void setEnumerated(EnumType newEnumerated)
+	{
+		EnumType oldEnumerated = enumerated;
+		enumerated = newEnumerated == null ? ENUMERATED_EDEFAULT : newEnumerated;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, OrmPackage.XML_VERSION__ENUMERATED, oldEnumerated, enumerated));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_VERSION__COLUMN:
+				return basicSetColumn(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_VERSION__COLUMN:
+				return getColumn();
+			case OrmPackage.XML_VERSION__LOB:
+				return isLob();
+			case OrmPackage.XML_VERSION__TEMPORAL:
+				return getTemporal();
+			case OrmPackage.XML_VERSION__ENUMERATED:
+				return getEnumerated();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_VERSION__COLUMN:
+				setColumn((XmlColumn)newValue);
+				return;
+			case OrmPackage.XML_VERSION__LOB:
+				setLob((Boolean)newValue);
+				return;
+			case OrmPackage.XML_VERSION__TEMPORAL:
+				setTemporal((TemporalType)newValue);
+				return;
+			case OrmPackage.XML_VERSION__ENUMERATED:
+				setEnumerated((EnumType)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_VERSION__COLUMN:
+				setColumn((XmlColumn)null);
+				return;
+			case OrmPackage.XML_VERSION__LOB:
+				setLob(LOB_EDEFAULT);
+				return;
+			case OrmPackage.XML_VERSION__TEMPORAL:
+				setTemporal(TEMPORAL_EDEFAULT);
+				return;
+			case OrmPackage.XML_VERSION__ENUMERATED:
+				setEnumerated(ENUMERATED_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case OrmPackage.XML_VERSION__COLUMN:
+				return column != null;
+			case OrmPackage.XML_VERSION__LOB:
+				return lob != LOB_EDEFAULT;
+			case OrmPackage.XML_VERSION__TEMPORAL:
+				return temporal != TEMPORAL_EDEFAULT;
+			case OrmPackage.XML_VERSION__ENUMERATED:
+				return enumerated != ENUMERATED_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == ColumnMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_VERSION__COLUMN: return OrmPackage.COLUMN_MAPPING__COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (derivedFeatureID)
+			{
+				case OrmPackage.XML_VERSION__LOB: return OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
+				case OrmPackage.XML_VERSION__TEMPORAL: return OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
+				case OrmPackage.XML_VERSION__ENUMERATED: return OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
+	{
+		if (baseClass == ColumnMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.COLUMN_MAPPING__COLUMN: return OrmPackage.XML_VERSION__COLUMN;
+				default: return -1;
+			}
+		}
+		if (baseClass == XmlConvertibleMapping.class)
+		{
+			switch (baseFeatureID)
+			{
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__LOB: return OrmPackage.XML_VERSION__LOB;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL: return OrmPackage.XML_VERSION__TEMPORAL;
+				case OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED: return OrmPackage.XML_VERSION__ENUMERATED;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (lob: ");
+		result.append(lob);
+		result.append(", temporal: ");
+		result.append(temporal);
+		result.append(", enumerated: ");
+		result.append(enumerated);
+		result.append(')');
+		return result.toString();
+	}
+
+	public TextRange getEnumeratedTextRange() {
+		throw new UnsupportedOperationException("enumerated not supported by version mappings");
+	}
+
+	public TextRange getLobTextRange() {
+		throw new UnsupportedOperationException("lob not supported by version mappings");
+	}
+	
+	public TextRange getTemporalTextRange() {
+		return getAttributeTextRange(JPA.TEMPORAL);
+	}
+	
+	public String getMappingKey() {
+		return MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY;
+	}
+	
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+			buildNameTranslator(),
+			buildAccessTranslator(),
+			buildColumnTranslator(), 
+			buildTemporalTranslator(),
+		};
+	}
+	
+	protected static Translator buildColumnTranslator() {
+		return XmlColumn.buildTranslator(JPA.COLUMN, OrmPackage.eINSTANCE.getColumnMapping_Column());
+	}
+	
+	protected static Translator buildTemporalTranslator() {
+		return new Translator(JPA.TEMPORAL, OrmPackage.eINSTANCE.getXmlConvertibleMapping_Temporal());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/JPA2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/JPA2_0.java
new file mode 100644
index 0000000..5c7f3f0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/JPA2_0.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.orm.JPA;
+
+/**
+ * JPA 2.0 orm.xml-related stuff (elements, attributes etc.)
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+@SuppressWarnings("nls")
+public interface JPA2_0
+	extends JPA
+{
+	String SCHEMA_NAMESPACE = JPA.SCHEMA_NAMESPACE;
+	String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/orm_2_0.xsd";
+	String SCHEMA_VERSION = "2.0";
+	
+	// JPA 2.0 specific nodes
+	
+	String CACHEABLE = "cacheable";
+	String COLLECTION_TABLE = "collection-table";
+	String DELIMITIED_IDENTIFIERS = "delimited-identifiers";
+	String ELEMENT_COLLECTION = "element-collection";
+	String MAP_KEY_ATTRIBUTE_OVERRIDE = "map-key-attribute-override";
+	String MAP_KEY_CLASS = "map-key-class";
+	String MAP_KEY_COLUMN = "map-key-column";
+	String MAP_KEY_CONVERT = "map-key-convert";
+	String MAP_KEY_ENUMERATED = "map-key-enumerated";
+	String MAP_KEY_JOIN_COLUMN = "map-key-join-column";
+	String MAPS_ID = "maps-id";
+	String NAMED_QUERY__LOCK_MODE = "lock-mode";
+	String ORDER_COLUMN = "order-column";
+	String ORPHAN_REMOVAL = "orphan-removal";
+	String TARGET_CLASS = "target-class";
+	String MAP_KEY_TEMPORAL = "map-key-temporal";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/LockModeType_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/LockModeType_2_0.java
new file mode 100644
index 0000000..2b3de36
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/LockModeType_2_0.java
@@ -0,0 +1,397 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Lock Mode Type 20</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getLockModeType_2_0()
+ * @model
+ * @generated
+ */
+public enum LockModeType_2_0 implements Enumerator
+{
+	/**
+	 * The '<em><b>NONE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #NONE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	NONE(0, "NONE", "NONE"), /**
+	 * The '<em><b>READ</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #READ_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	READ(1, "READ", "READ"),
+
+	/**
+	 * The '<em><b>WRITE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #WRITE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	WRITE(2, "WRITE", "WRITE"),
+
+	/**
+	 * The '<em><b>OPTIMISTIC</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #OPTIMISTIC_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	OPTIMISTIC(3, "OPTIMISTIC", "OPTIMISTIC"),
+
+	/**
+	 * The '<em><b>OPTIMISTIC FORCE INCREMENT</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #OPTIMISTIC_FORCE_INCREMENT_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	OPTIMISTIC_FORCE_INCREMENT(4, "OPTIMISTIC_FORCE_INCREMENT", "OPTIMISTIC_FORCE_INCREMENT"),
+
+	/**
+	 * The '<em><b>PESSIMISTIC READ</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #PESSIMISTIC_READ_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	PESSIMISTIC_READ(5, "PESSIMISTIC_READ", "PESSIMISTIC_READ"),
+
+	/**
+	 * The '<em><b>PESSIMISTIC WRITE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #PESSIMISTIC_WRITE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	PESSIMISTIC_WRITE(6, "PESSIMISTIC_WRITE", "PESSIMISTIC_WRITE"),
+
+	/**
+	 * The '<em><b>PESSIMISTIC FORCE INCREMENT</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #PESSIMISTIC_FORCE_INCREMENT_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	PESSIMISTIC_FORCE_INCREMENT(7, "PESSIMISTIC_FORCE_INCREMENT", "PESSIMISTIC_FORCE_INCREMENT");
+
+	/**
+	 * The '<em><b>NONE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #NONE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int NONE_VALUE = 0;
+
+	/**
+	 * The '<em><b>READ</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>READ</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #READ
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int READ_VALUE = 1;
+
+	/**
+	 * The '<em><b>WRITE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>WRITE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #WRITE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int WRITE_VALUE = 2;
+
+	/**
+	 * The '<em><b>OPTIMISTIC</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>OPTIMISTIC</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #OPTIMISTIC
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int OPTIMISTIC_VALUE = 3;
+
+	/**
+	 * The '<em><b>OPTIMISTIC FORCE INCREMENT</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>OPTIMISTIC FORCE INCREMENT</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #OPTIMISTIC_FORCE_INCREMENT
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int OPTIMISTIC_FORCE_INCREMENT_VALUE = 4;
+
+	/**
+	 * The '<em><b>PESSIMISTIC READ</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>PESSIMISTIC READ</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #PESSIMISTIC_READ
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PESSIMISTIC_READ_VALUE = 5;
+
+	/**
+	 * The '<em><b>PESSIMISTIC WRITE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>PESSIMISTIC WRITE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #PESSIMISTIC_WRITE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PESSIMISTIC_WRITE_VALUE = 6;
+
+	/**
+	 * The '<em><b>PESSIMISTIC FORCE INCREMENT</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>PESSIMISTIC FORCE INCREMENT</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #PESSIMISTIC_FORCE_INCREMENT
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int PESSIMISTIC_FORCE_INCREMENT_VALUE = 7;
+
+	/**
+	 * An array of all the '<em><b>Lock Mode Type 20</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final LockModeType_2_0[] VALUES_ARRAY =
+		new LockModeType_2_0[]
+		{
+			NONE,
+			READ,
+			WRITE,
+			OPTIMISTIC,
+			OPTIMISTIC_FORCE_INCREMENT,
+			PESSIMISTIC_READ,
+			PESSIMISTIC_WRITE,
+			PESSIMISTIC_FORCE_INCREMENT,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Lock Mode Type 20</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<LockModeType_2_0> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Lock Mode Type 20</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static LockModeType_2_0 get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			LockModeType_2_0 result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Lock Mode Type 20</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static LockModeType_2_0 getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			LockModeType_2_0 result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Lock Mode Type 20</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static LockModeType_2_0 get(int value)
+	{
+		switch (value)
+		{
+			case NONE_VALUE: return NONE;
+			case READ_VALUE: return READ;
+			case WRITE_VALUE: return WRITE;
+			case OPTIMISTIC_VALUE: return OPTIMISTIC;
+			case OPTIMISTIC_FORCE_INCREMENT_VALUE: return OPTIMISTIC_FORCE_INCREMENT;
+			case PESSIMISTIC_READ_VALUE: return PESSIMISTIC_READ;
+			case PESSIMISTIC_WRITE_VALUE: return PESSIMISTIC_WRITE;
+			case PESSIMISTIC_FORCE_INCREMENT_VALUE: return PESSIMISTIC_FORCE_INCREMENT;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private LockModeType_2_0(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //LockModeType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/OrmV2_0Factory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/OrmV2_0Factory.java
new file mode 100644
index 0000000..14b69cd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/OrmV2_0Factory.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package
+ * @generated
+ */
+public class OrmV2_0Factory extends EFactoryImpl
+{
+	/**
+	 * The singleton instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final OrmV2_0Factory eINSTANCE = init();
+
+	/**
+	 * Creates the default factory implementation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static OrmV2_0Factory init()
+	{
+		try
+		{
+			OrmV2_0Factory theOrmV2_0Factory = (OrmV2_0Factory)EPackage.Registry.INSTANCE.getEFactory("jpt.orm.v2_0.xmi"); 
+			if (theOrmV2_0Factory != null)
+			{
+				return theOrmV2_0Factory;
+			}
+		}
+		catch (Exception exception)
+		{
+			EcorePlugin.INSTANCE.log(exception);
+		}
+		return new OrmV2_0Factory();
+	}
+
+	/**
+	 * Creates an instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public OrmV2_0Factory()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public EObject create(EClass eClass)
+	{
+		switch (eClass.getClassifierID())
+		{
+			default:
+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object createFromString(EDataType eDataType, String initialValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case OrmV2_0Package.LOCK_MODE_TYPE_20:
+				return createLockModeType_2_0FromString(eDataType, initialValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String convertToString(EDataType eDataType, Object instanceValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case OrmV2_0Package.LOCK_MODE_TYPE_20:
+				return convertLockModeType_2_0ToString(eDataType, instanceValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public LockModeType_2_0 createLockModeType_2_0FromString(EDataType eDataType, String initialValue)
+	{
+		LockModeType_2_0 result = LockModeType_2_0.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertLockModeType_2_0ToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public OrmV2_0Package getOrmV2_0Package()
+	{
+		return (OrmV2_0Package)getEPackage();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @deprecated
+	 * @generated
+	 */
+	@Deprecated
+	public static OrmV2_0Package getPackage()
+	{
+		return OrmV2_0Package.eINSTANCE;
+	}
+
+} //OrmV2_0Factory
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/OrmV2_0Package.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/OrmV2_0Package.java
new file mode 100644
index 0000000..887d055
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/OrmV2_0Package.java
@@ -0,0 +1,3810 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.persistence.PersistencePackage;
+import org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package;
+import org.eclipse.jpt.core.resource.xml.CommonPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Factory
+ * @model kind="package"
+ * @generated
+ */
+public class OrmV2_0Package extends EPackageImpl
+{
+	/**
+	 * The package name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNAME = "v2_0";
+
+	/**
+	 * The package namespace URI.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_URI = "jpt.orm.v2_0.xmi";
+
+	/**
+	 * The package namespace name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_PREFIX = "org.eclipse.jpt.core.resource.orm.v2_0";
+
+	/**
+	 * The singleton instance of the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final OrmV2_0Package eINSTANCE = org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package.init();
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0 <em>Xml Attribute Mapping 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeMapping_2_0()
+	 * @generated
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING_20 = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0 <em>Xml Association Override 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0()
+	 * @generated
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_20 = 0;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION = 0;
+
+	/**
+	 * The feature id for the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_20__JOIN_TABLE = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Association Override 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ASSOCIATION_OVERRIDE_20_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Access</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING_20__ACCESS = OrmPackage.XML_ACCESS_HOLDER__ACCESS;
+
+	/**
+	 * The number of structural features of the '<em>Xml Attribute Mapping 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_MAPPING_20_FEATURE_COUNT = OrmPackage.XML_ACCESS_HOLDER_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0 <em>Xml Attribute Override 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0()
+	 * @generated
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_20 = 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Attribute Override 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTE_OVERRIDE_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0 <em>Xml Attributes 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0()
+	 * @generated
+	 */
+	public static final int XML_ATTRIBUTES_20 = 3;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTES_20__DESCRIPTION = 0;
+
+	/**
+	 * The feature id for the '<em><b>Element Collections</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Attributes 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ATTRIBUTES_20_FEATURE_COUNT = 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0 <em>Xml Collection Table 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCollectionTable_2_0()
+	 * @generated
+	 */
+	public static final int XML_COLLECTION_TABLE_20 = 6;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0 <em>Xml Derived Id 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0()
+	 * @generated
+	 */
+	public static final int XML_DERIVED_ID_20 = 7;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0 <em>Xml Element Collection 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20 = 8;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0 <em>Xml Embedded 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEmbedded_2_0()
+	 * @generated
+	 */
+	public static final int XML_EMBEDDED_20 = 9;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0 <em>Xml Cacheable 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0()
+	 * @generated
+	 */
+	public static final int XML_CACHEABLE_20 = 4;
+
+	/**
+	 * The feature id for the '<em><b>Cacheable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CACHEABLE_20__CACHEABLE = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Cacheable 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CACHEABLE_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0 <em>Xml Cascade Type 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0()
+	 * @generated
+	 */
+	public static final int XML_CASCADE_TYPE_20 = 5;
+
+	/**
+	 * The feature id for the '<em><b>Cascade Detach</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CASCADE_TYPE_20__CASCADE_DETACH = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Cascade Type 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_CASCADE_TYPE_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE_20__JOIN_COLUMNS = OrmPackage.XML_REFERENCE_TABLE__JOIN_COLUMNS;
+
+	/**
+	 * The number of structural features of the '<em>Xml Collection Table 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_COLLECTION_TABLE_20_FEATURE_COUNT = OrmPackage.XML_REFERENCE_TABLE_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DERIVED_ID_20__ID = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Derived Id 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_DERIVED_ID_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Lob</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__LOB = OrmPackage.XML_CONVERTIBLE_MAPPING__LOB;
+
+	/**
+	 * The feature id for the '<em><b>Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__TEMPORAL = OrmPackage.XML_CONVERTIBLE_MAPPING__TEMPORAL;
+
+	/**
+	 * The feature id for the '<em><b>Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__ENUMERATED = OrmPackage.XML_CONVERTIBLE_MAPPING__ENUMERATED;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__ORDER_COLUMN = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Order By</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__ORDER_BY = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__ATTRIBUTE_OVERRIDES = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__ASSOCIATION_OVERRIDES = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_ATTRIBUTE_OVERRIDES = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Target Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__TARGET_CLASS = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Fetch</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__FETCH = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_TEMPORAL = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 9;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_ENUMERATED = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 10;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 11;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 12;
+
+	/**
+	 * The feature id for the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__COLUMN = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 13;
+
+	/**
+	 * The feature id for the '<em><b>Collection Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 14;
+
+	/**
+	 * The number of structural features of the '<em>Xml Element Collection 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ELEMENT_COLLECTION_20_FEATURE_COUNT = OrmPackage.XML_CONVERTIBLE_MAPPING_FEATURE_COUNT + 15;
+
+	/**
+	 * The feature id for the '<em><b>Association Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_20__ASSOCIATION_OVERRIDES = OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER__ASSOCIATION_OVERRIDES;
+
+	/**
+	 * The number of structural features of the '<em>Xml Embedded 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EMBEDDED_20_FEATURE_COUNT = OrmPackage.XML_ASSOCIATION_OVERRIDE_CONTAINER_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0 <em>Xml Entity 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntity_2_0()
+	 * @generated
+	 */
+	public static final int XML_ENTITY_20 = 10;
+
+	/**
+	 * The feature id for the '<em><b>Cacheable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_20__CACHEABLE = XML_CACHEABLE_20__CACHEABLE;
+
+	/**
+	 * The number of structural features of the '<em>Xml Entity 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_20_FEATURE_COUNT = XML_CACHEABLE_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0 <em>Xml Entity Listener 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0()
+	 * @generated
+	 */
+	public static final int XML_ENTITY_LISTENER_20 = 11;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_LISTENER_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Entity Listener 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ENTITY_LISTENER_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0 <em>Xml Event Method 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0()
+	 * @generated
+	 */
+	public static final int XML_EVENT_METHOD_20 = 12;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Event Method 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_EVENT_METHOD_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0 <em>Xml Generator 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0()
+	 * @generated
+	 */
+	public static final int XML_GENERATOR_20 = 13;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Generator 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_GENERATOR_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0 <em>Xml Orderable 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0()
+	 * @generated
+	 */
+	public static final int XML_ORDERABLE_20 = 21;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDERABLE_20__ORDER_COLUMN = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Orderable 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDERABLE_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0 <em>Xml Multi Relationship Mapping 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20 = 17;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__ORDER_COLUMN = XML_ORDERABLE_20__ORDER_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ATTRIBUTE_OVERRIDES = XML_ORDERABLE_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS = XML_ORDERABLE_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL = XML_ORDERABLE_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED = XML_ORDERABLE_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN = XML_ORDERABLE_20_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS = XML_ORDERABLE_20_FEATURE_COUNT + 5;
+
+	/**
+	 * The number of structural features of the '<em>Xml Multi Relationship Mapping 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT = XML_ORDERABLE_20_FEATURE_COUNT + 6;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0 <em>Xml Many To Many 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlManyToMany_2_0()
+	 * @generated
+	 */
+	public static final int XML_MANY_TO_MANY_20 = 14;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__ORDER_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__ORDER_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__MAP_KEY_ATTRIBUTE_OVERRIDES = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__MAP_KEY_CLASS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__MAP_KEY_TEMPORAL = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__MAP_KEY_ENUMERATED = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__MAP_KEY_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20__MAP_KEY_JOIN_COLUMNS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS;
+
+	/**
+	 * The number of structural features of the '<em>Xml Many To Many 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MANY_TO_MANY_20_FEATURE_COUNT = XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0 <em>Xml Map Key Attribute Override Container 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0()
+	 * @generated
+	 */
+	public static final int XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20 = 15;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Map Key Attribute Override Container 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0 <em>Xml Maps Id 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0()
+	 * @generated
+	 */
+	public static final int XML_MAPS_ID_20 = 16;
+
+	/**
+	 * The feature id for the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPS_ID_20__MAPS_ID = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Maps Id 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPS_ID_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0 <em>Xml Named Query 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0()
+	 * @generated
+	 */
+	public static final int XML_NAMED_QUERY_20 = 18;
+
+	/**
+	 * The feature id for the '<em><b>Lock Mode</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY_20__LOCK_MODE = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Named Query 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_NAMED_QUERY_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0 <em>Xml Orphan Removable 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0()
+	 * @generated
+	 */
+	public static final int XML_ORPHAN_REMOVABLE_20 = 23;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0 <em>Xml One To Many 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToMany_2_0()
+	 * @generated
+	 */
+	public static final int XML_ONE_TO_MANY_20 = 19;
+
+	/**
+	 * The feature id for the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__ORDER_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__ORDER_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__MAP_KEY_ATTRIBUTE_OVERRIDES = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ATTRIBUTE_OVERRIDES;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__MAP_KEY_CLASS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__MAP_KEY_TEMPORAL = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__MAP_KEY_ENUMERATED = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__MAP_KEY_COLUMN = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN;
+
+	/**
+	 * The feature id for the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__MAP_KEY_JOIN_COLUMNS = XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS;
+
+	/**
+	 * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20__ORPHAN_REMOVAL = XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml One To Many 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_MANY_20_FEATURE_COUNT = XML_MULTI_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0 <em>Xml Single Relationship Mapping 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSingleRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20 = 29;
+
+	/**
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20__ID = XML_DERIVED_ID_20__ID;
+
+	/**
+	 * The feature id for the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20__MAPS_ID = XML_DERIVED_ID_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Single Relationship Mapping 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SINGLE_RELATIONSHIP_MAPPING_20_FEATURE_COUNT = XML_DERIVED_ID_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0 <em>Xml One To One 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToOne_2_0()
+	 * @generated
+	 */
+	public static final int XML_ONE_TO_ONE_20 = 20;
+
+	/**
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE_20__ID = XML_SINGLE_RELATIONSHIP_MAPPING_20__ID;
+
+	/**
+	 * The feature id for the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE_20__MAPS_ID = XML_SINGLE_RELATIONSHIP_MAPPING_20__MAPS_ID;
+
+	/**
+	 * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE_20__ORPHAN_REMOVAL = XML_SINGLE_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml One To One 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ONE_TO_ONE_20_FEATURE_COUNT = XML_SINGLE_RELATIONSHIP_MAPPING_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0 <em>Xml Order Column 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0()
+	 * @generated
+	 */
+	public static final int XML_ORDER_COLUMN_20 = 22;
+
+	/**
+	 * The feature id for the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN_20__NULLABLE = 0;
+
+	/**
+	 * The feature id for the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN_20__INSERTABLE = 1;
+
+	/**
+	 * The feature id for the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN_20__UPDATABLE = 2;
+
+	/**
+	 * The number of structural features of the '<em>Xml Order Column 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORDER_COLUMN_20_FEATURE_COUNT = 3;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0 <em>Xml Persistence Unit Defaults 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20 = 24;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0 <em>Xml Persistence Unit Metadata 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA_20 = 25;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0 <em>Xml Query 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0()
+	 * @generated
+	 */
+	public static final int XML_QUERY_20 = 26;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0 <em>Xml Query Hint 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0()
+	 * @generated
+	 */
+	public static final int XML_QUERY_HINT_20 = 27;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0 <em>Xml Sequence Generator 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0()
+	 * @generated
+	 */
+	public static final int XML_SEQUENCE_GENERATOR_20 = 28;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0 <em>Xml Sql Result Set Mapping 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0()
+	 * @generated
+	 */
+	public static final int XML_SQL_RESULT_SET_MAPPING_20 = 30;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0 <em>Xml Unique Constraint 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0()
+	 * @generated
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT_20 = 31;
+
+	/**
+	 * The feature id for the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Orphan Removable 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_ORPHAN_REMOVABLE_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION = 0;
+
+	/**
+	 * The feature id for the '<em><b>Delimited Identifiers</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence Unit Defaults 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_DEFAULTS_20_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence Unit Metadata 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_METADATA_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Query 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_HINT_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Query Hint 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_QUERY_HINT_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR_20__CATALOG = 0;
+
+	/**
+	 * The feature id for the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR_20__SCHEMA = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Sequence Generator 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SEQUENCE_GENERATOR_20_FEATURE_COUNT = 2;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Sql Result Set Mapping 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_SQL_RESULT_SET_MAPPING_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT_20__NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Unique Constraint 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_UNIQUE_CONSTRAINT_20_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 <em>Lock Mode Type 20</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getLockModeType_2_0()
+	 * @generated
+	 */
+	public static final int LOCK_MODE_TYPE_20 = 32;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAttributeMapping_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAssociationOverride_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAttributeOverride_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlAttributes_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlCollectionTable_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlDerivedId_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlElementCollection_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEmbedded_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEntity_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEntityListener_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlEventMethod_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlGenerator_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlManyToMany_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlMapKeyAttributeOverrideContainer_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlMapsId_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlMultiRelationshipMapping_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlNamedQuery_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOneToMany_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOneToOne_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOrderColumn_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceUnitDefaults_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceUnitMetadata_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlQuery_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlQueryHint_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlSequenceGenerator_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlSingleRelationshipMapping_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlSqlResultSetMapping_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlUniqueConstraint_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlCacheable_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlCascadeType_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOrphanRemovable_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlOrderable_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum lockModeType_2_0EEnum = null;
+
+	/**
+	 * Creates an instance of the model <b>Package</b>, registered with
+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+	 * package URI value.
+	 * <p>Note: the correct way to create the package is via the static
+	 * factory method {@link #init init()}, which also performs
+	 * initialization of the package, or returns the registered package,
+	 * if one already exists.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.emf.ecore.EPackage.Registry
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#eNS_URI
+	 * @see #init()
+	 * @generated
+	 */
+	private OrmV2_0Package()
+	{
+		super(eNS_URI, OrmV2_0Factory.eINSTANCE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static boolean isInited = false;
+
+	/**
+	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+	 * 
+	 * <p>This method is used to initialize {@link OrmV2_0Package#eINSTANCE} when that field is accessed.
+	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #eNS_URI
+	 * @see #createPackageContents()
+	 * @see #initializePackageContents()
+	 * @generated
+	 */
+	public static OrmV2_0Package init()
+	{
+		if (isInited) return (OrmV2_0Package)EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI);
+
+		// Obtain or create and register package
+		OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.get(eNS_URI) : new OrmV2_0Package());
+
+		isInited = true;
+
+		// Initialize simple dependencies
+		EcorePackage.eINSTANCE.eClass();
+		XMLTypePackage.eINSTANCE.eClass();
+
+		// Obtain or create and register interdependencies
+		CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
+		OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
+		PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
+		PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
+
+		// Create package meta-data objects
+		theOrmV2_0Package.createPackageContents();
+		theCommonPackage.createPackageContents();
+		theOrmPackage.createPackageContents();
+		thePersistencePackage.createPackageContents();
+		thePersistenceV2_0Package.createPackageContents();
+
+		// Initialize created meta-data
+		theOrmV2_0Package.initializePackageContents();
+		theCommonPackage.initializePackageContents();
+		theOrmPackage.initializePackageContents();
+		thePersistencePackage.initializePackageContents();
+		thePersistenceV2_0Package.initializePackageContents();
+
+		// Mark meta-data to indicate it can't be changed
+		theOrmV2_0Package.freeze();
+
+  
+		// Update the registry and return the package
+		EPackage.Registry.INSTANCE.put(OrmV2_0Package.eNS_URI, theOrmV2_0Package);
+		return theOrmV2_0Package;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0 <em>Xml Attribute Mapping 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Attribute Mapping 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0
+	 * @generated
+	 */
+	public EClass getXmlAttributeMapping_2_0()
+	{
+		return xmlAttributeMapping_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0 <em>Xml Association Override 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Association Override 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0
+	 * @generated
+	 */
+	public EClass getXmlAssociationOverride_2_0()
+	{
+		return xmlAssociationOverride_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription()
+	 * @see #getXmlAssociationOverride_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlAssociationOverride_2_0_Description()
+	{
+		return (EAttribute)xmlAssociationOverride_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getJoinTable <em>Join Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Join Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getJoinTable()
+	 * @see #getXmlAssociationOverride_2_0()
+	 * @generated
+	 */
+	public EReference getXmlAssociationOverride_2_0_JoinTable()
+	{
+		return (EReference)xmlAssociationOverride_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0 <em>Xml Attribute Override 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Attribute Override 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0
+	 * @generated
+	 */
+	public EClass getXmlAttributeOverride_2_0()
+	{
+		return xmlAttributeOverride_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription()
+	 * @see #getXmlAttributeOverride_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlAttributeOverride_2_0_Description()
+	{
+		return (EAttribute)xmlAttributeOverride_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0 <em>Xml Attributes 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Attributes 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0
+	 * @generated
+	 */
+	public EClass getXmlAttributes_2_0()
+	{
+		return xmlAttributes_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription()
+	 * @see #getXmlAttributes_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlAttributes_2_0_Description()
+	{
+		return (EAttribute)xmlAttributes_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getElementCollections <em>Element Collections</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Element Collections</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getElementCollections()
+	 * @see #getXmlAttributes_2_0()
+	 * @generated
+	 */
+	public EReference getXmlAttributes_2_0_ElementCollections()
+	{
+		return (EReference)xmlAttributes_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0 <em>Xml Collection Table 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Collection Table 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0
+	 * @generated
+	 */
+	public EClass getXmlCollectionTable_2_0()
+	{
+		return xmlCollectionTable_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0 <em>Xml Derived Id 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Derived Id 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0
+	 * @generated
+	 */
+	public EClass getXmlDerivedId_2_0()
+	{
+		return xmlDerivedId_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0#getId <em>Id</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Id</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0#getId()
+	 * @see #getXmlDerivedId_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlDerivedId_2_0_Id()
+	{
+		return (EAttribute)xmlDerivedId_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0 <em>Xml Element Collection 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Element Collection 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0
+	 * @generated
+	 */
+	public EClass getXmlElementCollection_2_0()
+	{
+		return xmlElementCollection_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass <em>Target Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Target Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlElementCollection_2_0_TargetClass()
+	{
+		return (EAttribute)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch <em>Fetch</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Fetch</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlElementCollection_2_0_Fetch()
+	{
+		return (EAttribute)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey <em>Map Key</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Map Key</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EReference getXmlElementCollection_2_0_MapKey()
+	{
+		return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(2);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass <em>Map Key Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Map Key Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EReference getXmlElementCollection_2_0_MapKeyClass()
+	{
+		return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(3);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Map Key Temporal</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyTemporal()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlElementCollection_2_0_MapKeyTemporal()
+	{
+		return (EAttribute)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(4);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Map Key Enumerated</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyEnumerated()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlElementCollection_2_0_MapKeyEnumerated()
+	{
+		return (EAttribute)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(5);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn <em>Map Key Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Map Key Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EReference getXmlElementCollection_2_0_MapKeyColumn()
+	{
+		return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(6);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Map Key Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyJoinColumns()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EReference getXmlElementCollection_2_0_MapKeyJoinColumns()
+	{
+		return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(7);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn <em>Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EReference getXmlElementCollection_2_0_Column()
+	{
+		return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(8);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable <em>Collection Table</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Collection Table</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable()
+	 * @see #getXmlElementCollection_2_0()
+	 * @generated
+	 */
+	public EReference getXmlElementCollection_2_0_CollectionTable()
+	{
+		return (EReference)xmlElementCollection_2_0EClass.getEStructuralFeatures().get(9);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0 <em>Xml Embedded 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Embedded 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0
+	 * @generated
+	 */
+	public EClass getXmlEmbedded_2_0()
+	{
+		return xmlEmbedded_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0 <em>Xml Entity 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Entity 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0
+	 * @generated
+	 */
+	public EClass getXmlEntity_2_0()
+	{
+		return xmlEntity_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0 <em>Xml Entity Listener 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Entity Listener 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0
+	 * @generated
+	 */
+	public EClass getXmlEntityListener_2_0()
+	{
+		return xmlEntityListener_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription()
+	 * @see #getXmlEntityListener_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlEntityListener_2_0_Description()
+	{
+		return (EAttribute)xmlEntityListener_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0 <em>Xml Event Method 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Event Method 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0
+	 * @generated
+	 */
+	public EClass getXmlEventMethod_2_0()
+	{
+		return xmlEventMethod_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription()
+	 * @see #getXmlEventMethod_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlEventMethod_2_0_Description()
+	{
+		return (EAttribute)xmlEventMethod_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0 <em>Xml Generator 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Generator 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0
+	 * @generated
+	 */
+	public EClass getXmlGenerator_2_0()
+	{
+		return xmlGenerator_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription()
+	 * @see #getXmlGenerator_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlGenerator_2_0_Description()
+	{
+		return (EAttribute)xmlGenerator_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0 <em>Xml Many To Many 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Many To Many 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0
+	 * @generated
+	 */
+	public EClass getXmlManyToMany_2_0()
+	{
+		return xmlManyToMany_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0 <em>Xml Map Key Attribute Override Container 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Map Key Attribute Override Container 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0
+	 * @generated
+	 */
+	public EClass getXmlMapKeyAttributeOverrideContainer_2_0()
+	{
+		return xmlMapKeyAttributeOverrideContainer_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0#getMapKeyAttributeOverrides <em>Map Key Attribute Overrides</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Map Key Attribute Overrides</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0#getMapKeyAttributeOverrides()
+	 * @see #getXmlMapKeyAttributeOverrideContainer_2_0()
+	 * @generated
+	 */
+	public EReference getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
+	{
+		return (EReference)xmlMapKeyAttributeOverrideContainer_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0 <em>Xml Maps Id 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Maps Id 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0
+	 * @generated
+	 */
+	public EClass getXmlMapsId_2_0()
+	{
+		return xmlMapsId_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId <em>Maps Id</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Maps Id</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId()
+	 * @see #getXmlMapsId_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlMapsId_2_0_MapsId()
+	{
+		return (EAttribute)xmlMapsId_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0 <em>Xml Multi Relationship Mapping 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Multi Relationship Mapping 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0
+	 * @generated
+	 */
+	public EClass getXmlMultiRelationshipMapping_2_0()
+	{
+		return xmlMultiRelationshipMapping_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass <em>Map Key Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Map Key Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass()
+	 * @see #getXmlMultiRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public EReference getXmlMultiRelationshipMapping_2_0_MapKeyClass()
+	{
+		return (EReference)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Map Key Temporal</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyTemporal()
+	 * @see #getXmlMultiRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlMultiRelationshipMapping_2_0_MapKeyTemporal()
+	{
+		return (EAttribute)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Map Key Enumerated</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyEnumerated()
+	 * @see #getXmlMultiRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlMultiRelationshipMapping_2_0_MapKeyEnumerated()
+	{
+		return (EAttribute)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(2);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn <em>Map Key Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Map Key Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn()
+	 * @see #getXmlMultiRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public EReference getXmlMultiRelationshipMapping_2_0_MapKeyColumn()
+	{
+		return (EReference)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(3);
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Map Key Join Columns</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyJoinColumns()
+	 * @see #getXmlMultiRelationshipMapping_2_0()
+	 * @generated
+	 */
+	public EReference getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns()
+	{
+		return (EReference)xmlMultiRelationshipMapping_2_0EClass.getEStructuralFeatures().get(4);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0 <em>Xml Named Query 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Named Query 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0
+	 * @generated
+	 */
+	public EClass getXmlNamedQuery_2_0()
+	{
+		return xmlNamedQuery_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode <em>Lock Mode</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Lock Mode</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode()
+	 * @see #getXmlNamedQuery_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlNamedQuery_2_0_LockMode()
+	{
+		return (EAttribute)xmlNamedQuery_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0 <em>Xml One To Many 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml One To Many 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0
+	 * @generated
+	 */
+	public EClass getXmlOneToMany_2_0()
+	{
+		return xmlOneToMany_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0 <em>Xml One To One 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml One To One 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0
+	 * @generated
+	 */
+	public EClass getXmlOneToOne_2_0()
+	{
+		return xmlOneToOne_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0 <em>Xml Order Column 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Order Column 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0
+	 * @generated
+	 */
+	public EClass getXmlOrderColumn_2_0()
+	{
+		return xmlOrderColumn_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable <em>Nullable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Nullable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable()
+	 * @see #getXmlOrderColumn_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlOrderColumn_2_0_Nullable()
+	{
+		return (EAttribute)xmlOrderColumn_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable <em>Insertable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Insertable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable()
+	 * @see #getXmlOrderColumn_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlOrderColumn_2_0_Insertable()
+	{
+		return (EAttribute)xmlOrderColumn_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable <em>Updatable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Updatable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable()
+	 * @see #getXmlOrderColumn_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlOrderColumn_2_0_Updatable()
+	{
+		return (EAttribute)xmlOrderColumn_2_0EClass.getEStructuralFeatures().get(2);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0 <em>Xml Persistence Unit Defaults 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence Unit Defaults 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0
+	 * @generated
+	 */
+	public EClass getXmlPersistenceUnitDefaults_2_0()
+	{
+		return xmlPersistenceUnitDefaults_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription()
+	 * @see #getXmlPersistenceUnitDefaults_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitDefaults_2_0_Description()
+	{
+		return (EAttribute)xmlPersistenceUnitDefaults_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers <em>Delimited Identifiers</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Delimited Identifiers</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers()
+	 * @see #getXmlPersistenceUnitDefaults_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers()
+	{
+		return (EAttribute)xmlPersistenceUnitDefaults_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0 <em>Xml Persistence Unit Metadata 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence Unit Metadata 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0
+	 * @generated
+	 */
+	public EClass getXmlPersistenceUnitMetadata_2_0()
+	{
+		return xmlPersistenceUnitMetadata_2_0EClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription()
+	 * @see #getXmlPersistenceUnitMetadata_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnitMetadata_2_0_Description()
+	{
+		return (EAttribute)xmlPersistenceUnitMetadata_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0 <em>Xml Query 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Query 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0
+	 * @generated
+	 */
+	public EClass getXmlQuery_2_0()
+	{
+		return xmlQuery_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0#getDescription()
+	 * @see #getXmlQuery_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlQuery_2_0_Description()
+	{
+		return (EAttribute)xmlQuery_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0 <em>Xml Query Hint 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Query Hint 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0
+	 * @generated
+	 */
+	public EClass getXmlQueryHint_2_0()
+	{
+		return xmlQueryHint_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription()
+	 * @see #getXmlQueryHint_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlQueryHint_2_0_Description()
+	{
+		return (EAttribute)xmlQueryHint_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0 <em>Xml Sequence Generator 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Sequence Generator 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0
+	 * @generated
+	 */
+	public EClass getXmlSequenceGenerator_2_0()
+	{
+		return xmlSequenceGenerator_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog <em>Catalog</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Catalog</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog()
+	 * @see #getXmlSequenceGenerator_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlSequenceGenerator_2_0_Catalog()
+	{
+		return (EAttribute)xmlSequenceGenerator_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema <em>Schema</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Schema</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema()
+	 * @see #getXmlSequenceGenerator_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlSequenceGenerator_2_0_Schema()
+	{
+		return (EAttribute)xmlSequenceGenerator_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0 <em>Xml Single Relationship Mapping 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Single Relationship Mapping 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0
+	 * @generated
+	 */
+	public EClass getXmlSingleRelationshipMapping_2_0()
+	{
+		return xmlSingleRelationshipMapping_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0 <em>Xml Sql Result Set Mapping 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Sql Result Set Mapping 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0
+	 * @generated
+	 */
+	public EClass getXmlSqlResultSetMapping_2_0()
+	{
+		return xmlSqlResultSetMapping_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription()
+	 * @see #getXmlSqlResultSetMapping_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlSqlResultSetMapping_2_0_Description()
+	{
+		return (EAttribute)xmlSqlResultSetMapping_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0 <em>Xml Unique Constraint 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Unique Constraint 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0
+	 * @generated
+	 */
+	public EClass getXmlUniqueConstraint_2_0()
+	{
+		return xmlUniqueConstraint_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName()
+	 * @see #getXmlUniqueConstraint_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlUniqueConstraint_2_0_Name()
+	{
+		return (EAttribute)xmlUniqueConstraint_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0 <em>Xml Cacheable 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Cacheable 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0
+	 * @generated
+	 */
+	public EClass getXmlCacheable_2_0()
+	{
+		return xmlCacheable_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable <em>Cacheable</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cacheable</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable()
+	 * @see #getXmlCacheable_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlCacheable_2_0_Cacheable()
+	{
+		return (EAttribute)xmlCacheable_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0 <em>Xml Cascade Type 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Cascade Type 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0
+	 * @generated
+	 */
+	public EClass getXmlCascadeType_2_0()
+	{
+		return xmlCascadeType_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach <em>Cascade Detach</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Cascade Detach</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach()
+	 * @see #getXmlCascadeType_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlCascadeType_2_0_CascadeDetach()
+	{
+		return (EAttribute)xmlCascadeType_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0 <em>Xml Orphan Removable 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Orphan Removable 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0
+	 * @generated
+	 */
+	public EClass getXmlOrphanRemovable_2_0()
+	{
+		return xmlOrphanRemovable_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval <em>Orphan Removal</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Orphan Removal</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval()
+	 * @see #getXmlOrphanRemovable_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlOrphanRemovable_2_0_OrphanRemoval()
+	{
+		return (EAttribute)xmlOrphanRemovable_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0 <em>Xml Orderable 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Orderable 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0
+	 * @generated
+	 */
+	public EClass getXmlOrderable_2_0()
+	{
+		return xmlOrderable_2_0EClass;
+	}
+
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn <em>Order Column</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Order Column</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn()
+	 * @see #getXmlOrderable_2_0()
+	 * @generated
+	 */
+	public EReference getXmlOrderable_2_0_OrderColumn()
+	{
+		return (EReference)xmlOrderable_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 <em>Lock Mode Type 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Lock Mode Type 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+	 * @generated
+	 */
+	public EEnum getLockModeType_2_0()
+	{
+		return lockModeType_2_0EEnum;
+	}
+
+
+	/**
+	 * Returns the factory that creates the instances of the model.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the factory that creates the instances of the model.
+	 * @generated
+	 */
+	public OrmV2_0Factory getOrmV2_0Factory()
+	{
+		return (OrmV2_0Factory)getEFactoryInstance();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isCreated = false;
+
+	/**
+	 * Creates the meta-model objects for the package.  This method is
+	 * guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void createPackageContents()
+	{
+		if (isCreated) return;
+		isCreated = true;
+
+		// Create classes and their features
+		xmlAssociationOverride_2_0EClass = createEClass(XML_ASSOCIATION_OVERRIDE_20);
+		createEAttribute(xmlAssociationOverride_2_0EClass, XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION);
+		createEReference(xmlAssociationOverride_2_0EClass, XML_ASSOCIATION_OVERRIDE_20__JOIN_TABLE);
+
+		xmlAttributeMapping_2_0EClass = createEClass(XML_ATTRIBUTE_MAPPING_20);
+
+		xmlAttributeOverride_2_0EClass = createEClass(XML_ATTRIBUTE_OVERRIDE_20);
+		createEAttribute(xmlAttributeOverride_2_0EClass, XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION);
+
+		xmlAttributes_2_0EClass = createEClass(XML_ATTRIBUTES_20);
+		createEAttribute(xmlAttributes_2_0EClass, XML_ATTRIBUTES_20__DESCRIPTION);
+		createEReference(xmlAttributes_2_0EClass, XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS);
+
+		xmlCacheable_2_0EClass = createEClass(XML_CACHEABLE_20);
+		createEAttribute(xmlCacheable_2_0EClass, XML_CACHEABLE_20__CACHEABLE);
+
+		xmlCascadeType_2_0EClass = createEClass(XML_CASCADE_TYPE_20);
+		createEAttribute(xmlCascadeType_2_0EClass, XML_CASCADE_TYPE_20__CASCADE_DETACH);
+
+		xmlCollectionTable_2_0EClass = createEClass(XML_COLLECTION_TABLE_20);
+
+		xmlDerivedId_2_0EClass = createEClass(XML_DERIVED_ID_20);
+		createEAttribute(xmlDerivedId_2_0EClass, XML_DERIVED_ID_20__ID);
+
+		xmlElementCollection_2_0EClass = createEClass(XML_ELEMENT_COLLECTION_20);
+		createEAttribute(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__TARGET_CLASS);
+		createEAttribute(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__FETCH);
+		createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY);
+		createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS);
+		createEAttribute(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_TEMPORAL);
+		createEAttribute(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_ENUMERATED);
+		createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN);
+		createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS);
+		createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__COLUMN);
+		createEReference(xmlElementCollection_2_0EClass, XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE);
+
+		xmlEmbedded_2_0EClass = createEClass(XML_EMBEDDED_20);
+
+		xmlEntity_2_0EClass = createEClass(XML_ENTITY_20);
+
+		xmlEntityListener_2_0EClass = createEClass(XML_ENTITY_LISTENER_20);
+		createEAttribute(xmlEntityListener_2_0EClass, XML_ENTITY_LISTENER_20__DESCRIPTION);
+
+		xmlEventMethod_2_0EClass = createEClass(XML_EVENT_METHOD_20);
+		createEAttribute(xmlEventMethod_2_0EClass, XML_EVENT_METHOD_20__DESCRIPTION);
+
+		xmlGenerator_2_0EClass = createEClass(XML_GENERATOR_20);
+		createEAttribute(xmlGenerator_2_0EClass, XML_GENERATOR_20__DESCRIPTION);
+
+		xmlManyToMany_2_0EClass = createEClass(XML_MANY_TO_MANY_20);
+
+		xmlMapKeyAttributeOverrideContainer_2_0EClass = createEClass(XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20);
+		createEReference(xmlMapKeyAttributeOverrideContainer_2_0EClass, XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES);
+
+		xmlMapsId_2_0EClass = createEClass(XML_MAPS_ID_20);
+		createEAttribute(xmlMapsId_2_0EClass, XML_MAPS_ID_20__MAPS_ID);
+
+		xmlMultiRelationshipMapping_2_0EClass = createEClass(XML_MULTI_RELATIONSHIP_MAPPING_20);
+		createEReference(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS);
+		createEAttribute(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL);
+		createEAttribute(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED);
+		createEReference(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN);
+		createEReference(xmlMultiRelationshipMapping_2_0EClass, XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS);
+
+		xmlNamedQuery_2_0EClass = createEClass(XML_NAMED_QUERY_20);
+		createEAttribute(xmlNamedQuery_2_0EClass, XML_NAMED_QUERY_20__LOCK_MODE);
+
+		xmlOneToMany_2_0EClass = createEClass(XML_ONE_TO_MANY_20);
+
+		xmlOneToOne_2_0EClass = createEClass(XML_ONE_TO_ONE_20);
+
+		xmlOrderable_2_0EClass = createEClass(XML_ORDERABLE_20);
+		createEReference(xmlOrderable_2_0EClass, XML_ORDERABLE_20__ORDER_COLUMN);
+
+		xmlOrderColumn_2_0EClass = createEClass(XML_ORDER_COLUMN_20);
+		createEAttribute(xmlOrderColumn_2_0EClass, XML_ORDER_COLUMN_20__NULLABLE);
+		createEAttribute(xmlOrderColumn_2_0EClass, XML_ORDER_COLUMN_20__INSERTABLE);
+		createEAttribute(xmlOrderColumn_2_0EClass, XML_ORDER_COLUMN_20__UPDATABLE);
+
+		xmlOrphanRemovable_2_0EClass = createEClass(XML_ORPHAN_REMOVABLE_20);
+		createEAttribute(xmlOrphanRemovable_2_0EClass, XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL);
+
+		xmlPersistenceUnitDefaults_2_0EClass = createEClass(XML_PERSISTENCE_UNIT_DEFAULTS_20);
+		createEAttribute(xmlPersistenceUnitDefaults_2_0EClass, XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION);
+		createEAttribute(xmlPersistenceUnitDefaults_2_0EClass, XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS);
+
+		xmlPersistenceUnitMetadata_2_0EClass = createEClass(XML_PERSISTENCE_UNIT_METADATA_20);
+		createEAttribute(xmlPersistenceUnitMetadata_2_0EClass, XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION);
+
+		xmlQuery_2_0EClass = createEClass(XML_QUERY_20);
+		createEAttribute(xmlQuery_2_0EClass, XML_QUERY_20__DESCRIPTION);
+
+		xmlQueryHint_2_0EClass = createEClass(XML_QUERY_HINT_20);
+		createEAttribute(xmlQueryHint_2_0EClass, XML_QUERY_HINT_20__DESCRIPTION);
+
+		xmlSequenceGenerator_2_0EClass = createEClass(XML_SEQUENCE_GENERATOR_20);
+		createEAttribute(xmlSequenceGenerator_2_0EClass, XML_SEQUENCE_GENERATOR_20__CATALOG);
+		createEAttribute(xmlSequenceGenerator_2_0EClass, XML_SEQUENCE_GENERATOR_20__SCHEMA);
+
+		xmlSingleRelationshipMapping_2_0EClass = createEClass(XML_SINGLE_RELATIONSHIP_MAPPING_20);
+
+		xmlSqlResultSetMapping_2_0EClass = createEClass(XML_SQL_RESULT_SET_MAPPING_20);
+		createEAttribute(xmlSqlResultSetMapping_2_0EClass, XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION);
+
+		xmlUniqueConstraint_2_0EClass = createEClass(XML_UNIQUE_CONSTRAINT_20);
+		createEAttribute(xmlUniqueConstraint_2_0EClass, XML_UNIQUE_CONSTRAINT_20__NAME);
+
+		// Create enums
+		lockModeType_2_0EEnum = createEEnum(LOCK_MODE_TYPE_20);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isInitialized = false;
+
+	/**
+	 * Complete the initialization of the package and its meta-model.  This
+	 * method is guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void initializePackageContents()
+	{
+		if (isInitialized) return;
+		isInitialized = true;
+
+		// Initialize package
+		setName(eNAME);
+		setNsPrefix(eNS_PREFIX);
+		setNsURI(eNS_URI);
+
+		// Obtain other dependent packages
+		XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+		OrmPackage theOrmPackage = (OrmPackage)EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI);
+
+		// Create type parameters
+
+		// Set bounds for type parameters
+
+		// Add supertypes to classes
+		xmlAttributeMapping_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAccessHolder());
+		xmlCollectionTable_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlReferenceTable());
+		xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlConvertibleMapping());
+		xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlOrderable());
+		xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAttributeOverrideContainer());
+		xmlElementCollection_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAssociationOverrideContainer());
+		xmlElementCollection_2_0EClass.getESuperTypes().add(this.getXmlMapKeyAttributeOverrideContainer_2_0());
+		xmlEmbedded_2_0EClass.getESuperTypes().add(theOrmPackage.getXmlAssociationOverrideContainer());
+		xmlEntity_2_0EClass.getESuperTypes().add(this.getXmlCacheable_2_0());
+		xmlManyToMany_2_0EClass.getESuperTypes().add(this.getXmlMultiRelationshipMapping_2_0());
+		xmlMultiRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlOrderable_2_0());
+		xmlMultiRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlMapKeyAttributeOverrideContainer_2_0());
+		xmlOneToMany_2_0EClass.getESuperTypes().add(this.getXmlMultiRelationshipMapping_2_0());
+		xmlOneToMany_2_0EClass.getESuperTypes().add(this.getXmlOrphanRemovable_2_0());
+		xmlOneToOne_2_0EClass.getESuperTypes().add(this.getXmlSingleRelationshipMapping_2_0());
+		xmlOneToOne_2_0EClass.getESuperTypes().add(this.getXmlOrphanRemovable_2_0());
+		xmlSingleRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlDerivedId_2_0());
+		xmlSingleRelationshipMapping_2_0EClass.getESuperTypes().add(this.getXmlMapsId_2_0());
+
+		// Initialize classes and features; add operations and parameters
+		initEClass(xmlAssociationOverride_2_0EClass, XmlAssociationOverride_2_0.class, "XmlAssociationOverride_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlAssociationOverride_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlAssociationOverride_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlAssociationOverride_2_0_JoinTable(), theOrmPackage.getXmlJoinTable(), null, "joinTable", null, 0, 1, XmlAssociationOverride_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlAttributeMapping_2_0EClass, XmlAttributeMapping_2_0.class, "XmlAttributeMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlAttributeOverride_2_0EClass, XmlAttributeOverride_2_0.class, "XmlAttributeOverride_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlAttributeOverride_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlAttributeOverride_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlAttributes_2_0EClass, XmlAttributes_2_0.class, "XmlAttributes_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlAttributes_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlAttributes_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlAttributes_2_0_ElementCollections(), theOrmPackage.getXmlElementCollection(), null, "elementCollections", null, 0, -1, XmlAttributes_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlCacheable_2_0EClass, XmlCacheable_2_0.class, "XmlCacheable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlCacheable_2_0_Cacheable(), theXMLTypePackage.getBooleanObject(), "cacheable", null, 0, 1, XmlCacheable_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlCascadeType_2_0EClass, XmlCascadeType_2_0.class, "XmlCascadeType_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlCascadeType_2_0_CascadeDetach(), theXMLTypePackage.getBoolean(), "cascadeDetach", null, 0, 1, XmlCascadeType_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlCollectionTable_2_0EClass, XmlCollectionTable_2_0.class, "XmlCollectionTable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlDerivedId_2_0EClass, XmlDerivedId_2_0.class, "XmlDerivedId_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlDerivedId_2_0_Id(), theXMLTypePackage.getBooleanObject(), "id", null, 0, 1, XmlDerivedId_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlElementCollection_2_0EClass, XmlElementCollection_2_0.class, "XmlElementCollection_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlElementCollection_2_0_TargetClass(), theXMLTypePackage.getString(), "targetClass", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlElementCollection_2_0_Fetch(), theOrmPackage.getFetchType(), "fetch", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlElementCollection_2_0_MapKey(), theOrmPackage.getMapKey(), null, "mapKey", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlElementCollection_2_0_MapKeyClass(), theOrmPackage.getXmlClassReference(), null, "mapKeyClass", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlElementCollection_2_0_MapKeyTemporal(), theOrmPackage.getTemporalType(), "mapKeyTemporal", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlElementCollection_2_0_MapKeyEnumerated(), theOrmPackage.getEnumType(), "mapKeyEnumerated", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlElementCollection_2_0_MapKeyColumn(), theOrmPackage.getXmlColumn(), null, "mapKeyColumn", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlElementCollection_2_0_MapKeyJoinColumns(), theOrmPackage.getXmlJoinColumn(), null, "mapKeyJoinColumns", null, 0, -1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlElementCollection_2_0_Column(), theOrmPackage.getXmlColumn(), null, "column", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlElementCollection_2_0_CollectionTable(), theOrmPackage.getXmlCollectionTable(), null, "collectionTable", null, 0, 1, XmlElementCollection_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlEmbedded_2_0EClass, XmlEmbedded_2_0.class, "XmlEmbedded_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlEntity_2_0EClass, XmlEntity_2_0.class, "XmlEntity_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlEntityListener_2_0EClass, XmlEntityListener_2_0.class, "XmlEntityListener_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlEntityListener_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlEntityListener_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlEventMethod_2_0EClass, XmlEventMethod_2_0.class, "XmlEventMethod_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlEventMethod_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlEventMethod_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlGenerator_2_0EClass, XmlGenerator_2_0.class, "XmlGenerator_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlGenerator_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlGenerator_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlManyToMany_2_0EClass, XmlManyToMany_2_0.class, "XmlManyToMany_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlMapKeyAttributeOverrideContainer_2_0EClass, XmlMapKeyAttributeOverrideContainer_2_0.class, "XmlMapKeyAttributeOverrideContainer_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides(), theOrmPackage.getXmlAttributeOverride(), null, "mapKeyAttributeOverrides", null, 0, -1, XmlMapKeyAttributeOverrideContainer_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlMapsId_2_0EClass, XmlMapsId_2_0.class, "XmlMapsId_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlMapsId_2_0_MapsId(), theXMLTypePackage.getString(), "mapsId", null, 0, 1, XmlMapsId_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlMultiRelationshipMapping_2_0EClass, XmlMultiRelationshipMapping_2_0.class, "XmlMultiRelationshipMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlMultiRelationshipMapping_2_0_MapKeyClass(), theOrmPackage.getXmlClassReference(), null, "mapKeyClass", null, 0, 1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlMultiRelationshipMapping_2_0_MapKeyTemporal(), theOrmPackage.getTemporalType(), "mapKeyTemporal", null, 0, 1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlMultiRelationshipMapping_2_0_MapKeyEnumerated(), theOrmPackage.getEnumType(), "mapKeyEnumerated", null, 0, 1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlMultiRelationshipMapping_2_0_MapKeyColumn(), theOrmPackage.getXmlColumn(), null, "mapKeyColumn", null, 0, 1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns(), theOrmPackage.getXmlJoinColumn(), null, "mapKeyJoinColumns", null, 0, -1, XmlMultiRelationshipMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlNamedQuery_2_0EClass, XmlNamedQuery_2_0.class, "XmlNamedQuery_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlNamedQuery_2_0_LockMode(), this.getLockModeType_2_0(), "lockMode", null, 0, 1, XmlNamedQuery_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlOneToMany_2_0EClass, XmlOneToMany_2_0.class, "XmlOneToMany_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlOneToOne_2_0EClass, XmlOneToOne_2_0.class, "XmlOneToOne_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlOrderable_2_0EClass, XmlOrderable_2_0.class, "XmlOrderable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlOrderable_2_0_OrderColumn(), theOrmPackage.getXmlOrderColumn(), null, "orderColumn", null, 0, 1, XmlOrderable_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlOrderColumn_2_0EClass, XmlOrderColumn_2_0.class, "XmlOrderColumn_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlOrderColumn_2_0_Nullable(), theXMLTypePackage.getBooleanObject(), "nullable", null, 0, 1, XmlOrderColumn_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlOrderColumn_2_0_Insertable(), theXMLTypePackage.getBooleanObject(), "insertable", null, 0, 1, XmlOrderColumn_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlOrderColumn_2_0_Updatable(), theXMLTypePackage.getBooleanObject(), "updatable", null, 0, 1, XmlOrderColumn_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlOrphanRemovable_2_0EClass, XmlOrphanRemovable_2_0.class, "XmlOrphanRemovable_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlOrphanRemovable_2_0_OrphanRemoval(), theXMLTypePackage.getBooleanObject(), "orphanRemoval", null, 0, 1, XmlOrphanRemovable_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPersistenceUnitDefaults_2_0EClass, XmlPersistenceUnitDefaults_2_0.class, "XmlPersistenceUnitDefaults_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPersistenceUnitDefaults_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlPersistenceUnitDefaults_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers(), theXMLTypePackage.getBoolean(), "delimitedIdentifiers", null, 0, 1, XmlPersistenceUnitDefaults_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPersistenceUnitMetadata_2_0EClass, XmlPersistenceUnitMetadata_2_0.class, "XmlPersistenceUnitMetadata_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPersistenceUnitMetadata_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlPersistenceUnitMetadata_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlQuery_2_0EClass, XmlQuery_2_0.class, "XmlQuery_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlQuery_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlQuery_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlQueryHint_2_0EClass, XmlQueryHint_2_0.class, "XmlQueryHint_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlQueryHint_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlQueryHint_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlSequenceGenerator_2_0EClass, XmlSequenceGenerator_2_0.class, "XmlSequenceGenerator_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlSequenceGenerator_2_0_Catalog(), theXMLTypePackage.getString(), "catalog", null, 0, 1, XmlSequenceGenerator_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlSequenceGenerator_2_0_Schema(), theXMLTypePackage.getString(), "schema", null, 0, 1, XmlSequenceGenerator_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlSingleRelationshipMapping_2_0EClass, XmlSingleRelationshipMapping_2_0.class, "XmlSingleRelationshipMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(xmlSqlResultSetMapping_2_0EClass, XmlSqlResultSetMapping_2_0.class, "XmlSqlResultSetMapping_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlSqlResultSetMapping_2_0_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlSqlResultSetMapping_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlUniqueConstraint_2_0EClass, XmlUniqueConstraint_2_0.class, "XmlUniqueConstraint_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlUniqueConstraint_2_0_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, XmlUniqueConstraint_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		// Initialize enums and add enum literals
+		initEEnum(lockModeType_2_0EEnum, LockModeType_2_0.class, "LockModeType_2_0");
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.NONE);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.READ);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.WRITE);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.OPTIMISTIC);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.OPTIMISTIC_FORCE_INCREMENT);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.PESSIMISTIC_READ);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.PESSIMISTIC_WRITE);
+		addEEnumLiteral(lockModeType_2_0EEnum, LockModeType_2_0.PESSIMISTIC_FORCE_INCREMENT);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * Defines literals for the meta objects that represent
+	 * <ul>
+	 *   <li>each class,</li>
+	 *   <li>each feature of each class,</li>
+	 *   <li>each enum,</li>
+	 *   <li>and each data type</li>
+	 * </ul>
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public interface Literals
+	{
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0 <em>Xml Attribute Mapping 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeMapping_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeMapping_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ATTRIBUTE_MAPPING_20 = eINSTANCE.getXmlAttributeMapping_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0 <em>Xml Association Override 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ASSOCIATION_OVERRIDE_20 = eINSTANCE.getXmlAssociationOverride_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ASSOCIATION_OVERRIDE_20__DESCRIPTION = eINSTANCE.getXmlAssociationOverride_2_0_Description();
+
+		/**
+		 * The meta object literal for the '<em><b>Join Table</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ASSOCIATION_OVERRIDE_20__JOIN_TABLE = eINSTANCE.getXmlAssociationOverride_2_0_JoinTable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0 <em>Xml Attribute Override 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ATTRIBUTE_OVERRIDE_20 = eINSTANCE.getXmlAttributeOverride_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ATTRIBUTE_OVERRIDE_20__DESCRIPTION = eINSTANCE.getXmlAttributeOverride_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0 <em>Xml Attributes 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ATTRIBUTES_20 = eINSTANCE.getXmlAttributes_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ATTRIBUTES_20__DESCRIPTION = eINSTANCE.getXmlAttributes_2_0_Description();
+
+		/**
+		 * The meta object literal for the '<em><b>Element Collections</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ATTRIBUTES_20__ELEMENT_COLLECTIONS = eINSTANCE.getXmlAttributes_2_0_ElementCollections();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0 <em>Xml Collection Table 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCollectionTable_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCollectionTable_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_COLLECTION_TABLE_20 = eINSTANCE.getXmlCollectionTable_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0 <em>Xml Derived Id 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_DERIVED_ID_20 = eINSTANCE.getXmlDerivedId_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Id</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_DERIVED_ID_20__ID = eINSTANCE.getXmlDerivedId_2_0_Id();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0 <em>Xml Element Collection 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ELEMENT_COLLECTION_20 = eINSTANCE.getXmlElementCollection_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Target Class</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ELEMENT_COLLECTION_20__TARGET_CLASS = eINSTANCE.getXmlElementCollection_2_0_TargetClass();
+
+		/**
+		 * The meta object literal for the '<em><b>Fetch</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ELEMENT_COLLECTION_20__FETCH = eINSTANCE.getXmlElementCollection_2_0_Fetch();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY = eINSTANCE.getXmlElementCollection_2_0_MapKey();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Class</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY_CLASS = eINSTANCE.getXmlElementCollection_2_0_MapKeyClass();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Temporal</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ELEMENT_COLLECTION_20__MAP_KEY_TEMPORAL = eINSTANCE.getXmlElementCollection_2_0_MapKeyTemporal();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Enumerated</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ELEMENT_COLLECTION_20__MAP_KEY_ENUMERATED = eINSTANCE.getXmlElementCollection_2_0_MapKeyEnumerated();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY_COLUMN = eINSTANCE.getXmlElementCollection_2_0_MapKeyColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ELEMENT_COLLECTION_20__MAP_KEY_JOIN_COLUMNS = eINSTANCE.getXmlElementCollection_2_0_MapKeyJoinColumns();
+
+		/**
+		 * The meta object literal for the '<em><b>Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ELEMENT_COLLECTION_20__COLUMN = eINSTANCE.getXmlElementCollection_2_0_Column();
+
+		/**
+		 * The meta object literal for the '<em><b>Collection Table</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ELEMENT_COLLECTION_20__COLLECTION_TABLE = eINSTANCE.getXmlElementCollection_2_0_CollectionTable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0 <em>Xml Embedded 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEmbedded_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEmbedded_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_EMBEDDED_20 = eINSTANCE.getXmlEmbedded_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0 <em>Xml Entity 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntity_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntity_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ENTITY_20 = eINSTANCE.getXmlEntity_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0 <em>Xml Entity Listener 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ENTITY_LISTENER_20 = eINSTANCE.getXmlEntityListener_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ENTITY_LISTENER_20__DESCRIPTION = eINSTANCE.getXmlEntityListener_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0 <em>Xml Event Method 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_EVENT_METHOD_20 = eINSTANCE.getXmlEventMethod_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_EVENT_METHOD_20__DESCRIPTION = eINSTANCE.getXmlEventMethod_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0 <em>Xml Generator 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_GENERATOR_20 = eINSTANCE.getXmlGenerator_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_GENERATOR_20__DESCRIPTION = eINSTANCE.getXmlGenerator_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0 <em>Xml Many To Many 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlManyToMany_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlManyToMany_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_MANY_TO_MANY_20 = eINSTANCE.getXmlManyToMany_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0 <em>Xml Map Key Attribute Override Container 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20 = eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_MAP_KEY_ATTRIBUTE_OVERRIDE_CONTAINER_20__MAP_KEY_ATTRIBUTE_OVERRIDES = eINSTANCE.getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0 <em>Xml Maps Id 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_MAPS_ID_20 = eINSTANCE.getXmlMapsId_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Maps Id</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MAPS_ID_20__MAPS_ID = eINSTANCE.getXmlMapsId_2_0_MapsId();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0 <em>Xml Multi Relationship Mapping 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_MULTI_RELATIONSHIP_MAPPING_20 = eINSTANCE.getXmlMultiRelationshipMapping_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Class</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_CLASS = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyClass();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Temporal</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_TEMPORAL = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyTemporal();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Enumerated</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_ENUMERATED = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyEnumerated();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_COLUMN = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyColumn();
+
+		/**
+		 * The meta object literal for the '<em><b>Map Key Join Columns</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_MULTI_RELATIONSHIP_MAPPING_20__MAP_KEY_JOIN_COLUMNS = eINSTANCE.getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0 <em>Xml Named Query 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_NAMED_QUERY_20 = eINSTANCE.getXmlNamedQuery_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Lock Mode</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_NAMED_QUERY_20__LOCK_MODE = eINSTANCE.getXmlNamedQuery_2_0_LockMode();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0 <em>Xml One To Many 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToMany_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToMany_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ONE_TO_MANY_20 = eINSTANCE.getXmlOneToMany_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0 <em>Xml One To One 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOneToOne_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToOne_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ONE_TO_ONE_20 = eINSTANCE.getXmlOneToOne_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0 <em>Xml Order Column 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ORDER_COLUMN_20 = eINSTANCE.getXmlOrderColumn_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Nullable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ORDER_COLUMN_20__NULLABLE = eINSTANCE.getXmlOrderColumn_2_0_Nullable();
+
+		/**
+		 * The meta object literal for the '<em><b>Insertable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ORDER_COLUMN_20__INSERTABLE = eINSTANCE.getXmlOrderColumn_2_0_Insertable();
+
+		/**
+		 * The meta object literal for the '<em><b>Updatable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ORDER_COLUMN_20__UPDATABLE = eINSTANCE.getXmlOrderColumn_2_0_Updatable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0 <em>Xml Persistence Unit Defaults 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE_UNIT_DEFAULTS_20 = eINSTANCE.getXmlPersistenceUnitDefaults_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS_20__DESCRIPTION = eINSTANCE.getXmlPersistenceUnitDefaults_2_0_Description();
+
+		/**
+		 * The meta object literal for the '<em><b>Delimited Identifiers</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_DEFAULTS_20__DELIMITED_IDENTIFIERS = eINSTANCE.getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0 <em>Xml Persistence Unit Metadata 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE_UNIT_METADATA_20 = eINSTANCE.getXmlPersistenceUnitMetadata_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_METADATA_20__DESCRIPTION = eINSTANCE.getXmlPersistenceUnitMetadata_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0 <em>Xml Query 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_QUERY_20 = eINSTANCE.getXmlQuery_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_QUERY_20__DESCRIPTION = eINSTANCE.getXmlQuery_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0 <em>Xml Query Hint 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_QUERY_HINT_20 = eINSTANCE.getXmlQueryHint_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_QUERY_HINT_20__DESCRIPTION = eINSTANCE.getXmlQueryHint_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0 <em>Xml Sequence Generator 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_SEQUENCE_GENERATOR_20 = eINSTANCE.getXmlSequenceGenerator_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Catalog</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_SEQUENCE_GENERATOR_20__CATALOG = eINSTANCE.getXmlSequenceGenerator_2_0_Catalog();
+
+		/**
+		 * The meta object literal for the '<em><b>Schema</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_SEQUENCE_GENERATOR_20__SCHEMA = eINSTANCE.getXmlSequenceGenerator_2_0_Schema();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0 <em>Xml Single Relationship Mapping 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSingleRelationshipMapping_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSingleRelationshipMapping_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_SINGLE_RELATIONSHIP_MAPPING_20 = eINSTANCE.getXmlSingleRelationshipMapping_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0 <em>Xml Sql Result Set Mapping 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_SQL_RESULT_SET_MAPPING_20 = eINSTANCE.getXmlSqlResultSetMapping_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_SQL_RESULT_SET_MAPPING_20__DESCRIPTION = eINSTANCE.getXmlSqlResultSetMapping_2_0_Description();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0 <em>Xml Unique Constraint 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_UNIQUE_CONSTRAINT_20 = eINSTANCE.getXmlUniqueConstraint_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_UNIQUE_CONSTRAINT_20__NAME = eINSTANCE.getXmlUniqueConstraint_2_0_Name();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0 <em>Xml Cacheable 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_CACHEABLE_20 = eINSTANCE.getXmlCacheable_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Cacheable</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_CACHEABLE_20__CACHEABLE = eINSTANCE.getXmlCacheable_2_0_Cacheable();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0 <em>Xml Cascade Type 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_CASCADE_TYPE_20 = eINSTANCE.getXmlCascadeType_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Cascade Detach</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_CASCADE_TYPE_20__CASCADE_DETACH = eINSTANCE.getXmlCascadeType_2_0_CascadeDetach();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0 <em>Xml Orphan Removable 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ORPHAN_REMOVABLE_20 = eINSTANCE.getXmlOrphanRemovable_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Orphan Removal</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_ORPHAN_REMOVABLE_20__ORPHAN_REMOVAL = eINSTANCE.getXmlOrphanRemovable_2_0_OrphanRemoval();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0 <em>Xml Orderable 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_ORDERABLE_20 = eINSTANCE.getXmlOrderable_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Order Column</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_ORDERABLE_20__ORDER_COLUMN = eINSTANCE.getXmlOrderable_2_0_OrderColumn();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0 <em>Lock Mode Type 20</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+		 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getLockModeType_2_0()
+		 * @generated
+		 */
+		public static final EEnum LOCK_MODE_TYPE_20 = eINSTANCE.getLockModeType_2_0();
+
+	}
+
+} //OrmV2_0Package
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java
new file mode 100644
index 0000000..d214d90
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAssociationOverride_2_0.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.orm.XmlJoinTable;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Association Override 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription <em>Description</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getJoinTable <em>Join Table</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlAssociationOverride_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Join Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Join Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Join Table</em>' containment reference.
+	 * @see #setJoinTable(XmlJoinTable)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAssociationOverride_2_0_JoinTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlJoinTable getJoinTable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAssociationOverride_2_0#getJoinTable <em>Join Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Join Table</em>' containment reference.
+	 * @see #getJoinTable()
+	 * @generated
+	 */
+	void setJoinTable(XmlJoinTable value);
+
+} // XmlAssociationOverride_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java
new file mode 100644
index 0000000..eff8cdb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributeMapping_2_0.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.orm.XmlAccessHolder;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Attribute Mapping 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeMapping_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlAttributeMapping_2_0 extends XmlAccessHolder
+{
+	
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java
new file mode 100644
index 0000000..1a0cdfd
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributeOverride_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Attribute Override 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlAttributeOverride_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributeOverride_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributeOverride_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlAttributeOverride_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributes_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributes_2_0.java
new file mode 100644
index 0000000..c268766
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlAttributes_2_0.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.orm.XmlElementCollection;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Attributes 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription <em>Description</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getElementCollections <em>Element Collections</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlAttributes_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlAttributes_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Element Collections</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlElementCollection}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Element Collections</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Element Collections</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlAttributes_2_0_ElementCollections()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlElementCollection> getElementCollections();
+
+} // XmlAttributes_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCacheable_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCacheable_2_0.java
new file mode 100644
index 0000000..8c0de4d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCacheable_2_0.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Cacheable2 0</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable <em>Cacheable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlCacheable_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Cacheable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cacheable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cacheable</em>' attribute.
+	 * @see #setCacheable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCacheable_2_0_Cacheable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getCacheable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCacheable_2_0#getCacheable <em>Cacheable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cacheable</em>' attribute.
+	 * @see #getCacheable()
+	 * @generated
+	 */
+	void setCacheable(Boolean value);
+	
+	/**
+	 * Return the {@link TextRange} for the cacheable annotation
+	 */
+	TextRange getCacheableTextRange();
+} // XmlCacheable2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCascadeType_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCascadeType_2_0.java
new file mode 100644
index 0000000..c499f52
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCascadeType_2_0.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Cascade Type 20</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach <em>Cascade Detach</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlCascadeType_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Cascade Detach</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Cascade Detach</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Cascade Detach</em>' attribute.
+	 * @see #setCascadeDetach(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCascadeType_2_0_CascadeDetach()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	boolean isCascadeDetach();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlCascadeType_2_0#isCascadeDetach <em>Cascade Detach</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Cascade Detach</em>' attribute.
+	 * @see #isCascadeDetach()
+	 * @generated
+	 */
+	void setCascadeDetach(boolean value);
+
+} // XmlCascadeType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCollectionTable_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCollectionTable_2_0.java
new file mode 100644
index 0000000..61e926b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlCollectionTable_2_0.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.orm.XmlReferenceTable;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Collection Table 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlCollectionTable_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlCollectionTable_2_0 extends XmlReferenceTable
+{
+
+} // XmlCollectionTable_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlDerivedId_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlDerivedId_2_0.java
new file mode 100644
index 0000000..7918f93
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlDerivedId_2_0.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Derived Id 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0#getId <em>Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlDerivedId_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Id</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Id</em>' attribute.
+	 * @see #setId(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlDerivedId_2_0_Id()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getId();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlDerivedId_2_0#getId <em>Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Id</em>' attribute.
+	 * @see #getId()
+	 * @generated
+	 */
+	void setId(Boolean value);
+	
+	/**
+	 * Return the text range of the derived id part of the XML document
+	 */
+	TextRange getIdTextRange();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlElementCollection_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlElementCollection_2_0.java
new file mode 100644
index 0000000..d92f42b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlElementCollection_2_0.java
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.FetchType;
+import org.eclipse.jpt.core.resource.orm.MapKey;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer;
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverrideContainer;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlCollectionTable;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+import org.eclipse.jpt.core.resource.orm.XmlOrderable;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Element Collection 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass <em>Target Class</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch <em>Fetch</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey <em>Map Key</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass <em>Map Key Class</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn <em>Map Key Column</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn <em>Column</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable <em>Collection Table</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlElementCollection_2_0 extends XmlConvertibleMapping, XmlOrderable, XmlAttributeOverrideContainer, XmlAssociationOverrideContainer, XmlMapKeyAttributeOverrideContainer_2_0
+{
+	/**
+	 * Returns the value of the '<em><b>Target Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Target Class</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Target Class</em>' attribute.
+	 * @see #setTargetClass(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_TargetClass()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getTargetClass();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getTargetClass <em>Target Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Target Class</em>' attribute.
+	 * @see #getTargetClass()
+	 * @generated
+	 */
+	void setTargetClass(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Fetch</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.FetchType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Fetch</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #setFetch(FetchType)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_Fetch()
+	 * @model
+	 * @generated
+	 */
+	FetchType getFetch();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getFetch <em>Fetch</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Fetch</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.FetchType
+	 * @see #getFetch()
+	 * @generated
+	 */
+	void setFetch(FetchType value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key</em>' containment reference.
+	 * @see #setMapKey(MapKey)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKey()
+	 * @model containment="true"
+	 * @generated
+	 */
+	MapKey getMapKey();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKey <em>Map Key</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key</em>' containment reference.
+	 * @see #getMapKey()
+	 * @generated
+	 */
+	void setMapKey(MapKey value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #setMapKeyClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlClassReference getMapKeyClass();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyClass <em>Map Key Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #getMapKeyClass()
+	 * @generated
+	 */
+	void setMapKeyClass(XmlClassReference value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setMapKeyTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyTemporal()
+	 * @model
+	 * @generated
+	 */
+	TemporalType getMapKeyTemporal();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getMapKeyTemporal()
+	 * @generated
+	 */
+	void setMapKeyTemporal(TemporalType value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setMapKeyEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyEnumerated()
+	 * @model
+	 * @generated
+	 */
+	EnumType getMapKeyEnumerated();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getMapKeyEnumerated()
+	 * @generated
+	 */
+	void setMapKeyEnumerated(EnumType value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #setMapKeyColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlColumn getMapKeyColumn();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #getMapKeyColumn()
+	 * @generated
+	 */
+	void setMapKeyColumn(XmlColumn value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_MapKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlJoinColumn> getMapKeyJoinColumns();
+
+	/**
+	 * Returns the value of the '<em><b>Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Column</em>' containment reference.
+	 * @see #setColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_Column()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlColumn getColumn();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getColumn <em>Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Column</em>' containment reference.
+	 * @see #getColumn()
+	 * @generated
+	 */
+	void setColumn(XmlColumn value);
+
+	/**
+	 * Returns the value of the '<em><b>Collection Table</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Collection Table</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Collection Table</em>' containment reference.
+	 * @see #setCollectionTable(XmlCollectionTable)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlElementCollection_2_0_CollectionTable()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlCollectionTable getCollectionTable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlElementCollection_2_0#getCollectionTable <em>Collection Table</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Collection Table</em>' containment reference.
+	 * @see #getCollectionTable()
+	 * @generated
+	 */
+	void setCollectionTable(XmlCollectionTable value);
+
+	/**
+	 * Return the {@link TextRange} for the target-class attribute.
+	 */
+	TextRange getTargetClassTextRange();
+
+} // XmlElementCollection_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEmbedded_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEmbedded_2_0.java
new file mode 100644
index 0000000..2e9a788
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEmbedded_2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.orm.XmlAssociationOverrideContainer;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Embedded 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEmbedded_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlEmbedded_2_0 extends XmlAssociationOverrideContainer
+{
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEntityListener_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEntityListener_2_0.java
new file mode 100644
index 0000000..c677c15
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEntityListener_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Entity Listener 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlEntityListener_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntityListener_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEntityListener_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlEntityListener_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEntity_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEntity_2_0.java
new file mode 100644
index 0000000..3877005
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEntity_2_0.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Entity 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEntity_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlEntity_2_0 extends XmlCacheable_2_0
+{
+
+} // XmlEntity_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEventMethod_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEventMethod_2_0.java
new file mode 100644
index 0000000..6f31dec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlEventMethod_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Event Method 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlEventMethod_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlEventMethod_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlEventMethod_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlEventMethod_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlGenerator_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlGenerator_2_0.java
new file mode 100644
index 0000000..984c3ff
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlGenerator_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Generator 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlGenerator_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlGenerator_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlGenerator_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlGenerator_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlManyToMany_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlManyToMany_2_0.java
new file mode 100644
index 0000000..fc1b205
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlManyToMany_2_0.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Many To Many 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlManyToMany_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlManyToMany_2_0 extends XmlMultiRelationshipMapping_2_0
+{
+
+} // XmlManyToMany_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java
new file mode 100644
index 0000000..dc79723
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapKeyAttributeOverrideContainer_2_0.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.jpt.core.resource.orm.XmlAttributeOverride;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Map Key Attribute Override Container2 0</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyAttributeOverrideContainer_2_0#getMapKeyAttributeOverrides <em>Map Key Attribute Overrides</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlMapKeyAttributeOverrideContainer_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Map Key Attribute Overrides</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlAttributeOverride}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Attribute Overrides</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Attribute Overrides</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyAttributeOverrideContainer_2_0_MapKeyAttributeOverrides()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlAttributeOverride> getMapKeyAttributeOverrides();
+
+} // XmlMapKeyAttributeOverrideContainer2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java
new file mode 100644
index 0000000..e901fd4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapKeyClass_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Map Key Class 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyClass_2_0#getClassName <em>Class Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyClass_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlMapKeyClass_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Class Name</em>' attribute.
+	 * @see #setClassName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapKeyClass_2_0_ClassName()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	String getClassName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapKeyClass_2_0#getClassName <em>Class Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Class Name</em>' attribute.
+	 * @see #getClassName()
+	 * @generated
+	 */
+	void setClassName(String value);
+
+} // XmlMapKeyClass_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapsId_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapsId_2_0.java
new file mode 100644
index 0000000..2fec97d
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMapsId_2_0.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Maps Id 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId <em>Maps Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlMapsId_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Maps Id</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Maps Id</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Maps Id</em>' attribute.
+	 * @see #setMapsId(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMapsId_2_0_MapsId()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getMapsId();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMapsId_2_0#getMapsId <em>Maps Id</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Maps Id</em>' attribute.
+	 * @see #getMapsId()
+	 * @generated
+	 */
+	void setMapsId(String value);
+	
+	/**
+	 * Return the text range of the "maps-id" part of the XML document
+	 */
+	TextRange getMapsIdTextRange();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java
new file mode 100644
index 0000000..3b0955a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlMultiRelationshipMapping_2_0.java
@@ -0,0 +1,174 @@
+/*******************************************************************************
+ *  Copyright (c) 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jpt.core.resource.orm.EnumType;
+import org.eclipse.jpt.core.resource.orm.TemporalType;
+import org.eclipse.jpt.core.resource.orm.XmlClassReference;
+import org.eclipse.jpt.core.resource.orm.XmlColumn;
+import org.eclipse.jpt.core.resource.orm.XmlJoinColumn;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Multi Relationship Mapping 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass <em>Map Key Class</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn <em>Map Key Column</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyJoinColumns <em>Map Key Join Columns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlMultiRelationshipMapping_2_0 extends XmlOrderable_2_0, XmlMapKeyAttributeOverrideContainer_2_0
+{
+	/**
+	 * Returns the value of the '<em><b>Map Key Class</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Class</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #setMapKeyClass(XmlClassReference)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyClass()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlClassReference getMapKeyClass();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyClass <em>Map Key Class</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Class</em>' containment reference.
+	 * @see #getMapKeyClass()
+	 * @generated
+	 */
+	void setMapKeyClass(XmlClassReference value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Temporal</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.TemporalType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Temporal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #setMapKeyTemporal(TemporalType)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyTemporal()
+	 * @model
+	 * @generated
+	 */
+	TemporalType getMapKeyTemporal();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyTemporal <em>Map Key Temporal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Temporal</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.TemporalType
+	 * @see #getMapKeyTemporal()
+	 * @generated
+	 */
+	void setMapKeyTemporal(TemporalType value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Enumerated</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.EnumType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Enumerated</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #setMapKeyEnumerated(EnumType)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyEnumerated()
+	 * @model
+	 * @generated
+	 */
+	EnumType getMapKeyEnumerated();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyEnumerated <em>Map Key Enumerated</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Enumerated</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.EnumType
+	 * @see #getMapKeyEnumerated()
+	 * @generated
+	 */
+	void setMapKeyEnumerated(EnumType value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #setMapKeyColumn(XmlColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlColumn getMapKeyColumn();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlMultiRelationshipMapping_2_0#getMapKeyColumn <em>Map Key Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Map Key Column</em>' containment reference.
+	 * @see #getMapKeyColumn()
+	 * @generated
+	 */
+	void setMapKeyColumn(XmlColumn value);
+
+	/**
+	 * Returns the value of the '<em><b>Map Key Join Columns</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.orm.XmlJoinColumn}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Map Key Join Columns</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Map Key Join Columns</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlMultiRelationshipMapping_2_0_MapKeyJoinColumns()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<XmlJoinColumn> getMapKeyJoinColumns();
+
+} // XmlMultiRelationshipMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlNamedQuery_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlNamedQuery_2_0.java
new file mode 100644
index 0000000..994e037
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlNamedQuery_2_0.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Named Query 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode <em>Lock Mode</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlNamedQuery_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Lock Mode</b></em>' attribute.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Lock Mode</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Lock Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+	 * @see #setLockMode(LockModeType_2_0)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlNamedQuery_2_0_LockMode()
+	 * @model
+	 * @generated
+	 */
+	LockModeType_2_0 getLockMode();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlNamedQuery_2_0#getLockMode <em>Lock Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Lock Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.LockModeType_2_0
+	 * @see #getLockMode()
+	 * @generated
+	 */
+	void setLockMode(LockModeType_2_0 value);
+
+} // XmlNamedQuery_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOneToMany_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOneToMany_2_0.java
new file mode 100644
index 0000000..bc79a92
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOneToMany_2_0.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml One To Many 20</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToMany_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlOneToMany_2_0 extends XmlMultiRelationshipMapping_2_0, XmlOrphanRemovable_2_0
+{
+
+} // XmlOneToMany_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOneToOne_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOneToOne_2_0.java
new file mode 100644
index 0000000..cacddeb
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOneToOne_2_0.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml One To One 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOneToOne_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlOneToOne_2_0 extends XmlSingleRelationshipMapping_2_0, XmlOrphanRemovable_2_0
+{
+
+} // XmlOneToOne_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrderColumn_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrderColumn_2_0.java
new file mode 100644
index 0000000..b28b45f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrderColumn_2_0.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Order Column 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable <em>Nullable</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable <em>Insertable</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable <em>Updatable</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlOrderColumn_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Nullable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Nullable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Nullable</em>' attribute.
+	 * @see #setNullable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0_Nullable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getNullable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getNullable <em>Nullable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Nullable</em>' attribute.
+	 * @see #getNullable()
+	 * @generated
+	 */
+	void setNullable(Boolean value);
+
+	/**
+	 * Returns the value of the '<em><b>Insertable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Insertable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Insertable</em>' attribute.
+	 * @see #setInsertable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0_Insertable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getInsertable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getInsertable <em>Insertable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Insertable</em>' attribute.
+	 * @see #getInsertable()
+	 * @generated
+	 */
+	void setInsertable(Boolean value);
+
+	/**
+	 * Returns the value of the '<em><b>Updatable</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Updatable</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Updatable</em>' attribute.
+	 * @see #setUpdatable(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderColumn_2_0_Updatable()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getUpdatable();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderColumn_2_0#getUpdatable <em>Updatable</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Updatable</em>' attribute.
+	 * @see #getUpdatable()
+	 * @generated
+	 */
+	void setUpdatable(Boolean value);
+
+} // XmlOrderColumn_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrderable_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrderable_2_0.java
new file mode 100644
index 0000000..9d9783e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrderable_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.orm.XmlOrderColumn;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Orderable 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn <em>Order Column</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlOrderable_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Order Column</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Order Column</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Order Column</em>' containment reference.
+	 * @see #setOrderColumn(XmlOrderColumn)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrderable_2_0_OrderColumn()
+	 * @model containment="true"
+	 * @generated
+	 */
+	XmlOrderColumn getOrderColumn();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrderable_2_0#getOrderColumn <em>Order Column</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Order Column</em>' containment reference.
+	 * @see #getOrderColumn()
+	 * @generated
+	 */
+	void setOrderColumn(XmlOrderColumn value);
+
+} // XmlOrderable_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java
new file mode 100644
index 0000000..6fde468
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlOrphanRemovable_2_0.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Orphan Removable2 0</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval <em>Orphan Removal</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlOrphanRemovable_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Orphan Removal</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Orphan Removal</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Orphan Removal</em>' attribute.
+	 * @see #setOrphanRemoval(Boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlOrphanRemovable_2_0_OrphanRemoval()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	Boolean getOrphanRemoval();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlOrphanRemovable_2_0#getOrphanRemoval <em>Orphan Removal</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Orphan Removal</em>' attribute.
+	 * @see #getOrphanRemoval()
+	 * @generated
+	 */
+	void setOrphanRemoval(Boolean value);
+
+} // XmlOrphanRemovable2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java
new file mode 100644
index 0000000..b86c7ba
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlPersistenceUnitDefaults_2_0.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Persistence Unit Defaults 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription <em>Description</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers <em>Delimited Identifiers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlPersistenceUnitDefaults_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Delimited Identifiers</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Delimited Identifiers</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Delimited Identifiers</em>' attribute.
+	 * @see #setDelimitedIdentifiers(boolean)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitDefaults_2_0_DelimitedIdentifiers()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+	 * @generated
+	 */
+	boolean isDelimitedIdentifiers();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitDefaults_2_0#isDelimitedIdentifiers <em>Delimited Identifiers</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Delimited Identifiers</em>' attribute.
+	 * @see #isDelimitedIdentifiers()
+	 * @generated
+	 */
+	void setDelimitedIdentifiers(boolean value);
+
+} // XmlPersistenceUnitDefaults_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java
new file mode 100644
index 0000000..6e5078b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlPersistenceUnitMetadata_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Persistence Unit Metadata 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlPersistenceUnitMetadata_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlPersistenceUnitMetadata_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlPersistenceUnitMetadata_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlPersistenceUnitMetadata_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlQueryHint_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlQueryHint_2_0.java
new file mode 100644
index 0000000..693a3d1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlQueryHint_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Query Hint 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlQueryHint_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQueryHint_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQueryHint_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlQueryHint_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlQuery_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlQuery_2_0.java
new file mode 100644
index 0000000..da4fbf0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlQuery_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Query 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlQuery_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlQuery_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlQuery_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlQuery_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java
new file mode 100644
index 0000000..78667c5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSequenceGenerator_2_0.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Sequence Generator 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog <em>Catalog</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema <em>Schema</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlSequenceGenerator_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Catalog</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Catalog</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Catalog</em>' attribute.
+	 * @see #setCatalog(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0_Catalog()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getCatalog();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getCatalog <em>Catalog</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Catalog</em>' attribute.
+	 * @see #getCatalog()
+	 * @generated
+	 */
+	void setCatalog(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Schema</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema</em>' attribute.
+	 * @see #setSchema(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSequenceGenerator_2_0_Schema()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getSchema();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSequenceGenerator_2_0#getSchema <em>Schema</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema</em>' attribute.
+	 * @see #getSchema()
+	 * @generated
+	 */
+	void setSchema(String value);
+
+} // XmlSequenceGenerator_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java
new file mode 100644
index 0000000..5fadba4
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSingleRelationshipMapping_2_0.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Single Relationship Mapping 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSingleRelationshipMapping_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @generated
+ */
+public interface XmlSingleRelationshipMapping_2_0 extends XmlDerivedId_2_0, XmlMapsId_2_0
+{
+} // XmlSingleRelationshipMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java
new file mode 100644
index 0000000..42fa4b7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlSqlResultSetMapping_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Sql Result Set Mapping 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlSqlResultSetMapping_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlSqlResultSetMapping_2_0_Description()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getDescription();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlSqlResultSetMapping_2_0#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	void setDescription(String value);
+
+} // XmlSqlResultSetMapping_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java
new file mode 100644
index 0000000..12265da
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/orm/v2_0/XmlUniqueConstraint_2_0.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.orm.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Unique Constraint 20</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlUniqueConstraint_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package#getXmlUniqueConstraint_2_0_Name()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	String getName();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.orm.v2_0.XmlUniqueConstraint_2_0#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	void setName(String value);
+
+} // XmlUniqueConstraint_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/JPA.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/JPA.java
new file mode 100644
index 0000000..4bf08e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/JPA.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+/**
+ * JPA persistence.xml-related stuff (elements, attributes etc.)
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+@SuppressWarnings("nls")
+public interface JPA 
+{
+	String SCHEMA_NAMESPACE = "http://java.sun.com/xml/ns/persistence";
+	String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
+	String SCHEMA_VERSION = "1.0";
+	
+	String CLASS = "class";
+
+	String DESCRIPTION = "description";
+
+	String EXCLUDE_UNLISTED_CLASSES = "exclude-unlisted-classes";
+
+	String JAR_FILE = "jar-file";
+
+	String JTA_DATA_SOURCE = "jta-data-source";
+
+	String MAPPING_FILE = "mapping-file";
+
+	String NON_JTA_DATA_SOURCE = "non-jta-data-source";
+
+	String PERSISTENCE = "persistence";
+	
+	String PERSISTENCE_UNIT = "persistence-unit";
+		String PERSISTENCE_UNIT__NAME = "name";
+		String PERSISTENCE_UNIT__TRANSACTION_TYPE = "transaction-type";
+
+	String PROPERTIES = "properties";
+
+	String PROPERTY = "property";
+		String PROPERTY__NAME = "name";
+		String PROPERTY__VALUE = "value";
+
+	String PROVIDER = "provider";
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistenceFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistenceFactory.java
new file mode 100644
index 0000000..dc795d1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistenceFactory.java
@@ -0,0 +1,250 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage
+ * @generated
+ */
+public class PersistenceFactory extends EFactoryImpl
+{
+	/**
+	 * The singleton instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final PersistenceFactory eINSTANCE = init();
+
+	/**
+	 * Creates the default factory implementation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static PersistenceFactory init()
+	{
+		try
+		{
+			PersistenceFactory thePersistenceFactory = (PersistenceFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.persistence.xmi"); 
+			if (thePersistenceFactory != null)
+			{
+				return thePersistenceFactory;
+			}
+		}
+		catch (Exception exception)
+		{
+			EcorePlugin.INSTANCE.log(exception);
+		}
+		return new PersistenceFactory();
+	}
+
+	/**
+	 * Creates an instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PersistenceFactory()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public EObject create(EClass eClass)
+	{
+		switch (eClass.getClassifierID())
+		{
+			case PersistencePackage.XML_JAVA_CLASS_REF: return (EObject)createXmlJavaClassRef();
+			case PersistencePackage.XML_JAR_FILE_REF: return (EObject)createXmlJarFileRef();
+			case PersistencePackage.XML_MAPPING_FILE_REF: return (EObject)createXmlMappingFileRef();
+			case PersistencePackage.XML_PERSISTENCE: return (EObject)createXmlPersistence();
+			case PersistencePackage.XML_PERSISTENCE_UNIT: return (EObject)createXmlPersistenceUnit();
+			case PersistencePackage.XML_PROPERTIES: return (EObject)createXmlProperties();
+			case PersistencePackage.XML_PROPERTY: return (EObject)createXmlProperty();
+			default:
+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object createFromString(EDataType eDataType, String initialValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT_TRANSACTION_TYPE:
+				return createXmlPersistenceUnitTransactionTypeFromString(eDataType, initialValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String convertToString(EDataType eDataType, Object instanceValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT_TRANSACTION_TYPE:
+				return convertXmlPersistenceUnitTransactionTypeToString(eDataType, instanceValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlJavaClassRef createXmlJavaClassRef()
+	{
+		XmlJavaClassRef xmlJavaClassRef = new XmlJavaClassRef();
+		return xmlJavaClassRef;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlJarFileRef createXmlJarFileRef()
+	{
+		XmlJarFileRef xmlJarFileRef = new XmlJarFileRef();
+		return xmlJarFileRef;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlMappingFileRef createXmlMappingFileRef()
+	{
+		XmlMappingFileRef xmlMappingFileRef = new XmlMappingFileRef();
+		return xmlMappingFileRef;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistence createXmlPersistence()
+	{
+		XmlPersistence xmlPersistence = new XmlPersistence();
+		return xmlPersistence;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistenceUnit createXmlPersistenceUnit()
+	{
+		XmlPersistenceUnit xmlPersistenceUnit = new XmlPersistenceUnit();
+		return xmlPersistenceUnit;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlProperties createXmlProperties()
+	{
+		XmlProperties xmlProperties = new XmlProperties();
+		return xmlProperties;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlProperty createXmlProperty()
+	{
+		XmlProperty xmlProperty = new XmlProperty();
+		return xmlProperty;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistenceUnitTransactionType createXmlPersistenceUnitTransactionTypeFromString(EDataType eDataType, String initialValue)
+	{
+		XmlPersistenceUnitTransactionType result = XmlPersistenceUnitTransactionType.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertXmlPersistenceUnitTransactionTypeToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PersistencePackage getPersistencePackage()
+	{
+		return (PersistencePackage)getEPackage();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @deprecated
+	 * @generated
+	 */
+	@Deprecated
+	public static PersistencePackage getPackage()
+	{
+		return PersistencePackage.eINSTANCE;
+	}
+
+} //PersistenceFactory
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistencePackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistencePackage.java
new file mode 100644
index 0000000..8b14d3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistencePackage.java
@@ -0,0 +1,1302 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package;
+import org.eclipse.jpt.core.resource.xml.CommonPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.PersistenceFactory
+ * @model kind="package"
+ * @generated
+ */
+public class PersistencePackage extends EPackageImpl
+{
+	/**
+	 * The package name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNAME = "persistence";
+
+	/**
+	 * The package namespace URI.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_URI = "jpt.persistence.xmi";
+
+	/**
+	 * The package namespace name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_PREFIX = "org.eclipse.jpt.core.resource.persistence";
+
+	/**
+	 * The singleton instance of the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final PersistencePackage eINSTANCE = org.eclipse.jpt.core.resource.persistence.PersistencePackage.init();
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef <em>Xml Java Class Ref</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJavaClassRef()
+	 * @generated
+	 */
+	public static final int XML_JAVA_CLASS_REF = 0;
+
+	/**
+	 * The feature id for the '<em><b>Java Class</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JAVA_CLASS_REF__JAVA_CLASS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Java Class Ref</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JAVA_CLASS_REF_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef <em>Xml Jar File Ref</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlJarFileRef
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJarFileRef()
+	 * @generated
+	 */
+	public static final int XML_JAR_FILE_REF = 1;
+
+	/**
+	 * The feature id for the '<em><b>File Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JAR_FILE_REF__FILE_NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Jar File Ref</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_JAR_FILE_REF_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef <em>Xml Mapping File Ref</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlMappingFileRef()
+	 * @generated
+	 */
+	public static final int XML_MAPPING_FILE_REF = 2;
+
+	/**
+	 * The feature id for the '<em><b>File Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPING_FILE_REF__FILE_NAME = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Mapping File Ref</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_MAPPING_FILE_REF_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistence <em>Xml Persistence</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistence
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistence()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE = 3;
+
+	/**
+	 * The feature id for the '<em><b>Version</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE__VERSION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION;
+
+	/**
+	 * The feature id for the '<em><b>Schema Location</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE__SCHEMA_LOCATION = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION;
+
+	/**
+	 * The feature id for the '<em><b>Persistence Units</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE__PERSISTENCE_UNITS = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_FEATURE_COUNT = CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT + 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit <em>Xml Persistence Unit</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT = 4;
+
+	/**
+	 * The feature id for the '<em><b>Shared Cache Mode</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE;
+
+	/**
+	 * The feature id for the '<em><b>Validation Mode</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__VALIDATION_MODE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20__VALIDATION_MODE;
+
+	/**
+	 * The feature id for the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__DESCRIPTION = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Provider</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__PROVIDER = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 1;
+
+	/**
+	 * The feature id for the '<em><b>Jta Data Source</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 2;
+
+	/**
+	 * The feature id for the '<em><b>Non Jta Data Source</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 3;
+
+	/**
+	 * The feature id for the '<em><b>Mapping Files</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__MAPPING_FILES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 4;
+
+	/**
+	 * The feature id for the '<em><b>Jar Files</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__JAR_FILES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 5;
+
+	/**
+	 * The feature id for the '<em><b>Classes</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__CLASSES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 6;
+
+	/**
+	 * The feature id for the '<em><b>Exclude Unlisted Classes</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 7;
+
+	/**
+	 * The feature id for the '<em><b>Properties</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__PROPERTIES = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 8;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__NAME = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 9;
+
+	/**
+	 * The feature id for the '<em><b>Transaction Type</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT__TRANSACTION_TYPE = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 10;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence Unit</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_FEATURE_COUNT = PersistenceV2_0Package.XML_PERSISTENCE_UNIT_20_FEATURE_COUNT + 11;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlProperties <em>Xml Properties</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperties
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperties()
+	 * @generated
+	 */
+	public static final int XML_PROPERTIES = 5;
+
+	/**
+	 * The feature id for the '<em><b>Properties</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PROPERTIES__PROPERTIES = 0;
+
+	/**
+	 * The number of structural features of the '<em>Xml Properties</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PROPERTIES_FEATURE_COUNT = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty <em>Xml Property</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperty
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperty()
+	 * @generated
+	 */
+	public static final int XML_PROPERTY = 6;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PROPERTY__NAME = 0;
+
+	/**
+	 * The feature id for the '<em><b>Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PROPERTY__VALUE = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Property</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PROPERTY_FEATURE_COUNT = 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType <em>Xml Persistence Unit Transaction Type</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnitTransactionType()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_TRANSACTION_TYPE = 7;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlJavaClassRefEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlJarFileRefEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlMappingFileRefEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceUnitEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPropertiesEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPropertyEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum xmlPersistenceUnitTransactionTypeEEnum = null;
+
+	/**
+	 * Creates an instance of the model <b>Package</b>, registered with
+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+	 * package URI value.
+	 * <p>Note: the correct way to create the package is via the static
+	 * factory method {@link #init init()}, which also performs
+	 * initialization of the package, or returns the registered package,
+	 * if one already exists.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.emf.ecore.EPackage.Registry
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#eNS_URI
+	 * @see #init()
+	 * @generated
+	 */
+	private PersistencePackage()
+	{
+		super(eNS_URI, PersistenceFactory.eINSTANCE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static boolean isInited = false;
+
+	/**
+	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+	 * 
+	 * <p>This method is used to initialize {@link PersistencePackage#eINSTANCE} when that field is accessed.
+	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #eNS_URI
+	 * @see #createPackageContents()
+	 * @see #initializePackageContents()
+	 * @generated
+	 */
+	public static PersistencePackage init()
+	{
+		if (isInited) return (PersistencePackage)EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI);
+
+		// Obtain or create and register package
+		PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PersistencePackage());
+
+		isInited = true;
+
+		// Initialize simple dependencies
+		EcorePackage.eINSTANCE.eClass();
+		XMLTypePackage.eINSTANCE.eClass();
+
+		// Obtain or create and register interdependencies
+		CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
+		OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
+		OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
+		PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
+
+		// Create package meta-data objects
+		thePersistencePackage.createPackageContents();
+		theCommonPackage.createPackageContents();
+		theOrmPackage.createPackageContents();
+		theOrmV2_0Package.createPackageContents();
+		thePersistenceV2_0Package.createPackageContents();
+
+		// Initialize created meta-data
+		thePersistencePackage.initializePackageContents();
+		theCommonPackage.initializePackageContents();
+		theOrmPackage.initializePackageContents();
+		theOrmV2_0Package.initializePackageContents();
+		thePersistenceV2_0Package.initializePackageContents();
+
+		// Mark meta-data to indicate it can't be changed
+		thePersistencePackage.freeze();
+
+  
+		// Update the registry and return the package
+		EPackage.Registry.INSTANCE.put(PersistencePackage.eNS_URI, thePersistencePackage);
+		return thePersistencePackage;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef <em>Xml Java Class Ref</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Java Class Ref</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef
+	 * @generated
+	 */
+	public EClass getXmlJavaClassRef()
+	{
+		return xmlJavaClassRefEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef#getJavaClass <em>Java Class</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Java Class</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef#getJavaClass()
+	 * @see #getXmlJavaClassRef()
+	 * @generated
+	 */
+	public EAttribute getXmlJavaClassRef_JavaClass()
+	{
+		return (EAttribute)xmlJavaClassRefEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef <em>Xml Jar File Ref</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Jar File Ref</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlJarFileRef
+	 * @generated
+	 */
+	public EClass getXmlJarFileRef()
+	{
+		return xmlJarFileRefEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef#getFileName <em>File Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>File Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlJarFileRef#getFileName()
+	 * @see #getXmlJarFileRef()
+	 * @generated
+	 */
+	public EAttribute getXmlJarFileRef_FileName()
+	{
+		return (EAttribute)xmlJarFileRefEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef <em>Xml Mapping File Ref</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Mapping File Ref</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef
+	 * @generated
+	 */
+	public EClass getXmlMappingFileRef()
+	{
+		return xmlMappingFileRefEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef#getFileName <em>File Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>File Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef#getFileName()
+	 * @see #getXmlMappingFileRef()
+	 * @generated
+	 */
+	public EAttribute getXmlMappingFileRef_FileName()
+	{
+		return (EAttribute)xmlMappingFileRefEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistence <em>Xml Persistence</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistence
+	 * @generated
+	 */
+	public EClass getXmlPersistence()
+	{
+		return xmlPersistenceEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistence#getPersistenceUnits <em>Persistence Units</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Persistence Units</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistence#getPersistenceUnits()
+	 * @see #getXmlPersistence()
+	 * @generated
+	 */
+	public EReference getXmlPersistence_PersistenceUnits()
+	{
+		return (EReference)xmlPersistenceEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit <em>Xml Persistence Unit</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence Unit</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit
+	 * @generated
+	 */
+	public EClass getXmlPersistenceUnit()
+	{
+		return xmlPersistenceUnitEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getDescription <em>Description</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Description</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getDescription()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_Description()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProvider <em>Provider</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Provider</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProvider()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_Provider()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource <em>Jta Data Source</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Jta Data Source</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_JtaDataSource()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(2);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource <em>Non Jta Data Source</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Non Jta Data Source</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_NonJtaDataSource()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(3);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getMappingFiles <em>Mapping Files</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Mapping Files</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getMappingFiles()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EReference getXmlPersistenceUnit_MappingFiles()
+	{
+		return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(4);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJarFiles <em>Jar Files</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Jar Files</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJarFiles()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EReference getXmlPersistenceUnit_JarFiles()
+	{
+		return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(5);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getClasses <em>Classes</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Classes</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getClasses()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EReference getXmlPersistenceUnit_Classes()
+	{
+		return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(6);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses <em>Exclude Unlisted Classes</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Exclude Unlisted Classes</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_ExcludeUnlistedClasses()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(7);
+	}
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProperties <em>Properties</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Properties</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProperties()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EReference getXmlPersistenceUnit_Properties()
+	{
+		return (EReference)xmlPersistenceUnitEClass.getEStructuralFeatures().get(8);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getName()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_Name()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(9);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getTransactionType <em>Transaction Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Transaction Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getTransactionType()
+	 * @see #getXmlPersistenceUnit()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_TransactionType()
+	{
+		return (EAttribute)xmlPersistenceUnitEClass.getEStructuralFeatures().get(10);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlProperties <em>Xml Properties</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Properties</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperties
+	 * @generated
+	 */
+	public EClass getXmlProperties()
+	{
+		return xmlPropertiesEClass;
+	}
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.eclipse.jpt.core.resource.persistence.XmlProperties#getProperties <em>Properties</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Properties</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperties#getProperties()
+	 * @see #getXmlProperties()
+	 * @generated
+	 */
+	public EReference getXmlProperties_Properties()
+	{
+		return (EReference)xmlPropertiesEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty <em>Xml Property</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Property</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperty
+	 * @generated
+	 */
+	public EClass getXmlProperty()
+	{
+		return xmlPropertyEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty#getName <em>Name</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Name</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperty#getName()
+	 * @see #getXmlProperty()
+	 * @generated
+	 */
+	public EAttribute getXmlProperty_Name()
+	{
+		return (EAttribute)xmlPropertyEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty#getValue <em>Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Value</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlProperty#getValue()
+	 * @see #getXmlProperty()
+	 * @generated
+	 */
+	public EAttribute getXmlProperty_Value()
+	{
+		return (EAttribute)xmlPropertyEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType <em>Xml Persistence Unit Transaction Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Xml Persistence Unit Transaction Type</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType
+	 * @generated
+	 */
+	public EEnum getXmlPersistenceUnitTransactionType()
+	{
+		return xmlPersistenceUnitTransactionTypeEEnum;
+	}
+
+	/**
+	 * Returns the factory that creates the instances of the model.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the factory that creates the instances of the model.
+	 * @generated
+	 */
+	public PersistenceFactory getPersistenceFactory()
+	{
+		return (PersistenceFactory)getEFactoryInstance();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isCreated = false;
+
+	/**
+	 * Creates the meta-model objects for the package.  This method is
+	 * guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void createPackageContents()
+	{
+		if (isCreated) return;
+		isCreated = true;
+
+		// Create classes and their features
+		xmlJavaClassRefEClass = createEClass(XML_JAVA_CLASS_REF);
+		createEAttribute(xmlJavaClassRefEClass, XML_JAVA_CLASS_REF__JAVA_CLASS);
+
+		xmlJarFileRefEClass = createEClass(XML_JAR_FILE_REF);
+		createEAttribute(xmlJarFileRefEClass, XML_JAR_FILE_REF__FILE_NAME);
+
+		xmlMappingFileRefEClass = createEClass(XML_MAPPING_FILE_REF);
+		createEAttribute(xmlMappingFileRefEClass, XML_MAPPING_FILE_REF__FILE_NAME);
+
+		xmlPersistenceEClass = createEClass(XML_PERSISTENCE);
+		createEReference(xmlPersistenceEClass, XML_PERSISTENCE__PERSISTENCE_UNITS);
+
+		xmlPersistenceUnitEClass = createEClass(XML_PERSISTENCE_UNIT);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__DESCRIPTION);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__PROVIDER);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE);
+		createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__MAPPING_FILES);
+		createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__JAR_FILES);
+		createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__CLASSES);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES);
+		createEReference(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__PROPERTIES);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__NAME);
+		createEAttribute(xmlPersistenceUnitEClass, XML_PERSISTENCE_UNIT__TRANSACTION_TYPE);
+
+		xmlPropertiesEClass = createEClass(XML_PROPERTIES);
+		createEReference(xmlPropertiesEClass, XML_PROPERTIES__PROPERTIES);
+
+		xmlPropertyEClass = createEClass(XML_PROPERTY);
+		createEAttribute(xmlPropertyEClass, XML_PROPERTY__NAME);
+		createEAttribute(xmlPropertyEClass, XML_PROPERTY__VALUE);
+
+		// Create enums
+		xmlPersistenceUnitTransactionTypeEEnum = createEEnum(XML_PERSISTENCE_UNIT_TRANSACTION_TYPE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isInitialized = false;
+
+	/**
+	 * Complete the initialization of the package and its meta-model.  This
+	 * method is guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void initializePackageContents()
+	{
+		if (isInitialized) return;
+		isInitialized = true;
+
+		// Initialize package
+		setName(eNAME);
+		setNsPrefix(eNS_PREFIX);
+		setNsURI(eNS_URI);
+
+		// Obtain other dependent packages
+		PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI);
+		EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+		CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
+		XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+		// Add subpackages
+		getESubpackages().add(thePersistenceV2_0Package);
+
+		// Create type parameters
+
+		// Set bounds for type parameters
+
+		// Add supertypes to classes
+		xmlPersistenceEClass.getESuperTypes().add(theCommonPackage.getAbstractJpaRootEObject());
+		xmlPersistenceUnitEClass.getESuperTypes().add(thePersistenceV2_0Package.getXmlPersistenceUnit_2_0());
+
+		// Initialize classes and features; add operations and parameters
+		initEClass(xmlJavaClassRefEClass, XmlJavaClassRef.class, "XmlJavaClassRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlJavaClassRef_JavaClass(), theEcorePackage.getEString(), "javaClass", "", 0, 1, XmlJavaClassRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+		initEClass(xmlJarFileRefEClass, XmlJarFileRef.class, "XmlJarFileRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlJarFileRef_FileName(), theEcorePackage.getEString(), "fileName", "", 0, 1, XmlJarFileRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+		initEClass(xmlMappingFileRefEClass, XmlMappingFileRef.class, "XmlMappingFileRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlMappingFileRef_FileName(), theEcorePackage.getEString(), "fileName", "", 0, 1, XmlMappingFileRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+		initEClass(xmlPersistenceEClass, XmlPersistence.class, "XmlPersistence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlPersistence_PersistenceUnits(), this.getXmlPersistenceUnit(), null, "persistenceUnits", null, 0, -1, XmlPersistence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPersistenceUnitEClass, XmlPersistenceUnit.class, "XmlPersistenceUnit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPersistenceUnit_Description(), theXMLTypePackage.getString(), "description", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_Provider(), theXMLTypePackage.getString(), "provider", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_JtaDataSource(), theXMLTypePackage.getString(), "jtaDataSource", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_NonJtaDataSource(), theXMLTypePackage.getString(), "nonJtaDataSource", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlPersistenceUnit_MappingFiles(), this.getXmlMappingFileRef(), null, "mappingFiles", null, 0, -1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlPersistenceUnit_JarFiles(), this.getXmlJarFileRef(), null, "jarFiles", null, 0, -1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlPersistenceUnit_Classes(), this.getXmlJavaClassRef(), null, "classes", null, 0, -1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_ExcludeUnlistedClasses(), theXMLTypePackage.getBooleanObject(), "excludeUnlistedClasses", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getXmlPersistenceUnit_Properties(), this.getXmlProperties(), null, "properties", null, 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_TransactionType(), this.getXmlPersistenceUnitTransactionType(), "transactionType", "JTA", 0, 1, XmlPersistenceUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPropertiesEClass, XmlProperties.class, "XmlProperties", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getXmlProperties_Properties(), this.getXmlProperty(), null, "properties", null, 0, -1, XmlProperties.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(xmlPropertyEClass, XmlProperty.class, "XmlProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlProperty_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, XmlProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlProperty_Value(), theXMLTypePackage.getString(), "value", null, 1, 1, XmlProperty.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		// Initialize enums and add enum literals
+		initEEnum(xmlPersistenceUnitTransactionTypeEEnum, XmlPersistenceUnitTransactionType.class, "XmlPersistenceUnitTransactionType");
+		addEEnumLiteral(xmlPersistenceUnitTransactionTypeEEnum, XmlPersistenceUnitTransactionType.JTA);
+		addEEnumLiteral(xmlPersistenceUnitTransactionTypeEEnum, XmlPersistenceUnitTransactionType.RESOURCE_LOCAL);
+
+		// Create resource
+		createResource(eNS_URI);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * Defines literals for the meta objects that represent
+	 * <ul>
+	 *   <li>each class,</li>
+	 *   <li>each feature of each class,</li>
+	 *   <li>each enum,</li>
+	 *   <li>and each data type</li>
+	 * </ul>
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public interface Literals
+	{
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef <em>Xml Java Class Ref</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJavaClassRef()
+		 * @generated
+		 */
+		public static final EClass XML_JAVA_CLASS_REF = eINSTANCE.getXmlJavaClassRef();
+
+		/**
+		 * The meta object literal for the '<em><b>Java Class</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_JAVA_CLASS_REF__JAVA_CLASS = eINSTANCE.getXmlJavaClassRef_JavaClass();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef <em>Xml Jar File Ref</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlJarFileRef
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJarFileRef()
+		 * @generated
+		 */
+		public static final EClass XML_JAR_FILE_REF = eINSTANCE.getXmlJarFileRef();
+
+		/**
+		 * The meta object literal for the '<em><b>File Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_JAR_FILE_REF__FILE_NAME = eINSTANCE.getXmlJarFileRef_FileName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef <em>Xml Mapping File Ref</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlMappingFileRef()
+		 * @generated
+		 */
+		public static final EClass XML_MAPPING_FILE_REF = eINSTANCE.getXmlMappingFileRef();
+
+		/**
+		 * The meta object literal for the '<em><b>File Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_MAPPING_FILE_REF__FILE_NAME = eINSTANCE.getXmlMappingFileRef_FileName();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistence <em>Xml Persistence</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistence
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistence()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE = eINSTANCE.getXmlPersistence();
+
+		/**
+		 * The meta object literal for the '<em><b>Persistence Units</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE__PERSISTENCE_UNITS = eINSTANCE.getXmlPersistence_PersistenceUnits();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit <em>Xml Persistence Unit</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE_UNIT = eINSTANCE.getXmlPersistenceUnit();
+
+		/**
+		 * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__DESCRIPTION = eINSTANCE.getXmlPersistenceUnit_Description();
+
+		/**
+		 * The meta object literal for the '<em><b>Provider</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__PROVIDER = eINSTANCE.getXmlPersistenceUnit_Provider();
+
+		/**
+		 * The meta object literal for the '<em><b>Jta Data Source</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE = eINSTANCE.getXmlPersistenceUnit_JtaDataSource();
+
+		/**
+		 * The meta object literal for the '<em><b>Non Jta Data Source</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE = eINSTANCE.getXmlPersistenceUnit_NonJtaDataSource();
+
+		/**
+		 * The meta object literal for the '<em><b>Mapping Files</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE_UNIT__MAPPING_FILES = eINSTANCE.getXmlPersistenceUnit_MappingFiles();
+
+		/**
+		 * The meta object literal for the '<em><b>Jar Files</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE_UNIT__JAR_FILES = eINSTANCE.getXmlPersistenceUnit_JarFiles();
+
+		/**
+		 * The meta object literal for the '<em><b>Classes</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE_UNIT__CLASSES = eINSTANCE.getXmlPersistenceUnit_Classes();
+
+		/**
+		 * The meta object literal for the '<em><b>Exclude Unlisted Classes</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES = eINSTANCE.getXmlPersistenceUnit_ExcludeUnlistedClasses();
+
+		/**
+		 * The meta object literal for the '<em><b>Properties</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PERSISTENCE_UNIT__PROPERTIES = eINSTANCE.getXmlPersistenceUnit_Properties();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__NAME = eINSTANCE.getXmlPersistenceUnit_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Transaction Type</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT__TRANSACTION_TYPE = eINSTANCE.getXmlPersistenceUnit_TransactionType();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlProperties <em>Xml Properties</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlProperties
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperties()
+		 * @generated
+		 */
+		public static final EClass XML_PROPERTIES = eINSTANCE.getXmlProperties();
+
+		/**
+		 * The meta object literal for the '<em><b>Properties</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EReference XML_PROPERTIES__PROPERTIES = eINSTANCE.getXmlProperties_Properties();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty <em>Xml Property</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlProperty
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperty()
+		 * @generated
+		 */
+		public static final EClass XML_PROPERTY = eINSTANCE.getXmlProperty();
+
+		/**
+		 * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PROPERTY__NAME = eINSTANCE.getXmlProperty_Name();
+
+		/**
+		 * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PROPERTY__VALUE = eINSTANCE.getXmlProperty_Value();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType <em>Xml Persistence Unit Transaction Type</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType
+		 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnitTransactionType()
+		 * @generated
+		 */
+		public static final EEnum XML_PERSISTENCE_UNIT_TRANSACTION_TYPE = eINSTANCE.getXmlPersistenceUnitTransactionType();
+
+	}
+
+} //PersistencePackage
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistenceXmlResourceFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistenceXmlResourceFactory.java
new file mode 100644
index 0000000..6353686
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/PersistenceXmlResourceFactory.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.xml.JpaXmlResource;
+import org.eclipse.wst.common.internal.emf.resource.Renderer;
+import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;
+
+/**
+ * 
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ */
+public class PersistenceXmlResourceFactory extends TranslatorResourceFactory
+{
+	public PersistenceXmlResourceFactory() {
+		this(RendererFactory.getDefaultRendererFactory());
+	}
+	
+	public PersistenceXmlResourceFactory(RendererFactory aRendererFactory) {
+		super(aRendererFactory);
+	}
+	
+	public PersistenceXmlResourceFactory(RendererFactory aRendererFactory, boolean listeningForUpdates) {
+		super(aRendererFactory, listeningForUpdates);
+	}
+	
+	
+	/**
+	 * @see TranslatorResourceFactory#createResource(URI, Renderer)
+	 */
+	@Override
+	protected TranslatorResource createResource(URI uri, Renderer renderer) {
+		return new JpaXmlResource(uri, renderer, JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE, XmlPersistence.getRootTranslator());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlJarFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlJarFileRef.java
new file mode 100644
index 0000000..fe584e6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlJarFileRef.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Jar File Ref</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef#getFileName <em>File Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJarFileRef()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlJarFileRef extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getFileName() <em>File Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFileName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String FILE_NAME_EDEFAULT = "";
+
+	/**
+	 * The cached value of the '{@link #getFileName() <em>File Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFileName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String fileName = FILE_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlJarFileRef()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_JAR_FILE_REF;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>File Name</b></em>' attribute.
+	 * The default value is <code>""</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>File Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>File Name</em>' attribute.
+	 * @see #setFileName(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJarFileRef_FileName()
+	 * @model default="" unique="false" ordered="false"
+	 * @generated
+	 */
+	public String getFileName()
+	{
+		return fileName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef#getFileName <em>File Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>File Name</em>' attribute.
+	 * @see #getFileName()
+	 * @generated
+	 */
+	public void setFileName(String newFileName)
+	{
+		String oldFileName = fileName;
+		fileName = newFileName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_JAR_FILE_REF__FILE_NAME, oldFileName, fileName));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
+				return getFileName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
+				setFileName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
+				setFileName(FILE_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAR_FILE_REF__FILE_NAME:
+				return FILE_NAME_EDEFAULT == null ? fileName != null : !FILE_NAME_EDEFAULT.equals(fileName);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (fileName: ");
+		result.append(fileName);
+		result.append(')');
+		return result.toString();
+	}
+	
+	@Override
+	public TextRange getValidationTextRange() {
+		return (! StringTools.stringIsEmpty(this.fileName)) ?
+			getTextTextRange() :
+			super.getValidationTextRange();
+	}
+
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+				elementName,
+				structuralFeature,
+				Translator.END_TAG_NO_INDENT,
+				buildTranslatorChildren()
+			);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+				buildFileNameTranslator(),
+			};
+	}
+
+	private static Translator buildFileNameTranslator() {
+		return new Translator(
+				Translator.TEXT_ATTRIBUTE_VALUE,
+				PersistencePackage.eINSTANCE.getXmlJarFileRef_FileName()
+			);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlJavaClassRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlJavaClassRef.java
new file mode 100644
index 0000000..807ed32
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlJavaClassRef.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Java Class Ref</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef#getJavaClass <em>Java Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJavaClassRef()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlJavaClassRef extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getJavaClass() <em>Java Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJavaClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String JAVA_CLASS_EDEFAULT = "";
+
+	/**
+	 * The cached value of the '{@link #getJavaClass() <em>Java Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJavaClass()
+	 * @generated
+	 * @ordered
+	 */
+	protected String javaClass = JAVA_CLASS_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlJavaClassRef()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_JAVA_CLASS_REF;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Java Class</b></em>' attribute.
+	 * The default value is <code>""</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Java Class</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Java Class</em>' attribute.
+	 * @see #setJavaClass(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlJavaClassRef_JavaClass()
+	 * @model default="" unique="false" ordered="false"
+	 * @generated
+	 */
+	public String getJavaClass()
+	{
+		return javaClass;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef#getJavaClass <em>Java Class</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Java Class</em>' attribute.
+	 * @see #getJavaClass()
+	 * @generated
+	 */
+	public void setJavaClass(String newJavaClass)
+	{
+		String oldJavaClass = javaClass;
+		javaClass = newJavaClass;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS, oldJavaClass, javaClass));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
+				return getJavaClass();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
+				setJavaClass((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
+				setJavaClass(JAVA_CLASS_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_JAVA_CLASS_REF__JAVA_CLASS:
+				return JAVA_CLASS_EDEFAULT == null ? javaClass != null : !JAVA_CLASS_EDEFAULT.equals(javaClass);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (javaClass: ");
+		result.append(javaClass);
+		result.append(')');
+		return result.toString();
+	}
+
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+				elementName,
+				structuralFeature,
+				Translator.END_TAG_NO_INDENT,
+				buildTranslatorChildren()
+			);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+				buildClassNameTranslator(),
+			};
+	}
+
+	private static Translator buildClassNameTranslator() {
+		return new Translator(
+				Translator.TEXT_ATTRIBUTE_VALUE,
+				PersistencePackage.eINSTANCE.getXmlJavaClassRef_JavaClass()
+			);
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlMappingFileRef.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlMappingFileRef.java
new file mode 100644
index 0000000..d93eda9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlMappingFileRef.java
@@ -0,0 +1,239 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mapping File Ref</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef#getFileName <em>File Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlMappingFileRef()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlMappingFileRef extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getFileName() <em>File Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFileName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String FILE_NAME_EDEFAULT = "";
+
+	/**
+	 * The cached value of the '{@link #getFileName() <em>File Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFileName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String fileName = FILE_NAME_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlMappingFileRef()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_MAPPING_FILE_REF;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>File Name</b></em>' attribute.
+	 * The default value is <code>""</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>File Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>File Name</em>' attribute.
+	 * @see #setFileName(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlMappingFileRef_FileName()
+	 * @model default="" unique="false" ordered="false"
+	 * @generated
+	 */
+	public String getFileName()
+	{
+		return fileName;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef#getFileName <em>File Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>File Name</em>' attribute.
+	 * @see #getFileName()
+	 * @generated
+	 */
+	public void setFileName(String newFileName)
+	{
+		String oldFileName = fileName;
+		fileName = newFileName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME, oldFileName, fileName));
+	}
+
+	@Override
+	public EList<Adapter> eAdapters() {
+		// TODO Auto-generated method stub
+		return super.eAdapters();
+	}
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
+				return getFileName();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
+				setFileName((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
+				setFileName(FILE_NAME_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_MAPPING_FILE_REF__FILE_NAME:
+				return FILE_NAME_EDEFAULT == null ? fileName != null : !FILE_NAME_EDEFAULT.equals(fileName);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (fileName: ");
+		result.append(fileName);
+		result.append(')');
+		return result.toString();
+	}
+
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+				elementName,
+				structuralFeature,
+				Translator.END_TAG_NO_INDENT,
+				buildTranslatorChildren()
+			);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+				buildFileNameTranslator(),
+			};
+	}
+
+	private static Translator buildFileNameTranslator() {
+		return new Translator(
+				Translator.TEXT_ATTRIBUTE_VALUE,
+				PersistencePackage.eINSTANCE.getXmlMappingFileRef_FileName()
+			);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistence.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistence.java
new file mode 100644
index 0000000..c591d37
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistence.java
@@ -0,0 +1,249 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleRootTranslator;
+import org.eclipse.jpt.core.resource.persistence.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>XmlPersistence</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistence#getPersistenceUnits <em>Persistence Units</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistence()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlPersistence extends AbstractJpaRootEObject
+{
+	/**
+	 * The cached value of the '{@link #getPersistenceUnits() <em>Persistence Units</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getPersistenceUnits()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlPersistenceUnit> persistenceUnits;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlPersistence()
+	{
+		super();
+	}
+	
+	@Override
+	public EObject eContainer() {
+		return super.eContainer();
+	}
+	
+	@Override
+	protected void eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID) {
+		super.eBasicSetContainer(newContainer, newContainerFeatureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_PERSISTENCE;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Persistence Units</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>XmlPersistence Units</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Persistence Units</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistence_PersistenceUnits()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlPersistenceUnit> getPersistenceUnits()
+	{
+		if (persistenceUnits == null)
+		{
+			persistenceUnits = new EObjectContainmentEList<XmlPersistenceUnit>(XmlPersistenceUnit.class, this, PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS);
+		}
+		return persistenceUnits;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
+				return ((InternalEList<?>)getPersistenceUnits()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
+				return getPersistenceUnits();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
+				getPersistenceUnits().clear();
+				getPersistenceUnits().addAll((Collection<? extends XmlPersistenceUnit>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
+				getPersistenceUnits().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE__PERSISTENCE_UNITS:
+				return persistenceUnits != null && !persistenceUnits.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+	
+	
+	// **************** version -> schema location mapping ********************
+	
+	private static String namespace = JPA.SCHEMA_NAMESPACE;
+	
+	@Override
+	protected String getNamespace() {
+		return namespace;
+	}
+	
+	private static Map<String, String> versionsToSchemaLocations = buildVersionsToSchemaLocations();
+	
+	private static Map<String, String> buildVersionsToSchemaLocations() {
+		Map<String, String> map = new HashMap<String, String>();
+		map.put(JPA.SCHEMA_VERSION, JPA.SCHEMA_LOCATION);
+		map.put(JPA2_0.SCHEMA_VERSION, JPA2_0.SCHEMA_LOCATION);
+		return map;
+	}
+	
+	@Override
+	protected String getSchemaLocationForVersion(String version) {
+		return versionsToSchemaLocations.get(version);
+	}
+	
+	
+	// **************** translators *******************************************
+	
+	private static final Translator ROOT_TRANSLATOR = buildRootTranslator();
+	
+	public static Translator getRootTranslator() {
+		return ROOT_TRANSLATOR;
+	}
+	
+	private static Translator buildRootTranslator() {
+		return new SimpleRootTranslator(
+				JPA.PERSISTENCE,
+				PersistencePackage.eINSTANCE.getXmlPersistence(),
+				buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+				buildVersionTranslator(versionsToSchemaLocations),
+				buildNamespaceTranslator(namespace),
+				buildSchemaNamespaceTranslator(),
+				buildSchemaLocationTranslator(namespace, versionsToSchemaLocations),
+				XmlPersistenceUnit.buildTranslator(JPA.PERSISTENCE_UNIT, PersistencePackage.eINSTANCE.getXmlPersistence_PersistenceUnits())
+			};
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistenceUnit.java
new file mode 100644
index 0000000..2eacb67
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistenceUnit.java
@@ -0,0 +1,1077 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.BooleanTranslator;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.persistence.v2_0.JPA2_0;
+import org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package;
+import org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0;
+import org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0;
+import org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Unit</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getDescription <em>Description</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProvider <em>Provider</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource <em>Jta Data Source</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource <em>Non Jta Data Source</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getMappingFiles <em>Mapping Files</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJarFiles <em>Jar Files</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getClasses <em>Classes</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses <em>Exclude Unlisted Classes</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProperties <em>Properties</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getTransactionType <em>Transaction Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit()
+ * @model kind="class"
+ * @generated
+ */
+public class XmlPersistenceUnit extends AbstractJpaEObject implements XmlPersistenceUnit_2_0
+{
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final XmlPersistenceUnitCachingType_2_0 SHARED_CACHE_MODE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSharedCacheMode() <em>Shared Cache Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSharedCacheMode()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlPersistenceUnitCachingType_2_0 sharedCacheMode = SHARED_CACHE_MODE_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final XmlPersistenceUnitValidationModeType_2_0 VALIDATION_MODE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getValidationMode() <em>Validation Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValidationMode()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlPersistenceUnitValidationModeType_2_0 validationMode = VALIDATION_MODE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DESCRIPTION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDescription()
+	 * @generated
+	 * @ordered
+	 */
+	protected String description = DESCRIPTION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getProvider() <em>Provider</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getProvider()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String PROVIDER_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getProvider() <em>Provider</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getProvider()
+	 * @generated
+	 * @ordered
+	 */
+	protected String provider = PROVIDER_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getJtaDataSource() <em>Jta Data Source</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJtaDataSource()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String JTA_DATA_SOURCE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getJtaDataSource() <em>Jta Data Source</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJtaDataSource()
+	 * @generated
+	 * @ordered
+	 */
+	protected String jtaDataSource = JTA_DATA_SOURCE_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getNonJtaDataSource() <em>Non Jta Data Source</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNonJtaDataSource()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NON_JTA_DATA_SOURCE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getNonJtaDataSource() <em>Non Jta Data Source</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNonJtaDataSource()
+	 * @generated
+	 * @ordered
+	 */
+	protected String nonJtaDataSource = NON_JTA_DATA_SOURCE_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getMappingFiles() <em>Mapping Files</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMappingFiles()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlMappingFileRef> mappingFiles;
+
+	/**
+	 * The cached value of the '{@link #getJarFiles() <em>Jar Files</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getJarFiles()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJarFileRef> jarFiles;
+
+	/**
+	 * The cached value of the '{@link #getClasses() <em>Classes</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getClasses()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlJavaClassRef> classes;
+
+	/**
+	 * The default value of the '{@link #getExcludeUnlistedClasses() <em>Exclude Unlisted Classes</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getExcludeUnlistedClasses()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final Boolean EXCLUDE_UNLISTED_CLASSES_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getExcludeUnlistedClasses() <em>Exclude Unlisted Classes</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getExcludeUnlistedClasses()
+	 * @generated
+	 * @ordered
+	 */
+	protected Boolean excludeUnlistedClasses = EXCLUDE_UNLISTED_CLASSES_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getProperties()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlProperties properties;
+
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * changed this to null and removed the generated flag so emf won't generate over it
+	 * we don't want a default for enums, just null if the tag does not exist
+	 */
+	protected static final XmlPersistenceUnitTransactionType TRANSACTION_TYPE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getTransactionType() <em>Transaction Type</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTransactionType()
+	 * @generated
+	 * @ordered
+	 */
+	protected XmlPersistenceUnitTransactionType transactionType = TRANSACTION_TYPE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlPersistenceUnit()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_PERSISTENCE_UNIT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Shared Cache Mode</b></em>' attribute.
+	 * The default value is <code>"UNSPECIFIED"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Shared Cache Mode</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Shared Cache Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+	 * @see #setSharedCacheMode(XmlPersistenceUnitCachingType_2_0)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_2_0_SharedCacheMode()
+	 * @model default="UNSPECIFIED" unique="false"
+	 * @generated
+	 */
+	public XmlPersistenceUnitCachingType_2_0 getSharedCacheMode()
+	{
+		return sharedCacheMode;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getSharedCacheMode <em>Shared Cache Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Shared Cache Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+	 * @see #getSharedCacheMode()
+	 * @generated
+	 */
+	public void setSharedCacheMode(XmlPersistenceUnitCachingType_2_0 newSharedCacheMode)
+	{
+		XmlPersistenceUnitCachingType_2_0 oldSharedCacheMode = sharedCacheMode;
+		sharedCacheMode = newSharedCacheMode == null ? SHARED_CACHE_MODE_EDEFAULT : newSharedCacheMode;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE, oldSharedCacheMode, sharedCacheMode));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Validation Mode</b></em>' attribute.
+	 * The default value is <code>"AUTO"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Validation Mode</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Validation Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+	 * @see #setValidationMode(XmlPersistenceUnitValidationModeType_2_0)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_2_0_ValidationMode()
+	 * @model default="AUTO" unique="false"
+	 * @generated
+	 */
+	public XmlPersistenceUnitValidationModeType_2_0 getValidationMode()
+	{
+		return validationMode;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getValidationMode <em>Validation Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Validation Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+	 * @see #getValidationMode()
+	 * @generated
+	 */
+	public void setValidationMode(XmlPersistenceUnitValidationModeType_2_0 newValidationMode)
+	{
+		XmlPersistenceUnitValidationModeType_2_0 oldValidationMode = validationMode;
+		validationMode = newValidationMode == null ? VALIDATION_MODE_EDEFAULT : newValidationMode;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE, oldValidationMode, validationMode));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Name()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Transaction Type</b></em>' attribute.
+	 * The default value is <code>"JTA"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Transaction Type</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Transaction Type</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType
+	 * @see #setTransactionType(XmlPersistenceUnitTransactionType)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_TransactionType()
+	 * @model default="JTA" unique="false"
+	 * @generated
+	 */
+	public XmlPersistenceUnitTransactionType getTransactionType()
+	{
+		return transactionType;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getTransactionType <em>Transaction Type</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Transaction Type</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType
+	 * @see #getTransactionType()
+	 * @generated
+	 */
+	public void setTransactionType(XmlPersistenceUnitTransactionType newTransactionType)
+	{
+		XmlPersistenceUnitTransactionType oldTransactionType = transactionType;
+		transactionType = newTransactionType == null ? TRANSACTION_TYPE_EDEFAULT : newTransactionType;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE, oldTransactionType, transactionType));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Description</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Description</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Description</em>' attribute.
+	 * @see #setDescription(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Description()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getDescription()
+	{
+		return description;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getDescription <em>Description</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Description</em>' attribute.
+	 * @see #getDescription()
+	 * @generated
+	 */
+	public void setDescription(String newDescription)
+	{
+		String oldDescription = description;
+		description = newDescription;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION, oldDescription, description));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Provider</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Provider</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Provider</em>' attribute.
+	 * @see #setProvider(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Provider()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getProvider()
+	{
+		return provider;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProvider <em>Provider</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Provider</em>' attribute.
+	 * @see #getProvider()
+	 * @generated
+	 */
+	public void setProvider(String newProvider)
+	{
+		String oldProvider = provider;
+		provider = newProvider;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER, oldProvider, provider));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Jta Data Source</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Jta Data Source</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Jta Data Source</em>' attribute.
+	 * @see #setJtaDataSource(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_JtaDataSource()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getJtaDataSource()
+	{
+		return jtaDataSource;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getJtaDataSource <em>Jta Data Source</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Jta Data Source</em>' attribute.
+	 * @see #getJtaDataSource()
+	 * @generated
+	 */
+	public void setJtaDataSource(String newJtaDataSource)
+	{
+		String oldJtaDataSource = jtaDataSource;
+		jtaDataSource = newJtaDataSource;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE, oldJtaDataSource, jtaDataSource));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Non Jta Data Source</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Non Jta Data Source</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Non Jta Data Source</em>' attribute.
+	 * @see #setNonJtaDataSource(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_NonJtaDataSource()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
+	 * @generated
+	 */
+	public String getNonJtaDataSource()
+	{
+		return nonJtaDataSource;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getNonJtaDataSource <em>Non Jta Data Source</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Non Jta Data Source</em>' attribute.
+	 * @see #getNonJtaDataSource()
+	 * @generated
+	 */
+	public void setNonJtaDataSource(String newNonJtaDataSource)
+	{
+		String oldNonJtaDataSource = nonJtaDataSource;
+		nonJtaDataSource = newNonJtaDataSource;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE, oldNonJtaDataSource, nonJtaDataSource));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Mapping Files</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Mapping Files</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Mapping Files</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_MappingFiles()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlMappingFileRef> getMappingFiles()
+	{
+		if (mappingFiles == null)
+		{
+			mappingFiles = new EObjectContainmentEList<XmlMappingFileRef>(XmlMappingFileRef.class, this, PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES);
+		}
+		return mappingFiles;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Jar Files</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.persistence.XmlJarFileRef}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Jar Files</em>' attribute list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Jar Files</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_JarFiles()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJarFileRef> getJarFiles()
+	{
+		if (jarFiles == null)
+		{
+			jarFiles = new EObjectContainmentEList<XmlJarFileRef>(XmlJarFileRef.class, this, PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES);
+		}
+		return jarFiles;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Classes</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Classes</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Classes</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Classes()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlJavaClassRef> getClasses()
+	{
+		if (classes == null)
+		{
+			classes = new EObjectContainmentEList<XmlJavaClassRef>(XmlJavaClassRef.class, this, PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES);
+		}
+		return classes;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Exclude Unlisted Classes</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Exclude Unlisted Classes</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Exclude Unlisted Classes</em>' attribute.
+	 * @see #setExcludeUnlistedClasses(Boolean)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_ExcludeUnlistedClasses()
+	 * @model dataType="org.eclipse.emf.ecore.xml.type.BooleanObject"
+	 * @generated
+	 */
+	public Boolean getExcludeUnlistedClasses()
+	{
+		return excludeUnlistedClasses;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getExcludeUnlistedClasses <em>Exclude Unlisted Classes</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Exclude Unlisted Classes</em>' attribute.
+	 * @see #getExcludeUnlistedClasses()
+	 * @generated
+	 */
+	public void setExcludeUnlistedClasses(Boolean newExcludeUnlistedClasses)
+	{
+		Boolean oldExcludeUnlistedClasses = excludeUnlistedClasses;
+		excludeUnlistedClasses = newExcludeUnlistedClasses;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES, oldExcludeUnlistedClasses, excludeUnlistedClasses));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Properties</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>XmlProperties</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Properties</em>' containment reference.
+	 * @see #setProperties(XmlProperties)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnit_Properties()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public XmlProperties getProperties()
+	{
+		return properties;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetProperties(XmlProperties newProperties, NotificationChain msgs)
+	{
+		XmlProperties oldProperties = properties;
+		properties = newProperties;
+		if (eNotificationRequired())
+		{
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, oldProperties, newProperties);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit#getProperties <em>Properties</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Properties</em>' containment reference.
+	 * @see #getProperties()
+	 * @generated
+	 */
+	public void setProperties(XmlProperties newProperties)
+	{
+		if (newProperties != properties)
+		{
+			NotificationChain msgs = null;
+			if (properties != null)
+				msgs = ((InternalEObject)properties).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, null, msgs);
+			if (newProperties != null)
+				msgs = ((InternalEObject)newProperties).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, null, msgs);
+			msgs = basicSetProperties(newProperties, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES, newProperties, newProperties));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
+				return ((InternalEList<?>)getMappingFiles()).basicRemove(otherEnd, msgs);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
+				return ((InternalEList<?>)getJarFiles()).basicRemove(otherEnd, msgs);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
+				return ((InternalEList<?>)getClasses()).basicRemove(otherEnd, msgs);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
+				return basicSetProperties(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
+				return getSharedCacheMode();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
+				return getValidationMode();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
+				return getDescription();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
+				return getProvider();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
+				return getJtaDataSource();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
+				return getNonJtaDataSource();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
+				return getMappingFiles();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
+				return getJarFiles();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
+				return getClasses();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
+				return getExcludeUnlistedClasses();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
+				return getProperties();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
+				return getName();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
+				return getTransactionType();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
+				setSharedCacheMode((XmlPersistenceUnitCachingType_2_0)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
+				setValidationMode((XmlPersistenceUnitValidationModeType_2_0)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
+				setDescription((String)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
+				setProvider((String)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
+				setJtaDataSource((String)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
+				setNonJtaDataSource((String)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
+				getMappingFiles().clear();
+				getMappingFiles().addAll((Collection<? extends XmlMappingFileRef>)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
+				getJarFiles().clear();
+				getJarFiles().addAll((Collection<? extends XmlJarFileRef>)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
+				getClasses().clear();
+				getClasses().addAll((Collection<? extends XmlJavaClassRef>)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
+				setExcludeUnlistedClasses((Boolean)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
+				setProperties((XmlProperties)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
+				setName((String)newValue);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
+				setTransactionType((XmlPersistenceUnitTransactionType)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
+				setSharedCacheMode(SHARED_CACHE_MODE_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
+				setValidationMode(VALIDATION_MODE_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
+				setDescription(DESCRIPTION_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
+				setProvider(PROVIDER_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
+				setJtaDataSource(JTA_DATA_SOURCE_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
+				setNonJtaDataSource(NON_JTA_DATA_SOURCE_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
+				getMappingFiles().clear();
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
+				getJarFiles().clear();
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
+				getClasses().clear();
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
+				setExcludeUnlistedClasses(EXCLUDE_UNLISTED_CLASSES_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
+				setProperties((XmlProperties)null);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
+				setTransactionType(TRANSACTION_TYPE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PERSISTENCE_UNIT__SHARED_CACHE_MODE:
+				return sharedCacheMode != SHARED_CACHE_MODE_EDEFAULT;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__VALIDATION_MODE:
+				return validationMode != VALIDATION_MODE_EDEFAULT;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__DESCRIPTION:
+				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROVIDER:
+				return PROVIDER_EDEFAULT == null ? provider != null : !PROVIDER_EDEFAULT.equals(provider);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JTA_DATA_SOURCE:
+				return JTA_DATA_SOURCE_EDEFAULT == null ? jtaDataSource != null : !JTA_DATA_SOURCE_EDEFAULT.equals(jtaDataSource);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NON_JTA_DATA_SOURCE:
+				return NON_JTA_DATA_SOURCE_EDEFAULT == null ? nonJtaDataSource != null : !NON_JTA_DATA_SOURCE_EDEFAULT.equals(nonJtaDataSource);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES:
+				return mappingFiles != null && !mappingFiles.isEmpty();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES:
+				return jarFiles != null && !jarFiles.isEmpty();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES:
+				return classes != null && !classes.isEmpty();
+			case PersistencePackage.XML_PERSISTENCE_UNIT__EXCLUDE_UNLISTED_CLASSES:
+				return EXCLUDE_UNLISTED_CLASSES_EDEFAULT == null ? excludeUnlistedClasses != null : !EXCLUDE_UNLISTED_CLASSES_EDEFAULT.equals(excludeUnlistedClasses);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__PROPERTIES:
+				return properties != null;
+			case PersistencePackage.XML_PERSISTENCE_UNIT__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case PersistencePackage.XML_PERSISTENCE_UNIT__TRANSACTION_TYPE:
+				return transactionType != TRANSACTION_TYPE_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (sharedCacheMode: ");
+		result.append(sharedCacheMode);
+		result.append(", validationMode: ");
+		result.append(validationMode);
+		result.append(", description: ");
+		result.append(description);
+		result.append(", provider: ");
+		result.append(provider);
+		result.append(", jtaDataSource: ");
+		result.append(jtaDataSource);
+		result.append(", nonJtaDataSource: ");
+		result.append(nonJtaDataSource);
+		result.append(", excludeUnlistedClasses: ");
+		result.append(excludeUnlistedClasses);
+		result.append(", name: ");
+		result.append(name);
+		result.append(", transactionType: ");
+		result.append(transactionType);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// ********** translators **********
+	
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+	
+	private static Translator[] buildTranslatorChildren() {
+		PersistencePackage pkg = PersistencePackage.eINSTANCE;
+		return new Translator[] {
+				buildNameTranslator(),
+				buildTransactionTypeTranslator(),
+				buildDescriptionTranslator(),
+				buildProviderTranslator(),
+				buildJtaDataSourceTranslator(),
+				buildNonJtaDataSourceTranslator(),
+				XmlMappingFileRef.buildTranslator(JPA.MAPPING_FILE, pkg.getXmlPersistenceUnit_MappingFiles()),
+				XmlJarFileRef.buildTranslator(JPA.JAR_FILE, pkg.getXmlPersistenceUnit_JarFiles()),
+				XmlJavaClassRef.buildTranslator(JPA.CLASS, pkg.getXmlPersistenceUnit_Classes()),
+				buildExcludeUnlistedClassesTranslator(),
+				buildSharedCacheModeTranslator(),
+				buildValidationModeTranslator(),
+				XmlProperties.buildTranslator(JPA.PROPERTIES, pkg.getXmlPersistenceUnit_Properties())};
+	}
+	
+	protected static Translator buildNameTranslator() {
+		return new Translator(
+				JPA.PERSISTENCE_UNIT__NAME,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_Name(),
+				Translator.DOM_ATTRIBUTE);
+	}
+	
+	protected static Translator buildTransactionTypeTranslator() {
+		return new Translator(
+				JPA.PERSISTENCE_UNIT__TRANSACTION_TYPE,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_TransactionType(),
+				Translator.DOM_ATTRIBUTE | Translator.UNSET_IF_NULL);
+	}
+	
+	protected static Translator buildDescriptionTranslator() {
+		return new Translator(
+				JPA.DESCRIPTION,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_Description());
+	}
+	
+	protected static Translator buildProviderTranslator() {
+		return new Translator(
+				JPA.PROVIDER,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_Provider());
+	}
+	
+	protected static Translator buildJtaDataSourceTranslator() {
+		return new Translator(
+				JPA.JTA_DATA_SOURCE,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_JtaDataSource());
+	}
+	
+	protected static Translator buildNonJtaDataSourceTranslator() {
+		return new Translator(
+				JPA.NON_JTA_DATA_SOURCE,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_NonJtaDataSource());
+	}
+	
+	protected static Translator buildExcludeUnlistedClassesTranslator() {
+		return new BooleanTranslator(
+				JPA.EXCLUDE_UNLISTED_CLASSES,
+				PersistencePackage.eINSTANCE.getXmlPersistenceUnit_ExcludeUnlistedClasses());
+	}
+	
+	protected static Translator buildSharedCacheModeTranslator() {
+		return new Translator(
+				JPA2_0.PERSISTENCE_UNIT__SHARED_CACHE_MODE,
+				PersistenceV2_0Package.eINSTANCE.getXmlPersistenceUnit_2_0_SharedCacheMode());
+	}
+	
+	protected static Translator buildValidationModeTranslator() {
+		return new Translator(
+				JPA2_0.PERSISTENCE_UNIT__VALIDATION_MODE,
+				PersistenceV2_0Package.eINSTANCE.getXmlPersistenceUnit_2_0_ValidationMode());
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistenceUnitTransactionType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistenceUnitTransactionType.java
new file mode 100644
index 0000000..d8048c0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlPersistenceUnitTransactionType.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Unit Transaction Type</b></em>',
+ * and utility methods for working with them.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlPersistenceUnitTransactionType()
+ * @model
+ * @generated
+ */
+public enum XmlPersistenceUnitTransactionType implements Enumerator
+{
+	/**
+	 * The '<em><b>JTA</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #JTA_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	JTA(0, "JTA", "JTA"),
+
+	/**
+	 * The '<em><b>RESOURCE LOCAL</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #RESOURCE_LOCAL_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	RESOURCE_LOCAL(1, "RESOURCE_LOCAL", "RESOURCE_LOCAL");
+
+	/**
+	 * The '<em><b>JTA</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>JTA</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #JTA
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int JTA_VALUE = 0;
+
+	/**
+	 * The '<em><b>RESOURCE LOCAL</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>RESOURCE LOCAL</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #RESOURCE_LOCAL
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int RESOURCE_LOCAL_VALUE = 1;
+
+	/**
+	 * An array of all the '<em><b>Xml Persistence Unit Transaction Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final XmlPersistenceUnitTransactionType[] VALUES_ARRAY =
+		new XmlPersistenceUnitTransactionType[]
+		{
+			JTA,
+			RESOURCE_LOCAL,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Xml Persistence Unit Transaction Type</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<XmlPersistenceUnitTransactionType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Transaction Type</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitTransactionType get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			XmlPersistenceUnitTransactionType result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Transaction Type</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitTransactionType getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			XmlPersistenceUnitTransactionType result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Transaction Type</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitTransactionType get(int value)
+	{
+		switch (value)
+		{
+			case JTA_VALUE: return JTA;
+			case RESOURCE_LOCAL_VALUE: return RESOURCE_LOCAL;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private XmlPersistenceUnitTransactionType(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //XmlPersistenceUnitTransactionType
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlProperties.java
new file mode 100644
index 0000000..69b6f64
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlProperties.java
@@ -0,0 +1,202 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>XmlProperties</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlProperties#getProperties <em>Properties</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperties()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlProperties extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getProperties()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<XmlProperty> properties;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlProperties()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_PROPERTIES;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Properties</b></em>' containment reference list.
+	 * The list contents are of type {@link org.eclipse.jpt.core.resource.persistence.XmlProperty}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>XmlProperties</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Properties</em>' containment reference list.
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperties_Properties()
+	 * @model containment="true"
+	 * @generated
+	 */
+	public EList<XmlProperty> getProperties()
+	{
+		if (properties == null)
+		{
+			properties = new EObjectContainmentEList<XmlProperty>(XmlProperty.class, this, PersistencePackage.XML_PROPERTIES__PROPERTIES);
+		}
+		return properties;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTIES__PROPERTIES:
+				return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTIES__PROPERTIES:
+				return getProperties();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTIES__PROPERTIES:
+				getProperties().clear();
+				getProperties().addAll((Collection<? extends XmlProperty>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTIES__PROPERTIES:
+				getProperties().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTIES__PROPERTIES:
+				return properties != null && !properties.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(elementName, structuralFeature, buildTranslatorChildren());
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+				XmlProperty.buildTranslator(JPA.PROPERTY, PersistencePackage.eINSTANCE.getXmlProperties_Properties()),
+			};
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlProperty.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlProperty.java
new file mode 100644
index 0000000..22e944c
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/XmlProperty.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.SimpleTranslator;
+import org.eclipse.jpt.core.resource.xml.AbstractJpaEObject;
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>XmlProperty</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlProperty#getName <em>Name</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.XmlProperty#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperty()
+ * @model kind="class"
+ * @extends JpaEObject
+ * @generated
+ */
+public class XmlProperty extends AbstractJpaEObject implements JpaEObject
+{
+	/**
+	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAME_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getName()
+	 * @generated
+	 * @ordered
+	 */
+	protected String name = NAME_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String VALUE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected String value = VALUE_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected XmlProperty()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return PersistencePackage.Literals.XML_PROPERTY;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Name</em>' attribute.
+	 * @see #setName(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperty_Name()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getName()
+	{
+		return name;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty#getName <em>Name</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Name</em>' attribute.
+	 * @see #getName()
+	 * @generated
+	 */
+	public void setName(String newName)
+	{
+		String oldName = name;
+		name = newName;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PROPERTY__NAME, oldName, name));
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Value</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Value</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Value</em>' attribute.
+	 * @see #setValue(String)
+	 * @see org.eclipse.jpt.core.resource.persistence.PersistencePackage#getXmlProperty_Value()
+	 * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+	 * @generated
+	 */
+	public String getValue()
+	{
+		return value;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.XmlProperty#getValue <em>Value</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Value</em>' attribute.
+	 * @see #getValue()
+	 * @generated
+	 */
+	public void setValue(String newValue)
+	{
+		String oldValue = value;
+		value = newValue;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, PersistencePackage.XML_PROPERTY__VALUE, oldValue, value));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTY__NAME:
+				return getName();
+			case PersistencePackage.XML_PROPERTY__VALUE:
+				return getValue();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTY__NAME:
+				setName((String)newValue);
+				return;
+			case PersistencePackage.XML_PROPERTY__VALUE:
+				setValue((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTY__NAME:
+				setName(NAME_EDEFAULT);
+				return;
+			case PersistencePackage.XML_PROPERTY__VALUE:
+				setValue(VALUE_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case PersistencePackage.XML_PROPERTY__NAME:
+				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case PersistencePackage.XML_PROPERTY__VALUE:
+				return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuilder result = new StringBuilder(super.toString());
+		result.append(" (name: ");
+		result.append(name);
+		result.append(", value: ");
+		result.append(value);
+		result.append(')');
+		return result.toString();
+	}
+
+
+	// ********** translators **********
+
+	public static Translator buildTranslator(String elementName, EStructuralFeature structuralFeature) {
+		return new SimpleTranslator(
+				elementName,
+				structuralFeature,
+				Translator.END_TAG_NO_INDENT,
+				buildTranslatorChildren()
+			);
+	}
+
+	private static Translator[] buildTranslatorChildren() {
+		return new Translator[] {
+				buildNameTranslator(),
+				buildValueTranslator()
+			};
+	}
+
+	private static Translator buildNameTranslator() {
+		return new Translator(
+				JPA.PROPERTY__NAME,
+				PersistencePackage.eINSTANCE.getXmlProperty_Name(),
+				Translator.DOM_ATTRIBUTE
+			);
+	}
+
+	private static Translator buildValueTranslator() {
+		return new Translator(
+				JPA.PROPERTY__VALUE,
+				PersistencePackage.eINSTANCE.getXmlProperty_Value(),
+				Translator.DOM_ATTRIBUTE
+			);
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/JPA2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/JPA2_0.java
new file mode 100644
index 0000000..b243d62
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/JPA2_0.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence.v2_0;
+
+import org.eclipse.jpt.core.resource.persistence.JPA;
+
+/**
+ * JPA persistence2_0.xml-related stuff (elements, attributes etc.)
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+@SuppressWarnings("nls")
+public interface JPA2_0
+	extends JPA
+{
+	String SCHEMA_NAMESPACE = JPA.SCHEMA_NAMESPACE;
+	String SCHEMA_LOCATION = "http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";
+	String SCHEMA_VERSION = "2.0";
+	
+	// JPA 2.0 specific nodes
+	
+	String PERSISTENCE_UNIT__SHARED_CACHE_MODE = "shared-cache-mode";
+	String PERSISTENCE_UNIT__VALIDATION_MODE = "validation-mode";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/PersistenceV2_0Factory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/PersistenceV2_0Factory.java
new file mode 100644
index 0000000..5d03956
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/PersistenceV2_0Factory.java
@@ -0,0 +1,192 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence.v2_0;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package
+ * @generated
+ */
+public class PersistenceV2_0Factory extends EFactoryImpl
+{
+	/**
+	 * The singleton instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final PersistenceV2_0Factory eINSTANCE = init();
+
+	/**
+	 * Creates the default factory implementation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static PersistenceV2_0Factory init()
+	{
+		try
+		{
+			PersistenceV2_0Factory thePersistenceV2_0Factory = (PersistenceV2_0Factory)EPackage.Registry.INSTANCE.getEFactory("jpt.persistence.v2_0.xmi"); 
+			if (thePersistenceV2_0Factory != null)
+			{
+				return thePersistenceV2_0Factory;
+			}
+		}
+		catch (Exception exception)
+		{
+			EcorePlugin.INSTANCE.log(exception);
+		}
+		return new PersistenceV2_0Factory();
+	}
+
+	/**
+	 * Creates an instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PersistenceV2_0Factory()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public EObject create(EClass eClass)
+	{
+		switch (eClass.getClassifierID())
+		{
+			default:
+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object createFromString(EDataType eDataType, String initialValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_CACHING_TYPE_20:
+				return createXmlPersistenceUnitCachingType_2_0FromString(eDataType, initialValue);
+			case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20:
+				return createXmlPersistenceUnitValidationModeType_2_0FromString(eDataType, initialValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String convertToString(EDataType eDataType, Object instanceValue)
+	{
+		switch (eDataType.getClassifierID())
+		{
+			case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_CACHING_TYPE_20:
+				return convertXmlPersistenceUnitCachingType_2_0ToString(eDataType, instanceValue);
+			case PersistenceV2_0Package.XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20:
+				return convertXmlPersistenceUnitValidationModeType_2_0ToString(eDataType, instanceValue);
+			default:
+				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistenceUnitCachingType_2_0 createXmlPersistenceUnitCachingType_2_0FromString(EDataType eDataType, String initialValue)
+	{
+		XmlPersistenceUnitCachingType_2_0 result = XmlPersistenceUnitCachingType_2_0.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertXmlPersistenceUnitCachingType_2_0ToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public XmlPersistenceUnitValidationModeType_2_0 createXmlPersistenceUnitValidationModeType_2_0FromString(EDataType eDataType, String initialValue)
+	{
+		XmlPersistenceUnitValidationModeType_2_0 result = XmlPersistenceUnitValidationModeType_2_0.get(initialValue);
+		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+		return result;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String convertXmlPersistenceUnitValidationModeType_2_0ToString(EDataType eDataType, Object instanceValue)
+	{
+		return instanceValue == null ? null : instanceValue.toString();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public PersistenceV2_0Package getPersistenceV2_0Package()
+	{
+		return (PersistenceV2_0Package)getEPackage();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @deprecated
+	 * @generated
+	 */
+	@Deprecated
+	public static PersistenceV2_0Package getPackage()
+	{
+		return PersistenceV2_0Package.eINSTANCE;
+	}
+
+} //PersistenceV2_0Factory
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/PersistenceV2_0Package.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/PersistenceV2_0Package.java
new file mode 100644
index 0000000..3311b93
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/PersistenceV2_0Package.java
@@ -0,0 +1,452 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence.v2_0;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.persistence.PersistencePackage;
+import org.eclipse.jpt.core.resource.xml.CommonPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Factory
+ * @model kind="package"
+ * @generated
+ */
+public class PersistenceV2_0Package extends EPackageImpl
+{
+	/**
+	 * The package name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNAME = "v2_0";
+
+	/**
+	 * The package namespace URI.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_URI = "jpt.persistence.v2_0.xmi";
+
+	/**
+	 * The package namespace name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_PREFIX = "org.eclipse.jpt.core.resource.persistence.v2_0";
+
+	/**
+	 * The singleton instance of the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final PersistenceV2_0Package eINSTANCE = org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package.init();
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0 <em>Xml Persistence Unit 20</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_20 = 0;
+
+	/**
+	 * The feature id for the '<em><b>Shared Cache Mode</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE = 0;
+
+	/**
+	 * The feature id for the '<em><b>Validation Mode</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_20__VALIDATION_MODE = 1;
+
+	/**
+	 * The number of structural features of the '<em>Xml Persistence Unit 20</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int XML_PERSISTENCE_UNIT_20_FEATURE_COUNT = 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0 <em>Xml Persistence Unit Caching Type 20</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitCachingType_2_0()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_CACHING_TYPE_20 = 1;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0 <em>Xml Persistence Unit Validation Mode Type 20</em>}' enum.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitValidationModeType_2_0()
+	 * @generated
+	 */
+	public static final int XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20 = 2;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass xmlPersistenceUnit_2_0EClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum xmlPersistenceUnitCachingType_2_0EEnum = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EEnum xmlPersistenceUnitValidationModeType_2_0EEnum = null;
+
+	/**
+	 * Creates an instance of the model <b>Package</b>, registered with
+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+	 * package URI value.
+	 * <p>Note: the correct way to create the package is via the static
+	 * factory method {@link #init init()}, which also performs
+	 * initialization of the package, or returns the registered package,
+	 * if one already exists.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.emf.ecore.EPackage.Registry
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#eNS_URI
+	 * @see #init()
+	 * @generated
+	 */
+	private PersistenceV2_0Package()
+	{
+		super(eNS_URI, PersistenceV2_0Factory.eINSTANCE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static boolean isInited = false;
+
+	/**
+	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+	 * 
+	 * <p>This method is used to initialize {@link PersistenceV2_0Package#eINSTANCE} when that field is accessed.
+	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #eNS_URI
+	 * @see #createPackageContents()
+	 * @see #initializePackageContents()
+	 * @generated
+	 */
+	public static PersistenceV2_0Package init()
+	{
+		if (isInited) return (PersistenceV2_0Package)EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI);
+
+		// Obtain or create and register package
+		PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PersistenceV2_0Package());
+
+		isInited = true;
+
+		// Initialize simple dependencies
+		EcorePackage.eINSTANCE.eClass();
+
+		// Obtain or create and register interdependencies
+		CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
+		OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
+		OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
+		PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
+
+		// Create package meta-data objects
+		thePersistenceV2_0Package.createPackageContents();
+		theCommonPackage.createPackageContents();
+		theOrmPackage.createPackageContents();
+		theOrmV2_0Package.createPackageContents();
+		thePersistencePackage.createPackageContents();
+
+		// Initialize created meta-data
+		thePersistenceV2_0Package.initializePackageContents();
+		theCommonPackage.initializePackageContents();
+		theOrmPackage.initializePackageContents();
+		theOrmV2_0Package.initializePackageContents();
+		thePersistencePackage.initializePackageContents();
+
+		// Mark meta-data to indicate it can't be changed
+		thePersistenceV2_0Package.freeze();
+
+  
+		// Update the registry and return the package
+		EPackage.Registry.INSTANCE.put(PersistenceV2_0Package.eNS_URI, thePersistenceV2_0Package);
+		return thePersistenceV2_0Package;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0 <em>Xml Persistence Unit 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Xml Persistence Unit 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0
+	 * @generated
+	 */
+	public EClass getXmlPersistenceUnit_2_0()
+	{
+		return xmlPersistenceUnit_2_0EClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode <em>Shared Cache Mode</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Shared Cache Mode</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode()
+	 * @see #getXmlPersistenceUnit_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_2_0_SharedCacheMode()
+	{
+		return (EAttribute)xmlPersistenceUnit_2_0EClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode <em>Validation Mode</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Validation Mode</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode()
+	 * @see #getXmlPersistenceUnit_2_0()
+	 * @generated
+	 */
+	public EAttribute getXmlPersistenceUnit_2_0_ValidationMode()
+	{
+		return (EAttribute)xmlPersistenceUnit_2_0EClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0 <em>Xml Persistence Unit Caching Type 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Xml Persistence Unit Caching Type 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+	 * @generated
+	 */
+	public EEnum getXmlPersistenceUnitCachingType_2_0()
+	{
+		return xmlPersistenceUnitCachingType_2_0EEnum;
+	}
+
+	/**
+	 * Returns the meta object for enum '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0 <em>Xml Persistence Unit Validation Mode Type 20</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for enum '<em>Xml Persistence Unit Validation Mode Type 20</em>'.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+	 * @generated
+	 */
+	public EEnum getXmlPersistenceUnitValidationModeType_2_0()
+	{
+		return xmlPersistenceUnitValidationModeType_2_0EEnum;
+	}
+
+	/**
+	 * Returns the factory that creates the instances of the model.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the factory that creates the instances of the model.
+	 * @generated
+	 */
+	public PersistenceV2_0Factory getPersistenceV2_0Factory()
+	{
+		return (PersistenceV2_0Factory)getEFactoryInstance();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isCreated = false;
+
+	/**
+	 * Creates the meta-model objects for the package.  This method is
+	 * guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void createPackageContents()
+	{
+		if (isCreated) return;
+		isCreated = true;
+
+		// Create classes and their features
+		xmlPersistenceUnit_2_0EClass = createEClass(XML_PERSISTENCE_UNIT_20);
+		createEAttribute(xmlPersistenceUnit_2_0EClass, XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE);
+		createEAttribute(xmlPersistenceUnit_2_0EClass, XML_PERSISTENCE_UNIT_20__VALIDATION_MODE);
+
+		// Create enums
+		xmlPersistenceUnitCachingType_2_0EEnum = createEEnum(XML_PERSISTENCE_UNIT_CACHING_TYPE_20);
+		xmlPersistenceUnitValidationModeType_2_0EEnum = createEEnum(XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isInitialized = false;
+
+	/**
+	 * Complete the initialization of the package and its meta-model.  This
+	 * method is guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void initializePackageContents()
+	{
+		if (isInitialized) return;
+		isInitialized = true;
+
+		// Initialize package
+		setName(eNAME);
+		setNsPrefix(eNS_PREFIX);
+		setNsURI(eNS_URI);
+
+		// Create type parameters
+
+		// Set bounds for type parameters
+
+		// Add supertypes to classes
+
+		// Initialize classes and features; add operations and parameters
+		initEClass(xmlPersistenceUnit_2_0EClass, XmlPersistenceUnit_2_0.class, "XmlPersistenceUnit_2_0", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getXmlPersistenceUnit_2_0_SharedCacheMode(), this.getXmlPersistenceUnitCachingType_2_0(), "sharedCacheMode", "UNSPECIFIED", 0, 1, XmlPersistenceUnit_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getXmlPersistenceUnit_2_0_ValidationMode(), this.getXmlPersistenceUnitValidationModeType_2_0(), "validationMode", "AUTO", 0, 1, XmlPersistenceUnit_2_0.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		// Initialize enums and add enum literals
+		initEEnum(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.class, "XmlPersistenceUnitCachingType_2_0");
+		addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.ALL);
+		addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.NONE);
+		addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.ENABLE_SELECTIVE);
+		addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.DISABLE_SELECTIVE);
+		addEEnumLiteral(xmlPersistenceUnitCachingType_2_0EEnum, XmlPersistenceUnitCachingType_2_0.UNSPECIFIED);
+
+		initEEnum(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.class, "XmlPersistenceUnitValidationModeType_2_0");
+		addEEnumLiteral(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.AUTO);
+		addEEnumLiteral(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.CALLBACK);
+		addEEnumLiteral(xmlPersistenceUnitValidationModeType_2_0EEnum, XmlPersistenceUnitValidationModeType_2_0.NONE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * Defines literals for the meta objects that represent
+	 * <ul>
+	 *   <li>each class,</li>
+	 *   <li>each feature of each class,</li>
+	 *   <li>each enum,</li>
+	 *   <li>and each data type</li>
+	 * </ul>
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public interface Literals
+	{
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0 <em>Xml Persistence Unit 20</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0
+		 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0()
+		 * @generated
+		 */
+		public static final EClass XML_PERSISTENCE_UNIT_20 = eINSTANCE.getXmlPersistenceUnit_2_0();
+
+		/**
+		 * The meta object literal for the '<em><b>Shared Cache Mode</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_20__SHARED_CACHE_MODE = eINSTANCE.getXmlPersistenceUnit_2_0_SharedCacheMode();
+
+		/**
+		 * The meta object literal for the '<em><b>Validation Mode</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute XML_PERSISTENCE_UNIT_20__VALIDATION_MODE = eINSTANCE.getXmlPersistenceUnit_2_0_ValidationMode();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0 <em>Xml Persistence Unit Caching Type 20</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+		 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitCachingType_2_0()
+		 * @generated
+		 */
+		public static final EEnum XML_PERSISTENCE_UNIT_CACHING_TYPE_20 = eINSTANCE.getXmlPersistenceUnitCachingType_2_0();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0 <em>Xml Persistence Unit Validation Mode Type 20</em>}' enum.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+		 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitValidationModeType_2_0()
+		 * @generated
+		 */
+		public static final EEnum XML_PERSISTENCE_UNIT_VALIDATION_MODE_TYPE_20 = eINSTANCE.getXmlPersistenceUnitValidationModeType_2_0();
+
+	}
+
+} //PersistenceV2_0Package
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java
new file mode 100644
index 0000000..bb2abca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnitCachingType_2_0.java
@@ -0,0 +1,312 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence.v2_0;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Xml Persistence Unit Caching Type 20</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitCachingType_2_0()
+ * @model
+ * @generated
+ */
+public enum XmlPersistenceUnitCachingType_2_0 implements Enumerator
+{
+	/**
+	 * The '<em><b>ALL</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #ALL_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	ALL(0, "ALL", "ALL"),
+
+	/**
+	 * The '<em><b>NONE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #NONE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	NONE(1, "NONE", "NONE"),
+
+	/**
+	 * The '<em><b>ENABLE SELECTIVE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #ENABLE_SELECTIVE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	ENABLE_SELECTIVE(2, "ENABLE_SELECTIVE", "ENABLE_SELECTIVE"),
+
+	/**
+	 * The '<em><b>DISABLE SELECTIVE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #DISABLE_SELECTIVE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	DISABLE_SELECTIVE(3, "DISABLE_SELECTIVE", "DISABLE_SELECTIVE"),
+
+	/**
+	 * The '<em><b>UNSPECIFIED</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #UNSPECIFIED_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	UNSPECIFIED(4, "UNSPECIFIED", "UNSPECIFIED");
+
+	/**
+	 * The '<em><b>ALL</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>ALL</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #ALL
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ALL_VALUE = 0;
+
+	/**
+	 * The '<em><b>NONE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #NONE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int NONE_VALUE = 1;
+
+	/**
+	 * The '<em><b>ENABLE SELECTIVE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>ENABLE SELECTIVE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #ENABLE_SELECTIVE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ENABLE_SELECTIVE_VALUE = 2;
+
+	/**
+	 * The '<em><b>DISABLE SELECTIVE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>DISABLE SELECTIVE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #DISABLE_SELECTIVE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int DISABLE_SELECTIVE_VALUE = 3;
+
+	/**
+	 * The '<em><b>UNSPECIFIED</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>UNSPECIFIED</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #UNSPECIFIED
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int UNSPECIFIED_VALUE = 4;
+
+	/**
+	 * An array of all the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final XmlPersistenceUnitCachingType_2_0[] VALUES_ARRAY =
+		new XmlPersistenceUnitCachingType_2_0[]
+		{
+			ALL,
+			NONE,
+			ENABLE_SELECTIVE,
+			DISABLE_SELECTIVE,
+			UNSPECIFIED,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<XmlPersistenceUnitCachingType_2_0> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitCachingType_2_0 get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			XmlPersistenceUnitCachingType_2_0 result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitCachingType_2_0 getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			XmlPersistenceUnitCachingType_2_0 result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Caching Type 20</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitCachingType_2_0 get(int value)
+	{
+		switch (value)
+		{
+			case ALL_VALUE: return ALL;
+			case NONE_VALUE: return NONE;
+			case ENABLE_SELECTIVE_VALUE: return ENABLE_SELECTIVE;
+			case DISABLE_SELECTIVE_VALUE: return DISABLE_SELECTIVE;
+			case UNSPECIFIED_VALUE: return UNSPECIFIED;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private XmlPersistenceUnitCachingType_2_0(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //XmlPersistenceUnitCachingType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java
new file mode 100644
index 0000000..a2758c3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnitValidationModeType_2_0.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence.v2_0;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnitValidationModeType_2_0()
+ * @model
+ * @generated
+ */
+public enum XmlPersistenceUnitValidationModeType_2_0 implements Enumerator
+{
+	/**
+	 * The '<em><b>AUTO</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #AUTO_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	AUTO(0, "AUTO", "AUTO"),
+
+	/**
+	 * The '<em><b>CALLBACK</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #CALLBACK_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	CALLBACK(1, "CALLBACK", "CALLBACK"),
+
+	/**
+	 * The '<em><b>NONE</b></em>' literal object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #NONE_VALUE
+	 * @generated
+	 * @ordered
+	 */
+	NONE(2, "NONE", "NONE");
+
+	/**
+	 * The '<em><b>AUTO</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>AUTO</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #AUTO
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int AUTO_VALUE = 0;
+
+	/**
+	 * The '<em><b>CALLBACK</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>CALLBACK</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #CALLBACK
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int CALLBACK_VALUE = 1;
+
+	/**
+	 * The '<em><b>NONE</b></em>' literal value.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @see #NONE
+	 * @model
+	 * @generated
+	 * @ordered
+	 */
+	public static final int NONE_VALUE = 2;
+
+	/**
+	 * An array of all the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static final XmlPersistenceUnitValidationModeType_2_0[] VALUES_ARRAY =
+		new XmlPersistenceUnitValidationModeType_2_0[]
+		{
+			AUTO,
+			CALLBACK,
+			NONE,
+		};
+
+	/**
+	 * A public read-only list of all the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' enumerators.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final List<XmlPersistenceUnitValidationModeType_2_0> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' literal with the specified literal value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitValidationModeType_2_0 get(String literal)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			XmlPersistenceUnitValidationModeType_2_0 result = VALUES_ARRAY[i];
+			if (result.toString().equals(literal))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' literal with the specified name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitValidationModeType_2_0 getByName(String name)
+	{
+		for (int i = 0; i < VALUES_ARRAY.length; ++i)
+		{
+			XmlPersistenceUnitValidationModeType_2_0 result = VALUES_ARRAY[i];
+			if (result.getName().equals(name))
+			{
+				return result;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the '<em><b>Xml Persistence Unit Validation Mode Type 20</b></em>' literal with the specified integer value.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static XmlPersistenceUnitValidationModeType_2_0 get(int value)
+	{
+		switch (value)
+		{
+			case AUTO_VALUE: return AUTO;
+			case CALLBACK_VALUE: return CALLBACK;
+			case NONE_VALUE: return NONE;
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final int value;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String name;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private final String literal;
+
+	/**
+	 * Only this class can construct instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private XmlPersistenceUnitValidationModeType_2_0(int value, String name, String literal)
+	{
+		this.value = value;
+		this.name = name;
+		this.literal = literal;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public int getValue()
+	{
+	  return value;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getName()
+	{
+	  return name;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getLiteral()
+	{
+	  return literal;
+	}
+
+	/**
+	 * Returns the literal value of the enumerator, which is its string representation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		return literal;
+	}
+	
+} //XmlPersistenceUnitValidationModeType_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java
new file mode 100644
index 0000000..586ccab
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/persistence/v2_0/XmlPersistenceUnit_2_0.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ *  Copyright (c) 2009  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.persistence.v2_0;
+
+import org.eclipse.jpt.core.resource.xml.JpaEObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Xml Persistence Unit 20</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode <em>Shared Cache Mode</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode <em>Validation Mode</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface XmlPersistenceUnit_2_0 extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Shared Cache Mode</b></em>' attribute.
+	 * The default value is <code>"UNSPECIFIED"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Shared Cache Mode</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Shared Cache Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+	 * @see #setSharedCacheMode(XmlPersistenceUnitCachingType_2_0)
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0_SharedCacheMode()
+	 * @model default="UNSPECIFIED" unique="false"
+	 * @generated
+	 */
+	XmlPersistenceUnitCachingType_2_0 getSharedCacheMode();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getSharedCacheMode <em>Shared Cache Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Shared Cache Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitCachingType_2_0
+	 * @see #getSharedCacheMode()
+	 * @generated
+	 */
+	void setSharedCacheMode(XmlPersistenceUnitCachingType_2_0 value);
+
+	/**
+	 * Returns the value of the '<em><b>Validation Mode</b></em>' attribute.
+	 * The default value is <code>"AUTO"</code>.
+	 * The literals are from the enumeration {@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Validation Mode</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Validation Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+	 * @see #setValidationMode(XmlPersistenceUnitValidationModeType_2_0)
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package#getXmlPersistenceUnit_2_0_ValidationMode()
+	 * @model default="AUTO" unique="false"
+	 * @generated
+	 */
+	XmlPersistenceUnitValidationModeType_2_0 getValidationMode();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnit_2_0#getValidationMode <em>Validation Mode</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Validation Mode</em>' attribute.
+	 * @see org.eclipse.jpt.core.resource.persistence.v2_0.XmlPersistenceUnitValidationModeType_2_0
+	 * @see #getValidationMode()
+	 * @generated
+	 */
+	void setValidationMode(XmlPersistenceUnitValidationModeType_2_0 value);
+
+} // XmlPersistenceUnit_2_0
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/AbstractJpaEObject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/AbstractJpaEObject.java
new file mode 100644
index 0000000..131e974
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/AbstractJpaEObject.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.xml;
+
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Set;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.jpt.core.utility.AbstractTextRange;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public abstract class AbstractJpaEObject
+	extends EObjectImpl
+	implements JpaEObject
+{
+	protected IDOMNode node;
+	
+	/**
+	 * Sets of "insignificant" feature ids, keyed by class.
+	 * This is built up lazily, as the objects are modified.
+	 */
+	private static final Hashtable<Class<? extends AbstractJpaEObject>, HashSet<Integer>> insignificantFeatureIdSets = new Hashtable<Class<? extends AbstractJpaEObject>, HashSet<Integer>>();
+	
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractJpaEObject() {
+		super();
+	}
+
+
+	// ********** JpaEObject implementation **********
+
+	public boolean isUnset() {
+		for (EStructuralFeature feature : this.eClass().getEAllStructuralFeatures()) {
+			if (this.eIsSet(feature)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+
+	// ********** change notification **********
+
+	/**
+	 * override to build a custom list for the adapters
+	 */
+	@Override
+	public EList<Adapter> eAdapters() {
+		if (this.eAdapters == null) {
+			this.eAdapters = new XmlEAdapterList<Adapter>(this);
+		}
+		return this.eAdapters;
+	}
+
+	/**
+	 * override to prevent notification when the object's state is unchanged
+	 */
+	@Override
+	public void eNotify(Notification notification) {
+		if ( ! notification.isTouch()) {
+			super.eNotify(notification);
+			this.featureChanged(notification.getFeatureID(this.getClass()));
+		}
+	}
+
+	protected void featureChanged(int featureId) {
+		if (this.featureIsSignificant(featureId)) { 
+			this.getXmlResource().resourceModelChanged();
+		}
+	}
+
+	protected JpaXmlResource getXmlResource() {
+		return (JpaXmlResource) this.eResource();
+	}
+
+	protected boolean featureIsSignificant(int featureId) {
+		return ! this.featureIsInsignificant(featureId);
+	}
+
+	protected boolean featureIsInsignificant(int featureId) {
+		return this.insignificantFeatureIds().contains(Integer.valueOf(featureId));
+	}
+
+	/**
+	 * Return a set of the object's "insignificant" feature ids.
+	 * These are the EMF features that will not be used to determine if all
+	 * the features are unset.  We use this to determine when to remove 
+	 * an element from the xml.
+	 * 
+	 * If you need instance-based calculation of your xml "insignificant" aspects,
+	 * override this method. If class-based calculation is sufficient,
+	 * override #addInsignificantXmlFeatureIdsTo(Set).
+	 * 
+	 * @see isAllFeaturesUnset()
+	 */
+	protected Set<Integer> insignificantFeatureIds() {
+		synchronized (insignificantFeatureIdSets) {
+			HashSet<Integer> insignificantXmlFeatureIds = insignificantFeatureIdSets.get(this.getClass());
+			if (insignificantXmlFeatureIds == null) {
+				insignificantXmlFeatureIds = new HashSet<Integer>();
+				this.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
+				insignificantFeatureIdSets.put(this.getClass(), insignificantXmlFeatureIds);
+			}
+			return insignificantXmlFeatureIds;
+		}
+	}
+
+	/**
+	 * Add the object's "insignificant" feature ids to the specified set.
+	 * These are the EMF features that, when they change, will NOT cause the
+	 * object (or its containing tree) to be updated, i.e. defaults calculated.
+	 * If class-based calculation of your "insignificant" features is sufficient,
+	 * override this method. If you need instance-based calculation,
+	 * override #insignificantXmlFeatureIds().
+	 */
+	protected void addInsignificantXmlFeatureIdsTo(@SuppressWarnings("unused") Set<Integer> insignificantXmlFeatureIds) {
+	// when you override this method, don't forget to include:
+	//	super.addInsignificantXmlFeatureIdsTo(insignificantXmlFeatureIds);
+	}
+
+
+	// ********** text ranges **********
+	
+	/**
+	 * Return a text range for the "text" node.
+	 * If the text node does not exist, return a text range for this object's node
+	 */
+	protected TextRange getTextTextRange() {
+		IDOMNode textNode = this.getTextNode();
+		return (textNode != null) ? buildTextRange(textNode) : this.getValidationTextRange();
+	}
+	
+	protected IDOMNode getTextNode() {
+		if (this.node == null) return null; // virtual objects have no node
+		NodeList children = this.node.getChildNodes();
+		for (int i = 0; i < children.getLength(); i ++) {
+			IDOMNode child = (IDOMNode) children.item(i);
+			if (child.getNodeType() == Node.TEXT_NODE) {
+				return child;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * Return a text range for the specified attribute node.
+	 * If the attribute node does not exist, return a text range for this object's
+	 * node
+	 */
+	protected TextRange getAttributeTextRange(String attributeName) {
+		IDOMNode attributeNode = this.getAttributeNode(attributeName);
+		return (attributeNode != null) ? buildTextRange(attributeNode) : this.getValidationTextRange();
+	}
+	
+	protected IDOMNode getAttributeNode(String attributeName) {
+		return (this.node == null) ? // virtual objects have no node
+			null : (IDOMNode) this.node.getAttributes().getNamedItem(attributeName);
+	}
+	
+	/**
+	 * Return a text range for the specified element node.
+	 * If the element node does not exist, return a text range for this object's
+	 * node
+	 */
+	protected TextRange getElementTextRange(String elementName) {
+		IDOMNode elementNode = this.getElementNode(elementName);
+		return (elementNode != null) ? buildTextRange(elementNode) : this.getValidationTextRange();
+	}
+	
+	/**
+	 * Returns the first element node with the given name, if one exists
+	 */
+	protected IDOMNode getElementNode(String elementName) {
+		if (this.node == null) return null; // virtual objects have no node
+		NodeList children = this.node.getChildNodes();
+		for (int i = 0; i < children.getLength(); i ++) {
+			IDOMNode child = (IDOMNode) children.item(i);
+			if ((child.getNodeType() == Node.ELEMENT_NODE)
+					&& elementName.equals(child.getNodeName())) {
+				return child;
+			}
+		}
+		return null;
+	}
+	
+	public TextRange getValidationTextRange() {
+		return this.getFullTextRange();
+	}
+	
+	public TextRange getSelectionTextRange() {
+		return this.getFullTextRange();
+	}
+	
+	protected TextRange getFullTextRange() {
+		return buildTextRange(this.node);
+	}
+	
+	protected static TextRange buildTextRange(IDOMNode domNode) {
+		return (domNode == null) ? null : new DOMNodeTextRange(domNode);
+	}
+	
+	public boolean containsOffset(int textOffset) {
+		return (this.node == null) ? false : this.node.contains(textOffset);
+	}
+
+
+	// ********** custom adapter list **********
+
+	protected static class XmlEAdapterList<E extends Object & Adapter>
+		extends EAdapterList<E>
+	{
+		public XmlEAdapterList(AbstractJpaEObject jpaEObject) {
+			super(jpaEObject);
+		}
+
+		@Override
+		protected void didAdd(int index, E newObject) {
+			super.didAdd(index, newObject);
+			if (newObject instanceof EMF2DOMAdapter) {
+				Object n = ((EMF2DOMAdapter) newObject).getNode();
+				if (n instanceof IDOMNode) {
+					((AbstractJpaEObject) this.notifier).node = (IDOMNode) n;
+				}
+			}
+		}
+
+		@Override
+		protected void didRemove(int index, E oldObject) {
+			if ((oldObject instanceof EMF2DOMAdapter) &&
+					(((EMF2DOMAdapter) oldObject).getNode() == ((AbstractJpaEObject) this.notifier).node)) {
+				((AbstractJpaEObject) this.notifier).node = null;
+			}
+			super.didRemove(index, oldObject);
+		}
+	}
+
+
+	// ********** DOM node text range **********
+
+	/**
+	 * Adapt an IDOMNode to the TextRange interface.
+	 */
+	protected static class DOMNodeTextRange
+		extends AbstractTextRange
+	{
+		private final IDOMNode node;
+
+		DOMNodeTextRange(IDOMNode node) {
+			super();
+			this.node = node;
+		}
+
+		public int getOffset() {
+			return this.node.getStartOffset();
+		}
+
+		public int getLength() {
+			if (this.node.getNodeType() == Node.ELEMENT_NODE) {
+				return ((IDOMElement) this.node).getStartEndOffset() - this.node.getStartOffset();
+			}
+			return this.node.getLength();
+		}
+
+		public int getLineNumber() {
+			return this.node.getStructuredDocument().getLineOfOffset(this.getOffset()) + 1;
+		}
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/AbstractJpaRootEObject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/AbstractJpaRootEObject.java
new file mode 100644
index 0000000..977e4f3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/AbstractJpaRootEObject.java
@@ -0,0 +1,336 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.xml;
+
+import java.util.Iterator;
+import java.util.Map;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.jpt.core.internal.utility.translators.EnumeratedValueTranslator;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.iterators.TransformationIterator;
+import org.eclipse.wst.common.internal.emf.resource.ConstantAttributeTranslator;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Jpa Root EObject</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getAbstractJpaRootEObject()
+ * @model kind="class" abstract="true"
+ * @generated
+ */
+public abstract class AbstractJpaRootEObject extends AbstractJpaEObject implements JpaRootEObject
+{
+	/**
+	 * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getVersion()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String VERSION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getVersion()
+	 * @generated
+	 * @ordered
+	 */
+	protected String version = VERSION_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getSchemaLocation() <em>Schema Location</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchemaLocation()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String SCHEMA_LOCATION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getSchemaLocation() <em>Schema Location</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getSchemaLocation()
+	 * @generated
+	 * @ordered
+	 */
+	protected String schemaLocation = SCHEMA_LOCATION_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AbstractJpaRootEObject()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass()
+	{
+		return CommonPackage.Literals.ABSTRACT_JPA_ROOT_EOBJECT;
+	}
+
+	/**
+	 * Returns the value of the '<em><b>Version</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Version</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Version</em>' attribute.
+	 * @see #setVersion(String)
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject_Version()
+	 * @model required="true"
+	 * @generated
+	 */
+	public String getVersion()
+	{
+		return version;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject#getVersion <em>Version</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Version</em>' attribute.
+	 * @see #getVersion()
+	 * @generated
+	 */
+	protected void setVersionGen(String newVersion)
+	{
+		String oldVersion = version;
+		version = newVersion;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION, oldVersion, version));
+	}
+	
+	public void setVersion(String newVersion) {
+		setVersionGen(newVersion);
+		setSchemaLocation(buildSchemaLocationString(getNamespace(), getSchemaLocationForVersion(newVersion)));
+	}
+	
+	/**
+	 * Returns the value of the '<em><b>Schema Location</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema Location</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema Location</em>' attribute.
+	 * @see #setSchemaLocation(String)
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject_SchemaLocation()
+	 * @model required="true"
+	 * @generated
+	 */
+	public String getSchemaLocation()
+	{
+		return schemaLocation;
+	}
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject#getSchemaLocation <em>Schema Location</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema Location</em>' attribute.
+	 * @see #getSchemaLocation()
+	 * @generated
+	 */
+	public void setSchemaLocation(String newSchemaLocation)
+	{
+		String oldSchemaLocation = schemaLocation;
+		schemaLocation = newSchemaLocation;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION, oldSchemaLocation, schemaLocation));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType)
+	{
+		switch (featureID)
+		{
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
+				return getVersion();
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
+				return getSchemaLocation();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue)
+	{
+		switch (featureID)
+		{
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
+				setVersion((String)newValue);
+				return;
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
+				setSchemaLocation((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID)
+	{
+		switch (featureID)
+		{
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
+				setVersion(VERSION_EDEFAULT);
+				return;
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
+				setSchemaLocation(SCHEMA_LOCATION_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID)
+	{
+		switch (featureID)
+		{
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__VERSION:
+				return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
+			case CommonPackage.ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION:
+				return SCHEMA_LOCATION_EDEFAULT == null ? schemaLocation != null : !SCHEMA_LOCATION_EDEFAULT.equals(schemaLocation);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString()
+	{
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (version: ");
+		result.append(version);
+		result.append(", schemaLocation: ");
+		result.append(schemaLocation);
+		result.append(')');
+		return result.toString();
+	}
+	
+	
+	// **************** validation ********************************************
+	
+	public TextRange getVersionTextRange() {
+		return getAttributeTextRange(XML.VERSION);
+	}
+	
+	
+	// **************** version -> schema location mapping ********************
+	
+	protected abstract String getNamespace();
+	
+	protected abstract String getSchemaLocationForVersion(String version);
+	
+	private static String buildSchemaLocationString(String namespace, String schemaLocation) {
+		return namespace + ' ' + schemaLocation;
+	}
+	
+	
+	// **************** translators *******************************************
+	
+	protected static Translator buildVersionTranslator(final Map<String, String> versionsToSchemaLocations) {
+		return new EnumeratedValueTranslator(
+				XML.VERSION, 
+				CommonPackage.eINSTANCE.getJpaRootEObject_Version(),
+				Translator.DOM_ATTRIBUTE) {
+			
+			@Override
+			protected Iterator<String> enumeratedObjectValues() {
+				return versionsToSchemaLocations.keySet().iterator();
+			}
+		};
+	}
+	
+	protected static Translator buildNamespaceTranslator(String namespace) {
+		return new ConstantAttributeTranslator(XML.NAMESPACE, namespace);
+	}
+	
+	protected static Translator buildSchemaNamespaceTranslator() {
+		return new ConstantAttributeTranslator(XML.NAMESPACE_XSI, XML.XSI_NAMESPACE_URL);
+	}
+	
+	protected static Translator buildSchemaLocationTranslator(
+			final String namespace,
+			final Map<String, String> versionsToSchemaLocations) {
+		
+		return new EnumeratedValueTranslator(
+				XML.XSI_SCHEMA_LOCATION, 
+				CommonPackage.eINSTANCE.getJpaRootEObject_SchemaLocation(),
+				Translator.DOM_ATTRIBUTE) {
+			
+			@Override
+			protected Iterator<String> enumeratedObjectValues() {
+				return new TransformationIterator<String, String>(versionsToSchemaLocations.values().iterator()) {
+					@Override
+					protected String transform(String next) {
+						return buildSchemaLocationString(namespace, next);
+					}
+				};
+			}
+		};	
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/CommonFactory.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/CommonFactory.java
new file mode 100644
index 0000000..594bad9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/CommonFactory.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.xml;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ *
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.xml.CommonPackage
+ * @generated
+ */
+public class CommonFactory extends EFactoryImpl
+{
+	/**
+	 * The singleton instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final CommonFactory eINSTANCE = init();
+
+	/**
+	 * Creates the default factory implementation.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static CommonFactory init()
+	{
+		try
+		{
+			CommonFactory theCommonFactory = (CommonFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.common.xmi"); 
+			if (theCommonFactory != null)
+			{
+				return theCommonFactory;
+			}
+		}
+		catch (Exception exception)
+		{
+			EcorePlugin.INSTANCE.log(exception);
+		}
+		return new CommonFactory();
+	}
+
+	/**
+	 * Creates an instance of the factory.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CommonFactory()
+	{
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public EObject create(EClass eClass)
+	{
+		switch (eClass.getClassifierID())
+		{
+			default:
+				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+		}
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CommonPackage getCommonPackage()
+	{
+		return (CommonPackage)getEPackage();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @deprecated
+	 * @generated
+	 */
+	@Deprecated
+	public static CommonPackage getPackage()
+	{
+		return CommonPackage.eINSTANCE;
+	}
+
+} //CommonFactory
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/CommonPackage.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/CommonPackage.java
new file mode 100644
index 0000000..da7c40b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/CommonPackage.java
@@ -0,0 +1,436 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.xml;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.jpt.core.resource.orm.OrmPackage;
+import org.eclipse.jpt.core.resource.orm.v2_0.OrmV2_0Package;
+import org.eclipse.jpt.core.resource.persistence.PersistencePackage;
+import org.eclipse.jpt.core.resource.persistence.v2_0.PersistenceV2_0Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ *   <li>each class,</li>
+ *   <li>each feature of each class,</li>
+ *   <li>each enum,</li>
+ *   <li>and each data type</li>
+ * </ul>
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.jpt.core.resource.xml.CommonFactory
+ * @model kind="package"
+ * @generated
+ */
+public class CommonPackage extends EPackageImpl
+{
+	/**
+	 * The package name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNAME = "xml";
+
+	/**
+	 * The package namespace URI.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_URI = "jpt.common.xmi";
+
+	/**
+	 * The package namespace name.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String eNS_PREFIX = "org.eclipse.jpt.core.resource.xml";
+
+	/**
+	 * The singleton instance of the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final CommonPackage eINSTANCE = org.eclipse.jpt.core.resource.xml.CommonPackage.init();
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject <em>Jpa Root EObject</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.xml.JpaRootEObject
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject()
+	 * @generated
+	 */
+	public static final int JPA_ROOT_EOBJECT = 1;
+
+	/**
+	 * The feature id for the '<em><b>Version</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int JPA_ROOT_EOBJECT__VERSION = 0;
+
+	/**
+	 * The feature id for the '<em><b>Schema Location</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int JPA_ROOT_EOBJECT__SCHEMA_LOCATION = 1;
+
+	/**
+	 * The number of structural features of the '<em>Jpa Root EObject</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int JPA_ROOT_EOBJECT_FEATURE_COUNT = 2;
+
+	/**
+	 * The meta object id for the '{@link org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject <em>Abstract Jpa Root EObject</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getAbstractJpaRootEObject()
+	 * @generated
+	 */
+	public static final int ABSTRACT_JPA_ROOT_EOBJECT = 0;
+
+	/**
+	 * The feature id for the '<em><b>Version</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_JPA_ROOT_EOBJECT__VERSION = JPA_ROOT_EOBJECT__VERSION;
+
+	/**
+	 * The feature id for the '<em><b>Schema Location</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_JPA_ROOT_EOBJECT__SCHEMA_LOCATION = JPA_ROOT_EOBJECT__SCHEMA_LOCATION;
+
+	/**
+	 * The number of structural features of the '<em>Abstract Jpa Root EObject</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	public static final int ABSTRACT_JPA_ROOT_EOBJECT_FEATURE_COUNT = JPA_ROOT_EOBJECT_FEATURE_COUNT + 0;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass abstractJpaRootEObjectEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass jpaRootEObjectEClass = null;
+
+	/**
+	 * Creates an instance of the model <b>Package</b>, registered with
+	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+	 * package URI value.
+	 * <p>Note: the correct way to create the package is via the static
+	 * factory method {@link #init init()}, which also performs
+	 * initialization of the package, or returns the registered package,
+	 * if one already exists.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.eclipse.emf.ecore.EPackage.Registry
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#eNS_URI
+	 * @see #init()
+	 * @generated
+	 */
+	private CommonPackage()
+	{
+		super(eNS_URI, CommonFactory.eINSTANCE);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private static boolean isInited = false;
+
+	/**
+	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+	 * 
+	 * <p>This method is used to initialize {@link CommonPackage#eINSTANCE} when that field is accessed.
+	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #eNS_URI
+	 * @see #createPackageContents()
+	 * @see #initializePackageContents()
+	 * @generated
+	 */
+	public static CommonPackage init()
+	{
+		if (isInited) return (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI);
+
+		// Obtain or create and register package
+		CommonPackage theCommonPackage = (CommonPackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CommonPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CommonPackage());
+
+		isInited = true;
+
+		// Initialize simple dependencies
+		EcorePackage.eINSTANCE.eClass();
+
+		// Obtain or create and register interdependencies
+		OrmPackage theOrmPackage = (OrmPackage)(EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) instanceof OrmPackage ? EPackage.Registry.INSTANCE.getEPackage(OrmPackage.eNS_URI) : OrmPackage.eINSTANCE);
+		OrmV2_0Package theOrmV2_0Package = (OrmV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) instanceof OrmV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(OrmV2_0Package.eNS_URI) : OrmV2_0Package.eINSTANCE);
+		PersistencePackage thePersistencePackage = (PersistencePackage)(EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) instanceof PersistencePackage ? EPackage.Registry.INSTANCE.getEPackage(PersistencePackage.eNS_URI) : PersistencePackage.eINSTANCE);
+		PersistenceV2_0Package thePersistenceV2_0Package = (PersistenceV2_0Package)(EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) instanceof PersistenceV2_0Package ? EPackage.Registry.INSTANCE.getEPackage(PersistenceV2_0Package.eNS_URI) : PersistenceV2_0Package.eINSTANCE);
+
+		// Create package meta-data objects
+		theCommonPackage.createPackageContents();
+		theOrmPackage.createPackageContents();
+		theOrmV2_0Package.createPackageContents();
+		thePersistencePackage.createPackageContents();
+		thePersistenceV2_0Package.createPackageContents();
+
+		// Initialize created meta-data
+		theCommonPackage.initializePackageContents();
+		theOrmPackage.initializePackageContents();
+		theOrmV2_0Package.initializePackageContents();
+		thePersistencePackage.initializePackageContents();
+		thePersistenceV2_0Package.initializePackageContents();
+
+		// Mark meta-data to indicate it can't be changed
+		theCommonPackage.freeze();
+
+  
+		// Update the registry and return the package
+		EPackage.Registry.INSTANCE.put(CommonPackage.eNS_URI, theCommonPackage);
+		return theCommonPackage;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject <em>Abstract Jpa Root EObject</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Abstract Jpa Root EObject</em>'.
+	 * @see org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject
+	 * @generated
+	 */
+	public EClass getAbstractJpaRootEObject()
+	{
+		return abstractJpaRootEObjectEClass;
+	}
+
+
+	/**
+	 * Returns the meta object for class '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject <em>Jpa Root EObject</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Jpa Root EObject</em>'.
+	 * @see org.eclipse.jpt.core.resource.xml.JpaRootEObject
+	 * @generated
+	 */
+	public EClass getJpaRootEObject()
+	{
+		return jpaRootEObjectEClass;
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject#getVersion <em>Version</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Version</em>'.
+	 * @see org.eclipse.jpt.core.resource.xml.JpaRootEObject#getVersion()
+	 * @see #getJpaRootEObject()
+	 * @generated
+	 */
+	public EAttribute getJpaRootEObject_Version()
+	{
+		return (EAttribute)jpaRootEObjectEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject#getSchemaLocation <em>Schema Location</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Schema Location</em>'.
+	 * @see org.eclipse.jpt.core.resource.xml.JpaRootEObject#getSchemaLocation()
+	 * @see #getJpaRootEObject()
+	 * @generated
+	 */
+	public EAttribute getJpaRootEObject_SchemaLocation()
+	{
+		return (EAttribute)jpaRootEObjectEClass.getEStructuralFeatures().get(1);
+	}
+
+
+	/**
+	 * Returns the factory that creates the instances of the model.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the factory that creates the instances of the model.
+	 * @generated
+	 */
+	public CommonFactory getCommonFactory()
+	{
+		return (CommonFactory)getEFactoryInstance();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isCreated = false;
+
+	/**
+	 * Creates the meta-model objects for the package.  This method is
+	 * guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void createPackageContents()
+	{
+		if (isCreated) return;
+		isCreated = true;
+
+		// Create classes and their features
+		abstractJpaRootEObjectEClass = createEClass(ABSTRACT_JPA_ROOT_EOBJECT);
+
+		jpaRootEObjectEClass = createEClass(JPA_ROOT_EOBJECT);
+		createEAttribute(jpaRootEObjectEClass, JPA_ROOT_EOBJECT__VERSION);
+		createEAttribute(jpaRootEObjectEClass, JPA_ROOT_EOBJECT__SCHEMA_LOCATION);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private boolean isInitialized = false;
+
+	/**
+	 * Complete the initialization of the package and its meta-model.  This
+	 * method is guarded to have no affect on any invocation but its first.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void initializePackageContents()
+	{
+		if (isInitialized) return;
+		isInitialized = true;
+
+		// Initialize package
+		setName(eNAME);
+		setNsPrefix(eNS_PREFIX);
+		setNsURI(eNS_URI);
+
+		// Create type parameters
+
+		// Set bounds for type parameters
+
+		// Add supertypes to classes
+		abstractJpaRootEObjectEClass.getESuperTypes().add(this.getJpaRootEObject());
+
+		// Initialize classes and features; add operations and parameters
+		initEClass(abstractJpaRootEObjectEClass, AbstractJpaRootEObject.class, "AbstractJpaRootEObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+		initEClass(jpaRootEObjectEClass, JpaRootEObject.class, "JpaRootEObject", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getJpaRootEObject_Version(), ecorePackage.getEString(), "version", null, 1, 1, JpaRootEObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getJpaRootEObject_SchemaLocation(), ecorePackage.getEString(), "schemaLocation", null, 1, 1, JpaRootEObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		// Create resource
+		createResource(eNS_URI);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * Defines literals for the meta objects that represent
+	 * <ul>
+	 *   <li>each class,</li>
+	 *   <li>each feature of each class,</li>
+	 *   <li>each enum,</li>
+	 *   <li>and each data type</li>
+	 * </ul>
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public interface Literals
+	{
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject <em>Abstract Jpa Root EObject</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.xml.AbstractJpaRootEObject
+		 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getAbstractJpaRootEObject()
+		 * @generated
+		 */
+		public static final EClass ABSTRACT_JPA_ROOT_EOBJECT = eINSTANCE.getAbstractJpaRootEObject();
+
+		/**
+		 * The meta object literal for the '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject <em>Jpa Root EObject</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.eclipse.jpt.core.resource.xml.JpaRootEObject
+		 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject()
+		 * @generated
+		 */
+		public static final EClass JPA_ROOT_EOBJECT = eINSTANCE.getJpaRootEObject();
+
+		/**
+		 * The meta object literal for the '<em><b>Version</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute JPA_ROOT_EOBJECT__VERSION = eINSTANCE.getJpaRootEObject_Version();
+
+		/**
+		 * The meta object literal for the '<em><b>Schema Location</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		public static final EAttribute JPA_ROOT_EOBJECT__SCHEMA_LOCATION = eINSTANCE.getJpaRootEObject_SchemaLocation();
+
+	}
+
+} //CommonPackage
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/EmfTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/EmfTools.java
new file mode 100644
index 0000000..95e53ec
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/EmfTools.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.xml;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.3
+ */
+public class EmfTools
+{
+	public static <T extends EObject> T create(
+			EFactory eFactory, EClass eClass, Class<T> javaClass) {
+		
+		EPackage ePackage = eFactory.getEPackage();
+		for (EClassifier each : ePackage.getEClassifiers()) {
+			if (each instanceof EClass) {
+				EClass eachEClass = (EClass) each;
+				if (eClass.isSuperTypeOf(eachEClass)) {
+					return (T) eFactory.create(eachEClass);
+				}
+			}
+		}
+		throw new IllegalArgumentException(
+			"Factory does not support objects of type \'" + eClass.getName() + "\'"); //$NON-NLS-1$
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaEObject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaEObject.java
new file mode 100644
index 0000000..32e702b
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaEObject.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jpt.core.resource.xml;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Common Dali behavior for EMF objects.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public interface JpaEObject
+	extends EObject
+{
+	/**
+	 * Return whether all the object's EMF features are "unset".
+	 */
+	boolean isUnset();
+	
+	/**
+	 * Return true if this object's text representation contains the text offset
+	 */
+	boolean containsOffset(int textOffset);
+
+	/**
+	 * Return the text range to be used for validation.  This is the source
+	 * range that will be highlighted for a validation error.
+	 */
+	TextRange getValidationTextRange();
+
+	/**
+	 * Return the text range to be used for selection.  This is the source
+	 * range that will be highlighted when selecting in the structure view.
+	 */
+	TextRange getSelectionTextRange();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaRootEObject.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaRootEObject.java
new file mode 100644
index 0000000..c3e27b1
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaRootEObject.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010  Oracle. 
+ *  All rights reserved.  This program and the accompanying materials are 
+ *  made available under the terms of the Eclipse Public License v1.0 which 
+ *  accompanies this distribution, and is available at 
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *  
+ *  Contributors: 
+ *  	Oracle - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jpt.core.resource.xml;
+
+import org.eclipse.jpt.core.utility.TextRange;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Jpa Root EObject</b></em>'.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject#getVersion <em>Version</em>}</li>
+ *   <li>{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject#getSchemaLocation <em>Schema Location</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject()
+ * @model kind="class" interface="true" abstract="true"
+ * @extends JpaEObject
+ * @generated
+ */
+public interface JpaRootEObject extends JpaEObject
+{
+	/**
+	 * Returns the value of the '<em><b>Version</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Version</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Version</em>' attribute.
+	 * @see #setVersion(String)
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject_Version()
+	 * @model required="true"
+	 * @generated
+	 */
+	String getVersion();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject#getVersion <em>Version</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Version</em>' attribute.
+	 * @see #getVersion()
+	 * @generated
+	 */
+	void setVersion(String value);
+
+	/**
+	 * Returns the value of the '<em><b>Schema Location</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Schema Location</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Schema Location</em>' attribute.
+	 * @see #setSchemaLocation(String)
+	 * @see org.eclipse.jpt.core.resource.xml.CommonPackage#getJpaRootEObject_SchemaLocation()
+	 * @model required="true"
+	 * @generated
+	 */
+	String getSchemaLocation();
+
+	/**
+	 * Sets the value of the '{@link org.eclipse.jpt.core.resource.xml.JpaRootEObject#getSchemaLocation <em>Schema Location</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Schema Location</em>' attribute.
+	 * @see #getSchemaLocation()
+	 * @generated
+	 */
+	void setSchemaLocation(String value);
+	
+	TextRange getVersionTextRange();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaXmlResource.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaXmlResource.java
new file mode 100644
index 0000000..b17102f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/JpaXmlResource.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.xml;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
+import org.eclipse.jem.util.plugin.JEMUtilPlugin;
+import org.eclipse.jpt.core.JpaResourceModel;
+import org.eclipse.jpt.core.JpaResourceModelListener;
+import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.utility.internal.ListenerList;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver;
+import org.eclipse.wst.common.internal.emf.resource.Renderer;
+import org.eclipse.wst.common.internal.emf.resource.Translator;
+import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl;
+import org.xml.sax.EntityResolver;
+
+/**
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+public class JpaXmlResource
+	extends TranslatorResourceImpl
+	implements JpaResourceModel
+{
+	/**
+	 * cache the content type - if the content type changes, the JPA project
+	 * will throw out the JPA file holding the xml resource and build a new one
+	 */
+	protected final IContentType contentType;
+	
+	protected final Translator rootTranslator;
+	
+	protected final ListenerList<JpaResourceModelListener> resourceModelListenerList =
+			new ListenerList<JpaResourceModelListener>(JpaResourceModelListener.class);
+	
+	
+	public JpaXmlResource(URI uri, Renderer renderer, IContentType contentType, Translator rootTranslator) {
+		super(uri, renderer);
+		this.contentType = contentType;
+		this.rootTranslator = rootTranslator;
+	}
+	
+	public IContentType getContentType() {
+		return this.contentType;
+	}
+	
+	public String getVersion() {
+		JpaRootEObject root = this.getRootObject();
+		return (root == null) ? null : root.getVersion();
+	}
+
+	
+	// ********** BasicNotifierImpl override **********
+	
+	/**
+	 * Override to fire notification only when:<ul>
+	 * <li>the resource's state has actually changed; and
+	 * <li>the resource is loaded; and
+	 * <li>the resource's resource set is still present (EMF will fire an
+	 *    notification when the resource set is set to 'null', just before
+	 *    the resource is "unloaded" - we want to swallow this notification)
+	 * </ul>
+	 */
+	@Override
+	public void eNotify(Notification notification) {
+		// unload events can happen before the resource set is removed - should always react to unload events
+		if (this.loadedFlagCleared(notification)) {
+			super.eNotify(notification);
+			if (this.isReverting()) {
+				this.resourceModelReverted();
+			} else {
+				this.resourceModelUnloaded();
+			}
+		}
+		else if ( ! notification.isTouch() && this.isLoaded() && (this.resourceSet != null)) {
+			super.eNotify(notification);
+			this.resourceModelChanged();
+		}
+	}
+	
+	/**
+	 * Return whether the specified notification indicates the resource has been
+	 * unloaded.
+	 * we could use this method to suppress some notifications; or we could just
+	 * check whether 'resourceSet' is 'null' (which is what we do)
+	 */
+	protected boolean loadedFlagCleared(Notification notification) {
+		return (notification.getNotifier() == this) &&
+				(notification.getEventType() == Notification.SET) &&
+				(notification.getFeatureID(Resource.class) == RESOURCE__IS_LOADED) &&
+				( ! notification.getNewBooleanValue());
+	}
+	
+	/**
+	 * Return whether the specified notification indicates the resource's
+	 * resource set was cleared.
+	 * We could use this method to suppress some resource set notifications;
+	 * or we could just check whether <code>resourceSet</code> is
+	 * <code>null</code> (which is what we do)/
+	 */
+	protected boolean resultSetCleared(Notification notification) {
+		return (notification.getNotifier() == this) &&
+				(notification.getEventType() == Notification.SET) &&
+				(notification.getFeatureID(Resource.class) == RESOURCE__RESOURCE_SET) &&
+				(notification.getNewValue() == null);
+	}
+	
+	
+	// ********** TranslatorResource implementation **********
+	
+	/**
+	 * only applicable for DTD-based files
+	 */
+	public String getDoctype() {
+		return null;
+	}
+	
+	public Translator getRootTranslator() {
+		return this.rootTranslator;
+	}
+	
+	
+	// ********** TranslatorResourceImpl implementation **********
+	
+	/**
+	 * only applicable for DTD-based files
+	 */
+	@Override
+	protected String getDefaultPublicId() {
+		return null;
+	}
+	
+	/**
+	 * only applicable for DTD-based files
+	 */
+	@Override
+	protected String getDefaultSystemId() {
+		return null;
+	}
+	
+	/**
+	 * this seems to be the default version of the spec for this doc
+	 * and the id 10 maps to the version 1.0
+	 */
+	@Override
+	protected int getDefaultVersionID() {
+		return 10;
+	}
+	
+	@Override
+	public JpaRootEObject getRootObject() {
+		EObject root = super.getRootObject();
+		try {
+			return (JpaRootEObject) root;
+		} catch (ClassCastException ex) {
+			throw new IllegalStateException("The root object of a JPA XML resource must implement JpaRootEObject: " + root, ex); //$NON-NLS-1$
+		}
+	}
+	
+	//296544 - override this to avoid internet access finding the schema during tests
+	@Override
+	public EntityResolver getEntityResolver() {
+		return J2EEXmlDtDEntityResolver.INSTANCE;
+	}
+	
+	
+	// ********** convenience methods **********
+	
+	public boolean fileExists() {
+		return this.getFile().exists();
+	}
+	
+	public IFile getFile() {
+		IFile file = this.getFile(this.uri);
+		return (file != null) ? file : this.getConvertedURIFile();
+	}
+	
+	protected IFile getConvertedURIFile() {
+		if (this.resourceSet == null) {
+			return null;
+		}
+		URI convertedURI = this.resourceSet.getURIConverter().normalize(this.uri);
+		return this.uri.equals(convertedURI) ? null : this.getFile(convertedURI);
+	}
+	
+	/**
+	 * Return the Eclipse file for the specified URI.
+	 * This URI is assumed to be absolute in the following format:
+	 *     platform:/resource/....
+	 */
+	protected IFile getFile(URI fileURI) {
+		if ( ! WorkbenchResourceHelperBase.isPlatformResourceURI(fileURI)) {
+			return null;
+		}
+		String fileName = URI.decode(fileURI.path()).substring(JEMUtilPlugin.PLATFORM_RESOURCE.length() + 1);
+		return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileName));
+	}
+	
+	public IProject getProject() {
+		return this.getFile().getProject();
+	}
+	
+	public void modify(Runnable runnable) {
+		try {
+			runnable.run();
+			try {
+				save(Collections.EMPTY_MAP);
+			} catch (IOException ex) {
+				JptCorePlugin.log(ex);
+			}
+		} catch (Exception ex) {
+			JptCorePlugin.log(ex);
+		}
+	}
+	
+	@Override
+	public String toString() {
+		// implementation in TranslatorResourceImpl is a bit off...
+		return StringTools.buildToStringFor(this, this.getURI());
+	}
+	
+	
+	// ********** JpaResourceModel implementation **********
+	
+	public JpaResourceType getResourceType() {
+		if (this.contentType == null) {
+			return null;
+		}
+		String version = this.getVersion();
+		return (version == null) ? null : new JpaResourceType(this.contentType, version);
+	}
+	
+	public void addResourceModelListener(JpaResourceModelListener listener) {
+		this.resourceModelListenerList.add(listener);
+	}
+	
+	public void removeResourceModelListener(JpaResourceModelListener listener) {
+		this.resourceModelListenerList.remove(listener);
+	}
+
+
+	// ********** listener notifications **********
+
+	protected void resourceModelChanged() {
+		for (JpaResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
+			listener.resourceModelChanged(this);
+		}
+	}
+
+	protected void resourceModelReverted() {
+		for (JpaResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
+			listener.resourceModelReverted(this);
+		}
+	}
+
+	protected void resourceModelUnloaded() {
+		for (JpaResourceModelListener listener : this.resourceModelListenerList.getListeners()) {
+			listener.resourceModelUnloaded(this);
+		}
+	}
+
+
+	// ********** cast things back to what they are in EMF **********
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public EList<Adapter> eAdapters() {
+		return super.eAdapters();
+	}
+	
+	@SuppressWarnings("unchecked")
+	@Override
+	public EList<EObject> getContents() {
+		return super.getContents();
+	}
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/XML.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/XML.java
new file mode 100644
index 0000000..99d75e5
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/xml/XML.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.xml;
+
+/**
+ * XML-related stuff.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.3
+ * @since 2.2
+ */
+@SuppressWarnings("nls")
+public interface XML
+{
+	String VERSION = "version";
+	
+	String NAMESPACE = "xmlns";
+
+	String NAMESPACE_XSI = "xmlns:xsi";
+	String XSI_NAMESPACE_URL = "http://www.w3.org/2001/XMLSchema-instance";
+
+	String XSI_SCHEMA_LOCATION = "xsi:schemaLocation";
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/AbstractTextRange.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/AbstractTextRange.java
new file mode 100644
index 0000000..e57ce66
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/AbstractTextRange.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility;
+
+import org.eclipse.jpt.utility.internal.StringTools;
+
+/**
+ * Partial implementation of text range.
+ * 
+ * Provisional API: This class is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public abstract class AbstractTextRange
+	implements TextRange
+{
+
+	public boolean includes(int index) {
+		return (this.getOffset() <= index) && (index < this.end());
+	}
+
+	public boolean touches(int index) {
+		return this.includes(index) || (index == this.end());
+	}
+
+	/**
+	 * The end offset is "exclusive", i.e. the element at the end offset
+	 * is not included in the range.
+	 */
+	protected int end() {
+		return this.getOffset() + this.getLength();
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (o == this) {
+			return true;
+		}
+		if ( ! (o instanceof TextRange)) {
+			return false;
+		}
+		TextRange r = (TextRange) o;
+		return (r.getOffset() == this.getOffset())
+				&& (r.getLength() == this.getLength());
+	}
+
+	@Override
+	public int hashCode() {
+		return this.getOffset() ^ this.getLength();
+	}
+
+	@Override
+	public String toString() {
+		String start = String.valueOf(this.getOffset());
+		String end = String.valueOf(this.end());
+		return StringTools.buildToStringFor(this, start + ", " + end); //$NON-NLS-1$
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/BodySourceWriter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/BodySourceWriter.java
new file mode 100644
index 0000000..0be7b18
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/BodySourceWriter.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility;
+
+import java.io.Serializable;
+import java.io.StringWriter;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeSet;
+
+import org.eclipse.jpt.utility.Filter;
+import org.eclipse.jpt.utility.IndentingPrintWriter;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.jpt.utility.internal.Transformer;
+import org.eclipse.jpt.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.utility.internal.iterables.TransformationIterable;
+
+import com.ibm.icu.text.Collator;
+
+/**
+ * Extend {@link IndentingPrintWriter} with some methods that facilitate
+ * building class source code.
+ */
+@SuppressWarnings("nls")
+public class BodySourceWriter
+	extends IndentingPrintWriter
+{
+	protected final String packageName;
+	protected final String className;
+	// key = short class name; value = import package
+	protected final HashMap<String, ImportPackage> imports = new HashMap<String, ImportPackage>();
+
+	public BodySourceWriter(String packageName, String className) {
+		super(new StringWriter(2000));
+		this.packageName = packageName;
+		this.className = className;
+	}
+
+	public String getSource() {
+		return this.out.toString();
+	}
+
+	public int getLength() {
+		return ((StringWriter) this.out).getBuffer().length();
+	}
+
+	protected void printVisibility(String visibilityModifier) {
+		if (visibilityModifier.length() != 0) {
+			this.print(visibilityModifier);
+			this.print(' ');
+		}
+	}
+
+	public void printAnnotation(String annotationName) {
+		this.print('@');
+		this.printTypeDeclaration(annotationName);
+	}
+
+	public void printTypeDeclaration(String typeDeclaration) {
+		this.print(this.buildImportedTypeDeclaration(typeDeclaration));
+	}
+
+	protected void printField(String fieldName, String typeDeclaration, String visibility) {
+		this.printVisibility(visibility);
+		this.printTypeDeclaration(typeDeclaration);
+		this.print(' ');
+		this.print(fieldName);
+		this.print(';');
+		this.println();
+		this.println();
+	}
+
+	protected void printParameterizedField(String fieldName, String typeDeclaration, String parameterTypeDeclaration, String visibility) {
+		this.printVisibility(visibility);
+		this.printTypeDeclaration(typeDeclaration);
+		this.print('<');
+		this.printTypeDeclaration(parameterTypeDeclaration);
+		this.print('>');
+		this.print(' ');
+		this.print(fieldName);
+		this.print(';');
+		this.println();
+		this.println();
+	}
+
+	/**
+	 * Convert the specified string to a <em>String Literal</em> and print it,
+	 * adding the surrounding double-quotes and escaping characters
+	 * as necessary.
+	 */
+	public void printStringLiteral(String string) {
+		StringTools.convertToJavaStringLiteralOn(string, this);
+	}
+
+
+	// ********** imports **********
+
+	// ***** writing
+	/**
+	 * Return the specified class's "imported" name.
+	 * The class declaration must be of the form:
+	 *     "int"
+	 *     "int[]" (not "[I")
+	 *     "java.lang.Object"
+	 *     "java.lang.Object[]" (not "[Ljava.lang.Object;")
+	 *     "java.util.Map.Entry" (not "java.util.Map$Entry")
+	 *     "java.util.Map.Entry[][]" (not "[[Ljava.util.Map$Entry;")
+	 *     
+	 * To really do this right, we would need to gather all the types from
+	 * the "unamed" (default) package that were referenced in the
+	 * compilation unit beforehand. *Any* collisions with one of these
+	 * types would have to be fully qualified (whether it was from
+	 * 'java.lang' or the same package as the current compilation unit).
+	 * In other words, if we have any types from the "unnamed" package,
+	 * results are unpredictable....
+	 */
+	protected String buildImportedTypeDeclaration(String typeDeclaration) {
+		if (this.typeDeclarationIsMemberClass(typeDeclaration)) {
+			// no need for an import, just return the partially-qualified name
+			return this.buildMemberClassTypeDeclaration(typeDeclaration);
+		}
+		int last = typeDeclaration.lastIndexOf('.');
+		String currentPackageName = (last == -1) ? "" : typeDeclaration.substring(0, last);
+		String shortTypeDeclaration = typeDeclaration.substring(last + 1);
+		String shortElementTypeName = shortTypeDeclaration;
+		while (shortElementTypeName.endsWith("[]")) {
+			shortElementTypeName = shortElementTypeName.substring(0, shortElementTypeName.length() - 2);
+		}
+		ImportPackage prev = this.imports.get(shortElementTypeName);
+		if (prev == null) {
+			// this is the first class with this short element type name
+			this.imports.put(shortElementTypeName, new ImportPackage(currentPackageName));
+			return shortTypeDeclaration;
+		}
+		if (prev.packageName.equals(currentPackageName)) {
+			// this element type has already been imported
+			return shortTypeDeclaration;
+		}
+		if (currentPackageName.equals(this.packageName) &&
+				prev.packageName.equals("java.lang")) {
+			// we force the 'java.lang' class to be explicitly imported
+			prev.collision = true;
+		}
+		// another class with the same short element type name has been
+		// previously imported, so this one must be used fully-qualified
+		return typeDeclaration;
+	}
+
+	/**
+	 * e.g. "foo.bar.Employee.PK" will return true
+	 */
+	protected boolean typeDeclarationIsMemberClass(String typeDeclaration) {
+		return (typeDeclaration.length() > this.className.length())
+				&& typeDeclaration.startsWith(this.className)
+				&& (typeDeclaration.charAt(this.className.length()) == '.');
+	}
+
+	/**
+	 * e.g. "foo.bar.Employee.PK" will return "Employee.PK"
+	 * this prevents collisions with other imported classes (e.g. "joo.jar.PK")
+	 */
+	protected String buildMemberClassTypeDeclaration(String typeDeclaration) {
+		int index = this.packageName.length();
+		if (index != 0) {
+			index++;  // bump past the '.'
+		}
+		return typeDeclaration.substring(index);
+	}
+
+	// ***** reading
+	public Iterable<String> getImports() {
+		return this.getSortedRequiredImports();
+	}
+
+	/**
+	 * transform our map entries to class names
+	 */
+	protected Iterable<String> getSortedRequiredImports() {
+		return new TransformationIterable<Map.Entry<String, ImportPackage>, String>(this.getSortedRequiredImportEntries(), this.buildImportEntriesTransformer());
+	}
+
+	protected Transformer<Map.Entry<String, ImportPackage>, String> buildImportEntriesTransformer() {
+		return IMPORT_ENTRIES_TRANSFORMER;
+	}
+
+	protected static final Transformer<Map.Entry<String, ImportPackage>, String> IMPORT_ENTRIES_TRANSFORMER = new ImportEntriesTransformer();
+
+	protected static class ImportEntriesTransformer
+		implements Transformer<Map.Entry<String, ImportPackage>, String>
+	{
+		public String transform(Entry<String, ImportPackage> importEntry) {
+			String pkg = importEntry.getValue().packageName;
+			String type = importEntry.getKey();
+			StringBuilder sb = new StringBuilder(pkg.length() + 1 + type.length());
+			sb.append(pkg);
+			sb.append('.');
+			sb.append(type);
+			return sb.toString();
+		}
+	}
+
+	/**
+	 * sort by package first, then class (*not* by fully-qualified class name)
+	 */
+	protected Iterable<Map.Entry<String, ImportPackage>> getSortedRequiredImportEntries() {
+		TreeSet<Map.Entry<String, ImportPackage>> sortedEntries = new TreeSet<Map.Entry<String, ImportPackage>>(this.buildImportEntriesComparator());
+		CollectionTools.addAll(sortedEntries, this.getRequiredImportEntries());
+		return sortedEntries;
+	}
+
+	protected Comparator<Map.Entry<String, ImportPackage>> buildImportEntriesComparator() {
+		return IMPORT_ENTRIES_COMPARATOR;
+	}
+
+	protected static final Comparator<Map.Entry<String, ImportPackage>> IMPORT_ENTRIES_COMPARATOR = new ImportEntriesComparator();
+
+	protected static class ImportEntriesComparator
+		implements Comparator<Map.Entry<String, ImportPackage>>, Serializable
+	{
+		public int compare(Map.Entry<String, ImportPackage> e1, Map.Entry<String, ImportPackage> e2) {
+			Collator collator = Collator.getInstance();
+			int pkg = collator.compare(e1.getValue().packageName, e2.getValue().packageName);
+			return (pkg == 0) ? collator.compare(e1.getKey(), e2.getKey()) : pkg;
+		}
+	}
+
+	/**
+	 * strip off any non-required imports (e.g. "java.lang.Object')
+	 */
+	protected Iterable<Map.Entry<String, ImportPackage>> getRequiredImportEntries() {
+		return new FilteringIterable<Map.Entry<String, ImportPackage>>(this.imports.entrySet(), this.buildRequiredImportEntriesFilter());
+	}
+
+	protected Filter<Map.Entry<String, ImportPackage>> buildRequiredImportEntriesFilter() {
+		return new RequiredImportEntriesFilter();
+	}
+
+	protected class RequiredImportEntriesFilter
+		implements Filter<Map.Entry<String, ImportPackage>>
+	{
+		public boolean accept(Map.Entry<String, ImportPackage> importEntry) {
+			return this.packageMustBeImported(importEntry.getValue());
+		}
+
+		protected boolean packageMustBeImported(ImportPackage importPackage) {
+			String pkg = importPackage.packageName;
+			if (pkg.equals("")) {
+				// cannot import a type from the "unnamed" package
+				return false;
+			}
+			if (pkg.equals("java.lang")) {
+				// we must import from 'java.lang' if we also have a class in the same package
+				return importPackage.collision;
+			}
+			if (pkg.equals(BodySourceWriter.this.packageName)) {
+				// we never need to import a class from the same package
+				return false;
+			}
+			return true;
+		}
+	}
+
+	/**
+	 * We need a 'collision' flag for when we encounter a class from
+	 * 'java.lang' followed by a class from the current compilation unit's
+	 * package. We will need to include the explicit import of the
+	 * 'java.lang' class and all the references to the other class will
+	 * have to be fully-qualified.
+	 * 
+	 * If the classes are encountered in the opposite order (i.e. the class
+	 * from the current compilation unit's package followed by the class
+	 * from 'java.lang'), we do *not* need to import the first class while
+	 * all the references to the 'java.lang' class will be fully-qualified.
+	 * 
+	 * Unfortunately, we still have a problem: if we reference a class from
+	 * 'java.lang' and there is a conflicting class from the current
+	 * compilation unit's package (but that class is *not* revealed to us
+	 * here), the simple name will be resolved to the non-'java.lang' class.
+	 * Unless we simply force an import of *all* 'java.lang' classes.... :-(
+	 * 
+	 * This shouldn't happen very often. :-)
+	 */
+	protected static class ImportPackage {
+		protected final String packageName;
+		protected boolean collision = false;
+
+		protected ImportPackage(String packageName) {
+			super();
+			this.packageName = packageName;
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/TextRange.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/TextRange.java
new file mode 100644
index 0000000..28303ce
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/TextRange.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility;
+
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+
+/**
+ * A text range defines the offset into, length of, and line of a piece
+ * of text.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ * 
+ * @version 2.0
+ * @since 2.0
+ */
+public interface TextRange {
+
+	/**
+	 * Returns the offset of the text.
+	 *
+	 * @return the offset of the text
+	 */
+	int getOffset();
+	
+	/**
+	 * Return the length of the text.
+	 */
+	int getLength();
+
+	/**
+	 * Return whether the range includes the character at the specified index.
+	 */
+	boolean includes(int index);
+
+	/**
+	 * Return whether the range touches an insertion cursor at the
+	 * specified index.
+	 */
+	boolean touches(int index);
+
+	/**
+	 * Return the line number of the text.
+	 */
+	int getLineNumber();
+
+	/**
+	 * Return true if the offsets and lengths are the same.
+	 */
+	boolean equals(Object obj);
+
+	/**
+	 * Return a hash code that corresponds to the #equals() contract.
+	 */
+	int hashCode();
+
+
+	/**
+	 * Empty implementation of text range.
+	 */
+	final class Empty implements TextRange {
+		public static final TextRange INSTANCE = new Empty();
+		public static TextRange instance() {
+			return INSTANCE;
+		}
+		// ensure single instance
+		private Empty() {
+			super();
+		}
+		public int getLineNumber() {
+			return IMessage.LINENO_UNSET;
+		}
+		public int getOffset() {
+			return IMessage.OFFSET_UNSET;
+		}
+		public int getLength() {
+			return IMessage.OFFSET_UNSET;
+		}
+		public boolean includes(int index) {
+			return false;
+		}
+		public boolean touches(int index) {
+			return index == 0;  // ???
+		}
+		@Override
+		public boolean equals(Object o) {
+			if (o == this) {
+				return true;
+			}
+			if ( ! (o instanceof TextRange)) {
+				return false;
+			}
+			TextRange r = (TextRange) o;
+			return (r.getOffset() == 0)
+					&& (r.getLength() == 0);
+		}
+		@Override
+		public int hashCode() {
+			return 0;
+		}
+		@Override
+		public String toString() {
+			return "TextRange.Empty"; //$NON-NLS-1$
+		}
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationAdapter.java
new file mode 100644
index 0000000..b0920c3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationAdapter.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+/**
+ * Adapt a Java annotation with a simple-to-use interface.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface AnnotationAdapter {
+
+	/**
+	 * Given the specified compilation unit, return the value of the
+	 * adapter's annotation.
+	 * @see #getAnnotation()
+	 */
+	Annotation getAnnotation(CompilationUnit astRoot);
+
+	/**
+	 * Build a new marker annotation, replacing the original annotation if present.
+	 */
+	void newMarkerAnnotation();
+
+	/**
+	 * Build a new single member annotation, replacing the original annotation if present.
+	 */
+	void newSingleMemberAnnotation();
+
+	/**
+	 * Build a new normal annotation, replacing the original annotation if present.
+	 */
+	void newNormalAnnotation();
+
+	/**
+	 * Remove the annotation.
+	 */
+	void removeAnnotation();
+
+	/**
+	 * Return the AST node corresponding to the annotation.
+	 * If the annotation is missing, return the annotation's parent node.
+	 * @see #getAstNode()
+	 */
+	ASTNode getAstNode(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationEditFormatter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationEditFormatter.java
new file mode 100644
index 0000000..f8c98a3
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationEditFormatter.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface AnnotationEditFormatter {
+
+	/**
+	 * Review the specified edits and format the specified document as needed.
+	 */
+	void format(IDocument doc, TextEdit editTree) throws MalformedTreeException, BadLocationException;
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationElementAdapter.java
new file mode 100644
index 0000000..2a5d589
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotationElementAdapter.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+
+/**
+ * Adapt a Java annotation element with a simple-to-use interface.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface AnnotationElementAdapter<T> {
+
+	/**
+	 * Return the value of the adapter's annotation element.
+	 * Return null if the element is not present.
+	 * If the compilation unit is available, #value(CompilationUnit)
+	 * might be more performant.
+	 * @see #getValue(org.eclipse.jdt.core.dom.CompilationUnit)
+	 */
+	T getValue();
+
+	/**
+	 * Given the specified compilation unit, return the value of the
+	 * adapter's annotation element.
+	 * Return null if the element is not present.
+	 * @see #getValue()
+	 */
+	T getValue(CompilationUnit astRoot);
+
+	/**
+	 * Set the value of the adapter's annotation element.
+	 * Setting the value of the element to null will cause
+	 * the element to be removed from its annotation.
+	 */
+	void setValue(T value);
+
+	/**
+	 * Given the specified compilation unit, return the expression value of the
+	 * adapter's annotation element.
+	 * Return null if the element is not present.
+	 * @see #getExpression()
+	 */
+	Expression getExpression(CompilationUnit astRoot);
+
+	/**
+	 * Return the AST node corresponding to the element.
+	 * If the element is missing, return the annotation's node.
+	 * @see #getAstNode()
+	 */
+	ASTNode getAstNode(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Attribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Attribute.java
new file mode 100644
index 0000000..3842638
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Attribute.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+
+/**
+ * Attributes are either represented by fields ('foo') or properties/method
+ * pairs ('getFoo()'/'setFoo()').
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface Attribute extends Member {
+
+	/**
+	 * Return the attribute's name, as opposed to the member's name
+	 * (e.g. "getFoo()" returns "foo").
+	 */
+	// TODO rename to getName()?
+	String getAttributeName();
+
+	/**
+	 * Return the type binding for the attribute's declared type,
+	 * as opposed to its declaring type.
+	 */
+	ITypeBinding getTypeBinding(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the attribute is a field.
+	 */
+	boolean isField();
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/DeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/DeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..290d389
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/DeclarationAnnotationAdapter.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+
+/**
+ * Provide clients with a pluggable way to manipulate an
+ * annotation modifying a "declaration".
+ * 
+ * TODO specify how multiple annotations with the same name are to be handled
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface DeclarationAnnotationAdapter {
+
+	/**
+	 * Given the specified declaration, return the annotation.
+	 */
+	Annotation getAnnotation(ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, modify it with
+	 * a new marker annotation, replacing the original annotation if present.
+	 * Return the new annotation.
+	 */
+	MarkerAnnotation newMarkerAnnotation(ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, modify it with
+	 * a new single member annotation, replacing the original annotation if present.
+	 * Return the new annotation.
+	 */
+	SingleMemberAnnotation newSingleMemberAnnotation(ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, modify it with
+	 * a new normal annotation, replacing the original annotation if present.
+	 * Return the new annotation.
+	 */
+	NormalAnnotation newNormalAnnotation(ModifiedDeclaration declaration);
+
+	/**
+	 * Remove the annotation from the specified declaration.
+	 */
+	void removeAnnotation(ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, return the AST node
+	 * corresponding to the annotation.
+	 * If the annotation is missing, return its parent node.
+	 */
+	ASTNode getAstNode(ModifiedDeclaration declaration);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/DeclarationAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/DeclarationAnnotationElementAdapter.java
new file mode 100644
index 0000000..70f1a79
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/DeclarationAnnotationElementAdapter.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Expression;
+
+/**
+ * Provide clients with a pluggable way to manipulate an
+ * annotation element modifying a "declaration".
+ * T is the type of the object to be passed to and returned by the adapter.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface DeclarationAnnotationElementAdapter<T> {
+
+	/**
+	 * Reduce the number of NLS warnings.
+	 */
+	String VALUE = "value"; //$NON-NLS-1$
+
+	/**
+	 * Given the specified declaration, return the value of the
+	 * annotation element. Return null or an empty array
+	 * if the element is not present.
+	 */
+	T getValue(ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, set the value of the
+	 * annotation element. Setting the value of the element
+	 * to null will cause the element to be removed from its
+	 * annotation.
+	 */
+	void setValue(T value, ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, return the element's value expression.
+	 * Return null if the element is not present.
+	 */
+	Expression getExpression(ModifiedDeclaration declaration);
+
+	/**
+	 * Given the specified declaration, return the AST node
+	 * corresponding to the element's value.
+	 * If the element is missing, return the annotation's node.
+	 */
+	ASTNode getAstNode(ModifiedDeclaration declaration);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/ExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/ExpressionConverter.java
new file mode 100644
index 0000000..d21d0c7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/ExpressionConverter.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.Expression;
+
+/**
+ * Define the protocol for converting an AST expression back and forth
+ * from an arbitrary type (e.g. StringLiteral <=> String).
+ * T is the type of the object to be converted to and from an expression.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface ExpressionConverter<T> {
+
+	/**
+	 * Convert the specified object to an
+	 * expression that is owned by the specified AST.
+	 * The type of the object is determined by the
+	 * contract specified by the client.
+	 */
+	Expression convert(T object, AST ast);
+
+	/**
+	 * Convert the specified expression to an object of some
+	 * pre-determined type.
+	 */
+	T convert(Expression expression);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/FieldAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/FieldAttribute.java
new file mode 100644
index 0000000..4046cf9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/FieldAttribute.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.IVariableBinding;
+
+/**
+ * Field attribute: just some covariant overrides.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface FieldAttribute extends Attribute {
+
+	/**
+	 * Covariant override.
+	 */
+	IVariableBinding getBinding(CompilationUnit astRoot);
+
+	/**
+	 * Covariant override.
+	 */
+	FieldDeclaration getBodyDeclaration(CompilationUnit astRoot);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/IndexedAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/IndexedAnnotationAdapter.java
new file mode 100644
index 0000000..ba2209e
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/IndexedAnnotationAdapter.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+
+/**
+ * Adapt an indexed Java annotation with a simple-to-use interface.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface IndexedAnnotationAdapter extends AnnotationAdapter {
+
+	/**
+	 * Return the the index at which the annotation is situated.
+	 */
+	int getIndex();
+
+	/**
+	 * Move the annotation to the specified index, leaving its original
+	 * position cleared out.
+	 */
+	void moveAnnotation(int newIndex);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/IndexedDeclarationAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/IndexedDeclarationAnnotationAdapter.java
new file mode 100644
index 0000000..1336363
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/IndexedDeclarationAnnotationAdapter.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+
+/**
+ * Allow clients to manipulate an annotation within an array of annotations.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface IndexedDeclarationAnnotationAdapter extends DeclarationAnnotationAdapter {
+
+	/**
+	 * Return the the index at which the annotation is situated.
+	 */
+	int getIndex();
+
+	/**
+	 * Move the annotation to the specified index, leaving its original
+	 * position cleared out.
+	 */
+	void moveAnnotation(int newIndex, ModifiedDeclaration declaration);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java
new file mode 100644
index 0000000..d36bbf6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.BodyDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Dali manipulates annotations on members (types, fields, and methods).
+ * This interface simplifies those manipulations.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface Member {
+
+	/**
+	 * Return the member's body declaration from the specified AST.
+	 * This can be null if the member is no longer present in the AST
+	 * because the source has been changed in another thread.
+	 */
+	BodyDeclaration getBodyDeclaration(CompilationUnit astRoot);
+
+	/**
+	 * Return the member's binding from the specified AST.
+	 */
+	IBinding getBinding(CompilationUnit astRoot);
+
+	/**
+	 * Return the member's "modified" declaration from the specified AST.
+	 */
+	ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot);
+
+	/**
+	 * Return the member's "modified" declaration from a newly-generated AST.
+	 */
+	ModifiedDeclaration getModifiedDeclaration();
+
+	/**
+	 * Return whether the attribute is a persistable field or property getter.
+	 */
+	boolean isPersistable(CompilationUnit astRoot);
+
+	/**
+	 * Return whether the member matches the specified member
+	 * and occurrence.
+	 */
+	boolean matches(String memberName, int occurrence);
+
+	/**
+	 * Return the member's name text range from the specified AST.
+	 */
+	TextRange getNameTextRange(CompilationUnit astRoot);
+
+	/**
+	 * Edit the member's declaration using the specified editor.
+	 */
+	void edit(Editor editor);
+
+
+	// ********** "editor" interface **********
+
+	/**
+	 * This interface defines a callback that is invoked when the member's
+	 * compilation unit/AST is in a state to be manipulated.
+	 */
+	public interface Editor {
+
+		/**
+		 * Edit the specified declaration. Any changes made to the declaration
+		 * will be captured and applied to the member's compilation unit.
+		 */
+		void edit(ModifiedDeclaration declaration);
+
+	}
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/MethodAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/MethodAttribute.java
new file mode 100644
index 0000000..4637ab7
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/MethodAttribute.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jpt.utility.MethodSignature;
+
+/**
+ * Property attribute: just some covariant overrides.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+// TODO rename PropertyAttribute?
+public interface MethodAttribute extends Attribute {
+
+	/**
+	 * Covariant override.
+	 */
+	IMethodBinding getBinding(CompilationUnit astRoot);
+
+	/**
+	 * Covariant override.
+	 */
+	MethodDeclaration getBodyDeclaration(CompilationUnit astRoot);
+
+	/**
+	 * This method must be used instead of Member#matches(String, int).
+	 */
+	boolean matches(MethodSignature signature, int occurrence);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/ModifiedDeclaration.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/ModifiedDeclaration.java
new file mode 100644
index 0000000..c36d582
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/ModifiedDeclaration.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+
+/**
+ * Define a wrapper that provides a common protocol for all the various AST
+ * declarations that have modifiers (i.e. there are a number of AST node
+ * classes that implement the method #modifiers(), but they do not implement
+ * a common interface):
+ *     BodyDeclaration
+ *     SingleVariableDeclaration
+ *     VariableDeclarationExpression
+ *     VariableDeclarationStatement
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface ModifiedDeclaration {
+
+	/**
+	 * Return the "declaration" AST node.
+	 */
+	ASTNode getDeclaration();
+
+	/**
+	 * Return the "declaration" AST.
+	 */
+	AST getAst();
+
+	/**
+	 * Return the *first* annotation with the specified name.
+	 * Return null if the declaration has no such annotation.
+	 */
+	Annotation getAnnotationNamed(String annotationName);
+
+	/**
+	 * Remove the *first* annotation with the specified name from the declaration.
+	 */
+	void removeAnnotationNamed(String annotationName);
+
+	/**
+	 * Replace the specified old annotation with the specified new annotation.
+	 * If there is no annotation with the specified name, simply add the new
+	 * annotation to the declaration's modifiers.
+	 */
+	void replaceAnnotationNamed(String oldAnnotationName, Annotation newAnnotation);
+
+	/**
+	 * Add the specified import to the declaration's compilation unit.
+	 * Return whether the appropriate import was added to or already present in
+	 * the declaration's compilation unit (i.e. the specified class can be
+	 * subsequently referenced using a "short" name).
+	 * Also return true if an import was unnecessary (i.e. the specified class
+	 * is part of the "default" package).
+	 * This does not support adding a "wildcard" import (e.g. "java.util.*").
+	 */
+	boolean addImport(String className);
+
+	/**
+	 * Add the specified static import to the declaration's compilation unit.
+	 * Return whether the appropriate import was added to or already present in
+	 * the declaration's compilation unit (i.e. the specified constant can be
+	 * subsequently referenced using a "short" name).
+	 * Also return true if an import was unnecessary (i.e. the specified enum
+	 * is part of the "default" package).
+	 * This does not support adding a "wildcard" import (e.g. "java.lang.annotation.ElementType.*").
+	 */
+	boolean addStaticImport(String enumConstantName);
+
+	/**
+	 * Add the specified import to the declaration's compilation unit.
+	 * Return whether the appropriate import was added to or already present in
+	 * the declaration's compilation unit (i.e. the specified name can be
+	 * subsequently referenced using a "short" name).
+	 * Also return true if an import was unnecessary (i.e. the specified class
+	 * or enum is part of the "default" package).
+	 * This does not support adding a "wildcard" import (e.g. "java.util.*").
+	 */
+	boolean addImport(String importName, boolean static_);
+
+	/**
+	 * Return whether the specified annotation has the specified
+	 * (fully-qualified) name within the declaration's context; i.e. attempt
+	 * to resolve the annotation's name (using imports etc.) and return
+	 * whether it matches the specified name.
+	 */
+	boolean annotationIsNamed(Annotation annotation, String name);
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Type.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Type.java
new file mode 100644
index 0000000..26726d9
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Type.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+
+/**
+ * Type: just some covariant overrides.
+ * 
+ * Provisional API: This interface is part of an interim API that is still
+ * under development and expected to change significantly before reaching
+ * stability. It is available at this early stage to solicit feedback from
+ * pioneering adopters on the understanding that any code that uses this API
+ * will almost certainly be broken (repeatedly) as the API evolves.
+ * 
+ * This interface is not intended to be implemented by clients.
+ */
+public interface Type extends Member {
+
+	/**
+	 * Covariant override.
+	 */
+	ITypeBinding getBinding(CompilationUnit astRoot);
+
+	/**
+	 * Covariant override.
+	 */
+	TypeDeclaration getBodyDeclaration(CompilationUnit astRoot);
+
+	/**
+	 * Return the type's nested types (does not include annotations or enums).
+	 */
+	TypeDeclaration[] getTypes(CompilationUnit astRoot);
+
+	/**
+	 * Return the type's fields.
+	 */
+	FieldDeclaration[] getFields(CompilationUnit astRoot);
+
+	/**
+	 * Return the type's methods.
+	 */
+	MethodDeclaration[] getMethods(CompilationUnit astRoot);
+
+}