diff options
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource')
19 files changed, 0 insertions, 777 deletions
diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.classpath b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.classpath deleted file mode 100644 index fe3e03bba0..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.classpath +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> - <accessrules> - <accessrule kind="accessible" pattern="org/eclipse/jpt/jpa/ui/**"/> - <accessrule kind="accessible" pattern="org/eclipse/jpt/jpa/core/**"/> - <accessrule kind="accessible" pattern="org/eclipse/jpt/common/utility/**"/> - </accessrules> - </classpathentry> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.cvsignore b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.cvsignore deleted file mode 100644 index ba077a4031..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.project b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.project deleted file mode 100644 index b7783a563f..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.jpt.jpa.core.tests.extension.resource</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/META-INF/MANIFEST.MF b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/META-INF/MANIFEST.MF deleted file mode 100644 index a9fcef952b..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %pluginName -Bundle-Vendor: %providerName -Bundle-SymbolicName: org.eclipse.jpt.jpa.core.tests.extension.resource;singleton:=true -Bundle-Version: 3.0.0.qualifier -Bundle-Activator: org.eclipse.jpt.jpa.core.tests.extension.resource.ExtensionTestPlugin -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Require-Bundle: org.eclipse.core.resources, - org.eclipse.core.runtime, - org.eclipse.jdt.core, - org.eclipse.jpt.common.core, - org.eclipse.jpt.jpa.core, - org.eclipse.jpt.jpa.ui, - org.eclipse.jpt.jpa.gen, - org.eclipse.jpt.jpa.db, - org.eclipse.jpt.common.utility, - org.eclipse.swt, - org.eclipse.wst.common.project.facet.core, - org.eclipse.wst.validation -Export-Package: org.eclipse.jpt.jpa.core.tests.extension.resource;x-internal:=true diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/about.html b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/about.html deleted file mode 100644 index be534ba44f..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/about.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<HTML> - -<head> -<title>About</title> -<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> -</head> - -<BODY lang="EN-US"> - -<H3>About This Content</H3> - -<P>May 02, 2008</P> - -<H3>License</H3> - -<P>The Eclipse Foundation makes available all content in this plug-in -("Content"). Unless otherwise indicated below, the Content is provided to you -under the terms and conditions of the Eclipse Public License Version 1.0 -("EPL"). A copy of the EPL is available at -<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>. -For purposes of the EPL, "Program" will mean the Content.</P> - -<P>If you did not receive this Content directly from the Eclipse Foundation, the -Content is being redistributed by another party ("Redistributor") and different -terms and conditions may apply to your use of any object code in the Content. -Check the Redistributor's license that was provided with the Content. If no such -license exists, contact the Redistributor. Unless otherwise indicated below, the -terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at -<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P> - -</BODY> -</HTML> diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/build.properties b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/build.properties deleted file mode 100644 index f33b241f91..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -# Copyright (c) 2007 Oracle. All rights reserved. -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0, which accompanies this distribution -# and is available at http://www.eclipse.org/legal/epl-v10.html. -# -# Contributors: -# Oracle - initial API and implementation -################################################################################ -javacSource=1.5 -javacTarget=1.5 -source.. = src/ -output.. = bin/ -bin.includes = .,\ - META-INF/,\ - plugin.xml,\ - plugin.properties,\ - about.html -jars.compile.order = . diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/plugin.properties b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/plugin.properties deleted file mode 100644 index 0558789278..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/plugin.properties +++ /dev/null @@ -1,23 +0,0 @@ -################################################################################ -# Copyright (c) 2007, 2009 Oracle. All rights reserved. -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0, which accompanies this distribution -# and is available at http://www.eclipse.org/legal/epl-v10.html. -# -# Contributors: -# Oracle - initial API and implementation -################################################################################ -# ==================================================================== -# To code developer: -# Do NOT change the properties between this line and the -# "%%% END OF TRANSLATED PROPERTIES %%%" line. -# Make a new property name, append to the end of the file and change -# the code to use the new property. -# ==================================================================== - -# ==================================================================== -# %%% END OF TRANSLATED PROPERTIES %%% -# ==================================================================== - -pluginName = Dali Java Persistence Tools - Extension Tests -providerName = Eclipse Web Tools Platform diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/plugin.xml b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/plugin.xml deleted file mode 100644 index 747a8d16d1..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/plugin.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.2"?>
<!-- - Copyright (c) 2007, 2010 Oracle. All rights reserved. - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v1.0, which accompanies this distribution - and is available at http://www.eclipse.org/legal/epl-v10.html. - - Contributors: - Oracle - initial API and implementation - --> - -<plugin> - - <extension - point="org.eclipse.jpt.jpa.core.jpaPlatforms"> - - <jpaPlatform - id="core.testJpaPlatform" - label="Test Jpa Platform" - factoryClass="org.eclipse.jpt.jpa.core.tests.extension.resource.TestJpaPlatformFactory"/> - - </extension> - - <extension - point="org.eclipse.jpt.jpa.ui.jpaPlatformUis"> - - <jpaPlatformUi - id="core.testJpaPlatform.ui" - jpaPlatform="core.testJpaPlatform" - factoryClass="org.eclipse.jpt.jpa.core.tests.extension.resource.TestJpaPlatformUiFactory"/> - - </extension> - -</plugin> diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/ExtensionTestPlugin.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/ExtensionTestPlugin.java deleted file mode 100644 index ae5cd6e783..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/ExtensionTestPlugin.java +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Oracle. All rights reserved. - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle - initial API and implementation - *******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class ExtensionTestPlugin extends Plugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.jpt.jpa.core.tests.extension.resource"; //$NON-NLS-1$ - - // The shared instance - private static ExtensionTestPlugin plugin; - - /** - * The constructor - */ - public ExtensionTestPlugin() { - super(); - } - - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static ExtensionTestPlugin getDefault() { - return plugin; - } - -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestAttributeMapping.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestAttributeMapping.java deleted file mode 100644 index e47d0ee7da..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestAttributeMapping.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; -import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaAttributeMapping; -import org.eclipse.jpt.jpa.core.resource.java.Annotation; - -public class JavaTestAttributeMapping - extends AbstractJavaAttributeMapping<Annotation> -{ - public static final String TEST_ATTRIBUTE_MAPPING_KEY = "testAttribute"; //$NON-NLS-1$ - public static final String TEST_ATTRIBUTE_ANNOTATION_NAME = "test.TestAttribute"; //$NON-NLS-1$ - - - public JavaTestAttributeMapping(JavaPersistentAttribute parent) { - super(parent); - } - - public String getKey() { - return JavaTestAttributeMapping.TEST_ATTRIBUTE_MAPPING_KEY; - } - - @Override - protected String getAnnotationName() { - return JavaTestAttributeMapping.TEST_ATTRIBUTE_ANNOTATION_NAME; - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestAttributeMappingDefinition.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestAttributeMappingDefinition.java deleted file mode 100644 index 4b423d8912..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestAttributeMappingDefinition.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable; -import org.eclipse.jpt.jpa.core.JpaFactory; -import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping; -import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; - -public class JavaTestAttributeMappingDefinition - implements JavaAttributeMappingDefinition -{ - // singleton - private static final JavaAttributeMappingDefinition INSTANCE = new JavaTestAttributeMappingDefinition(); - - /** - * Return the singleton. - */ - public static JavaAttributeMappingDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private JavaTestAttributeMappingDefinition() { - super(); - } - - public String getKey() { - return JavaTestAttributeMapping.TEST_ATTRIBUTE_MAPPING_KEY; - } - - public String getAnnotationName() { - return JavaTestAttributeMapping.TEST_ATTRIBUTE_ANNOTATION_NAME; - } - - public boolean isSpecified(JavaPersistentAttribute persistentAttribute) { - return persistentAttribute.getResourcePersistentAttribute().getAnnotation(this.getAnnotationName()) != null; - } - - public Iterable<String> getSupportingAnnotationNames() { - return EmptyIterable.instance(); - } - - public JavaAttributeMapping buildMapping(JavaPersistentAttribute persistentAttribute, JpaFactory factory) { - return ((TestJpaFactory) factory).buildJavaTestAttributeMapping(persistentAttribute); - } - - @Override - public String toString() { - return this.getClass().getSimpleName(); - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestTypeMapping.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestTypeMapping.java deleted file mode 100644 index 469d58dd2a..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestTypeMapping.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaTypeMapping; -import org.eclipse.jpt.jpa.core.resource.java.Annotation; - -public class JavaTestTypeMapping - extends AbstractJavaTypeMapping<Annotation> -{ - public static final String TEST_TYPE_MAPPING_KEY = "test"; //$NON-NLS-1$ - public static final String TEST_TYPE_ANNOTATION_NAME = "test.Test"; //$NON-NLS-1$ - - - public JavaTestTypeMapping(JavaPersistentType parent) { - super(parent, null); - } - - public String getKey() { - return TEST_TYPE_MAPPING_KEY; - } - - public JavaPersistentType getIdClass() { - return null; - } - - public boolean isMapped() { - return true; - } - - public boolean tableNameIsInvalid(String tableName) { - return false; - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestTypeMappingDefinition.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestTypeMappingDefinition.java deleted file mode 100644 index 7313299580..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/JavaTestTypeMappingDefinition.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable; -import org.eclipse.jpt.jpa.core.JpaFactory; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition; -import org.eclipse.jpt.jpa.core.resource.java.Annotation; - -public class JavaTestTypeMappingDefinition - implements JavaTypeMappingDefinition -{ - // singleton - private static final JavaTestTypeMappingDefinition INSTANCE = new JavaTestTypeMappingDefinition(); - - /** - * Return the singleton - */ - public static JavaTypeMappingDefinition instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private JavaTestTypeMappingDefinition() { - super(); - } - - public String getKey() { - return JavaTestTypeMapping.TEST_TYPE_MAPPING_KEY; - } - - public String getAnnotationName() { - return JavaTestTypeMapping.TEST_TYPE_ANNOTATION_NAME; - } - - public Iterable<String> getSupportingAnnotationNames() { - return EmptyIterable.instance(); - } - - public JavaTestTypeMapping buildMapping(JavaPersistentType persistentType, Annotation annotation, JpaFactory factory) { - return ((TestJpaFactory) factory).buildJavaTestTypeMapping(persistentType); - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJavaBasicMapping.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJavaBasicMapping.java deleted file mode 100644 index c4ade4014e..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJavaBasicMapping.java +++ /dev/null @@ -1,21 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; -import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBasicMapping; - -public class TestJavaBasicMapping - extends AbstractJavaBasicMapping -{ - public TestJavaBasicMapping(JavaPersistentAttribute parent) { - super(parent); - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJavaEntity.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJavaEntity.java deleted file mode 100644 index 2aee63a1e2..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJavaEntity.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaEntity; -import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0; -import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation; - -public class TestJavaEntity - extends AbstractJavaEntity -{ - protected TestJavaEntity(JavaPersistentType parent, EntityAnnotation mappingAnnotation) { - super(parent, mappingAnnotation); - } - - public JavaCacheable2_0 getCacheable() { - return null; - } - - public boolean calculateDefaultCacheable() { - return false; - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaFactory.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaFactory.java deleted file mode 100644 index 1fb3e08be3..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaFactory.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.core.context.java.JavaBasicMapping; -import org.eclipse.jpt.jpa.core.context.java.JavaEntity; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute; -import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType; -import org.eclipse.jpt.jpa.core.internal.AbstractJpaFactory; -import org.eclipse.jpt.jpa.core.resource.java.EntityAnnotation; - -public class TestJpaFactory - extends AbstractJpaFactory -{ - @Override - public JavaEntity buildJavaEntity(JavaPersistentType parent, EntityAnnotation entityAnnotation) { - return new TestJavaEntity(parent, entityAnnotation); - } - - @Override - public JavaBasicMapping buildJavaBasicMapping(JavaPersistentAttribute parent) { - return new TestJavaBasicMapping(parent); - } - - public JavaTestTypeMapping buildJavaTestTypeMapping(JavaPersistentType parent) { - return new JavaTestTypeMapping(parent); - } - - public JavaTestAttributeMapping buildJavaTestAttributeMapping(JavaPersistentAttribute parent) { - return new JavaTestAttributeMapping(parent); - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformFactory.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformFactory.java deleted file mode 100644 index 820c9a843a..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformFactory.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007, 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.core.JpaFacet; -import org.eclipse.jpt.jpa.core.JpaPlatform; -import org.eclipse.jpt.jpa.core.JpaPlatformFactory; -import org.eclipse.jpt.jpa.core.JpaPlatformVariation; -import org.eclipse.jpt.jpa.core.internal.GenericJpaAnnotationDefinitionProvider; -import org.eclipse.jpt.jpa.core.internal.GenericJpaAnnotationProvider; -import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatform; -import org.eclipse.jpt.jpa.core.internal.GenericJpaPlatformFactory.SimpleVersion; - -/** - * All the state in the JPA platform should be "static" (i.e. unchanging once - * it is initialized). - */ -@SuppressWarnings("nls") -public class TestJpaPlatformFactory - implements JpaPlatformFactory -{ - /** - * zero-argument constructor - */ - public TestJpaPlatformFactory() { - super(); - } - - - public JpaPlatform buildJpaPlatform(String id) { - return new GenericJpaPlatform( - id, - buildJpaVersion(), - new TestJpaFactory(), - new GenericJpaAnnotationProvider(GenericJpaAnnotationDefinitionProvider.instance()), - TestJpaPlatformProvider.instance(), - buildJpaPlatformVariation()); - } - - private JpaPlatform.Version buildJpaVersion() { - return new SimpleVersion(JpaFacet.VERSION_1_0.getVersionString()) { - @Override - public String getVersion() { - return "BOOOYAH!"; - } - }; - } - - protected JpaPlatformVariation buildJpaPlatformVariation() { - return new JpaPlatformVariation() { - public Supported getTablePerConcreteClassInheritanceIsSupported() { - return Supported.MAYBE; - } - public boolean isJoinTableOverridable() { - return false; - } - }; - } -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformProvider.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformProvider.java deleted file mode 100644 index 5a072bf5b1..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformProvider.java +++ /dev/null @@ -1,163 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2010 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.tests.extension.resource; - -import java.util.ArrayList; -import org.eclipse.core.runtime.content.IContentType; -import org.eclipse.jpt.common.core.JptCommonCorePlugin; -import org.eclipse.jpt.common.core.JptResourceType; -import org.eclipse.jpt.common.utility.internal.CollectionTools; -import org.eclipse.jpt.jpa.core.JpaPlatformProvider; -import org.eclipse.jpt.jpa.core.JpaResourceModelProvider; -import org.eclipse.jpt.jpa.core.JptJpaCorePlugin; -import org.eclipse.jpt.jpa.core.ResourceDefinition; -import org.eclipse.jpt.jpa.core.context.java.DefaultJavaAttributeMappingDefinition; -import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMappingDefinition; -import org.eclipse.jpt.jpa.core.context.java.JavaTypeMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.AbstractJpaPlatformProvider; -import org.eclipse.jpt.jpa.core.internal.JarResourceModelProvider; -import org.eclipse.jpt.jpa.core.internal.JavaResourceModelProvider; -import org.eclipse.jpt.jpa.core.internal.OrmResourceModelProvider; -import org.eclipse.jpt.jpa.core.internal.PersistenceResourceModelProvider; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaBasicMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddableDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddedIdMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaEmbeddedMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaEntityDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaIdMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaManyToManyMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaManyToOneMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaMappedSuperclassDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaOneToManyMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaOneToOneMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaTransientMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.context.java.JavaVersionMappingDefinition; -import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmXmlDefinition; -import org.eclipse.jpt.jpa.core.internal.jpa1.context.persistence.GenericPersistenceXmlDefinition; - -public class TestJpaPlatformProvider extends AbstractJpaPlatformProvider -{ - public static final String ID = "core.testJpaPlatform"; //$NON-NLS-1$ - - // singleton - private static final JpaPlatformProvider INSTANCE = new TestJpaPlatformProvider(); - - - /** - * Return the singleton. - */ - public static JpaPlatformProvider instance() { - return INSTANCE; - } - - - /** - * Enforce singleton usage - */ - private TestJpaPlatformProvider() { - super(); - } - - - // ********** resource models ********** - - public JptResourceType getMostRecentSupportedResourceType(IContentType contentType) { - if (contentType.equals(JptCommonCorePlugin.JAVA_SOURCE_CONTENT_TYPE)) { - return JptCommonCorePlugin.JAVA_SOURCE_RESOURCE_TYPE; - } - else if (contentType.equals(JptCommonCorePlugin.JAR_CONTENT_TYPE)) { - return JptCommonCorePlugin.JAR_RESOURCE_TYPE; - } - else if (contentType.equals(JptJpaCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) { - return JptJpaCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE; - } - else if (contentType.equals(JptJpaCorePlugin.ORM_XML_CONTENT_TYPE)) { - return JptJpaCorePlugin.ORM_XML_1_0_RESOURCE_TYPE; - } - else { - throw new IllegalArgumentException(contentType.toString()); - } - } - - @Override - protected void addResourceModelProvidersTo(ArrayList<JpaResourceModelProvider> providers) { - CollectionTools.addAll(providers, RESOURCE_MODEL_PROVIDERS); - } - - // order should not be important here - protected static final JpaResourceModelProvider[] RESOURCE_MODEL_PROVIDERS = new JpaResourceModelProvider[] { - JavaResourceModelProvider.instance(), - JarResourceModelProvider.instance(), - PersistenceResourceModelProvider.instance(), - OrmResourceModelProvider.instance() - }; - - - // ********** Java type mappings ********** - - @Override - protected void addJavaTypeMappingDefinitionsTo(ArrayList<JavaTypeMappingDefinition> definitions) { - CollectionTools.addAll(definitions, JAVA_TYPE_MAPPING_DEFINITIONS); - } - - // order matches that used by the Reference Implementation (EclipseLink) - protected static final JavaTypeMappingDefinition[] JAVA_TYPE_MAPPING_DEFINITIONS = new JavaTypeMappingDefinition[] { - JavaEntityDefinition.instance(), - JavaEmbeddableDefinition.instance(), - JavaMappedSuperclassDefinition.instance(), - JavaTestTypeMappingDefinition.instance() // added - }; - - - // ********** Java attribute mappings ********** - - @Override - protected void addDefaultJavaAttributeMappingDefinitionsTo(ArrayList<DefaultJavaAttributeMappingDefinition> definitions) { - CollectionTools.addAll(definitions, DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS); - } - - // order matches that used by the Reference Implementation (EclipseLink) - protected static final DefaultJavaAttributeMappingDefinition[] DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new DefaultJavaAttributeMappingDefinition[] { - JavaEmbeddedMappingDefinition.instance(), - JavaBasicMappingDefinition.instance() - }; - @Override - protected void addSpecifiedJavaAttributeMappingDefinitionsTo(ArrayList<JavaAttributeMappingDefinition> definitions) { - CollectionTools.addAll(definitions, SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS); - } - - // order matches that used by the Reference Implementation (EclipseLink) - protected static final JavaAttributeMappingDefinition[] SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new JavaAttributeMappingDefinition[] { - JavaTransientMappingDefinition.instance(), - JavaIdMappingDefinition.instance(), - JavaVersionMappingDefinition.instance(), - JavaBasicMappingDefinition.instance(), - JavaEmbeddedMappingDefinition.instance(), - JavaEmbeddedIdMappingDefinition.instance(), - JavaManyToManyMappingDefinition.instance(), - JavaManyToOneMappingDefinition.instance(), - JavaOneToManyMappingDefinition.instance(), - JavaOneToOneMappingDefinition.instance(), - JavaTestAttributeMappingDefinition.instance() // added - }; - - - // ********** resource definitions ********** - - @Override - protected void addResourceDefinitionsTo(ArrayList<ResourceDefinition> definitions) { - CollectionTools.addAll(definitions, RESOURCE_DEFINITIONS); - } - - protected static final ResourceDefinition[] RESOURCE_DEFINITIONS = new ResourceDefinition[] { - GenericPersistenceXmlDefinition.instance(), - GenericOrmXmlDefinition.instance() - }; -} diff --git a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformUiFactory.java b/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformUiFactory.java deleted file mode 100644 index 32db21485c..0000000000 --- a/jpa/tests/org.eclipse.jpt.jpa.core.tests.extension.resource/src/org/eclipse/jpt/jpa/core/tests/extension/resource/TestJpaPlatformUiFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies 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.core.tests.extension.resource; - -import org.eclipse.jpt.jpa.ui.JpaPlatformUi; -import org.eclipse.jpt.jpa.ui.JpaPlatformUiFactory; -import org.eclipse.jpt.jpa.ui.internal.GenericJpaPlatformUiProvider; -import org.eclipse.jpt.jpa.ui.internal.platform.generic.GenericJpaPlatformUi; -import org.eclipse.jpt.jpa.ui.internal.platform.generic.GenericNavigatorProvider; - -public class TestJpaPlatformUiFactory implements JpaPlatformUiFactory -{ - - /** - * Zero arg constructor for extension point - */ - public TestJpaPlatformUiFactory() { - super(); - } - - public JpaPlatformUi buildJpaPlatformUi() { - return new GenericJpaPlatformUi( - new GenericNavigatorProvider(), - GenericJpaPlatformUiProvider.instance()); - } -} |