Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa/tests
diff options
context:
space:
mode:
authorkmoore2011-09-27 15:02:36 +0000
committerkmoore2011-09-27 15:02:36 +0000
commitc16ace973e77f24e52a146f86b39ba892b34d64e (patch)
tree10d69cc4fce2e98d1994f9ee9b25d4e1200e26b6 /jpa/tests
parentb8fbeb6be753640d2e406c70535f85287944b1d1 (diff)
downloadwebtools.dali-c16ace973e77f24e52a146f86b39ba892b34d64e.tar.gz
webtools.dali-c16ace973e77f24e52a146f86b39ba892b34d64e.tar.xz
webtools.dali-c16ace973e77f24e52a146f86b39ba892b34d64e.zip
cleaning up EclipseLink orm test hierarchy
Diffstat (limited to 'jpa/tests')
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java25
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java13
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java91
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkJpaProjectTests.java35
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkEntityMappingsTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java63
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java84
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEmbeddableTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEntityTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToManyMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToOneMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmMappedSuperclassTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToManyMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToOneMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTransientMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitDefaultsTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitMetadataTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTests.java16
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1ContextModelTestCase.java22
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1JpaProjectTests.java17
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmContextModelTestCase.java92
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java13
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentTypeTests.java17
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmTransientMappingTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2ContextModelTestCase.java15
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2JpaProjectTests.java17
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/EclipseLink2_0ContextModelTestCase.java28
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmCollectionTableTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmContextModelTestCase.java92
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmEntityTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmMappedSuperclassTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/EclipseLink2_3ContextModelTestCase.java24
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/EclipseLink2_3OrmContextModelTestCase.java93
-rw-r--r--jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/OrmEclipseLinkMultitenancyTests.java4
47 files changed, 349 insertions, 531 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java
index 4d321e3119..c21bb21b2c 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/context/ContextModelTestCase.java
@@ -32,6 +32,7 @@ import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProvider;
import org.eclipse.jpt.jpa.core.platform.GenericPlatform;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
import org.eclipse.jpt.jpa.core.resource.persistence.XmlJavaClassRef;
@@ -88,15 +89,27 @@ public abstract class ContextModelTestCase extends AnnotationTestCase
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = DataModelFactory.createDataModel(new JpaFacetInstallDataModelProvider());
- // default facet version is 2.0 - most tests use 1.0
- dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_1_0.getVersionString());
- // most tests use the basic generic platform
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, GenericPlatform.VERSION_1_0);
- // most tests do use an orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
+ dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, this.getJpaFacetVersionString());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, this.getJpaPlatformDescription());
+ dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.valueOf(this.createOrmXml()));
return dataModel;
}
+
+ // default facet version is 2.0 - most tests use 1.0
+ protected String getJpaFacetVersionString() {
+ return JpaFacet.VERSION_1_0.getVersionString();
+ }
+ // most tests use the basic generic platform
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return GenericPlatform.VERSION_1_0;
+ }
+
+ // most tests do use an orm.xml
+ protected boolean createOrmXml() {
+ return true;
+ }
+
protected JpaProject getJpaProject() {
return getJavaProject().getJpaProject();
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java
index 7bf44ceb3c..efc6a77229 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.core.tests/src/org/eclipse/jpt/jpa/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle.
+ * Copyright (c) 2009, 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
@@ -14,6 +14,7 @@ import org.eclipse.jpt.jpa.core.JpaFacet;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.platform.GenericPlatform;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.core.tests.internal.context.ContextModelTestCase;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -32,4 +33,14 @@ public abstract class Generic2_0ContextModelTestCase extends ContextModelTestCas
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
+
+ @Override
+ protected String getJpaFacetVersionString() {
+ return JpaFacet.VERSION_2_0.getVersionString();
+ }
+
+ @Override
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return GenericPlatform.VERSION_2_0;
+ }
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java
index a8c0b43eb0..cb38368220 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java
@@ -9,41 +9,114 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
+import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
+import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
+import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
+import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
import org.eclipse.jpt.jpa.core.tests.internal.context.ContextModelTestCase;
+import org.eclipse.jpt.jpa.core.tests.internal.projects.TestJpaProject;
import org.eclipse.jpt.jpa.eclipselink.core.EclipseLinkJpaProject;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkEntityMappings;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationOperation;
import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
+import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLink;
+import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntityMappings;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
public abstract class EclipseLinkContextModelTestCase
extends ContextModelTestCase
{
+ protected JpaXmlResource eclipseLinkOrmXmlResource;
+
protected EclipseLinkContextModelTestCase(String name) {
super(name);
}
-
-
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.eclipseLinkOrmXmlResource = getJpaProject().getDefaultEclipseLinkOrmXmlResource();
+ }
+
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_0);
+ protected void tearDown() throws Exception {
+ this.eclipseLinkOrmXmlResource = null;
+ super.tearDown();
+ }
+
+ @Override
+ protected TestJpaProject buildJpaProject(String projectName, boolean autoBuild, IDataModel jpaConfig) throws Exception {
+ TestJpaProject testJpaProject = super.buildJpaProject(projectName, autoBuild, jpaConfig);
+
+ if (createEclipseLinkOrmXml()) {
+ EclipseLinkOrmFileCreationOperation operation =
+ new EclipseLinkOrmFileCreationOperation(buildEclipseLinkOrmConfig(testJpaProject));
+ operation.execute(null, null);
+ }
+
+ return testJpaProject;
+ }
+
+ @Override
+ protected boolean createOrmXml() {
+ return false;
+ }
+
+ protected boolean createEclipseLinkOrmXml() {
+ return true;
+ }
+
+ protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
+ IDataModel dataModel =
+ DataModelFactory.createDataModel(new EclipseLinkOrmFileCreationDataModelProvider());
+ dataModel.setProperty(JptFileCreationDataModelProperties.CONTAINER_PATH,
+ testJpaProject.getProject().getFolder("src/META-INF").getFullPath()); //$NON-NLS-1$
+ dataModel.setProperty(JpaFileCreationDataModelProperties.VERSION, this.getEclipseLinkSchemaVersion());
+ dataModel.setProperty(OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT, Boolean.TRUE);
return dataModel;
}
-
+
+ protected String getEclipseLinkSchemaVersion() {
+ return EclipseLink.SCHEMA_VERSION;
+ }
+
+ @Override
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_1_0;
+ }
+
@Override
protected EclipseLinkJpaProject getJpaProject() {
return (EclipseLinkJpaProject) super.getJpaProject();
}
-
+
@Override
protected EclipseLinkPersistenceUnit getPersistenceUnit() {
return (EclipseLinkPersistenceUnit) super.getPersistenceUnit();
}
-
+
@Override
protected JavaEclipseLinkEntity getJavaEntity() {
return (JavaEclipseLinkEntity) getJavaPersistentType().getMapping();
}
+
+ @Override
+ protected JpaXmlResource getOrmXmlResource() {
+ return this.eclipseLinkOrmXmlResource;
+ }
+
+ @Override
+ protected XmlEntityMappings getXmlEntityMappings() {
+ return (XmlEntityMappings) super.getXmlEntityMappings();
+ }
+
+ @Override
+ protected EclipseLinkEntityMappings getEntityMappings() {
+ return (EclipseLinkEntityMappings) super.getEntityMappings();
+ }
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkJpaProjectTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkJpaProjectTests.java
index 40cf67f75d..b9d5154465 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkJpaProjectTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/EclipseLinkJpaProjectTests.java
@@ -12,33 +12,50 @@ package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context;
import org.eclipse.core.runtime.Path;
import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.jpa.core.tests.internal.context.ContextModelTestCase;
+import org.eclipse.jpt.jpa.eclipselink.core.EclipseLinkJpaProject;
import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@SuppressWarnings("nls")
-public class EclipseLinkJpaProjectTests extends EclipseLinkContextModelTestCase
+public class EclipseLinkJpaProjectTests
+ extends ContextModelTestCase
{
public EclipseLinkJpaProjectTests(String name) {
super(name);
}
-
-
+
+ @Override
+ protected boolean createOrmXml() {
+ return true;
+ }
+
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- // don't build orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.FALSE);
- return dataModel;
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_1_0;
+ }
+
+ @Override
+ protected EclipseLinkJpaProject getJpaProject() {
+ return (EclipseLinkJpaProject) super.getJpaProject();
}
public void testGetDefaultOrmXmlResource() throws Exception {
JpaXmlResource resource = this.getJpaProject().getDefaultOrmXmlResource();
+ assertNotNull(resource);
+ assertEquals(JptJpaCorePlugin.ORM_XML_CONTENT_TYPE, resource.getContentType());
+ assertEquals("src/META-INF/orm.xml", resource.getFile().getProjectRelativePath().toString());
+
+ //delete the orm.xml file and verify it is not returned from getDefaultOrmXmlResource()
+ resource.delete(null);
+ resource = this.getJpaProject().getDefaultOrmXmlResource();
assertNull(resource);
//add the orm.xml file with eclipselink orm content type
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkEntityMappingsTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkEntityMappingsTests.java
index 98c7627066..4560c5a451 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkEntityMappingsTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkEntityMappingsTests.java
@@ -24,9 +24,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntityMappings;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlObjectTypeConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlStructConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLinkEntityMappingsTests extends EclipseLinkOrmContextModelTestCase
+public class EclipseLinkEntityMappingsTests
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkEntityMappingsTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java
index 3434ef504d..6e10f4f023 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 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.
@@ -25,10 +25,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkB
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlBasic;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmBasicMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
private ICompilationUnit createTestEntityWithBasicMapping() throws Exception {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java
index 6da84e55a5..9dbac3a406 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmCachingTests.java
@@ -1,3 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 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.jpa.eclipselink.core.tests.internal.context.orm;
import java.util.Iterator;
@@ -14,8 +23,12 @@ import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTimeOfDay;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkCaching;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmEclipseLinkEntity;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.caching.Caching;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCase {
+@SuppressWarnings("nls")
+public class EclipseLinkOrmCachingTests
+ extends EclipseLinkContextModelTestCase
+{
private ICompilationUnit createTestEntity() throws Exception {
return this.createTestType(new DefaultAnnotationWriter() {
@@ -55,7 +68,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedSharedFalseUnsetsOtherCacheSettings() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -94,7 +107,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetDefaultShared() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -108,7 +121,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedShared() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -119,7 +132,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedType() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -142,7 +155,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetDefaultType() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -156,7 +169,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedType() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -167,7 +180,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedAlwaysRefresh() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -184,7 +197,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedAlwaysRefresh() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -195,7 +208,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedRefreshOnlyIfNewer() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -212,7 +225,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedRefreshOnlyIfNewer() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -223,7 +236,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedDisableHits() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -240,7 +253,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedDisableHits() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -251,7 +264,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedCoordinationType() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -275,7 +288,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedCoordinationType() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -285,7 +298,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetExpiry() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
assertNull(entity.getCaching().getExpiry());
@@ -295,7 +308,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetExpiry() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -310,7 +323,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetExpiryUnsetsExpiryTimeOfDay() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -327,7 +340,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetTimeOfDayExpiry() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -337,7 +350,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testAddTimeOfDayExpiry() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -352,7 +365,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testRemoveTimeOfDayExpiry() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -362,7 +375,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testAddTimeOfDayExpiryUnsetsExpiry() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -379,7 +392,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testSetSpecifiedSize() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -395,7 +408,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetDefaultSize() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
@@ -409,7 +422,7 @@ public class EclipseLinkOrmCachingTests extends EclipseLinkOrmContextModelTestCa
public void testGetSpecifiedSize() throws Exception {
createTestEntity();
- OrmPersistentType type = (OrmPersistentType)getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
+ OrmPersistentType type = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
OrmEclipseLinkEntity entity = (OrmEclipseLinkEntity)type.getMapping();
OrmEclipseLinkCaching caching = entity.getCaching();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java
deleted file mode 100644
index f86fac1a4c..0000000000
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmContextModelTestCase.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 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.jpa.eclipselink.core.tests.internal.context.orm;
-
-import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jpt.jpa.core.tests.internal.projects.TestJpaProject;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationOperation;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLink;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-@SuppressWarnings("nls")
-public abstract class EclipseLinkOrmContextModelTestCase
- extends EclipseLinkContextModelTestCase
-{
- protected JpaXmlResource eclipseLinkOrmXmlResource;
-
-
- protected EclipseLinkOrmContextModelTestCase(String name) {
- super(name);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.eclipseLinkOrmXmlResource = getJpaProject().getDefaultEclipseLinkOrmXmlResource();
- }
-
- @Override
- protected TestJpaProject buildJpaProject(String projectName, boolean autoBuild, IDataModel jpaConfig) throws Exception {
- TestJpaProject testJpaProject = super.buildJpaProject(projectName, autoBuild, jpaConfig);
-
- EclipseLinkOrmFileCreationOperation operation =
- new EclipseLinkOrmFileCreationOperation(buildEclipseLinkOrmConfig(testJpaProject));
- operation.execute(null, null);
-
- return testJpaProject;
- }
-
- protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
- IDataModel dataModel =
- DataModelFactory.createDataModel(new EclipseLinkOrmFileCreationDataModelProvider());
- dataModel.setProperty(JptFileCreationDataModelProperties.CONTAINER_PATH,
- testJpaProject.getProject().getFolder("src/META-INF").getFullPath());
- dataModel.setProperty(JpaFileCreationDataModelProperties.VERSION, EclipseLink.SCHEMA_VERSION);
- dataModel.setProperty(OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT, Boolean.TRUE);
- return dataModel;
- }
-
- @Override
- protected void tearDown() throws Exception {
- this.eclipseLinkOrmXmlResource = null;
- super.tearDown();
- }
-
- @Override
- protected JpaXmlResource getOrmXmlResource() {
- return this.eclipseLinkOrmXmlResource;
- }
-
- @Override
- protected XmlEntityMappings getXmlEntityMappings() {
- return (XmlEntityMappings) super.getXmlEntityMappings();
- }
-
- @Override
- protected EclipseLinkEntityMappings getEntityMappings() {
- return (EclipseLinkEntityMappings) super.getEntityMappings();
- }
-}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java
index cc53451a2e..5eb33082fd 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 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.
@@ -26,10 +26,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkC
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlBasic;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmConverterTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
private ICompilationUnit createTestEntityWithBasicMapping() throws Exception {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEmbeddableTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEmbeddableTests.java
index 7bbfb71487..1c1310d299 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEmbeddableTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEmbeddableTests.java
@@ -35,9 +35,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEmbeddable;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlObjectTypeConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlStructConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLinkOrmEmbeddableTests extends EclipseLinkOrmContextModelTestCase
+public class EclipseLinkOrmEmbeddableTests
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmEmbeddableTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEntityTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEntityTests.java
index d80263af79..403a9d184b 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEntityTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmEntityTests.java
@@ -41,11 +41,12 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlObjectTypeConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlStructConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLinkOrmEntityTests extends EclipseLinkOrmContextModelTestCase
+public class EclipseLinkOrmEntityTests
+ extends EclipseLinkContextModelTestCase
{
-
public EclipseLinkOrmEntityTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java
index f239980bfb..10d438bc29 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 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.
@@ -27,10 +27,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkI
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlId;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmIdMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmIdMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToManyMappingTests.java
index a934c68ff5..f2cf0ca09a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToManyMappingTests.java
@@ -32,10 +32,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlManyToMany;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmManyToManyMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmManyToManyMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToOneMappingTests.java
index 2c2000d72a..0af5072c07 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmManyToOneMappingTests.java
@@ -31,10 +31,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlManyToOne;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmManyToOneMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmManyToOneMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmMappedSuperclassTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmMappedSuperclassTests.java
index 1d5231019b..dd364be549 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmMappedSuperclassTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmMappedSuperclassTests.java
@@ -40,9 +40,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlMappedSuperclass;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlObjectTypeConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlStructConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLinkOrmMappedSuperclassTests extends EclipseLinkOrmContextModelTestCase
+public class EclipseLinkOrmMappedSuperclassTests
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmMappedSuperclassTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java
index c016aa19a1..c94ffd136d 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java
@@ -31,10 +31,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLinkOrmFactory;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlBasic;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlConversionValue;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlObjectTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmObjectTypeConverterTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
private ICompilationUnit createTestEntityWithBasicMapping() throws Exception {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToManyMappingTests.java
index fc6bb89af4..729cf8a2c3 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToManyMappingTests.java
@@ -32,11 +32,12 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlOneToMany;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
import org.eclipse.jpt.jpa.eclipselink.core.v2_0.context.EclipseLinkOneToManyRelationship2_0;
@SuppressWarnings("nls")
public class EclipseLinkOrmOneToManyMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmOneToManyMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToOneMappingTests.java
index bf93e31d9a..36f155ea40 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmOneToOneMappingTests.java
@@ -31,10 +31,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlOneToOne;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmOneToOneMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmOneToOneMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java
index c7ba83fc09..2188b2738b 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java
@@ -31,10 +31,11 @@ import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkIdMapping;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkOneToOneMapping;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmPersistentAttributeTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmPersistentAttributeTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java
index 09ee7543f5..5247d8aad8 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java
@@ -26,10 +26,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkS
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlBasic;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlStructConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmStructConverterTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
private ICompilationUnit createTestEntityWithBasicMapping() throws Exception {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTransientMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTransientMappingTests.java
index 1af98f5581..51c094b3fa 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTransientMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTransientMappingTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 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.
@@ -17,10 +17,11 @@ import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.resource.java.JPA;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmTransientMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmTransientMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java
index f4917577a5..4fcfead81e 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java
@@ -26,10 +26,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkT
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlBasic;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmTypeConverterTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
private ICompilationUnit createTestEntityWithBasicMapping() throws Exception {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java
index e9483bac5f..c2b954e9f3 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 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.
@@ -27,10 +27,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkV
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlVersion;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLinkOrmVersionMappingTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkOrmVersionMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitDefaultsTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitDefaultsTests.java
index 493a9512b7..3e659b5d89 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitDefaultsTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitDefaultsTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2007, 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.
@@ -17,9 +17,11 @@ import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLinkOrmFactory;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlPersistenceUnitDefaults;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLinkPersistenceUnitDefaultsTests extends EclipseLinkOrmContextModelTestCase
+public class EclipseLinkPersistenceUnitDefaultsTests
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkPersistenceUnitDefaultsTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitMetadataTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitMetadataTests.java
index a398e808da..ae3984ff89 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitMetadataTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/orm/EclipseLinkPersistenceUnitMetadataTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2007, 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.
@@ -15,8 +15,10 @@ import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLinkOrmFactory;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlPersistenceUnitMetadata;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-public class EclipseLinkPersistenceUnitMetadataTests extends EclipseLinkOrmContextModelTestCase
+public class EclipseLinkPersistenceUnitMetadataTests
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkPersistenceUnitMetadataTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTests.java
index ccf01be24f..f39bd0a27a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTests.java
@@ -19,7 +19,6 @@ import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.persistence.MappingFileRef;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
import org.eclipse.jpt.jpa.core.resource.java.JPA;
import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
@@ -31,26 +30,23 @@ import org.eclipse.jpt.jpa.core.tests.internal.projects.TestJpaProject;
import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit;
import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.orm.EclipseLinkOrmContextModelTestCase;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@SuppressWarnings("nls")
public class EclipseLinkPersistenceUnitTests
- extends EclipseLinkOrmContextModelTestCase
+ extends EclipseLinkContextModelTestCase
{
public EclipseLinkPersistenceUnitTests(String name) {
super(name);
}
-
-
+
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
+ protected boolean createOrmXml() {
+ return true;
}
-
+
@Override
protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
IDataModel dataModel =
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1ContextModelTestCase.java
index dda1601884..d1da49d0ce 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1ContextModelTestCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle.
+ * Copyright (c) 2009, 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
@@ -10,10 +10,10 @@
*******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
+import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v1_1.EclipseLink1_1;
import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
public abstract class EclipseLink1_1ContextModelTestCase extends EclipseLinkContextModelTestCase
{
@@ -22,12 +22,14 @@ public abstract class EclipseLink1_1ContextModelTestCase extends EclipseLinkCont
protected EclipseLink1_1ContextModelTestCase(String name) {
super(name);
}
-
+
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_1);
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
- }
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_1_1;
+ }
+
+ @Override
+ protected String getEclipseLinkSchemaVersion() {
+ return EclipseLink1_1.SCHEMA_VERSION;
+ }
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1JpaProjectTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1JpaProjectTests.java
index d01ac71afa..a156d09081 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1JpaProjectTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/EclipseLink1_1JpaProjectTests.java
@@ -14,20 +14,35 @@ import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelP
import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.jpa.core.tests.internal.context.ContextModelTestCase;
+import org.eclipse.jpt.jpa.eclipselink.core.EclipseLinkJpaProject;
import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v1_1.EclipseLink1_1;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@SuppressWarnings("nls")
-public class EclipseLink1_1JpaProjectTests extends EclipseLink1_1ContextModelTestCase
+public class EclipseLink1_1JpaProjectTests
+ extends ContextModelTestCase
{
public EclipseLink1_1JpaProjectTests(String name) {
super(name);
}
+
+ @Override
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_1_1;
+ }
+
+ @Override
+ protected EclipseLinkJpaProject getJpaProject() {
+ return (EclipseLinkJpaProject) super.getJpaProject();
+ }
public void testGetDefaultOrmXmlResource() throws Exception {
JpaXmlResource resource = this.getJpaProject().getDefaultOrmXmlResource();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmContextModelTestCase.java
deleted file mode 100644
index 6d57e68f25..0000000000
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmContextModelTestCase.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.eclipselink.core.tests.internal.v1_1.context.orm;
-
-import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jpt.jpa.core.tests.internal.projects.TestJpaProject;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationOperation;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v1_1.EclipseLink1_1;
-import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context.EclipseLink1_1ContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-@SuppressWarnings("nls")
-public abstract class EclipseLink1_1OrmContextModelTestCase
- extends EclipseLink1_1ContextModelTestCase
-{
- protected JpaXmlResource eclipseLink1_1OrmXmlResource;
-
-
- protected EclipseLink1_1OrmContextModelTestCase(String name) {
- super(name);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.eclipseLink1_1OrmXmlResource = getJpaProject().getDefaultEclipseLinkOrmXmlResource();
- }
- @Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- // don't create default orm.xml - instead build eclipselink-orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.FALSE);
- return dataModel;
- }
-
- @Override
- protected TestJpaProject buildJpaProject(String projectName, boolean autoBuild, IDataModel jpaConfig) throws Exception {
- TestJpaProject testJpaProject = super.buildJpaProject(projectName, autoBuild, jpaConfig);
-
- EclipseLinkOrmFileCreationOperation operation =
- new EclipseLinkOrmFileCreationOperation(buildEclipseLinkOrmConfig(testJpaProject));
- operation.execute(null, null);
-
- return testJpaProject;
- }
-
- protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
- IDataModel dataModel =
- DataModelFactory.createDataModel(new EclipseLinkOrmFileCreationDataModelProvider());
- dataModel.setProperty(JptFileCreationDataModelProperties.CONTAINER_PATH,
- testJpaProject.getProject().getFolder("src/META-INF").getFullPath());
- dataModel.setProperty(JpaFileCreationDataModelProperties.VERSION, EclipseLink1_1.SCHEMA_VERSION);
- dataModel.setProperty(OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT, Boolean.TRUE);
- return dataModel;
- }
-
- @Override
- protected void tearDown() throws Exception {
- this.eclipseLink1_1OrmXmlResource = null;
- super.tearDown();
- }
-
- @Override
- protected JpaXmlResource getOrmXmlResource() {
- return this.eclipseLink1_1OrmXmlResource;
- }
-
- @Override
- protected XmlEntityMappings getXmlEntityMappings() {
- return (XmlEntityMappings) super.getXmlEntityMappings();
- }
-
- @Override
- protected EclipseLinkEntityMappings getEntityMappings() {
- return (EclipseLinkEntityMappings) super.getEntityMappings();
- }
-}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java
index 556481af8a..5c5ab31b56 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java
@@ -25,29 +25,20 @@ import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.resource.java.JPA;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkIdMapping;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkOneToOneMapping;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context.EclipseLink1_1ContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLink1_1OrmPersistentAttributeTests
- extends EclipseLink1_1OrmContextModelTestCase
+ extends EclipseLink1_1ContextModelTestCase
{
public EclipseLink1_1OrmPersistentAttributeTests(String name) {
super(name);
}
- @Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- // create both orm.xml and eclipselink-orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
- }
-
private ICompilationUnit createTestTypeNullAttributeMapping() throws Exception {
return this.createTestType(new DefaultAnnotationWriter() {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentTypeTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentTypeTests.java
index 77a1f17b86..76b57d2876 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentTypeTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmPersistentTypeTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 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.
@@ -11,33 +11,24 @@ package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context.orm;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.tests.internal.utility.jdt.AnnotationTestCase.DefaultAnnotationWriter;
import org.eclipse.jpt.common.utility.internal.iterators.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.AccessType;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
import org.eclipse.jpt.jpa.core.resource.java.JPA;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context.EclipseLink1_1ContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLink1_1OrmPersistentTypeTests extends EclipseLink1_1OrmContextModelTestCase
+public class EclipseLink1_1OrmPersistentTypeTests
+ extends EclipseLink1_1ContextModelTestCase
{
public EclipseLink1_1OrmPersistentTypeTests(String name) {
super(name);
}
- @Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- // create both orm.xml and eclipselink-orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
- }
-
private ICompilationUnit createTestEntityIdMapping() throws Exception {
return this.createTestType(new DefaultAnnotationWriter() {
@Override
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmTransientMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmTransientMappingTests.java
index 23d282233d..976c13b738 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmTransientMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_1/context/orm/EclipseLink1_1OrmTransientMappingTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 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.
@@ -11,16 +11,16 @@ package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context.orm;
import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jpt.common.core.tests.internal.utility.jdt.AnnotationTestCase.DefaultAnnotationWriter;
import org.eclipse.jpt.common.utility.internal.iterators.ArrayIterator;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.resource.java.JPA;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_1.context.EclipseLink1_1ContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLink1_1OrmTransientMappingTests
- extends EclipseLink1_1OrmContextModelTestCase
+ extends EclipseLink1_1ContextModelTestCase
{
public EclipseLink1_1OrmTransientMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2ContextModelTestCase.java
index 9aee7089df..6b0e33ed77 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2ContextModelTestCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle.
+ * Copyright (c) 2009, 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
@@ -10,11 +10,9 @@
*******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v1_2.context;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
public abstract class EclipseLink1_2ContextModelTestCase extends EclipseLinkContextModelTestCase
{
@@ -25,10 +23,7 @@ public abstract class EclipseLink1_2ContextModelTestCase extends EclipseLinkCont
}
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_2);
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
- }
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_1_2;
+ }
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2JpaProjectTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2JpaProjectTests.java
index 952962750f..dcb126d9ce 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2JpaProjectTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v1_2/context/EclipseLink1_2JpaProjectTests.java
@@ -14,20 +14,35 @@ import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelP
import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
+import org.eclipse.jpt.jpa.core.tests.internal.context.ContextModelTestCase;
+import org.eclipse.jpt.jpa.eclipselink.core.EclipseLinkJpaProject;
import org.eclipse.jpt.jpa.eclipselink.core.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
+import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v1_2.EclipseLink1_2;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@SuppressWarnings("nls")
-public class EclipseLink1_2JpaProjectTests extends EclipseLink1_2ContextModelTestCase
+public class EclipseLink1_2JpaProjectTests
+ extends ContextModelTestCase
{
public EclipseLink1_2JpaProjectTests(String name) {
super(name);
}
+
+ @Override
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_1_2;
+ }
+
+ @Override
+ protected EclipseLinkJpaProject getJpaProject() {
+ return (EclipseLinkJpaProject) super.getJpaProject();
+ }
public void testGetDefaultOrmXmlResource() throws Exception {
JpaXmlResource resource = this.getJpaProject().getDefaultOrmXmlResource();
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/EclipseLink2_0ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/EclipseLink2_0ContextModelTestCase.java
index 81e169f5ef..3396da79e6 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/EclipseLink2_0ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/EclipseLink2_0ContextModelTestCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle.
+ * Copyright (c) 2009, 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
@@ -11,25 +11,29 @@
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context;
import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
+import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_0.EclipseLink2_0;
import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
public abstract class EclipseLink2_0ContextModelTestCase extends EclipseLinkContextModelTestCase
{
protected EclipseLink2_0ContextModelTestCase(String name) {
super(name);
}
-
+
+ @Override
+ protected String getJpaFacetVersionString() {
+ return JpaFacet.VERSION_2_0.getVersionString();
+ }
+
+ @Override
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_2_0;
+ }
+
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_2_0);
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
+ protected String getEclipseLinkSchemaVersion() {
+ return EclipseLink2_0.SCHEMA_VERSION;
}
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmCollectionTableTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmCollectionTableTests.java
index 190702bc71..59213980de 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmCollectionTableTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmCollectionTableTests.java
@@ -41,9 +41,11 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0;
import org.eclipse.jpt.jpa.core.resource.persistence.PersistenceFactory;
import org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLink2_0OrmCollectionTableTests extends EclipseLink2_0OrmContextModelTestCase
+public class EclipseLink2_0OrmCollectionTableTests
+ extends EclipseLink2_0ContextModelTestCase
{
public EclipseLink2_0OrmCollectionTableTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmContextModelTestCase.java
deleted file mode 100644
index c5828b93cb..0000000000
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmContextModelTestCase.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 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.jpa.eclipselink.core.tests.internal.v2_0.context.orm;
-
-import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jpt.jpa.core.tests.internal.projects.TestJpaProject;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationOperation;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_0.EclipseLink2_0;
-import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-@SuppressWarnings("nls")
-public abstract class EclipseLink2_0OrmContextModelTestCase
- extends EclipseLink2_0ContextModelTestCase
-{
- protected JpaXmlResource eclipseLink2_0OrmXmlResource;
-
-
- protected EclipseLink2_0OrmContextModelTestCase(String name) {
- super(name);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.eclipseLink2_0OrmXmlResource = getJpaProject().getDefaultEclipseLinkOrmXmlResource();
- }
- @Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- // don't create default orm.xml - instead build eclipselink-orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.FALSE);
- return dataModel;
- }
-
- @Override
- protected TestJpaProject buildJpaProject(String projectName, boolean autoBuild, IDataModel jpaConfig) throws Exception {
- TestJpaProject testJpaProject = super.buildJpaProject(projectName, autoBuild, jpaConfig);
-
- EclipseLinkOrmFileCreationOperation operation =
- new EclipseLinkOrmFileCreationOperation(buildEclipseLinkOrmConfig(testJpaProject));
- operation.execute(null, null);
-
- return testJpaProject;
- }
-
- protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
- IDataModel dataModel =
- DataModelFactory.createDataModel(new EclipseLinkOrmFileCreationDataModelProvider());
- dataModel.setProperty(JptFileCreationDataModelProperties.CONTAINER_PATH,
- testJpaProject.getProject().getFolder("src/META-INF").getFullPath());
- dataModel.setProperty(JpaFileCreationDataModelProperties.VERSION, EclipseLink2_0.SCHEMA_VERSION);
- dataModel.setProperty(OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT, Boolean.TRUE);
- return dataModel;
- }
-
- @Override
- protected void tearDown() throws Exception {
- this.eclipseLink2_0OrmXmlResource = null;
- super.tearDown();
- }
-
- @Override
- protected JpaXmlResource getOrmXmlResource() {
- return this.eclipseLink2_0OrmXmlResource;
- }
-
- @Override
- protected XmlEntityMappings getXmlEntityMappings() {
- return (XmlEntityMappings) super.getXmlEntityMappings();
- }
-
- @Override
- protected EclipseLinkEntityMappings getEntityMappings() {
- return (EclipseLinkEntityMappings) super.getEntityMappings();
- }
-}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java
index b223c2590c..fd01a0c81d 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java
@@ -58,10 +58,12 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlOneToMany;
import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlElementCollection_2_0;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConvert;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlConvertibleMapping;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
import org.eclipse.jpt.jpa.eclipselink.core.v2_0.context.EclipseLinkElementCollectionMapping2_0;
@SuppressWarnings("nls")
-public class EclipseLink2_0OrmElementCollectionMappingTests extends EclipseLink2_0OrmContextModelTestCase
+public class EclipseLink2_0OrmElementCollectionMappingTests
+ extends EclipseLink2_0ContextModelTestCase
{
private static final String ATTRIBUTE_OVERRIDE_NAME = "city";
private static final String ATTRIBUTE_OVERRIDE_COLUMN_NAME = "E_CITY";
@@ -1208,7 +1210,7 @@ public class EclipseLink2_0OrmElementCollectionMappingTests extends EclipseLink2
createTestEmbeddableState();
OrmPersistentType persistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
- OrmPersistentType persistentType2 = getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
+ getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
OrmPersistentType persistentType3 = getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".State");
//embedded mapping is virtual, specified attribute overrides should exist
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmEntityTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmEntityTests.java
index b005c63f7f..ca7e091571 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmEntityTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmEntityTests.java
@@ -44,9 +44,11 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
import org.eclipse.jpt.jpa.core.resource.orm.XmlEntity;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkEntity;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkMappedSuperclass;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLink2_0OrmEntityTests extends EclipseLink2_0OrmContextModelTestCase
+public class EclipseLink2_0OrmEntityTests
+ extends EclipseLink2_0ContextModelTestCase
{
protected static final String SUB_TYPE_NAME = "AnnotationTestTypeChild";
protected static final String FULLY_QUALIFIED_SUB_TYPE_NAME = PACKAGE_NAME + "." + SUB_TYPE_NAME;
@@ -1351,7 +1353,7 @@ public class EclipseLink2_0OrmEntityTests extends EclipseLink2_0OrmContextModelT
createTestEmbeddableAddress();
createTestEmbeddableZipCode();
- OrmPersistentType customerPersistentType = getEntityMappings().addPersistentType(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Customer");
+ getEntityMappings().addPersistentType(MappingKeys.MAPPED_SUPERCLASS_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Customer");
OrmPersistentType longTimeCustomerPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".LongTimeCustomer");
OrmPersistentType addressPersistentType = getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
OrmPersistentType zipCodePersistentType = getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".ZipCode");
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java
index 8e8e929776..dab9630984 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java
@@ -47,15 +47,15 @@ import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkJoinFetchMapping;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkManyToManyMapping;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLink2_0OrmManyToManyMappingTests
- extends EclipseLink2_0OrmContextModelTestCase
+ extends EclipseLink2_0ContextModelTestCase
{
public EclipseLink2_0OrmManyToManyMappingTests(String name) {
super(name);
}
-
private void createTestTargetEntityAddress() throws Exception {
SourceWriter sourceWriter = new SourceWriter() {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java
index 62965f7708..bbb7384a4a 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmManyToOneMappingTests.java
@@ -43,10 +43,11 @@ import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkJoinFetchMapping;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
@SuppressWarnings("nls")
public class EclipseLink2_0OrmManyToOneMappingTests
- extends EclipseLink2_0OrmContextModelTestCase
+ extends EclipseLink2_0ContextModelTestCase
{
public EclipseLink2_0OrmManyToOneMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmMappedSuperclassTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmMappedSuperclassTests.java
index 92809bac2b..b24f37cdb5 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmMappedSuperclassTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmMappedSuperclassTests.java
@@ -46,9 +46,11 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlMappedSuperclass;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlObjectTypeConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlStructConverter;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTypeConverter;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
@SuppressWarnings("nls")
-public class EclipseLink2_0OrmMappedSuperclassTests extends EclipseLink2_0OrmContextModelTestCase
+public class EclipseLink2_0OrmMappedSuperclassTests
+ extends EclipseLink2_0ContextModelTestCase
{
protected static final String SUB_TYPE_NAME = "AnnotationTestTypeChild";
protected static final String FULLY_QUALIFIED_SUB_TYPE_NAME = PACKAGE_NAME + "." + SUB_TYPE_NAME;
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java
index fbeeabb375..7de98bd572 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToManyMappingTests.java
@@ -55,6 +55,7 @@ import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkOneToManyMapping;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm.OrmEclipseLinkOneToManyMapping;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntity;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
import org.eclipse.jpt.jpa.eclipselink.core.v2_0.context.EclipseLinkOneToManyRelationship2_0;
/**
@@ -62,11 +63,13 @@ import org.eclipse.jpt.jpa.eclipselink.core.v2_0.context.EclipseLinkOneToManyRel
*/
@SuppressWarnings("nls")
public class EclipseLink2_0OrmOneToManyMappingTests
- extends EclipseLink2_0OrmContextModelTestCase
+ extends EclipseLink2_0ContextModelTestCase
{
public EclipseLink2_0OrmOneToManyMappingTests(String name) {
super(name);
}
+
+
private void createTestTargetEntityAddress() throws Exception {
SourceWriter sourceWriter = new SourceWriter() {
public void appendSourceTo(StringBuilder sb) {
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java
index 5cae3a36dd..0703722827 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_0/context/orm/EclipseLink2_0OrmOneToOneMappingTests.java
@@ -49,11 +49,12 @@ import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlDerivedId_2_0;
import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapsId_2_0;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkJoinFetchType;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_0.context.EclipseLink2_0ContextModelTestCase;
import org.eclipse.jpt.jpa.eclipselink.core.v2_0.context.EclipseLinkOneToOneMapping2_0;
@SuppressWarnings("nls")
public class EclipseLink2_0OrmOneToOneMappingTests
- extends EclipseLink2_0OrmContextModelTestCase
+ extends EclipseLink2_0ContextModelTestCase
{
public EclipseLink2_0OrmOneToOneMappingTests(String name) {
super(name);
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/EclipseLink2_3ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/EclipseLink2_3ContextModelTestCase.java
index 76f863e6f4..3a7b5f692c 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/EclipseLink2_3ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/EclipseLink2_3ContextModelTestCase.java
@@ -10,12 +10,10 @@
package org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_3.context;
import org.eclipse.jpt.jpa.core.JpaFacet;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
+import org.eclipse.jpt.jpa.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.jpa.eclipselink.core.platform.EclipseLinkPlatform;
+import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.EclipseLink2_3;
import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.context.EclipseLinkContextModelTestCase;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
public abstract class EclipseLink2_3ContextModelTestCase extends EclipseLinkContextModelTestCase
{
@@ -24,11 +22,17 @@ public abstract class EclipseLink2_3ContextModelTestCase extends EclipseLinkCont
}
@Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_2_3);
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
- return dataModel;
+ protected String getJpaFacetVersionString() {
+ return JpaFacet.VERSION_2_0.getVersionString();
+ }
+
+ @Override
+ protected JpaPlatformDescription getJpaPlatformDescription() {
+ return EclipseLinkPlatform.VERSION_2_3;
+ }
+
+ @Override
+ protected String getEclipseLinkSchemaVersion() {
+ return EclipseLink2_3.SCHEMA_VERSION;
}
}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/EclipseLink2_3OrmContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/EclipseLink2_3OrmContextModelTestCase.java
deleted file mode 100644
index 6c6e74c2e3..0000000000
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/EclipseLink2_3OrmContextModelTestCase.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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.jpa.eclipselink.core.tests.internal.v2_3.context.orm;
-
-import org.eclipse.jpt.common.core.internal.operations.JptFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.JpaFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.operations.OrmFileCreationDataModelProperties;
-import org.eclipse.jpt.jpa.core.resource.xml.JpaXmlResource;
-import org.eclipse.jpt.jpa.core.tests.internal.projects.TestJpaProject;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationDataModelProvider;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.operations.EclipseLinkOrmFileCreationOperation;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlEntityMappings;
-import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.EclipseLink2_3;
-import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_3.context.EclipseLink2_3ContextModelTestCase;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-@SuppressWarnings("nls")
-public abstract class EclipseLink2_3OrmContextModelTestCase
- extends EclipseLink2_3ContextModelTestCase
-{
- protected JpaXmlResource eclipseLink2_3OrmXmlResource;
-
-
- protected EclipseLink2_3OrmContextModelTestCase(String name) {
- super(name);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- this.eclipseLink2_3OrmXmlResource = getJpaProject().getDefaultEclipseLinkOrmXmlResource();
- }
-
- @Override
- protected IDataModel buildJpaConfigDataModel() {
- IDataModel dataModel = super.buildJpaConfigDataModel();
- // don't create default orm.xml - instead build eclipselink-orm.xml
- dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.FALSE);
- return dataModel;
- }
-
- @Override
- protected TestJpaProject buildJpaProject(String projectName, boolean autoBuild, IDataModel jpaConfig) throws Exception {
- TestJpaProject testJpaProject = super.buildJpaProject(projectName, autoBuild, jpaConfig);
-
- EclipseLinkOrmFileCreationOperation operation =
- new EclipseLinkOrmFileCreationOperation(buildEclipseLinkOrmConfig(testJpaProject));
- operation.execute(null, null);
-
- return testJpaProject;
- }
-
- protected IDataModel buildEclipseLinkOrmConfig(TestJpaProject testJpaProject) {
- IDataModel dataModel =
- DataModelFactory.createDataModel(new EclipseLinkOrmFileCreationDataModelProvider());
- dataModel.setProperty(JptFileCreationDataModelProperties.CONTAINER_PATH,
- testJpaProject.getProject().getFolder("src/META-INF").getFullPath());
- dataModel.setProperty(JpaFileCreationDataModelProperties.VERSION, EclipseLink2_3.SCHEMA_VERSION);
- dataModel.setProperty(OrmFileCreationDataModelProperties.ADD_TO_PERSISTENCE_UNIT, Boolean.TRUE);
- return dataModel;
- }
-
- @Override
- protected void tearDown() throws Exception {
- this.eclipseLink2_3OrmXmlResource = null;
- super.tearDown();
- }
-
- @Override
- protected JpaXmlResource getOrmXmlResource() {
- return this.eclipseLink2_3OrmXmlResource;
- }
-
- @Override
- protected XmlEntityMappings getXmlEntityMappings() {
- return (XmlEntityMappings) super.getXmlEntityMappings();
- }
-
- @Override
- protected EclipseLinkEntityMappings getEntityMappings() {
- return (EclipseLinkEntityMappings) super.getEntityMappings();
- }
-}
diff --git a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/OrmEclipseLinkMultitenancyTests.java b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/OrmEclipseLinkMultitenancyTests.java
index e386b1f864..115fec52b1 100644
--- a/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/OrmEclipseLinkMultitenancyTests.java
+++ b/jpa/tests/org.eclipse.jpt.jpa.eclipselink.core.tests/src/org/eclipse/jpt/jpa/eclipselink/core/tests/internal/v2_3/context/orm/OrmEclipseLinkMultitenancyTests.java
@@ -17,12 +17,14 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLinkOrmFactory;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlMultitenant;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlMultitenantHolder;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.MultitenantType;
+import org.eclipse.jpt.jpa.eclipselink.core.tests.internal.v2_3.context.EclipseLink2_3ContextModelTestCase;
import org.eclipse.jpt.jpa.eclipselink.core.v2_3.context.EclipseLinkMultitenantType;
import org.eclipse.jpt.jpa.eclipselink.core.v2_3.context.orm.OrmEclipseLinkMultitenancy;
import org.eclipse.jpt.jpa.eclipselink.core.v2_3.context.orm.OrmTenantDiscriminatorColumn;
@SuppressWarnings("nls")
-public class OrmEclipseLinkMultitenancyTests extends EclipseLink2_3OrmContextModelTestCase
+public class OrmEclipseLinkMultitenancyTests
+ extends EclipseLink2_3ContextModelTestCase
{
protected static final String SUB_TYPE_NAME = "AnnotationTestTypeChild";
protected static final String FULLY_QUALIFIED_SUB_TYPE_NAME = PACKAGE_NAME + "." + SUB_TYPE_NAME;

Back to the top