summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2013-02-22 10:54:50 (EST)
committerKaren Butzke2013-02-22 10:54:50 (EST)
commit13a5555c6303d6350552dcc23270b88c204e7ee6 (patch)
tree05e3b666342c4ad87510319a0f1edd6d5108037d
parent536cb65551f738e3442e8057f584b36a0a507840 (diff)
downloadwebtools.dali-13a5555c6303d6350552dcc23270b88c204e7ee6.zip
webtools.dali-13a5555c6303d6350552dcc23270b88c204e7ee6.tar.gz
webtools.dali-13a5555c6303d6350552dcc23270b88c204e7ee6.tar.bz2
get JPA facet version platform config instead of duplicating in Platform factory
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/Generic2_1JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/InternalJpaPlatformConfig.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_1JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_2JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_0JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_1JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_2JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_3JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_4JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_5JpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLinkJpaPlatformFactory.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java4
15 files changed, 68 insertions, 51 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java
index 95fe52e..8fe7f74 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaPlatform.java
@@ -21,6 +21,7 @@ import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition;
import org.eclipse.jpt.jpa.core.context.java.JavaManagedTypeDefinition;
import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition;
import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
+import org.eclipse.jpt.jpa.core.jpa2_1.JpaProject2_1;
import org.eclipse.jpt.jpa.core.platform.JpaPlatformManager;
import org.eclipse.jpt.jpa.db.ConnectionProfileFactory;
import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar;
@@ -219,6 +220,7 @@ public interface JpaPlatform
* Return the highest JPA specification version supported by the platform.
* @see JpaProject#FACET_VERSION_STRING
* @see JpaProject2_0#FACET_VERSION_STRING
+ * @see JpaProject2_1#FACET_VERSION_STRING
*/
String getJpaVersion();
@@ -227,6 +229,7 @@ public interface JpaPlatform
* specification version.
* @see JpaProject#FACET_VERSION_STRING
* @see JpaProject2_0#FACET_VERSION_STRING
+ * @see JpaProject2_1#FACET_VERSION_STRING
*/
boolean isCompatibleWithJpaVersion(String jpaVersion);
}
@@ -261,10 +264,16 @@ public interface JpaPlatform
String getLabel();
/**
+ * Return the config's JPA facet version or null if the extension
+ * does <em>not</em> specify a JPA facet version.
+ */
+ IProjectFacetVersion getJpaFacetVersion();
+
+ /**
* Return whether the config's JPA platform supports the specified
* JPA facet version. If the extension specifies a JPA facet version, it
* must be the same as the specified JPA facet version. If the extension
- * does <em>not</em> specify a JPA facet verion, the config's JPA
+ * does <em>not</em> specify a JPA facet version, the config's JPA
* platform supports all JPA facet versions.
* @exception IllegalArgumentException if the specified facet version is
* not for a JPA facet
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java
index 5f73b61..f51c501 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/GenericJpaPlatformFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Oracle. All rights reserved.
+ * Copyright (c) 2009, 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.
@@ -14,10 +14,10 @@ import org.eclipse.jpt.common.utility.internal.VersionComparator;
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.JpaProject;
import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaFactory;
import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar1_0;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
@@ -46,7 +46,7 @@ public class GenericJpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- this.buildJpaVersion(),
+ this.buildJpaVersion(config.getJpaFacetVersion()),
new GenericJpaFactory(),
new JpaAnnotationProvider(GenericJpaAnnotationDefinitionProvider.instance()),
GenericJpaPlatformProvider.instance(),
@@ -54,8 +54,8 @@ public class GenericJpaPlatformFactory
JPQLGrammar1_0.instance());
}
- private JpaPlatform.Version buildJpaVersion() {
- return new GenericJpaPlatformVersion(JpaProject.FACET_VERSION_STRING);
+ private JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new GenericJpaPlatformVersion(jpaFacetVersion.getVersionString());
}
protected JpaPlatformVariation buildJpaPlatformVariation() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
index b0d03a5..fca2d28 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/Generic2_0JpaPlatformFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 Oracle. All rights reserved.
+ * Copyright (c) 2009, 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,8 +17,8 @@ import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformFactory.GenericJpaPlatformVersion;
import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
-import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar2_0;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
@@ -39,7 +39,7 @@ public class Generic2_0JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- this.buildJpaVersion(),
+ this.buildJpaVersion(config.getJpaFacetVersion()),
new GenericJpaFactory2_0(),
new JpaAnnotationProvider(Generic2_0JpaAnnotationDefinitionProvider.instance()),
Generic2_0JpaPlatformProvider.instance(),
@@ -47,8 +47,8 @@ public class Generic2_0JpaPlatformFactory
JPQLGrammar2_0.instance());
}
- private JpaPlatform.Version buildJpaVersion() {
- return new GenericJpaPlatformVersion(JpaProject2_0.FACET_VERSION_STRING);
+ private JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new GenericJpaPlatformVersion(jpaFacetVersion.getVersionString());
}
protected JpaPlatformVariation buildJpaPlatformVariation() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/Generic2_1JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/Generic2_1JpaPlatformFactory.java
index 14e247a..2b9e1f3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/Generic2_1JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2_1/Generic2_1JpaPlatformFactory.java
@@ -17,8 +17,8 @@ import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformFactory.GenericJpaPlatformVersion;
import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
-import org.eclipse.jpt.jpa.core.jpa2_1.JpaProject2_1;
import org.eclipse.persistence.jpa.jpql.parser.JPQLGrammar2_1;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
@@ -39,7 +39,7 @@ public class Generic2_1JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- this.buildJpaVersion(),
+ this.buildJpaVersion(config.getJpaFacetVersion()),
new GenericJpaFactory2_1(),
new JpaAnnotationProvider(Generic2_1JpaAnnotationDefinitionProvider.instance()),
Generic2_1JpaPlatformProvider.instance(),
@@ -47,8 +47,8 @@ public class Generic2_1JpaPlatformFactory
JPQLGrammar2_1.instance());
}
- private JpaPlatform.Version buildJpaVersion() {
- return new GenericJpaPlatformVersion(JpaProject2_1.FACET_VERSION_STRING);
+ private JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new GenericJpaPlatformVersion(jpaFacetVersion.getVersionString());
}
protected JpaPlatformVariation buildJpaPlatformVariation() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/InternalJpaPlatformConfig.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/InternalJpaPlatformConfig.java
index 66fe4c6..d1a14e7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/InternalJpaPlatformConfig.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/platform/InternalJpaPlatformConfig.java
@@ -57,6 +57,10 @@ class InternalJpaPlatformConfig
return this.factoryClassName;
}
+ public IProjectFacetVersion getJpaFacetVersion() {
+ return this.jpaFacetVersion;
+ }
+
void setJpaFacetVersion(IProjectFacetVersion jpaFacetVersion) {
this.jpaFacetVersion = jpaFacetVersion;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_1JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_1JpaPlatformFactory.java
index c6cca0b..c6b4b30 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_1JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_1JpaPlatformFactory.java
@@ -14,13 +14,13 @@ 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.JpaProject;
import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.internal.GenericJpaAnnotationDefinitionProvider;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkJpaPlatformVersion;
import org.eclipse.persistence.jpa.jpql.parser.EclipseLinkJPQLGrammar1;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
@@ -49,7 +49,7 @@ public class EclipseLink1_1JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLinkJpaFactory(),
buildAnnotationProvider(),
EclipseLink1_1JpaPlatformProvider.instance(),
@@ -77,7 +77,7 @@ public class EclipseLink1_1JpaPlatformFactory
};
}
- private JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject.FACET_VERSION_STRING);
+ private JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_2JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_2JpaPlatformFactory.java
index 499aa4e..c74f83c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_2JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink1_2JpaPlatformFactory.java
@@ -14,13 +14,13 @@ 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.JpaProject;
import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.internal.GenericJpaAnnotationDefinitionProvider;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkJpaPlatformVersion;
import org.eclipse.persistence.jpa.jpql.parser.EclipseLinkJPQLGrammar1;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
@@ -50,7 +50,7 @@ public class EclipseLink1_2JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLinkJpaFactory(),
buildAnnotationProvider(),
EclipseLink1_2JpaPlatformProvider.instance(),
@@ -79,7 +79,7 @@ public class EclipseLink1_2JpaPlatformFactory
};
}
- private JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject.FACET_VERSION_STRING);
+ private JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_0JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_0JpaPlatformFactory.java
index 21c1c38..d4f3607 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_0JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_0JpaPlatformFactory.java
@@ -18,9 +18,9 @@ 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.persistence.jpa.jpql.parser.EclipseLinkJPQLGrammar2_0;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
public class EclipseLink2_0JpaPlatformFactory
implements JpaPlatformFactory
@@ -45,7 +45,7 @@ public class EclipseLink2_0JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_0JpaFactory(),
this.buildAnnotationProvider(),
EclipseLink2_0JpaPlatformProvider.instance(),
@@ -53,8 +53,8 @@ public class EclipseLink2_0JpaPlatformFactory
EclipseLinkJPQLGrammar2_0.instance());
}
- protected JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_0.FACET_VERSION_STRING);
+ protected JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_1JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_1JpaPlatformFactory.java
index e8d039a..f02676c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_1JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_1JpaPlatformFactory.java
@@ -18,11 +18,11 @@ 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.context.EclipseLinkAccessType;
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_1;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
public class EclipseLink2_1JpaPlatformFactory
implements JpaPlatformFactory
@@ -47,7 +47,7 @@ public class EclipseLink2_1JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_0JpaFactory(),
this.buildAnnotationProvider(),
EclipseLink2_1JpaPlatformProvider.instance(),
@@ -55,8 +55,8 @@ public class EclipseLink2_1JpaPlatformFactory
EclipseLinkJPQLGrammar2_1.instance());
}
- protected JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_0.FACET_VERSION_STRING);
+ protected JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_2JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_2JpaPlatformFactory.java
index da6deb3..e531fab 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_2JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_2JpaPlatformFactory.java
@@ -18,10 +18,10 @@ 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_2;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
public class EclipseLink2_2JpaPlatformFactory
implements JpaPlatformFactory
@@ -46,7 +46,7 @@ public class EclipseLink2_2JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_0JpaFactory(),
this.buildAnnotationProvider(),
EclipseLink2_2JpaPlatformProvider.instance(),
@@ -54,8 +54,8 @@ public class EclipseLink2_2JpaPlatformFactory
EclipseLinkJPQLGrammar2_2.instance());
}
- protected JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_0.FACET_VERSION_STRING);
+ protected JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_3JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_3JpaPlatformFactory.java
index 9b03dd0..9f3426d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_3JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_3JpaPlatformFactory.java
@@ -18,10 +18,10 @@ 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_3;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
public class EclipseLink2_3JpaPlatformFactory
implements JpaPlatformFactory
@@ -46,7 +46,7 @@ public class EclipseLink2_3JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_0JpaFactory(),
buildAnnotationProvider(),
EclipseLink2_3JpaPlatformProvider.instance(),
@@ -54,8 +54,8 @@ public class EclipseLink2_3JpaPlatformFactory
EclipseLinkJPQLGrammar2_3.instance());
}
- protected JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_0.FACET_VERSION_STRING);
+ protected JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_4JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_4JpaPlatformFactory.java
index ff527e7..3984793 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_4JpaPlatformFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/EclipseLink2_4JpaPlatformFactory.java
@@ -18,10 +18,10 @@ 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_4;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
public class EclipseLink2_4JpaPlatformFactory
implements JpaPlatformFactory
@@ -46,7 +46,7 @@ public class EclipseLink2_4JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_4JpaFactory(),
buildAnnotationProvider(),
EclipseLink2_4JpaPlatformProvider.instance(),
@@ -54,8 +54,8 @@ public class EclipseLink2_4JpaPlatformFactory
EclipseLinkJPQLGrammar2_4.instance());
}
- protected JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_0.FACET_VERSION_STRING);
+ protected JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
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_5JpaPlatformFactory.java
index 1bbf2a2..2a99b87 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_5JpaPlatformFactory.java
@@ -18,10 +18,10 @@ 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_1.Generic2_1JpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.jpa.core.jpa2_1.JpaProject2_1;
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;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
public class EclipseLink2_5JpaPlatformFactory
implements JpaPlatformFactory
@@ -46,7 +46,7 @@ public class EclipseLink2_5JpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLink2_5JpaFactory(),
buildAnnotationProvider(),
EclipseLink2_5JpaPlatformProvider.instance(),
@@ -54,8 +54,8 @@ public class EclipseLink2_5JpaPlatformFactory
EclipseLinkJPQLGrammar2_5.instance());
}
- protected JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject2_1.FACET_VERSION_STRING);
+ protected JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
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 eb0d56b..036ce0a 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
@@ -15,13 +15,13 @@ import org.eclipse.jpt.common.utility.internal.VersionComparator;
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.JpaProject;
import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.internal.GenericJpaAnnotationDefinitionProvider;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform;
import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformFactory.GenericJpaPlatformVersion;
import org.eclipse.jpt.jpa.core.internal.JpaAnnotationProvider;
import org.eclipse.persistence.jpa.jpql.parser.EclipseLinkJPQLGrammar1;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
/**
* All the state in the JPA platform should be "static" (i.e. unchanging once
@@ -56,7 +56,7 @@ public class EclipseLinkJpaPlatformFactory
public JpaPlatform buildJpaPlatform(JpaPlatform.Config config) {
return new GenericJpaPlatform(
config,
- buildJpaVersion(),
+ buildJpaVersion(config.getJpaFacetVersion()),
new EclipseLinkJpaFactory(),
buildAnnotationProvider(),
EclipseLinkJpaPlatformProvider.instance(),
@@ -64,8 +64,8 @@ public class EclipseLinkJpaPlatformFactory
EclipseLinkJPQLGrammar1.instance());
}
- private JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkJpaPlatformVersion(VERSION, JpaProject.FACET_VERSION_STRING);
+ private JpaPlatform.Version buildJpaVersion(IProjectFacetVersion jpaFacetVersion) {
+ return new EclipseLinkJpaPlatformVersion(VERSION, jpaFacetVersion.getVersionString());
}
protected AnnotationProvider buildAnnotationProvider() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java
index eabf7ac..707fdff 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/properties/JpaProjectPropertiesPage.java
@@ -447,6 +447,10 @@ public class JpaProjectPropertiesPage
return null;
}
+ public IProjectFacetVersion getJpaFacetVersion() {
+ return null;
+ }
+
public boolean supportsJpaFacetVersion(IProjectFacetVersion jpaFacetVersion) {
return false;
}