Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornhauge2011-02-03 16:57:44 +0000
committernhauge2011-02-03 16:57:44 +0000
commit2ebb49f74cfb4589ff37e0e6fd6a7feae3a90f59 (patch)
tree63e5b7c0c3d630dc627de4e6f905457ae6f50fa4 /jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2
parente75640b4f03e58e6a26eae1eee347951718b3a3f (diff)
downloadwebtools.dali-2ebb49f74cfb4589ff37e0e6fd6a7feae3a90f59.tar.gz
webtools.dali-2ebb49f74cfb4589ff37e0e6fd6a7feae3a90f59.tar.xz
webtools.dali-2ebb49f74cfb4589ff37e0e6fd6a7feae3a90f59.zip
This commit was manufactured by cvs2svn to create tag 'v201102030000'.v201102030000
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2')
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaAnnotationDefinitionProvider.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaFactory.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformFactory.java72
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformProvider.java191
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/java/EclipseLinkJavaPersistentType1_2.java78
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/orm/EclipseLinkOrmXml1_2Definition.java48
6 files changed, 0 insertions, 481 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaAnnotationDefinitionProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaAnnotationDefinitionProvider.java
deleted file mode 100644
index fc98bf532a..0000000000
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaAnnotationDefinitionProvider.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.eclipselink.core.internal.v1_2;
-
-import java.util.ArrayList;
-import org.eclipse.jpt.core.JpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.core.internal.AbstractJpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.core.internal.jpa2.resource.java.Access2_0AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-
-/**
- * Provides annotations for 1.2 EclipseLink platform
- */
-public class EclipseLink1_2JpaAnnotationDefinitionProvider
- extends AbstractJpaAnnotationDefinitionProvider
-{
- // singleton
- private static final JpaAnnotationDefinitionProvider INSTANCE = new EclipseLink1_2JpaAnnotationDefinitionProvider();
-
- /**
- * Return the singleton
- */
- public static JpaAnnotationDefinitionProvider instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private EclipseLink1_2JpaAnnotationDefinitionProvider() {
- super();
- }
-
- @Override
- protected void addTypeAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions) {
- definitions.add(Access2_0AnnotationDefinition.instance());
- }
-
- @Override
- protected void addTypeMappingAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions) {
- // nothing new for EclipseLink 1.2
- }
-
- @Override
- protected void addAttributeAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions) {
- // nothing new for EclipseLink 1.2
- }
-
- @Override
- protected void addPackageAnnotationDefinitionsTo(ArrayList<AnnotationDefinition> definitions) {
- // no package annotations
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaFactory.java
deleted file mode 100644
index 8bafa93488..0000000000
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.eclipselink.core.internal.v1_2;
-
-import org.eclipse.jpt.core.context.PersistentType.Owner;
-import org.eclipse.jpt.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaFactory;
-import org.eclipse.jpt.eclipselink.core.internal.v1_2.context.java.EclipseLinkJavaPersistentType1_2;
-
-public class EclipseLink1_2JpaFactory
- extends EclipseLinkJpaFactory
-{
- public EclipseLink1_2JpaFactory() {
- super();
- }
-
- // ********** Java Context Model **********
-
- @Override
- public JavaPersistentType buildJavaPersistentType(Owner owner, JavaResourcePersistentType jrpt) {
- return new EclipseLinkJavaPersistentType1_2(owner, jrpt);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformFactory.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformFactory.java
deleted file mode 100644
index 2cfcdca732..0000000000
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformFactory.java
+++ /dev/null
@@ -1,72 +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.eclipselink.core.internal.v1_2;
-
-import org.eclipse.jpt.core.JpaAnnotationProvider;
-import org.eclipse.jpt.core.JpaFacet;
-import org.eclipse.jpt.core.JpaPlatform;
-import org.eclipse.jpt.core.JpaPlatformFactory;
-import org.eclipse.jpt.core.JpaPlatformVariation;
-import org.eclipse.jpt.core.internal.GenericJpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.core.internal.GenericJpaAnnotationProvider;
-import org.eclipse.jpt.core.internal.GenericJpaPlatform;
-import org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaAnnotationDefinitionProvider;
-import org.eclipse.jpt.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkVersion;
-import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin;
-
-/**
- * All the state in the JPA platform should be "static" (i.e. unchanging once
- * it is initialized).
- */
-public class EclipseLink1_2JpaPlatformFactory
- implements JpaPlatformFactory
-{
- /**
- * zero-argument constructor
- */
- public EclipseLink1_2JpaPlatformFactory() {
- super();
- }
-
-
- public JpaPlatform buildJpaPlatform(String id) {
- return new GenericJpaPlatform(
- id,
- buildJpaVersion(),
- new EclipseLink1_2JpaFactory(),
- buildJpaAnnotationProvider(),
- EclipseLink1_2JpaPlatformProvider.instance(),
- buildJpaPlatformVariation());
- }
-
- protected JpaAnnotationProvider buildJpaAnnotationProvider() {
- return new GenericJpaAnnotationProvider(
- GenericJpaAnnotationDefinitionProvider.instance(),
- EclipseLinkJpaAnnotationDefinitionProvider.instance(),
- EclipseLink1_2JpaAnnotationDefinitionProvider.instance());
- }
-
- protected JpaPlatformVariation buildJpaPlatformVariation() {
- return new JpaPlatformVariation() {
- public Supported getTablePerConcreteClassInheritanceIsSupported() {
- return Supported.YES;
- }
- public boolean isJoinTableOverridable() {
- return false;
- }
- };
- }
-
- private JpaPlatform.Version buildJpaVersion() {
- return new EclipseLinkVersion(
- JptEclipseLinkCorePlugin.ECLIPSELINK_PLATFORM_VERSION_1_2,
- JpaFacet.VERSION_1_0.getVersionString());
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformProvider.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformProvider.java
deleted file mode 100644
index ab842a9d66..0000000000
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/EclipseLink1_2JpaPlatformProvider.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jpt.eclipselink.core.internal.v1_2;
-
-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.core.JpaPlatformProvider;
-import org.eclipse.jpt.core.JpaResourceModelProvider;
-import org.eclipse.jpt.core.JptCorePlugin;
-import org.eclipse.jpt.core.ResourceDefinition;
-import org.eclipse.jpt.core.context.java.DefaultJavaAttributeMappingDefinition;
-import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
-import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
-import org.eclipse.jpt.core.internal.AbstractJpaPlatformProvider;
-import org.eclipse.jpt.core.internal.JarResourceModelProvider;
-import org.eclipse.jpt.core.internal.JavaResourceModelProvider;
-import org.eclipse.jpt.core.internal.OrmResourceModelProvider;
-import org.eclipse.jpt.core.internal.PersistenceResourceModelProvider;
-import org.eclipse.jpt.core.internal.context.java.JavaBasicMappingDefinition;
-import org.eclipse.jpt.core.internal.context.java.JavaEmbeddableDefinition;
-import org.eclipse.jpt.core.internal.context.java.JavaEmbeddedIdMappingDefinition;
-import org.eclipse.jpt.core.internal.context.java.JavaEmbeddedMappingDefinition;
-import org.eclipse.jpt.core.internal.context.java.JavaEntityDefinition;
-import org.eclipse.jpt.core.internal.context.java.JavaMappedSuperclassDefinition;
-import org.eclipse.jpt.core.internal.context.java.JavaTransientMappingDefinition;
-import org.eclipse.jpt.core.internal.jpa1.context.orm.GenericOrmXmlDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.EclipseLinkOrmResourceModelProvider;
-import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkBasicCollectionMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkBasicMapMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkBasicMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkIdMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkManyToManyMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkManyToOneMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkOneToManyMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkOneToOneMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkTransformationMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkVariableOneToOneMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.java.JavaEclipseLinkVersionMappingDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.orm.EclipseLinkOrmXmlDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.context.persistence.EclipseLinkPersistenceXmlDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.v1_1.context.orm.EclipseLinkOrmXml1_1Definition;
-import org.eclipse.jpt.eclipselink.core.internal.v1_2.context.orm.EclipseLinkOrmXml1_2Definition;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-
-/**
- * EclipseLink platform
- */
-public class EclipseLink1_2JpaPlatformProvider
- extends AbstractJpaPlatformProvider {
-
- // singleton
- private static final JpaPlatformProvider INSTANCE = new EclipseLink1_2JpaPlatformProvider();
-
-
- /**
- * Return the singleton.
- */
- public static JpaPlatformProvider instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private EclipseLink1_2JpaPlatformProvider() {
- 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(JptCorePlugin.PERSISTENCE_XML_CONTENT_TYPE)) {
- return JptCorePlugin.PERSISTENCE_XML_1_0_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptCorePlugin.ORM_XML_CONTENT_TYPE)) {
- return JptCorePlugin.ORM_XML_1_0_RESOURCE_TYPE;
- }
- else if (contentType.equals(JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_CONTENT_TYPE)) {
- return JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_2_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(),
- EclipseLinkOrmResourceModelProvider.instance()
- };
-
-
- // ********* Java type mappings *********
-
- @Override
- protected void addJavaTypeMappingDefinitionsTo(ArrayList<JavaTypeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, JAVA_TYPE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by EclipseLink
- // NB: no EclipseLink-specific mappings
- protected static final JavaTypeMappingDefinition[] JAVA_TYPE_MAPPING_DEFINITIONS = new JavaTypeMappingDefinition[] {
- JavaEntityDefinition.instance(),
- JavaEmbeddableDefinition.instance(),
- JavaMappedSuperclassDefinition.instance()
- };
-
-
- // ********* Java attribute mappings *********
-
- @Override
- protected void addDefaultJavaAttributeMappingDefinitionsTo(ArrayList<DefaultJavaAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by EclipseLink
- // NB: no change from EclipseLink 1.1 to 1.2
- protected static final DefaultJavaAttributeMappingDefinition[] DEFAULT_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new DefaultJavaAttributeMappingDefinition[] {
- JavaEmbeddedMappingDefinition.instance(),
- JavaEclipseLinkOneToManyMappingDefinition.instance(),
- JavaEclipseLinkOneToOneMappingDefinition.instance(),
- JavaEclipseLinkVariableOneToOneMappingDefinition.instance(),
- JavaEclipseLinkBasicMappingDefinition.instance()
- };
-
- @Override
- protected void addSpecifiedJavaAttributeMappingDefinitionsTo(ArrayList<JavaAttributeMappingDefinition> definitions) {
- CollectionTools.addAll(definitions, SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS);
- }
-
- // order matches that used by EclipseLink
- // NB: no change from EclipseLink 1.1 to 1.2
- protected static final JavaAttributeMappingDefinition[] SPECIFIED_JAVA_ATTRIBUTE_MAPPING_DEFINITIONS = new JavaAttributeMappingDefinition[] {
- JavaTransientMappingDefinition.instance(),
- JavaEclipseLinkBasicCollectionMappingDefinition.instance(),
- JavaEclipseLinkBasicMapMappingDefinition.instance(),
- JavaEclipseLinkIdMappingDefinition.instance(),
- JavaEclipseLinkVersionMappingDefinition.instance(),
- JavaBasicMappingDefinition.instance(),
- JavaEmbeddedMappingDefinition.instance(),
- JavaEmbeddedIdMappingDefinition.instance(),
- JavaEclipseLinkTransformationMappingDefinition.instance(),
- JavaEclipseLinkManyToManyMappingDefinition.instance(),
- JavaEclipseLinkManyToOneMappingDefinition.instance(),
- JavaEclipseLinkOneToManyMappingDefinition.instance(),
- JavaEclipseLinkOneToOneMappingDefinition.instance(),
- JavaEclipseLinkVariableOneToOneMappingDefinition.instance()
- };
-
-
- // ********** resource definitions **********
-
- @Override
- protected void addResourceDefinitionsTo(ArrayList<ResourceDefinition> definitions) {
- CollectionTools.addAll(definitions, RESOURCE_DEFINITIONS);
- }
-
- protected static final ResourceDefinition[] RESOURCE_DEFINITIONS = new ResourceDefinition[] {
- EclipseLinkPersistenceXmlDefinition.instance(),
- GenericOrmXmlDefinition.instance(),
- EclipseLinkOrmXmlDefinition.instance(),
- EclipseLinkOrmXml1_1Definition.instance(),
- EclipseLinkOrmXml1_2Definition.instance()
- };
-}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/java/EclipseLinkJavaPersistentType1_2.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/java/EclipseLinkJavaPersistentType1_2.java
deleted file mode 100644
index 1276ad44ef..0000000000
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/java/EclipseLinkJavaPersistentType1_2.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.eclipselink.core.internal.v1_2.context.java;
-
-import java.util.Iterator;
-
-import org.eclipse.jpt.core.context.AccessType;
-import org.eclipse.jpt.core.context.PersistentType;
-import org.eclipse.jpt.core.internal.context.java.AbstractJavaPersistentType;
-import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-
-/**
- * EclipseLink Java 1.2
- * Support for specified access.
- */
-public class EclipseLinkJavaPersistentType1_2
- extends AbstractJavaPersistentType
-{
- public EclipseLinkJavaPersistentType1_2(PersistentType.Owner parent, JavaResourcePersistentType jrpt) {
- super(parent, jrpt);
- }
-
-
- // ********** access annotation **********
-
- protected Access2_0Annotation getAccessAnnotation() {
- return (Access2_0Annotation) this.resourcePersistentType.getNonNullAnnotation(this.getAccessAnnotationName());
- }
-
- protected void removeAccessAnnotationIfUnset() {
- if (this.getAccessAnnotation().isUnset()) {
- this.removeAccessAnnotation();
- }
- }
-
- protected void removeAccessAnnotation() {
- this.resourcePersistentType.removeAnnotation(this.getAccessAnnotationName());
- }
-
- protected String getAccessAnnotationName() {
- return Access2_0Annotation.ANNOTATION_NAME;
- }
-
-
- // ********** access **********
-
- public void setSpecifiedAccess(AccessType access) {
- if (this.valuesAreDifferent(this.specifiedAccess, access)) {
- this.getAccessAnnotation().setValue(AccessType.toJavaResourceModel(access));
- this.removeAccessAnnotationIfUnset();
- this.setSpecifiedAccess_(access);
- }
- }
-
- @Override
- protected AccessType buildSpecifiedAccess() {
- return AccessType.fromJavaResourceModel(this.getAccessAnnotation().getValue());
- }
-
-
- // ********** attributes **********
-
- @Override
- protected Iterator<JavaResourcePersistentAttribute> resourceAttributes() {
- return (this.specifiedAccess == null) ?
- super.resourceAttributes() :
- this.resourcePersistentType.persistableAttributes(AccessType.toJavaResourceModel(this.specifiedAccess));
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/orm/EclipseLinkOrmXml1_2Definition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/orm/EclipseLinkOrmXml1_2Definition.java
deleted file mode 100644
index e348ac29cb..0000000000
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v1_2/context/orm/EclipseLinkOrmXml1_2Definition.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0, which accompanies this distribution
- * and is available at http://www.eclipse.org/legal/epl-v10.html.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.eclipselink.core.internal.v1_2.context.orm;
-
-import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.core.context.orm.OrmXmlDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.JptEclipseLinkCorePlugin;
-import org.eclipse.jpt.eclipselink.core.internal.context.orm.AbstractEclipseLinkOrmXmlDefinition;
-import org.eclipse.jpt.eclipselink.core.internal.v1_1.context.orm.EclipseLinkOrmXml1_1ContextNodeFactory;
-
-public class EclipseLinkOrmXml1_2Definition
- extends AbstractEclipseLinkOrmXmlDefinition
-{
- // singleton
- private static final OrmXmlDefinition INSTANCE = new EclipseLinkOrmXml1_2Definition();
-
- /**
- * Return the singleton.
- */
- public static OrmXmlDefinition instance() {
- return INSTANCE;
- }
-
-
- /**
- * Enforce singleton usage
- */
- private EclipseLinkOrmXml1_2Definition() {
- super();
- }
- public JptResourceType getResourceType() {
- return JptEclipseLinkCorePlugin.ECLIPSELINK_ORM_XML_1_2_RESOURCE_TYPE;
- }
-
- @Override
- protected OrmXmlContextNodeFactory buildContextNodeFactory() {
- return new EclipseLinkOrmXml1_1ContextNodeFactory();
- }
-
-}

Back to the top