diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java deleted file mode 100644 index 6ae03e083d..0000000000 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/context/java/AbstractJavaIdMappingDefinition2_0.java +++ /dev/null @@ -1,42 +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.core.internal.jpa2.context.java; - -import org.eclipse.jpt.core.context.java.JavaPersistentAttribute; -import org.eclipse.jpt.core.internal.context.java.AbstractJavaIdMappingDefinition; -import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute; -import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation; -import org.eclipse.jpt.core.resource.java.OneToOneAnnotation; - -public abstract class AbstractJavaIdMappingDefinition2_0 - extends AbstractJavaIdMappingDefinition -{ - protected AbstractJavaIdMappingDefinition2_0() { - super(); - } - - - @Override - public boolean testSpecified(JavaPersistentAttribute persistentAttribute) { - return super.testSpecified(persistentAttribute) && ! testDerivedId(persistentAttribute); - } - - /** - * Return whether the Id annotation, if present, is used as a supporting annotation for - * 1-1 or M-1 mapping, rather than as a primary mapping annotation - */ - protected boolean testDerivedId(JavaPersistentAttribute persistentAttribute) { - JavaResourcePersistentAttribute resourceAttribute = - persistentAttribute.getResourcePersistentAttribute(); - return resourceAttribute.getAnnotation(OneToOneAnnotation.ANNOTATION_NAME) != null - || resourceAttribute.getAnnotation(ManyToOneAnnotation.ANNOTATION_NAME) != null; - } -} |