kmoore | c9c9e2b | 2011-02-06 02:07:28 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
kmoore | c7a0867 | 2011-08-01 15:10:18 +0000 | [diff] [blame] | 2 | * Copyright (c) 2009, 2011 Oracle. All rights reserved. |
kmoore | c9c9e2b | 2011-02-06 02:07:28 +0000 | [diff] [blame] | 3 | * This program and the accompanying materials are made available under the |
| 4 | * terms of the Eclipse Public License v1.0, which accompanies this distribution |
| 5 | * and is available at http://www.eclipse.org/legal/epl-v10.html. |
| 6 | * |
| 7 | * Contributors: |
| 8 | * Oracle - initial API and implementation |
| 9 | ******************************************************************************/ |
| 10 | package org.eclipse.jpt.jpa.core.internal.jpa2.resource.java; |
| 11 | |
| 12 | import org.eclipse.jdt.core.dom.CompilationUnit; |
kmoore | c7a0867 | 2011-08-01 15:10:18 +0000 | [diff] [blame] | 13 | import org.eclipse.jpt.common.core.internal.resource.java.NullAnnotation; |
| 14 | import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement; |
kmoore | c9c9e2b | 2011-02-06 02:07:28 +0000 | [diff] [blame] | 15 | import org.eclipse.jpt.common.core.utility.TextRange; |
kmoore | c9c9e2b | 2011-02-06 02:07:28 +0000 | [diff] [blame] | 16 | import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapsId2_0Annotation; |
kmoore | c9c9e2b | 2011-02-06 02:07:28 +0000 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * <code>javax.persistence.MapsId</code> |
| 20 | */ |
| 21 | public final class NullMapsId2_0Annotation |
| 22 | extends NullAnnotation<MapsId2_0Annotation> |
| 23 | implements MapsId2_0Annotation |
| 24 | { |
kmoore | c7a0867 | 2011-08-01 15:10:18 +0000 | [diff] [blame] | 25 | protected NullMapsId2_0Annotation(JavaResourceAnnotatedElement parent) { |
kmoore | c9c9e2b | 2011-02-06 02:07:28 +0000 | [diff] [blame] | 26 | super(parent); |
| 27 | } |
| 28 | |
| 29 | public String getAnnotationName() { |
| 30 | return ANNOTATION_NAME; |
| 31 | } |
| 32 | |
| 33 | // ***** value |
| 34 | public String getValue() { |
| 35 | return null; |
| 36 | } |
| 37 | |
| 38 | public void setValue(String newValue) { |
| 39 | if (newValue != null) { |
| 40 | this.addAnnotation().setValue(newValue); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | public TextRange getValueTextRange(CompilationUnit astRoot) { |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | public boolean valueTouches(int pos, CompilationUnit astRoot) { |
| 49 | return false; |
| 50 | } |
| 51 | } |