summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2013-02-26 11:31:08 (EST)
committerKaren Butzke2013-02-26 11:31:08 (EST)
commit40df250b20bbd1e8d576a3e32d6243b8375aa125 (patch)
treec67b7d7ec14a71b29f538f225e396dabf09dd46c
parent1252becd5fc481c32e951eff3b452434c39bfd20 (diff)
downloadwebtools.dali-40df250b20bbd1e8d576a3e32d6243b8375aa125.zip
webtools.dali-40df250b20bbd1e8d576a3e32d6243b8375aa125.tar.gz
webtools.dali-40df250b20bbd1e8d576a3e32d6243b8375aa125.tar.bz2
Bug 401810 - [EclipseLink] Support EclipseLink 2.5 with the JPA 2.0 facet
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.properties5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.xml15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformFactory.java82
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformProvider.java204
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_1PlatformFactory.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformFactory.java)8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_1PlatformProvider.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformProvider.java)12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaPlatformFactory.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_0PersistenceXmlDefinition.java53
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_1PersistenceXmlDefinition.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5PersistenceXmlDefinition.java)10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkEclipseLinkBundlesLibraryValidator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkUserLibraryValidator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/plugin.xml11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiFactory.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiFactory.java)8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiProvider.java76
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiFactory.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiProvider.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java)12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition.java57
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition.java (renamed from jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5UiDefinition.java)6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLink2_5ContextModelTestCase.java4
19 files changed, 565 insertions, 44 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.properties b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.properties
index 76409b2..0125890 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.properties
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.properties
@@ -1,5 +1,5 @@
################################################################################
-# Copyright (c) 2006, 2012 Oracle. All rights reserved.
+# Copyright (c) 2006, 2013 Oracle. All rights reserved.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v1.0, which accompanies this distribution
# and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -33,6 +33,7 @@ ECLIPSELINK2_1_x_PLATFORM = EclipseLink 2.1.x
ECLIPSELINK2_2_x_PLATFORM = EclipseLink 2.2.x
ECLIPSELINK2_3_x_PLATFORM = EclipseLink 2.3.x
ECLIPSELINK2_4_x_PLATFORM = EclipseLink 2.4.x
-ECLIPSELINK2_5_x_PLATFORM = EclipseLink 2.5.x
+ECLIPSELINK2_5_x_FOR_JPA_2_0_PLATFORM = EclipseLink 2.5.x (JPA 2.0)
+ECLIPSELINK2_5_x_FOR_JPA_2_1_PLATFORM = EclipseLink 2.5.x (JPA 2.1)
builderName = Eclipselink Static Weaving Builder
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.xml b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.xml
index fc6d5b8..58777a0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.xml
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<!--
- Copyright (c) 2008, 2012 Oracle. All rights reserved.
+ Copyright (c) 2008, 2013 Oracle. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0, which accompanies this distribution
and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -183,10 +183,17 @@
group="eclipselink"
jpaFacetVersion="2.0"/>
+ <jpaPlatform
+ id="eclipselink2_5_jpa2_0"
+ label="%ECLIPSELINK2_5_x_FOR_JPA_2_0_PLATFORM"
+ factoryClass="org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_0PlatformFactory"
+ group="eclipselink"
+ jpaFacetVersion="2.0"/>
+
<jpaPlatform
- id="eclipselink2_5"
- label="%ECLIPSELINK2_5_x_PLATFORM"
- factoryClass="org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5JpaPlatformFactory"
+ id="eclipselink2_5_jpa2_1"
+ label="%ECLIPSELINK2_5_x_FOR_JPA_2_1_PLATFORM"
+ factoryClass="org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_1PlatformFactory"
group="eclipselink"
jpaFacetVersion="2.1"/>
</extension>
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformFactory.java
new file mode 100644
index 0000000..846aed0
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformFactory.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.jpa.eclipselink.core.internal;
+
+import org.eclipse.jpt.common.core.AnnotationProvider;
+import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.jpa.core.JpaPlatform;
+import org.eclipse.jpt.jpa.core.JpaPlatformFactory;
+import org.eclipse.jpt.jpa.core.JpaPlatformVariation;
+import org.eclipse.jpt.jpa.core.context.AccessType;
+import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
+import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
+import org.eclipse.jpt.jpa.core.internal.jpa2.Generic2_0JpaAnnotationDefinitionProvider;
+import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkJpaPlatformVersion;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_1Definition;
+import org.eclipse.persistence.jpa.jpql.parser.EclipseLinkJPQLGrammar2_5;
+
+public class EclipseLink2_5ForJpa2_0PlatformFactory
+ implements JpaPlatformFactory
+{
+ /**
+ * See <code>org.eclipse.jpt.jpa.eclipselink.core/plugin.xml:org.eclipse.jpt.jpa.core.jpaPlatforms</code>.
+ */
+ public static final String ID = "eclipselink2_5_jpa2_0"; //$NON-NLS-1$
+
+ /**
+ * Version string for EclipseLink platform version 2.5
+ */
+ public static final String VERSION = "2.5"; //$NON-NLS-1$
+
+ /**
+ * zero-argument constructor
+ */
+ public EclipseLink2_5ForJpa2_0PlatformFactory() {
+ super();
+ }
+
+ public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
+ return new GenericJpaPlatform(
+ config,
+ buildJpaVersion(),
+ new EclipseLink2_5JpaFactory(),
+ buildAnnotationProvider(),
+ EclipseLink2_5ForJpa2_0PlatformProvider.instance(),
+ buildJpaVariation(),
+ EclipseLinkJPQLGrammar2_5.instance());
+ }
+
+ protected JpaPlatform.Version buildJpaVersion() {
+ return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_0.FACET_VERSION_STRING);
+ }
+
+ protected AnnotationProvider buildAnnotationProvider() {
+ return new JpaAnnotationProvider(
+ Generic2_0JpaAnnotationDefinitionProvider.instance(),
+ EclipseLink2_4JpaAnnotationDefinitionProvider.instance());
+ }
+
+ protected JpaPlatformVariation buildJpaVariation() {
+ return new JpaPlatformVariation() {
+ public Supported getTablePerConcreteClassInheritanceIsSupported() {
+ return Supported.YES;
+ }
+ public boolean isJoinTableOverridable() {
+ return true;
+ }
+ public AccessType[] getSupportedAccessTypes(JptResourceType resourceType) {
+ return resourceType.isKindOf(EclipseLinkOrmXml2_1Definition.instance().getResourceType()) ?
+ EclipseLink2_1JpaPlatformFactory.SUPPORTED_ACCESS_TYPES :
+ GENERIC_SUPPORTED_ACCESS_TYPES;
+ }
+ };
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformProvider.java
new file mode 100644
index 0000000..e799a18
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_0PlatformProvider.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.jpa.eclipselink.core.internal;
+
+import java.util.ArrayList;
+import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.common.utility.internal.collection.CollectionTools;
+import org.eclipse.jpt.jpa.core.JpaPlatformProvider;
+import org.eclipse.jpt.jpa.core.JpaResourceModelProvider;
+import org.eclipse.jpt.jpa.core.ResourceDefinition;
+import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition;
+import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
+import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
+import org.eclipse.jpt.jpa.core.internal.AbstractJpaPlatformProvider;
+import org.eclipse.jpt.jpa.core.internal.JarResourceModelProvider;
+import org.eclipse.jpt.jpa.core.internal.JavaResourceModelProvider;
+import org.eclipse.jpt.jpa.core.internal.OrmResourceModelProvider;
+import org.eclipse.jpt.jpa.core.internal.PersistenceResourceModelProvider;
+import org.eclipse.jpt.jpa.core.internal.context.java.JarDefinition;
+import org.eclipse.jpt.jpa.core.internal.context.java.JavaSourceFileDefinition;
+import org.eclipse.jpt.jpa.core.internal.context.java.JavaTransientMappingDefinition;
+import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXmlDefinition;
+import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.GenericOrmXml2_0Definition;
+import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.GenericPersistenceXml2_0Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaArrayMappingDefinition2_3;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaBasicCollectionMappingDefinition2_0;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaBasicMapMappingDefinition2_0;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaBasicMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaElementCollectionMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaEmbeddableDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaEmbeddedIdMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaEmbeddedMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaEntityDefinition2_3;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaIdMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaManyToManyMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaManyToOneMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaMappedSuperclassDefinition2_3;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaOneToManyMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaOneToOneMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaStructureMappingDefinition2_3;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaTransformationMappingDefinition2_0;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaVariableOneToOneMappingDefinition2_0;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.java.EclipseLinkJavaVersionMappingDefinition2_2;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml1_1Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml1_2Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_0Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_1Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_2Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_3Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_4Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_5Definition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXmlDefinition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLink2_4PersistenceXmlDefinition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLink2_5ForJpa2_0PersistenceXmlDefinition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceXmlDefinition;
+
+/**
+ * EclipseLink 2.5 platform config for the JPA 2.0 facet
+ */
+public class EclipseLink2_5ForJpa2_0PlatformProvider
+ extends AbstractJpaPlatformProvider
+{
+ // singleton
+ private static final JpaPlatformProvider INSTANCE = new EclipseLink2_5ForJpa2_0PlatformProvider();
+
+ /**
+ * Return the singleton
+ */
+ public static JpaPlatformProvider instance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Enforce singleton usage
+ */
+ private EclipseLink2_5ForJpa2_0PlatformProvider() {
+ super();
+ }
+
+
+ // ********** resource models **********
+
+ @Override
+ protected void addMostRecentSupportedResourceTypesTo(ArrayList<JptResourceType> types) {
+ CollectionTools.addAll(types, MOST_RECENT_SUPPORTED_RESOURCE_TYPES);
+ }
+
+ // order should not be important here
+ protected static final JptResourceType[] MOST_RECENT_SUPPORTED_RESOURCE_TYPES = new JptResourceType[] {
+ JavaSourceFileDefinition.instance().getResourceType(),
+ JarDefinition.instance().getResourceType(),
+ GenericPersistenceXml2_0Definition.instance().getResourceType(),
+ GenericOrmXml2_0Definition.instance().getResourceType(),
+ EclipseLinkOrmXml2_5Definition.instance().getResourceType()
+ };
+
+ @Override
+ protected void addResourceModelProvidersTo(ArrayList<JpaResourceModelProvider> providers) {
+ CollectionTools.addAll(providers, RESOURCE_MODEL_PROVIDERS);
+ }
+
+ // order should not be important here
+ protected static final JpaResourceModelProvider[] RESOURCE_MODEL_PROVIDERS = new JpaResourceModelProvider[] {
+ JavaResourceModelProvider.instance(),
+ JarResourceModelProvider.instance(),
+ PersistenceResourceModelProvider.instance(),
+ OrmResourceModelProvider.instance(),
+ EclipseLinkOrmResourceModelProvider.instance()
+ };
+
+
+ // ********** resource definitions **********
+
+ @Override
+ protected void addResourceDefinitionsTo(ArrayList<ResourceDefinition> definitions) {
+ CollectionTools.addAll(definitions, RESOURCE_DEFINITIONS);
+ }
+
+ protected static final ResourceDefinition[] RESOURCE_DEFINITIONS = new ResourceDefinition[] {
+ JavaSourceFileDefinition.instance(),
+ JarDefinition.instance(),
+ EclipseLinkPersistenceXmlDefinition.instance(),
+ EclipseLink2_4PersistenceXmlDefinition.instance(),
+ EclipseLink2_5ForJpa2_0PersistenceXmlDefinition.instance(),
+ GenericOrmXmlDefinition.instance(),
+ GenericOrmXml2_0Definition.instance(),
+ EclipseLinkOrmXmlDefinition.instance(),
+ EclipseLinkOrmXml1_1Definition.instance(),
+ EclipseLinkOrmXml1_2Definition.instance(),
+ EclipseLinkOrmXml2_0Definition.instance(),
+ EclipseLinkOrmXml2_1Definition.instance(),
+ EclipseLinkOrmXml2_2Definition.instance(),
+ EclipseLinkOrmXml2_3Definition.instance(),
+ EclipseLinkOrmXml2_4Definition.instance(),
+ EclipseLinkOrmXml2_5Definition.instance()
+ };
+
+
+ // ********* Java type mappings *********
+
+ @Override
+ protected void addJavaTypeMappingDefinitionsTo(ArrayList<JavaTypeMappingDefinition> definitions) {
+ CollectionTools.addAll(definitions, JAVA_TYPE_MAPPING_DEFINITIONS_2_5);
+ }
+
+ // order matches that used by EclipseLink
+ // NB: no EclipseLink-specific mappings
+ protected static final JavaTypeMappingDefinition[] JAVA_TYPE_MAPPING_DEFINITIONS_2_5 = new JavaTypeMappingDefinition[] {
+ EclipseLinkJavaEntityDefinition2_3.instance(),
+ EclipseLinkJavaEmbeddableDefinition2_2.instance(),
+ EclipseLinkJavaMappedSuperclassDefinition2_3.instance()
+ };
+
+
+ // ********* Java attribute mappings *********
+
+ @Override
+ protected void addDefaultJavaAttributeMappingDefinitionsTo(ArrayList<DefaultJavaAttributeMappingDefinition> definitions) {
+ CollectionTools.addAll(definitions, DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS_2_5);
+ }
+
+ // order matches that used by EclipseLink
+ // NB: no change from EclipseLink 1.2 to 2.0
+ protected static final DefaultJavaAttributeMappingDefinition[] DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS_2_5 = new DefaultJavaAttributeMappingDefinition[] {
+ EclipseLinkJavaEmbeddedMappingDefinition2_2.instance(),
+ EclipseLinkJavaOneToManyMappingDefinition2_2.instance(),
+ EclipseLinkJavaOneToOneMappingDefinition2_2.instance(),
+ EclipseLinkJavaVariableOneToOneMappingDefinition2_0.instance(),
+ EclipseLinkJavaBasicMappingDefinition2_2.instance()
+ };
+
+ @Override
+ protected void addSpecifiedJavaAttributeMappingDefinitionsTo(ArrayList<JavaAttributeMappingDefinition> definitions) {
+ CollectionTools.addAll(definitions, SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS_2_5);
+ }
+
+ // order matches that used by EclipseLink
+ protected static final JavaAttributeMappingDefinition[] SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS_2_5 = new JavaAttributeMappingDefinition[] {
+ JavaTransientMappingDefinition.instance(),
+ EclipseLinkJavaBasicCollectionMappingDefinition2_0.instance(),
+ EclipseLinkJavaBasicMapMappingDefinition2_0.instance(),
+ EclipseLinkJavaArrayMappingDefinition2_3.instance(),
+ EclipseLinkJavaElementCollectionMappingDefinition2_2.instance(),
+ EclipseLinkJavaIdMappingDefinition2_2.instance(),
+ EclipseLinkJavaVersionMappingDefinition2_2.instance(),
+ EclipseLinkJavaBasicMappingDefinition2_2.instance(),
+ EclipseLinkJavaStructureMappingDefinition2_3.instance(),
+ EclipseLinkJavaEmbeddedMappingDefinition2_2.instance(),
+ EclipseLinkJavaEmbeddedIdMappingDefinition2_2.instance(),
+ EclipseLinkJavaTransformationMappingDefinition2_0.instance(),
+ EclipseLinkJavaManyToManyMappingDefinition2_2.instance(),
+ EclipseLinkJavaManyToOneMappingDefinition2_2.instance(),
+ EclipseLinkJavaOneToManyMappingDefinition2_2.instance(),
+ EclipseLinkJavaOneToOneMappingDefinition2_2.instance(),
+ EclipseLinkJavaVariableOneToOneMappingDefinition2_0.instance()
+ };
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_1PlatformFactory.java
index 2a99b87..b8b0bae 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_1PlatformFactory.java
@@ -23,13 +23,13 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmX
import org.eclipse.persistence.jpa.jpql.parser.EclipseLinkJPQLGrammar2_5;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-public class EclipseLink2_5JpaPlatformFactory
+public class EclipseLink2_5ForJpa2_1PlatformFactory
implements JpaPlatformFactory
{
/**
* See <code>org.eclipse.jpt.jpa.eclipselink.core/plugin.xml:org.eclipse.jpt.jpa.core.jpaPlatforms</code>.
*/
- public static final String ID = "eclipselink2_5"; //$NON-NLS-1$
+ public static final String ID = "eclipselink2_5_jpa2_1"; //$NON-NLS-1$
/**
* Version string for EclipseLink platform version 2.5
@@ -39,7 +39,7 @@ public class EclipseLink2_5JpaPlatformFactory
/**
* zero-argument constructor
*/
- public EclipseLink2_5JpaPlatformFactory() {
+ public EclipseLink2_5ForJpa2_1PlatformFactory() {
super();
}
@@ -49,7 +49,7 @@ public class EclipseLink2_5JpaPlatformFactory
buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_5JpaFactory(),
buildAnnotationProvider(),
- EclipseLink2_5JpaPlatformProvider.instance(),
+ EclipseLink2_5ForJpa2_1PlatformProvider.instance(),
buildJpaVariation(),
EclipseLinkJPQLGrammar2_5.instance());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_1PlatformProvider.java
index 780b15e..6a6e6ac 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5ForJpa2_1PlatformProvider.java
@@ -62,17 +62,17 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmX
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXml2_5Definition;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.EclipseLinkOrmXmlDefinition;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLink2_4PersistenceXmlDefinition;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLink2_5PersistenceXmlDefinition;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLink2_5ForJpa2_1PersistenceXmlDefinition;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceXmlDefinition;
/**
- * EclipseLink 2.5 platform config
+ * EclipseLink 2.5 platform config for JPA 2.1 facet
*/
-public class EclipseLink2_5JpaPlatformProvider
+public class EclipseLink2_5ForJpa2_1PlatformProvider
extends AbstractJpaPlatformProvider
{
// singleton
- private static final JpaPlatformProvider INSTANCE = new EclipseLink2_5JpaPlatformProvider();
+ private static final JpaPlatformProvider INSTANCE = new EclipseLink2_5ForJpa2_1PlatformProvider();
/**
* Return the singleton
@@ -84,7 +84,7 @@ public class EclipseLink2_5JpaPlatformProvider
/**
* Enforce singleton usage
*/
- private EclipseLink2_5JpaPlatformProvider() {
+ private EclipseLink2_5ForJpa2_1PlatformProvider() {
super();
}
@@ -132,7 +132,7 @@ public class EclipseLink2_5JpaPlatformProvider
JarDefinition.instance(),
EclipseLinkPersistenceXmlDefinition.instance(),
EclipseLink2_4PersistenceXmlDefinition.instance(),
- EclipseLink2_5PersistenceXmlDefinition.instance(),
+ EclipseLink2_5ForJpa2_1PersistenceXmlDefinition.instance(),
GenericOrmXmlDefinition.instance(),
GenericOrmXml2_0Definition.instance(),
GenericOrmXml2_1Definition.instance(),
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaPlatformFactory.java
index 036ce0a..7d67a0f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaPlatformFactory.java
@@ -116,7 +116,8 @@ public class EclipseLinkJpaPlatformFactory
* @see EclipseLink2_2JpaPlatformFactory#VERSION
* @see EclipseLink2_3JpaPlatformFactory#VERSION
* @see EclipseLink2_4JpaPlatformFactory#VERSION
- * @see EclipseLink2_5JpaPlatformFactory#VERSION
+ * @see EclipseLink2_5ForJpa2_0PlatformFactory#VERSION
+ * @see EclipseLink2_5ForJpa2_1PlatformFactory#VERSION
*/
public boolean isCompatibleWithEclipseLinkVersion(String version) {
return VersionComparator.INTEGER_VERSION_COMPARATOR.compare(this.eclipseLinkVersion, version) >= 0;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_0PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_0PersistenceXmlDefinition.java
new file mode 100644
index 0000000..a432dca
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_0PersistenceXmlDefinition.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+* Copyright (c) 2013 Oracle. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0, which accompanies this distribution
+* and is available at http://www.eclipse.org/legal/epl-v10.html.
+*
+* Contributors:
+* Oracle - initial API and implementation
+*******************************************************************************/
+package org.eclipse.jpt.jpa.eclipselink.core.internal.context.persistence;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlContextNodeFactory;
+import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXmlDefinition;
+import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceXmlDefinition;
+import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.GenericPersistenceXml2_0Definition;
+import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Factory;
+
+public class EclipseLink2_5ForJpa2_0PersistenceXmlDefinition
+ extends AbstractPersistenceXmlDefinition
+{
+ // singleton
+ private static final PersistenceXmlDefinition INSTANCE = new EclipseLink2_5ForJpa2_0PersistenceXmlDefinition();
+
+ /**
+ * Return the singleton
+ */
+ public static PersistenceXmlDefinition instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * Enforce singleton usage
+ */
+ private EclipseLink2_5ForJpa2_0PersistenceXmlDefinition() {
+ super();
+ }
+
+ public EFactory getResourceNodeFactory() {
+ return PersistenceV2_0Factory.eINSTANCE;
+ }
+
+ public JptResourceType getResourceType() {
+ return GenericPersistenceXml2_0Definition.instance().getResourceType();
+ }
+
+ @Override
+ protected PersistenceXmlContextNodeFactory buildContextNodeFactory() {
+ return new EclipseLink2_4PersistenceXmlContextNodeFactory();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5PersistenceXmlDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_1PersistenceXmlDefinition.java
index 8eb0327..e84d914 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5PersistenceXmlDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/persistence/EclipseLink2_5ForJpa2_1PersistenceXmlDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2012 Oracle. All rights reserved.
+* Copyright (c) 2012, 2013 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -17,11 +17,11 @@ import org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistence
import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.GenericPersistenceXml2_1Definition;
import org.eclipse.jpt.jpa.core.resource.persistence.v2_0.PersistenceV2_0Factory;
-public class EclipseLink2_5PersistenceXmlDefinition
+public class EclipseLink2_5ForJpa2_1PersistenceXmlDefinition
extends AbstractPersistenceXmlDefinition
{
// singleton
- private static final PersistenceXmlDefinition INSTANCE = new EclipseLink2_5PersistenceXmlDefinition();
+ private static final PersistenceXmlDefinition INSTANCE = new EclipseLink2_5ForJpa2_1PersistenceXmlDefinition();
/**
* Return the singleton
@@ -34,10 +34,10 @@ public class EclipseLink2_5PersistenceXmlDefinition
/**
* Enforce singleton usage
*/
- private EclipseLink2_5PersistenceXmlDefinition() {
+ private EclipseLink2_5ForJpa2_1PersistenceXmlDefinition() {
super();
}
-
+
public EFactory getResourceNodeFactory() {
return PersistenceV2_0Factory.eINSTANCE;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkEclipseLinkBundlesLibraryValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkEclipseLinkBundlesLibraryValidator.java
index da8c6ba..dcfdd7d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkEclipseLinkBundlesLibraryValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkEclipseLinkBundlesLibraryValidator.java
@@ -22,7 +22,8 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_1JpaPlatformFa
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_2JpaPlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_3JpaPlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_4JpaPlatformFactory;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5JpaPlatformFactory;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_0PlatformFactory;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_1PlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory;
import org.eclipse.osgi.service.resolver.VersionRange;
@@ -55,7 +56,8 @@ public class EclipseLinkEclipseLinkBundlesLibraryValidator
versionRanges.put(EclipseLink2_2JpaPlatformFactory.ID, buildEclipseLink2_2BundleVersionRanges());
versionRanges.put(EclipseLink2_3JpaPlatformFactory.ID, buildEclipseLink2_3BundleVersionRanges());
versionRanges.put(EclipseLink2_4JpaPlatformFactory.ID, buildEclipseLink2_4BundleVersionRanges());
- versionRanges.put(EclipseLink2_5JpaPlatformFactory.ID, buildEclipseLink2_5BundleVersionRanges());
+ versionRanges.put(EclipseLink2_5ForJpa2_0PlatformFactory.ID, buildEclipseLink2_5BundleVersionRanges());
+ versionRanges.put(EclipseLink2_5ForJpa2_1PlatformFactory.ID, buildEclipseLink2_5BundleVersionRanges());
return versionRanges;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkUserLibraryValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkUserLibraryValidator.java
index b579626..24c7006 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkUserLibraryValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/libval/EclipseLinkUserLibraryValidator.java
@@ -22,7 +22,8 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_1JpaPlatformFa
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_2JpaPlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_3JpaPlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_4JpaPlatformFactory;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5JpaPlatformFactory;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_0PlatformFactory;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_1PlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory;
import org.eclipse.osgi.service.resolver.VersionRange;
@@ -63,7 +64,8 @@ public class EclipseLinkUserLibraryValidator
versionRanges.put(EclipseLink2_2JpaPlatformFactory.ID, new VersionRange("[2.2, 3.0)"));
versionRanges.put(EclipseLink2_3JpaPlatformFactory.ID, new VersionRange("[2.3, 3.0)"));
versionRanges.put(EclipseLink2_4JpaPlatformFactory.ID, new VersionRange("[2.4, 3.0)"));
- versionRanges.put(EclipseLink2_5JpaPlatformFactory.ID, new VersionRange("[2.5, 3.0)"));
+ versionRanges.put(EclipseLink2_5ForJpa2_0PlatformFactory.ID, new VersionRange("[2.5, 3.0)"));
+ versionRanges.put(EclipseLink2_5ForJpa2_1PlatformFactory.ID, new VersionRange("[2.5, 3.0)"));
return versionRanges;
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/plugin.xml b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/plugin.xml
index 9d2f3d5..d22a43e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/plugin.xml
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/plugin.xml
@@ -55,9 +55,14 @@
factoryClass="org.eclipse.jpt.jpa.eclipselink.ui.internal.platform.EclipseLink2_4JpaPlatformUiFactory"/>
<jpaPlatformUi
- id="eclipselink2_5.ui"
- jpaPlatform="eclipselink2_5"
- factoryClass="org.eclipse.jpt.jpa.eclipselink.ui.internal.platform.EclipseLink2_5JpaPlatformUiFactory"/>
+ id="eclipselink2_5_jpa2_0.ui"
+ jpaPlatform="eclipselink2_5_jpa2_0"
+ factoryClass="org.eclipse.jpt.jpa.eclipselink.ui.internal.platform.EclipseLink2_5ForJpa2_0PlatformUiFactory"/>
+
+ <jpaPlatformUi
+ id="eclipselink2_5_jpa2_1.ui"
+ jpaPlatform="eclipselink2_5_jpa2_1"
+ factoryClass="org.eclipse.jpt.jpa.eclipselink.ui.internal.platform.EclipseLink2_5ForJpa2_1PlatformUiFactory"/>
</extension>
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiFactory.java
index 82fce86..aae66e4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2013 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -11,13 +11,13 @@ package org.eclipse.jpt.jpa.eclipselink.ui.internal.platform;
import org.eclipse.jpt.jpa.ui.JpaPlatformUi;
-public class EclipseLink2_5JpaPlatformUiFactory
+public class EclipseLink2_5ForJpa2_0PlatformUiFactory
extends EclipseLink2_0JpaPlatformUiFactory
{
/**
* Zero arg constructor for extension point
*/
- public EclipseLink2_5JpaPlatformUiFactory() {
+ public EclipseLink2_5ForJpa2_0PlatformUiFactory() {
super();
}
@@ -25,7 +25,7 @@ public class EclipseLink2_5JpaPlatformUiFactory
public JpaPlatformUi buildJpaPlatformUi() {
return new EclipseLink2_0JpaPlatformUi(
EclipseLinkJpaPlatformUiFactory.NAVIGATOR_FACTORY_PROVIDER,
- EclipseLink2_5JpaPlatformUiProvider.instance()
+ EclipseLink2_5ForJpa2_0PlatformUiProvider.instance()
);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiProvider.java
new file mode 100644
index 0000000..4be230f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_0PlatformUiProvider.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.jpa.eclipselink.ui.internal.platform;
+
+import java.util.List;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.java.EclipseLink2_3JavaResourceUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml1_1UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml1_2UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_0UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_1UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_2UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_3UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_4UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml2_5UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXmlUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.v2_0.persistence.EclipseLinkPersistenceXml2_4UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.v2_0.persistence.EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition;
+import org.eclipse.jpt.jpa.ui.JpaPlatformUiProvider;
+import org.eclipse.jpt.jpa.ui.ResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.AbstractJpaPlatformUiProvider;
+import org.eclipse.jpt.jpa.ui.internal.details.orm.OrmXmlUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.OrmXml2_0UiDefinition;
+
+
+public class EclipseLink2_5ForJpa2_0PlatformUiProvider
+ extends AbstractJpaPlatformUiProvider {
+
+ // singleton
+ private static final JpaPlatformUiProvider INSTANCE = new EclipseLink2_5ForJpa2_0PlatformUiProvider();
+
+
+ /**
+ * Return the singleton.
+ */
+ public static JpaPlatformUiProvider instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * Ensure single instance.
+ */
+ private EclipseLink2_5ForJpa2_0PlatformUiProvider() {
+ super();
+ }
+
+
+ // ********** resource ui definitions **********
+
+ @Override
+ protected void addResourceUiDefinitionsTo(List<ResourceUiDefinition> definitions) {
+ definitions.add(EclipseLink2_3JavaResourceUiDefinition.instance());
+ definitions.add(OrmXmlUiDefinition.instance());
+ definitions.add(OrmXml2_0UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXmlUiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml1_1UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml1_2UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml2_0UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml2_1UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml2_2UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml2_3UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml2_4UiDefinition.instance());
+ definitions.add(EclipseLinkOrmXml2_5UiDefinition.instance());
+ definitions.add(EclipseLinkPersistenceXmlUiDefinition.instance());
+ definitions.add(EclipseLinkPersistenceXml2_4UiDefinition.instance());
+ definitions.add(EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition.instance());
+ }
+} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiFactory.java
new file mode 100644
index 0000000..456a793
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiFactory.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.jpa.eclipselink.ui.internal.platform;
+
+import org.eclipse.jpt.jpa.ui.JpaPlatformUi;
+
+public class EclipseLink2_5ForJpa2_1PlatformUiFactory
+ extends EclipseLink2_0JpaPlatformUiFactory
+{
+ /**
+ * Zero arg constructor for extension point
+ */
+ public EclipseLink2_5ForJpa2_1PlatformUiFactory() {
+ super();
+ }
+
+ @Override
+ public JpaPlatformUi buildJpaPlatformUi() {
+ return new EclipseLink2_0JpaPlatformUi(
+ EclipseLinkJpaPlatformUiFactory.NAVIGATOR_FACTORY_PROVIDER,
+ EclipseLink2_5ForJpa2_1PlatformUiProvider.instance()
+ );
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiProvider.java
index 1c95890..40dc6b9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5JpaPlatformUiProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/platform/EclipseLink2_5ForJpa2_1PlatformUiProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. All rights reserved.
+ * Copyright (c) 2012, 2013 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -22,7 +22,7 @@ import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXml
import org.eclipse.jpt.jpa.eclipselink.ui.internal.details.orm.EclipseLinkOrmXmlUiDefinition;
import org.eclipse.jpt.jpa.eclipselink.ui.internal.persistence.EclipseLinkPersistenceXmlUiDefinition;
import org.eclipse.jpt.jpa.eclipselink.ui.internal.v2_0.persistence.EclipseLinkPersistenceXml2_4UiDefinition;
-import org.eclipse.jpt.jpa.eclipselink.ui.internal.v2_0.persistence.EclipseLinkPersistenceXml2_5UiDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.v2_0.persistence.EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition;
import org.eclipse.jpt.jpa.ui.JpaPlatformUiProvider;
import org.eclipse.jpt.jpa.ui.ResourceUiDefinition;
import org.eclipse.jpt.jpa.ui.internal.AbstractJpaPlatformUiProvider;
@@ -31,11 +31,11 @@ import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.OrmXml2_0UiDefinition;
import org.eclipse.jpt.jpa.ui.internal.jpa2.details.orm.OrmXml2_1UiDefinition;
-public class EclipseLink2_5JpaPlatformUiProvider
+public class EclipseLink2_5ForJpa2_1PlatformUiProvider
extends AbstractJpaPlatformUiProvider {
// singleton
- private static final JpaPlatformUiProvider INSTANCE = new EclipseLink2_5JpaPlatformUiProvider();
+ private static final JpaPlatformUiProvider INSTANCE = new EclipseLink2_5ForJpa2_1PlatformUiProvider();
/**
@@ -49,7 +49,7 @@ public class EclipseLink2_5JpaPlatformUiProvider
/**
* Ensure single instance.
*/
- private EclipseLink2_5JpaPlatformUiProvider() {
+ private EclipseLink2_5ForJpa2_1PlatformUiProvider() {
super();
}
@@ -73,6 +73,6 @@ public class EclipseLink2_5JpaPlatformUiProvider
definitions.add(EclipseLinkOrmXml2_5UiDefinition.instance());
definitions.add(EclipseLinkPersistenceXmlUiDefinition.instance());
definitions.add(EclipseLinkPersistenceXml2_4UiDefinition.instance());
- definitions.add(EclipseLinkPersistenceXml2_5UiDefinition.instance());
+ definitions.add(EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition.instance());
}
} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition.java
new file mode 100644
index 0000000..e000a42
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.jpa.eclipselink.ui.internal.v2_0.persistence;
+
+import java.util.List;
+import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.jpa.core.internal.jpa2.context.persistence.GenericPersistenceXml2_0Definition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.persistence.connection.EclipseLinkPersistenceUnitConnectionEditorPageDefinition;
+import org.eclipse.jpt.jpa.eclipselink.ui.internal.persistence.general.EclipseLinkPersistenceUnitGeneralEditorPageDefinition;
+import org.eclipse.jpt.jpa.ui.PersistenceResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.ResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.editors.JpaEditorPageDefinition;
+import org.eclipse.jpt.jpa.ui.internal.AbstractPersistenceResourceUiDefinition;
+import org.eclipse.jpt.jpa.ui.internal.persistence.PersistenceUnitPropertiesEditorPageDefinition;
+
+public class EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition
+ extends AbstractPersistenceResourceUiDefinition
+{
+ // singleton
+ private static final PersistenceResourceUiDefinition INSTANCE = new EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition();
+
+ /**
+ * Return the singleton
+ */
+ public static ResourceUiDefinition instance() {
+ return INSTANCE;
+ }
+
+
+ /**
+ * Enforce singleton usage
+ */
+ private EclipseLinkPersistenceXml2_5ForJpa2_0UiDefinition() {
+ super();
+ }
+
+ @Override
+ protected void addEditorPageDefinitionsTo(List<JpaEditorPageDefinition> definitions) {
+ definitions.add(EclipseLinkPersistenceUnitGeneralEditorPageDefinition.instance());
+ definitions.add(EclipseLinkPersistenceUnitConnectionEditorPageDefinition.instance());
+ definitions.add(EclipseLinkPersistenceUnitCustomization2_0EditorPageDefinition.instance());
+ definitions.add(EclipseLinkPersistenceUnitCaching2_0EditorPageDefinition.instance());
+ definitions.add(EclipseLinkPersistenceUnitOptions2_4EditorPageDefinition.instance());
+ definitions.add(PersistenceUnitPropertiesEditorPageDefinition.instance());
+ }
+
+ public boolean providesUi(JptResourceType resourceType) {
+ return resourceType.equals(GenericPersistenceXml2_0Definition.instance().getResourceType());
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5UiDefinition.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition.java
index 3bbe0e4..e35472d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5UiDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.ui/src/org/eclipse/jpt/jpa/eclipselink/ui/internal/v2_0/persistence/EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition.java
@@ -22,11 +22,11 @@ import org.eclipse.jpt.jpa.ui.internal.AbstractPersistenceResourceUiDefinition;
import org.eclipse.jpt.jpa.ui.internal.jpa2_1.JavaConverterTypeUiDefinition;
import org.eclipse.jpt.jpa.ui.internal.persistence.PersistenceUnitPropertiesEditorPageDefinition;
-public class EclipseLinkPersistenceXml2_5UiDefinition
+public class EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition
extends AbstractPersistenceResourceUiDefinition
{
// singleton
- private static final PersistenceResourceUiDefinition INSTANCE = new EclipseLinkPersistenceXml2_5UiDefinition();
+ private static final PersistenceResourceUiDefinition INSTANCE = new EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition();
/**
* Return the singleton
@@ -39,7 +39,7 @@ public class EclipseLinkPersistenceXml2_5UiDefinition
/**
* Enforce singleton usage
*/
- private EclipseLinkPersistenceXml2_5UiDefinition() {
+ private EclipseLinkPersistenceXml2_5ForJpa2_1UiDefinition() {
super();
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLink2_5ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLink2_5ContextModelTestCase.java
index 36e5ccd..2c7a0d6 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLink2_5ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLink2_5ContextModelTestCase.java
@@ -10,7 +10,7 @@
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context;
import org.eclipse.jpt.jpa.core.jpa2_1.JpaProject2_1;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5JpaPlatformFactory;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLink2_5ForJpa2_1PlatformFactory;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_5.EclipseLink2_5;
public abstract class EclipseLink2_5ContextModelTestCase
@@ -27,7 +27,7 @@ public abstract class EclipseLink2_5ContextModelTestCase
@Override
protected String getJpaPlatformID() {
- return EclipseLink2_5JpaPlatformFactory.ID;
+ return EclipseLink2_5ForJpa2_1PlatformFactory.ID;
}
@Override