Merge remote-tracking branch 'origin/master'
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java
index 07b4136..ea0242c 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java
@@ -64,7 +64,7 @@
throw new UnsupportedOperationException();
}
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
return null;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java
index 6688e14..3c87be5 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java
@@ -15,7 +15,6 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.internal.plugin.JptCommonCorePlugin;
import org.eclipse.jpt.common.core.resource.java.Annotation;
@@ -322,7 +321,7 @@
throw new UnsupportedOperationException();
}
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
+ public TextRange getTextRange(String nestableAnnotationName) {
throw new UnsupportedOperationException();
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java
index b4b4941..2f57c55 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java
@@ -13,7 +13,6 @@
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.plugin.JptCommonCorePlugin;
import org.eclipse.jpt.common.core.internal.resource.java.AbstractJavaResourceNode;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
@@ -49,7 +48,7 @@
throw new UnsupportedOperationException();
}
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
throw new UnsupportedOperationException();
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
index e25c637..55dd5c6 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
@@ -19,7 +19,6 @@
import java.util.Map;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.IAnnotationBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MarkerAnnotation;
@@ -74,6 +73,8 @@
protected TextRange nameTextRange;
+ protected TextRange textRange;
+
// ********** construction/initialization **********
SourceAnnotatedElement(JavaResourceNode parent, E annotatedElement) {
@@ -96,6 +97,7 @@
// getBinding() : IBinding - SourceMember and its subclasses have an initialize that takes an IBinding
// getTypeBinding() : ITypeBinding - this is for SourceAttribute
protected void initialize(ASTNode node, Name nameNode) {
+ this.textRange = this.buildTextRange(node);
this.nameTextRange = ASTTools.buildTextRange(nameNode);
this.initializeAnnotations(node);
}
@@ -150,10 +152,11 @@
/**
* Subclasses are responsible for calling this synchronizeWith method.
- * The ASTNode will be used to sync the annotations and the Name node
- * will be used to cache the name text range.
+ * The ASTNode will be used to sync the annotations and cache the text range
+ * and the Name node will be used to cache the name text range.
*/
protected void synchronizeWith(ASTNode node, Name nameNode) {
+ this.textRange = this.buildTextRange(node);
this.nameTextRange = ASTTools.buildTextRange(nameNode);
this.syncAnnotations(node);
}
@@ -522,18 +525,15 @@
// ********** misc **********
- public TextRange getTextRange(CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.annotatedElement.getBodyDeclaration(astRoot));
+ public TextRange getTextRange() {
+ return this.textRange;
}
public TextRange getNameTextRange() {
return this.nameTextRange;
}
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
+ public TextRange getTextRange(String nestableAnnotationName) {
CombinationAnnotationContainer container = this.annotationContainers.get(nestableAnnotationName);
if (container == null) {
return null;
@@ -542,7 +542,7 @@
if (annotation == null) {
annotation = container.getNestedAnnotation(0);
}
- return annotation.getTextRange(astRoot);
+ return annotation.getTextRange();
}
private TextRange buildTextRange(ASTNode astNode) {
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java
index 1260efa..ee66766 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java
@@ -42,6 +42,7 @@
protected final AnnotationAdapter annotationAdapter;
+ protected TextRange annotationTextRange;
/**
* constructor for straight member annotation
@@ -63,18 +64,20 @@
// ********** JavaResourceNode implementation **********
- public TextRange getTextRange(CompilationUnit astRoot) {
- return this.getAnnotationTextRange(astRoot);
+ public TextRange getTextRange() {
+ return this.getAnnotationTextRange();
}
// ********** Annotation implementation **********
public void initialize(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ this.annotationTextRange = this.buildTextRange(astAnnotation);
initialize((CompilationUnit) astAnnotation.getRoot());
}
public void synchronizeWith(org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ this.annotationTextRange = this.buildTextRange(astAnnotation);
synchronizeWith((CompilationUnit) astAnnotation.getRoot());
}
@@ -137,11 +140,8 @@
* Return the text range corresponding to the annotation.
* If the annotation is missing, return <code>null</code>.
*/
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.getAstAnnotation(astRoot));
+ protected TextRange getAnnotationTextRange() {
+ return this.annotationTextRange;
}
/**
@@ -157,25 +157,17 @@
* Return the text range corresponding to the specified element.
* If the specified element is missing, return the annotation's text range instead.
*/
- protected TextRange getElementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, CompilationUnit astRoot) {
- return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, astRoot), astRoot);
- }
-
- /**
- * Convenience method.
- * Return the text range corresponding to the specified element.
- * If the specified element is missing, return the annotation's text range instead.
- */
protected TextRange getElementTextRange(DeclarationAnnotationElementAdapter<?> elementAdapter, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, astAnnotation), astAnnotation);
}
/**
- * Convenience method. If the specified element text range is null
- * return the member's text range instead.
+ * Convenience method.
+ * Return the text range corresponding to the specified element at the given index.
+ * If the specified element is missing, return the annotation's text range instead.
*/
- protected TextRange getElementTextRange(TextRange elementTextRange, CompilationUnit astRoot) {
- return (elementTextRange != null) ? elementTextRange : this.getAnnotationTextRange(astRoot);
+ protected TextRange getElementTextRange(IndexedDeclarationAnnotationElementAdapter<?> elementAdapter, int index, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ return this.getElementTextRange(this.getAnnotationElementTextRange(elementAdapter, index, astAnnotation), astAnnotation);
}
/**
@@ -187,14 +179,6 @@
}
/**
- * Convenience method. Return whether the specified position exists and
- * touches the specified element.
- */
- protected boolean elementTouches(DeclarationAnnotationElementAdapter<?> elementAdapter, int pos, CompilationUnit astRoot) {
- return this.textRangeTouches(this.getAnnotationElementTextRange(elementAdapter, astRoot), pos);
- }
-
- /**
* Convenience method. Return whether the specified text range is not
* null (meaning the corresponding AST node exists) and the specified position touches it.
*/
@@ -202,26 +186,12 @@
return (textRange != null) && textRange.touches(pos);
}
- /**
- * Return the text range corresponding to the specified element.
- * If the element is missing, return null.
- */
- protected TextRange getAnnotationElementTextRange(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.getAnnotationElementExpression(adapter, astRoot));
- }
-
protected TextRange getAnnotationElementTextRange(DeclarationAnnotationElementAdapter<?> adapter, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
return (astAnnotation == null) ? null : this.buildTextRange(this.getAnnotationElementExpression(adapter, astAnnotation));
}
- /**
- * Return the specified AST DOM element.
- */
- protected Expression getAnnotationElementExpression(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
- return adapter.getExpression(this.annotatedElement.getModifiedDeclaration(astRoot));
+ protected TextRange getAnnotationElementTextRange(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ return (astAnnotation == null) ? null : this.buildTextRange(this.getAnnotationElementExpression(adapter, index, astAnnotation));
}
/**
@@ -232,22 +202,10 @@
}
/**
- * Return the text range corresponding to the expression at the specified
- * index of the element's array.
- * @exception ArrayIndexOutOfBoundsException if the index is out of range
+ * Return the specified AST DOM element.
*/
- protected TextRange selectAnnotationElementTextRange(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, CompilationUnit astRoot) {
- // the AST is null for virtual Java attributes
- // TODO remove the AST null check once we start storing text ranges
- // in the resource model
- return (astRoot == null) ? null : this.buildTextRange(this.selectAnnotationElementExpression(adapter, index, astRoot));
- }
-
- /**
- * Return the expression at the specified index of the element's array.
- */
- protected Expression selectAnnotationElementExpression(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, CompilationUnit astRoot) {
- return adapter.selectExpression(this.annotatedElement.getModifiedDeclaration(astRoot), index);
+ protected Expression getAnnotationElementExpression(IndexedDeclarationAnnotationElementAdapter<?> adapter, int index, org.eclipse.jdt.core.dom.Annotation astAnnotation) {
+ return adapter.selectExpression(astAnnotation, index);
}
/**
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java
index d47133f..e5dac76 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java
@@ -102,7 +102,7 @@
// ********** JavaResourceNode implementation **********
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
return null;
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
index 1160aea..020a5d4 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java
@@ -178,27 +178,6 @@
}
/**
- * Return whether the specified expression is a type literal and the type binding
- * corresponding to the specified type name exists in the type
- * literal's inheritance hierarchy (superclasses and interfaces).
- * Return null otherwise.
- */
- public static boolean typeIsSubTypeOf(Expression expression, String searchTypeName) {
- return findTypeInHierarchy(expression, searchTypeName) != null;
- }
-
- /**
- * If the specified expression is a type literal, return the type binding
- * corresponding to the specified type name if it exists in the type
- * literal's inheritance hierarchy (superclasses and interfaces).
- * Return null otherwise.
- */
- public static ITypeBinding findTypeInHierarchy(Expression expression, String searchTypeName) {
- ITypeBinding typeBinding = resolveTypeBinding(expression);
- return (typeBinding == null) ? null : findTypeInHierarchy(typeBinding, searchTypeName);
- }
-
- /**
* Return whether a type binding with the specified type name exists in
* the specified type binding's inheritance hierarchy (superclasses
* and interfaces).
@@ -255,19 +234,6 @@
}
return null;
}
- /**
- * Return whether the specified expression is a type literal and the type binding
- * corresponding to the specified interface name exists in the type
- * literal's inheritance hierarchy (superclasses and interfaces).
- * Return null otherwise.
- */
- public static boolean typeImplementsInterface(Expression expression, String searchInterfaceName) {
- ITypeBinding typeBinding = resolveTypeBinding(expression);
- if (typeBinding == null) {
- return false;
- }
- return findInterfaceInHierarchy(typeBinding, searchInterfaceName) != null;
- }
/**
* Return whether a type binding with the specified interface name exists in
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java
index fe84b5a..a53c0fb 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java
@@ -9,11 +9,11 @@
******************************************************************************/
package org.eclipse.jpt.common.core.internal.utility.jdt;
+import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
import org.eclipse.jpt.common.core.utility.jdt.IndexedDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.common.core.utility.jdt.IndexedExpressionConverter;
-import org.eclipse.jpt.common.core.utility.jdt.ModifiedDeclaration;
/**
* Wrap a declaration annotation element adapter that deals with AST
@@ -38,7 +38,7 @@
return (IndexedExpressionConverter<T>) this.converter;
}
- public Expression selectExpression(ModifiedDeclaration declaration, int index) {
- return this.getConverter().selectExpression(this.getExpression(declaration), index);
+ public Expression selectExpression(Annotation astAnnotation, int index) {
+ return this.getConverter().selectExpression(this.getExpression(astAnnotation), index);
}
}
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java
index fde46cc..aa64a76 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.common.core.resource.java;
import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -200,10 +199,10 @@
* container annotation.
* This is not used for stand-alone annotations
*
- * @see Annotation#getTextRange(CompilationUnit)
+ * @see Annotation#getTextRange()
* @see AnnotationProvider#getContainerAnnotationName(String)
*/
- TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot);
+ TextRange getTextRange(String nestableAnnotationName);
/**
* The kind of java element.
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java
index 7b63fb8..4a4fb50 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.common.core.resource.java;
import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -25,7 +24,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.3
* @since 3.0
*/
public interface JavaResourceNode
@@ -57,7 +56,7 @@
/**
* Return the [source] node's text range in the compilation unit's file.
*/
- TextRange getTextRange(CompilationUnit astRoot);
+ TextRange getTextRange();
/**
* Root of Java resource model containment hierarchy.
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java
index 202e094..b22558b 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.common.core.utility.jdt;
+import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.Expression;
/**
@@ -30,9 +31,9 @@
extends DeclarationAnnotationElementAdapter<T[]>
{
/**
- * Given the specified declaration, return the expression at the specified
+ * Given the specified annotation, return the expression at the specified
* index.
* @throws IndexOutOfBoundsException if the index is out of range
*/
- Expression selectExpression(ModifiedDeclaration declaration, int index);
+ Expression selectExpression(Annotation astAnnotation, int index);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java
index 67cb961..96120b4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java
@@ -9,8 +9,13 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceTypeReference;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.JaxbNode;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Common protocol for JAXB objects that have a context, as opposed to
@@ -22,7 +27,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.3
* @since 3.0
*/
public interface JaxbContextNode
@@ -43,4 +48,18 @@
*/
void update();
+
+
+ // ******************** validation ****************************************
+
+ /**
+ * Adds to the list of current validation messages
+ */
+ void validate(List<IMessage> messages, IReporter reporter);
+
+ /**
+ * Return the text range for highlighting errors for this object
+ */
+ TextRange getValidationTextRange();
+
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java
index f203a01..fdb9aa6 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,10 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import java.util.List;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
/**
* Root of the JAXB context model.
* <p>
@@ -22,7 +18,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.0
*/
public interface JaxbContextRoot
@@ -104,13 +100,4 @@
// ***** misc *****
-
-
-
- // ***** validation *****
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java
index 739cbe8..2c730c8 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,10 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import java.util.List;
import org.eclipse.jpt.jaxb.core.xsd.XsdSchema;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
*
@@ -23,7 +20,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.03
* @since 3.0
*/
public interface JaxbPackage
@@ -75,12 +72,4 @@
* Return the {@link XsdSchema} associated with this package, if there is one, null otherwise
*/
XsdSchema getXsdSchema();
-
-
- // **************** validation ********************************************
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java
index 5ef4178..bd648dc 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
@@ -23,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.?
+ * @version 3.3
* @since 3.?
*/
public interface JaxbQName
@@ -57,7 +56,7 @@
// ***** validation *****
- TextRange getNamespaceTextRange(CompilationUnit astRoot);
+ TextRange getNamespaceTextRange();
- TextRange getNameTextRange(CompilationUnit astRoot);
+ TextRange getNameTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java
index 333cbcf..378e161 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.context;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.resource.java.XmlElementAnnotation;
@@ -110,5 +109,5 @@
// ***** validation *****
- TextRange getTypeTextRange(CompilationUnit astRoot);
+ TextRange getTypeTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java
index b2859f0..c833c99 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -9,13 +9,9 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.context.java;
-import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.jaxb.core.context.JaxbContextNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public interface JavaContextNode
@@ -27,17 +23,4 @@
* Return the Java code-completion proposals for the specified position in the source code.
*/
Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
-
-
- // ******************** validation ****************************************
-
- /**
- * Adds to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- /**
- * Return the text range for highlighting errors for this object
- */
- TextRange getValidationTextRange(CompilationUnit astRoot);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java
index 5e270b2..a8a2376 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,11 +9,17 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.JaxbNode;
import org.eclipse.jpt.jaxb.core.context.JaxbContextNode;
import org.eclipse.jpt.jaxb.core.context.JaxbContextRoot;
import org.eclipse.jpt.jaxb.core.internal.AbstractJaxbNode;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJaxbContextNode
extends AbstractJaxbNode
@@ -83,4 +89,19 @@
public JaxbContextRoot getContextRoot() {
return getParent().getContextRoot();
}
+
+
+ // **************** validation ********************************************
+
+ public abstract TextRange getValidationTextRange();
+
+ /**
+ * All subclass implementations {@link #validate(List, IReporter)}
+ * should be preceded by a "super" call to this method
+ */
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ if (reporter.isCancelled()) {
+ throw new ValidationCancelledException();
+ }
+ }
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java
index e7e5170..ea3b3a4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java
@@ -20,6 +20,7 @@
import org.eclipse.jpt.common.core.resource.java.JavaResourceEnum;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.NotNullFilter;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -568,8 +569,15 @@
// **************** validation ********************************************
+
+ @Override
+ public TextRange getValidationTextRange() {
+ return TextRange.Empty.instance(); //?
+ }
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JaxbPackage pkg : this.packages.values()) {
pkg.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java
index 5869fee..46927b9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,6 +11,7 @@
import java.util.List;
import org.eclipse.jpt.common.core.resource.java.JavaResourcePackage;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jaxb.core.context.JaxbContextRoot;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
@@ -20,7 +21,6 @@
import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
import org.eclipse.jpt.jaxb.core.internal.validation.JaxbValidationMessages;
import org.eclipse.jpt.jaxb.core.xsd.XsdSchema;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -110,7 +110,7 @@
// **************** misc **************************************************
public String getNamespace() {
- return (getPackageInfo() == null) ? "" : getPackageInfo().getXmlSchema().getNamespace();
+ return (getPackageInfo() == null) ? "" : getPackageInfo().getXmlSchema().getNamespace(); //$NON-NLS-1$
}
public XmlNsForm getAttributeFormDefault() {
@@ -127,11 +127,15 @@
// **************** validation ********************************************
+
+ @Override
+ public TextRange getValidationTextRange() {
+ return TextRange.Empty.instance(); //?
+ }
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
if (getJaxbProject().getSchemaLibrary().getSchema(getNamespace()) == null) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java
index f560b9e..6789f06 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
@@ -181,11 +180,11 @@
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlJavaTypeAdapter != null) {
- this.xmlJavaTypeAdapter.validate(messages, reporter, astRoot);
+ this.xmlJavaTypeAdapter.validate(messages, reporter);
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java
index 7c215be..3bec53e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -102,8 +101,8 @@
// ********** validation **********
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation() == null ? getJavaResourceAttribute().getNameTextRange() : getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation() == null ? getJavaResourceAttribute().getNameTextRange() : getAnnotation().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
index d92a2bb..2a20cb3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
@@ -9,20 +9,15 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.JptResourceType;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.jaxb.core.JaxbNode;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.AbstractJaxbContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJavaContextNode
@@ -47,19 +42,4 @@
int pos, Filter<String> filter, CompilationUnit astRoot) {
return EmptyIterable.instance();
}
-
-
- // **************** validation ********************************************
-
- public abstract TextRange getValidationTextRange(CompilationUnit astRoot);
-
- /**
- * All subclass implementations {@link #validate(List, IReporter, CompilationUnit)}
- * should be preceded by a "super" call to this method
- */
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java
index d3edefc..f4731e9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
@@ -94,7 +93,7 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition xsdType = getJaxbClassMapping().getXsdTypeDefinition();
if (xsdType == null) {
return;
@@ -118,7 +117,7 @@
}
if (resolvedXsdElement == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java
index 045a6db..2e157d7 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java
@@ -169,20 +169,20 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getParent().getValidationTextRange();
}
- protected TextRange getTextRange(TextRange textRange, CompilationUnit astRoot) {
- return (textRange != null) ? textRange : getParent().getValidationTextRange(astRoot);
+ protected TextRange getTextRange(TextRange textRange) {
+ return (textRange != null) ? textRange : getParent().getValidationTextRange();
}
- public TextRange getNamespaceTextRange(CompilationUnit astRoot) {
- return getTextRange(this.proxy.getNamespaceTextRange(), astRoot);
+ public TextRange getNamespaceTextRange() {
+ return getTextRange(this.proxy.getNamespaceTextRange());
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return getTextRange(this.proxy.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return getTextRange(this.proxy.getNameTextRange());
}
/**
@@ -194,17 +194,17 @@
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateName(messages, reporter, astRoot);
+ validateName(messages, reporter);
if (! StringTools.stringIsEmpty(getName())) {
- validateReference(messages, reporter, astRoot);
+ validateReference(messages, reporter);
}
}
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
if (StringTools.stringIsEmpty(getName())) {
messages.add(
DefaultValidationMessages.buildMessage(
@@ -212,19 +212,19 @@
JaxbValidationMessages.QNAME__MISSING_NAME,
new String[] { getReferencedComponentTypeDescription() },
this,
- getNameTextRange(astRoot)));
+ getNameTextRange()));
}
}
- protected abstract void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
+ protected abstract void validateReference(List<IMessage> messages, IReporter reporter);
- protected IMessage getUnresolveSchemaComponentMessage(CompilationUnit astRoot) {
+ protected IMessage getUnresolveSchemaComponentMessage() {
return DefaultValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.QNAME__UNRESOLVED_COMPONENT,
new String[] { getReferencedComponentTypeDescription(), getNamespace(), getName() },
this,
- getNameTextRange(astRoot));
+ getNameTextRange());
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java
index cc03ba5..9ae8bac 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java
@@ -30,7 +30,6 @@
import org.eclipse.jpt.jaxb.core.resource.java.XmlRootElementAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlTransientAnnotation;
import org.eclipse.jpt.jaxb.core.resource.java.XmlTypeAnnotation;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -268,13 +267,6 @@
}
- // ***** misc *****
-
- protected CompilationUnit buildASTRoot() {
- return this.resourceType.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
-
// ***** content assist *****
@Override
@@ -310,14 +302,13 @@
* Override as needed
*/
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return getJavaResourceType().getNameTextRange();
}
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
// TODO temporary hack since we don't know yet where to put
// any messages for types in another project
IFile file = this.resourceType.getFile();
@@ -327,21 +318,14 @@
if ((file != null)
&& file.getProject().equals(getJaxbProject().getProject())
&& (this.resourceType instanceof SourceNode)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
- }
- }
-
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- if (this.mapping != null) {
- this.mapping.validate(messages, reporter, astRoot);
- }
-
- if (this.xmlJavaTypeAdapter != null) {
- this.xmlJavaTypeAdapter.validate(messages, reporter, astRoot);
+
+ if (this.mapping != null) {
+ this.mapping.validate(messages, reporter);
+ }
+
+ if (this.xmlJavaTypeAdapter != null) {
+ this.xmlJavaTypeAdapter.validate(messages, reporter);
+ }
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java
index 8821439..5c59d92 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java
@@ -338,20 +338,20 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = getXmlTypeAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : getJaxbType().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = getXmlTypeAnnotation().getTextRange();
+ return (textRange != null) ? textRange : getJaxbType().getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (! this.xmlTransient) {
- this.qName.validate(messages, reporter, astRoot);
+ this.qName.validate(messages, reporter);
if (this.xmlRootElement != null) {
- this.xmlRootElement.validate(messages, reporter, astRoot);
+ this.xmlRootElement.validate(messages, reporter);
}
}
}
@@ -436,7 +436,7 @@
}
@Override
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
// do not call super... - it is not an error if the name is ""
// if name is absent (""), namespace cannot be different from package namespace
if ("".equals(getName())
@@ -453,7 +453,7 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
// if name is not absent (""), type must be from schema associated with this package
String name = getName();
String namespace = getNamespace();
@@ -463,7 +463,7 @@
if (schema != null) {
XsdTypeDefinition schemaType = schema.getTypeDefinition(namespace, name);
if (schemaType == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java
index f2c8bb9..3a39782 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -200,7 +199,7 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java
index 57c51ad..1a15f78 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
@@ -288,19 +287,19 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlID != null) {
- this.xmlID.validate(messages, reporter, astRoot);
+ this.xmlID.validate(messages, reporter);
}
if (this.xmlIDREF != null) {
- this.xmlIDREF.validate(messages, reporter, astRoot);
+ this.xmlIDREF.validate(messages, reporter);
}
if (this.xmlAttachmentRef != null) {
- this.xmlAttachmentRef.validate(messages, reporter, astRoot);
+ this.xmlAttachmentRef.validate(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java
index 8f5f0ca..8cf22df 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java
@@ -1,3 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.jaxb.core.internal.context.java;
import java.util.List;
@@ -223,26 +232,26 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlSchemaType != null) {
- this.xmlSchemaType.validate(messages, reporter, astRoot);
+ this.xmlSchemaType.validate(messages, reporter);
}
if (isXmlList()) {
- validateXmlList(messages, reporter, astRoot);
+ validateXmlList(messages, reporter);
}
}
- protected void validateXmlList(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateXmlList(List<IMessage> messages, IReporter reporter) {
if (! getPersistentAttribute().isJavaResourceAttributeCollectionType()) {
messages.add(
DefaultValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_LIST__ATTRIBUTE_NOT_COLLECTION_TYPE,
this,
- getXmlListValidationTextRange(astRoot)));
+ getXmlListValidationTextRange()));
}
else {
XsdTypeDefinition xsdType = getDataTypeXsdTypeDefinition();
@@ -256,13 +265,13 @@
JaxbValidationMessages.XML_LIST__ITEM_TYPE_NOT_MAPPED_TO_VALID_SCHEMA_TYPE,
new String[] { getValueTypeName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
- protected TextRange getXmlListValidationTextRange(CompilationUnit astRoot) {
+ protected TextRange getXmlListValidationTextRange() {
XmlListAnnotation annotation = getXmlListAnnotation();
- return (annotation == null) ? getValidationTextRange(astRoot) : annotation.getTextRange(astRoot);
+ return (annotation == null) ? getValidationTextRange() : annotation.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java
index 1eb4de5..8d2f72b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -58,7 +57,7 @@
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return null;
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java
index 99b941d..3db4fca 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
@@ -54,8 +53,8 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String fqType = getFullyQualifiedType();
if (fqType != null && ! XmlSchemaTypeAnnotation.DEFAULT_TYPE.equals(fqType)) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java
index 6090425..f2a3fec 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlJavaTypeAdapter;
@@ -48,8 +47,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getType() == null || getFullyQualifiedType().equals(XmlJavaTypeAdapter.DEFAULT_TYPE)) {
messages.add(
DefaultValidationMessages.buildMessage(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java
index b608e72..3df75bc 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java
@@ -15,7 +15,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -643,16 +642,16 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JaxbPersistentAttribute attribute : getAttributes()) {
- attribute.validate(messages, reporter, astRoot);
+ attribute.validate(messages, reporter);
}
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getJaxbClassMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getJaxbClassMapping().getValidationTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
index 348a972..438f26d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
@@ -775,22 +775,22 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateConstructor(messages, reporter, astRoot);
- validatePropOrder(messages, reporter, astRoot);
- validateXmlAnyAttributeMapping(messages, astRoot);
- validateXmlAnyElementMapping(messages, astRoot);
- validateXmlValueMapping(messages, astRoot);
- validateXmlIDs(messages, astRoot);
+ validateConstructor(messages, reporter);
+ validatePropOrder(messages, reporter);
+ validateXmlAnyAttributeMapping(messages);
+ validateXmlAnyElementMapping(messages);
+ validateXmlValueMapping(messages);
+ validateXmlIDs(messages);
for (JaxbPersistentAttribute attribute : getAttributes()) {
- attribute.validate(messages, reporter, astRoot);
+ attribute.validate(messages, reporter);
}
}
- protected void validateConstructor(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateConstructor(List<IMessage> messages, IReporter reporter) {
// TODO - factory class/method
if (! JAXB.XML_TYPE__DEFAULT_FACTORY_CLASS.equals(getFactoryClass())) {
@@ -800,7 +800,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_TYPE__UNSPECIFIED_FACTORY_METHOD,
this,
- getFactoryClassTextRange(astRoot)));
+ getFactoryClassTextRange()));
}
}
else {
@@ -812,13 +812,13 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_TYPE__NO_PUBLIC_OR_PROTECTED_CONSTRUCTOR,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
- protected void validatePropOrder(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validatePropOrder(List<IMessage> messages, IReporter reporter) {
if (CollectionTools.isEmpty(getPropOrder())) {
return;
}
@@ -894,7 +894,7 @@
JaxbValidationMessages.XML_TYPE__MISSING_PROP,
new String[] { missingProp },
this,
- getPropOrderTextRange(astRoot)));
+ getPropOrderTextRange()));
}
for (int i : nonexistentProps) {
@@ -918,7 +918,7 @@
}
}
- protected void validateXmlAnyAttributeMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlAnyAttributeMapping(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -941,7 +941,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -949,12 +949,12 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected void validateXmlAnyElementMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlAnyElementMapping(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -977,7 +977,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ELEMENT__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -985,12 +985,12 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ELEMENT__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected void validateXmlValueMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlValueMapping(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -1013,7 +1013,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -1021,12 +1021,12 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected void validateXmlIDs(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateXmlIDs(List<IMessage> messages) {
Set<JaxbPersistentAttribute> localAttributes = new HashSet<JaxbPersistentAttribute>();
Set<JaxbPersistentAttribute> allAttributes = new HashSet<JaxbPersistentAttribute>();
@@ -1054,7 +1054,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -1062,24 +1062,24 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__MULTIPLE_MAPPINGS_DEFINED,
anyAttribute.getMapping(),
- anyAttribute.getMapping().getValidationTextRange(astRoot)));
+ anyAttribute.getMapping().getValidationTextRange()));
}
}
}
- protected TextRange getFactoryClassTextRange(CompilationUnit astRoot) {
+ protected TextRange getFactoryClassTextRange() {
TextRange result = getXmlTypeAnnotation().getFactoryClassTextRange();
- return (result != null) ? result : getValidationTextRange(astRoot);
+ return (result != null) ? result : getValidationTextRange();
}
- protected TextRange getFactoryMethodTextRange(CompilationUnit astRoot) {
+ protected TextRange getFactoryMethodTextRange() {
TextRange result = getXmlTypeAnnotation().getFactoryMethodTextRange();
- return (result != null) ? result : getValidationTextRange(astRoot);
+ return (result != null) ? result : getValidationTextRange();
}
- protected TextRange getPropOrderTextRange(CompilationUnit astRoot) {
+ protected TextRange getPropOrderTextRange() {
TextRange result = getXmlTypeAnnotation().getPropOrderTextRange();
- return (result != null) ? result : getValidationTextRange(astRoot);
+ return (result != null) ? result : getValidationTextRange();
}
protected TextRange getPropTextRange(int index) {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java
index 9ede19c..be563d0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java
@@ -199,18 +199,18 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getXmlElementDeclAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getXmlElementDeclAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.qName.validate(messages, reporter, astRoot);
- this.substitutionHeadQName.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.qName.validate(messages, reporter);
+ this.substitutionHeadQName.validate(messages, reporter);
JavaResourceMethod resourceMethod = getResourceMethod();
- validateMethodReturnType(resourceMethod, messages, astRoot);
+ validateMethodReturnType(resourceMethod, messages);
if (resourceMethod.getParametersSize() != 1) {
messages.add(
@@ -218,12 +218,12 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_PARAM,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
protected void validateMethodReturnType(
- JavaResourceMethod resourceMethod, List<IMessage> messages, CompilationUnit astRoot) {
+ JavaResourceMethod resourceMethod, List<IMessage> messages) {
if (! JAXB.JAXB_ELEMENT.equals(resourceMethod.getTypeBinding().getQualifiedName())) {
messages.add(
@@ -231,7 +231,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_RETURN_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@@ -294,7 +294,7 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
if (! GenericJavaElementFactoryMethod.this.isGlobalScope()) {
String fqScope = GenericJavaElementFactoryMethod.this.getFullyQualifiedScope();
JaxbTypeMapping scopeTypeMapping =
@@ -306,7 +306,7 @@
}
if (xsdType.getElement(getNamespace(), getName(), true) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -314,7 +314,7 @@
XsdSchema xsdSchema = this.getXsdSchema();
if (xsdSchema != null) {
if (xsdSchema.getElementDeclaration(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -388,7 +388,7 @@
}
@Override
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
// need to ignore the unspecified (null) case
if ("".equals(getName())) {
messages.add(
@@ -397,7 +397,7 @@
JaxbValidationMessages.QNAME__MISSING_NAME,
new String[] { getReferencedComponentTypeDescription() },
this,
- getNameTextRange(astRoot)));
+ getNameTextRange()));
}
else if (! StringTools.stringIsEmpty(getName())) {
if (Tools.valuesAreEqual(getName(), GenericJavaElementFactoryMethod.this.getQName().getName())) {
@@ -406,17 +406,17 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__SUBST_HEAD_NAME_EQUALS_NAME,
this,
- getNameTextRange(astRoot)));
+ getNameTextRange()));
}
}
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdSchema xsdSchema = this.getXsdSchema();
if (xsdSchema != null) {
if (xsdSchema.getElementDeclaration(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
@@ -432,7 +432,7 @@
JaxbValidationMessages.XML_ELEMENT_DECL__SUBST_HEAD_NO_MATCHING_ELEMENT_DECL,
new String[] { getNamespace(), getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java
index bbe30a8..f4bb276 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java
@@ -131,8 +131,8 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String value = getValue();
XsdTypeDefinition<?> xsdType = getEnumMapping().getXsdTypeDefinition();
@@ -148,17 +148,17 @@
JaxbValidationMessages.XML_ENUM_VALUE__INVALID_LEXICAL_VALUE,
new String[] { value, xsdType.getName() },
this,
- getValueTextRange(astRoot)));
+ getValueTextRange()));
}
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getResourceEnumConstant().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getResourceEnumConstant().getTextRange();
}
- protected TextRange getValueTextRange(CompilationUnit astRoot) {
+ protected TextRange getValueTextRange() {
TextRange enumValueTextRange = getXmlEnumValueAnnotation().getValueTextRange();
- return enumValueTextRange != null ? enumValueTextRange : getValidationTextRange(astRoot);
+ return enumValueTextRange != null ? enumValueTextRange : getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java
index 89e9640..630eeeb 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java
@@ -217,14 +217,14 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
validateXmlType(messages, reporter);
validateXmlEnum(messages, reporter);
for (JaxbEnumConstant constant : getEnumConstants()) {
- constant.validate(messages, reporter, astRoot);
+ constant.validate(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java
index 05a0a9d..8bbd63f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jaxb.core.context.JaxbClass;
import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
@@ -131,11 +130,11 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlRegistry != null) {
- this.xmlRegistry.validate(messages, reporter, astRoot);
+ this.xmlRegistry.validate(messages, reporter);
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
index 9ad05a6..531d02a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java
@@ -297,11 +297,7 @@
// ***** misc *****
-
- protected CompilationUnit buildASTRoot() {
- return this.resourcePackage.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
+
public String getNamespaceForPrefix(String prefix) {
if (this.xmlSchema != null) {
for (XmlNs xmlns : this.xmlSchema.getXmlNsPrefixes()) {
@@ -355,10 +351,11 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.resourcePackage.getNameTextRange();
}
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
if (reporter.isCancelled()) {
throw new ValidationCancelledException();
@@ -370,23 +367,16 @@
if ((file != null)
&& file.getProject().equals(getJaxbProject().getProject())
&& (this.resourcePackage instanceof SourceNode)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
- }
- }
- @Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
-
- this.xmlSchema.validate(messages, reporter, astRoot);
-
- for (XmlSchemaType schemaType : getXmlSchemaTypes()) {
- schemaType.validate(messages, reporter, astRoot);
- }
-
- for (XmlJavaTypeAdapter adapter : getXmlJavaTypeAdapters()) {
- adapter.validate(messages, reporter, astRoot);
+ this.xmlSchema.validate(messages, reporter);
+
+ for (XmlSchemaType schemaType : getXmlSchemaTypes()) {
+ schemaType.validate(messages, reporter);
+ }
+
+ for (XmlJavaTypeAdapter adapter : getXmlJavaTypeAdapters()) {
+ adapter.validate(messages, reporter);
+ }
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java
index 5d0308e..bb5a567 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbPackageInfo;
import org.eclipse.jpt.jaxb.core.context.XmlJavaTypeAdapter;
import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
@@ -34,8 +33,8 @@
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getSpecifiedType() == null || getFullyQualifiedType().equals(XmlJavaTypeAdapter.DEFAULT_TYPE)) {
messages.add(
DefaultValidationMessages.buildMessage(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java
index 0448011..2805645 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
import org.eclipse.jpt.jaxb.core.context.JaxbPackageInfo;
import org.eclipse.jpt.jaxb.core.internal.validation.DefaultValidationMessages;
@@ -45,8 +44,8 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String fqType = getFullyQualifiedType();
if (fqType == null || XmlSchemaTypeAnnotation.DEFAULT_TYPE.equals(fqType)) {
@@ -55,7 +54,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_SCHEMA_TYPE__TYPE_NOT_SPECIFIED_ON_PACKAGE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java
index 01edcb5..d98231e 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java
@@ -410,13 +410,13 @@
// **************** validation ********************************************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getJavaResourceAttribute().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getJavaResourceAttribute().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// validate that unsupported annotations are not present
JavaAttributeMappingDefinition currentMappingDefinition = getCurrentMappingDefinition();
@@ -431,11 +431,11 @@
JaxbValidationMessages.ATTRIBUTE_MAPPING__UNSUPPORTED_ANNOTATION,
new String[] { annotation.getAnnotationName(), currentMappingDefinition.getAnnotationName() },
this,
- annotation.getTextRange(astRoot)));
+ annotation.getTextRange()));
}
}
- this.getMapping().validate(messages, reporter, astRoot);
+ this.getMapping().validate(messages, reporter);
}
protected JavaAttributeMappingDefinition getCurrentMappingDefinition() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java
index a18a767..71023f3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
@@ -125,7 +124,7 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return getJavaResourceType().getNameTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java
index 6b94b42..0057f24 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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,7 +11,6 @@
import java.util.List;
import java.util.Map;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.MappingKeys;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlAnyAttributeMapping;
@@ -45,8 +44,8 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (! getPersistentAttribute().isJavaResourceAttributeTypeSubTypeOf(Map.class.getName())) {
messages.add(
@@ -54,7 +53,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__NON_MAP_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java
index a5d9f92..2adf2d4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -334,10 +334,10 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElementRefs.validate(messages, reporter, astRoot);
+ this.xmlElementRefs.validate(messages, reporter);
if (getJavaResourceAttribute().getAnnotation(JAXB.XML_ELEMENT_REFS) != null) {
XmlElementRefAnnotation xmlElementRefAnnotation =
@@ -349,16 +349,16 @@
JaxbValidationMessages.ATTRIBUTE_MAPPING__UNSUPPORTED_ANNOTATION,
new String[] { JAXB.XML_ELEMENT_REF, JAXB.XML_ELEMENT_REFS },
getPersistentAttribute(),
- xmlElementRefAnnotation.getTextRange(astRoot)));
+ xmlElementRefAnnotation.getTextRange()));
}
}
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
if (this.xmlMixed != null) {
- this.xmlMixed.validate(messages, reporter, astRoot);
+ this.xmlMixed.validate(messages, reporter);
}
}
@@ -470,7 +470,7 @@
XmlElementRefsAnnotation xmlElementRefsAnnotation = getXmlElementRefsAnnotation();
if (xmlElementRefsAnnotation == null) {
- throw new IllegalArgumentException(String.valueOf(targetIndex) + ", " + String.valueOf(sourceIndex));
+ throw new IllegalArgumentException(String.valueOf(targetIndex) + ", " + String.valueOf(sourceIndex)); //$NON-NLS-1$
}
xmlElementRefsAnnotation.moveXmlElementRef(targetIndex, sourceIndex);
}
@@ -479,18 +479,18 @@
return new GenericJavaXmlElementRef(parent, new XmlElementRefContext(annotation));
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
XmlElementRefsAnnotation xmlElementRefsAnnotation = getXmlElementRefsAnnotation();
if (xmlElementRefsAnnotation != null) {
- return xmlElementRefsAnnotation.getTextRange(astRoot);
+ return xmlElementRefsAnnotation.getTextRange();
}
XmlElementRefAnnotation xmlElementRefAnnotation = getXmlElementRefAnnotation();
if (xmlElementRefAnnotation != null) {
- return xmlElementRefAnnotation.getTextRange(astRoot);
+ return xmlElementRefAnnotation.getTextRange();
}
- return GenericJavaXmlAnyElementMapping.this.getValidationTextRange(astRoot);
+ return GenericJavaXmlAnyElementMapping.this.getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java
index e7ca2fc..20148b4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
@@ -39,7 +38,7 @@
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.resourceXmlAttachmentRef.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.resourceXmlAttachmentRef.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java
index 7d9428c..6ff2e16 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -180,18 +180,18 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateQName(messages, reporter, astRoot);
- validateSchemaType(messages, reporter, astRoot);
+ validateQName(messages, reporter);
+ validateSchemaType(messages, reporter);
}
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.qName.validate(messages, reporter, astRoot);
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
+ this.qName.validate(messages, reporter);
}
- protected void validateSchemaType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateSchemaType(List<IMessage> messages, IReporter reporter) {
XsdFeature xsdFeature = getXsdFeature();
if (xsdFeature == null) {
return;
@@ -220,7 +220,7 @@
JaxbValidationMessages.XML_ATTRIBUTE__INVALID_SCHEMA_TYPE,
new String[] { getValueTypeName(), xsdFeature.getName() },
this,
- this.qName.getNameTextRange(astRoot)));
+ this.qName.getNameTextRange()));
}
}
@@ -268,11 +268,11 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition type = getJaxbClassMapping().getXsdTypeDefinition();
if (type != null) {
if (type.getAttribute(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -307,18 +307,18 @@
return GenericJavaXmlAttributeMapping.this.getPersistentAttribute().getJavaResourceAttributeBaseTypeName();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
+ public TextRange getTypeTextRange() {
// 1) if we're getting here, XmlIDREF will not be null
// 2) use the @XmlIDREF text range, since there is no specific place where the type is specified
- return GenericJavaXmlAttributeMapping.this.getXmlIDREF().getValidationTextRange(astRoot);
+ return GenericJavaXmlAttributeMapping.this.getXmlIDREF().getValidationTextRange();
}
public XsdFeature getXsdFeature() {
return GenericJavaXmlAttributeMapping.this.getXsdFeature();
}
- public TextRange getXsdFeatureTextRange(CompilationUnit astRoot) {
- return GenericJavaXmlAttributeMapping.this.getQName().getNameTextRange(astRoot);
+ public TextRange getXsdFeatureTextRange() {
+ return GenericJavaXmlAttributeMapping.this.getQName().getNameTextRange();
}
});
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
index 7a7cc19..aefc1e4 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
@@ -342,29 +342,29 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
XmlElementAnnotation annotation = getAnnotation(false);
- return (annotation == null) ? getParent().getValidationTextRange(astRoot) : annotation.getTextRange(astRoot);
+ return (annotation == null) ? getParent().getValidationTextRange() : annotation.getTextRange();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
+ public TextRange getTypeTextRange() {
XmlElementAnnotation annotation = getAnnotation(false);
- return (annotation == null) ? getParent().getValidationTextRange(astRoot) : annotation.getTypeTextRange();
+ return (annotation == null) ? getParent().getValidationTextRange() : annotation.getTypeTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- validateQName(messages, reporter, astRoot);
- validateType(messages, reporter, astRoot);
- validateSchemaType(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ validateQName(messages, reporter);
+ validateType(messages, reporter);
+ validateSchemaType(messages, reporter);
}
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.qName.validate(messages, reporter, astRoot);
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
+ this.qName.validate(messages, reporter);
}
- protected void validateType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateType(List<IMessage> messages, IReporter reporter) {
String fqType = getFullyQualifiedType();
if (StringTools.stringIsEmpty(fqType)) {
messages.add(
@@ -372,7 +372,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT__UNSPECIFIED_TYPE,
this,
- getTypeTextRange(astRoot)));
+ getTypeTextRange()));
}
else if (! StringTools.stringIsEmpty(this.specifiedType)
// verify that type actually exists before validating
@@ -385,13 +385,13 @@
JaxbValidationMessages.XML_ELEMENT__ILLEGAL_TYPE,
new String[] { attributeBaseType },
this,
- getTypeTextRange(astRoot)));
+ getTypeTextRange()));
}
}
}
- protected void validateSchemaType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateSchemaType(List<IMessage> messages, IReporter reporter) {
XsdElementDeclaration xsdElement = getXsdElement();
if (xsdElement == null) {
return;
@@ -430,7 +430,7 @@
JaxbValidationMessages.XML_ELEMENT__INVALID_SCHEMA_TYPE,
new String[] { typeName, xsdElement.getName() },
this,
- this.qName.getNameTextRange(astRoot)));
+ this.qName.getNameTextRange()));
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java
index 75aae25..95517d2 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -228,13 +228,13 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElement.validate(messages, reporter, astRoot);
+ this.xmlElement.validate(messages, reporter);
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
}
@@ -295,20 +295,20 @@
return GenericJavaXmlElementMapping.this.xmlElement.getType();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
+ public TextRange getTypeTextRange() {
// 1) if we're getting here, XmlIDREF will not be null
// 2) if there is an @XmlElement annotation, use that, otherwise use the @XmlIDREF
return (GenericJavaXmlElementMapping.this.getAnnotation() == null) ?
- GenericJavaXmlElementMapping.this.getXmlIDREF().getValidationTextRange(astRoot)
- : GenericJavaXmlElementMapping.this.xmlElement.getTypeTextRange(astRoot);
+ GenericJavaXmlElementMapping.this.getXmlIDREF().getValidationTextRange()
+ : GenericJavaXmlElementMapping.this.xmlElement.getTypeTextRange();
}
public XsdFeature getXsdFeature() {
return GenericJavaXmlElementMapping.this.getXsdFeature();
}
- public TextRange getXsdFeatureTextRange(CompilationUnit astRoot) {
- return GenericJavaXmlElementMapping.this.xmlElement.getQName().getNameTextRange(astRoot);
+ public TextRange getXsdFeatureTextRange() {
+ return GenericJavaXmlElementMapping.this.xmlElement.getQName().getNameTextRange();
}
});
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
index 182936e..1e14a79 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
@@ -229,8 +229,8 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
public TextRange getTypeTextRange() {
@@ -238,9 +238,9 @@
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.qName.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.qName.validate(messages, reporter);
validateType(messages, reporter);
}
@@ -343,16 +343,16 @@
}
@Override
- protected void validateName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages, IReporter reporter) {
// only validate if type is JAXBElement
if (isTypeJAXBElement()) {
- super.validateName(messages, reporter, astRoot);
+ super.validateName(messages, reporter);
}
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateReference(messages, reporter, astRoot);
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
+ super.validateReference(messages, reporter);
// if type is JAXBElement, then name/namespace must also point at a valid XmlElementDecl
if (! isTypeJAXBElement()) {
@@ -367,7 +367,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_REF__NO_REGISTRY,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
return;
}
@@ -383,7 +383,7 @@
JaxbValidationMessages.XML_ELEMENT_REF__NO_MATCHING_ELEMENT_DECL,
new String[] { getNamespace(), getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java
index 9362158..6faac68 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -259,13 +259,13 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElementRef.validate(messages, reporter, astRoot);
+ this.xmlElementRef.validate(messages, reporter);
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java
index c4168ea..9695ca3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java
@@ -131,22 +131,22 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateDuplicateTypesAndQNames(messages, reporter, astRoot);
+ validateDuplicateTypesAndQNames(messages, reporter);
for (XmlElementRef elementRef : getXmlElementRefs()) {
- elementRef.validate(messages, reporter, astRoot);
+ elementRef.validate(messages, reporter);
}
}
- protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter) {
Bag<String> xmlElementRefTypes = new HashBag<String>();
Bag<QName> xmlElementRefQnames = new HashBag<QName>();
@@ -185,7 +185,7 @@
JaxbValidationMessages.XML_ELEMENT_REFS__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName },
xmlElementRef,
- xmlElementRef.getQName().getNameTextRange(astRoot)));
+ xmlElementRef.getQName().getNameTextRange()));
}
}
}
@@ -244,6 +244,6 @@
XmlElementRef buildXmlElementRef(JavaContextNode parent, XmlElementRefAnnotation annotation);
- TextRange getValidationTextRange(CompilationUnit astRoot);
+ TextRange getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java
index 48bbf20..782d553 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -267,17 +267,17 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.xmlElementRefs.validate(messages, reporter, astRoot);
+ this.xmlElementRefs.validate(messages, reporter);
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
if (this.xmlMixed != null) {
- this.xmlMixed.validate(messages, reporter, astRoot);
+ this.xmlMixed.validate(messages, reporter);
}
}
@@ -309,8 +309,8 @@
return new GenericJavaXmlElementRef(parent, new XmlElementRefContext(annotation));
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getXmlElementRefsAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getXmlElementRefsAnnotation().getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java
index 23f7c5a..179cf08 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -200,8 +200,8 @@
//************* validation ****************
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (! getPersistentAttribute().isJavaResourceAttributeCollectionType()) {
messages.add(
@@ -209,19 +209,19 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_WRAPPER_DEFINED_ON_NON_ARRAY_NON_COLLECTION,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
- validateQName(messages, reporter, astRoot);
+ validateQName(messages, reporter);
}
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.qName.validate(messages, reporter, astRoot);
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
+ this.qName.validate(messages, reporter);
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@@ -292,14 +292,14 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition type = getJaxbClassMapping().getXsdTypeDefinition();
if (type == null) {
return;
}
if (type.getElement(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java
index 993b48d..bbcc19f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -317,25 +317,25 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateDuplicateTypesAndQNames(messages, reporter, astRoot);
+ validateDuplicateTypesAndQNames(messages, reporter);
for (XmlElement xmlElement : getXmlElements()) {
- xmlElement.validate(messages, reporter, astRoot);
+ xmlElement.validate(messages, reporter);
}
if (this.xmlElementWrapper != null) {
- this.xmlElementWrapper.validate(messages, reporter, astRoot);
+ this.xmlElementWrapper.validate(messages, reporter);
}
if (this.xmlIDREF != null) {
- this.xmlIDREF.validate(messages, reporter, astRoot);
+ this.xmlIDREF.validate(messages, reporter);
}
}
- protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDuplicateTypesAndQNames(List<IMessage> messages, IReporter reporter) {
Bag<String> xmlElementTypes = new HashBag<String>();
Bag<QName> xmlElementQNames = new HashBag<QName>();
@@ -351,13 +351,13 @@
}
for (XmlElement xmlElement : getXmlElements()) {
- validateDuplicateType(xmlElement, xmlElementTypes, messages, astRoot);
- validateDuplicateQName(xmlElement, xmlElementQNames, messages, astRoot);
+ validateDuplicateType(xmlElement, xmlElementTypes, messages);
+ validateDuplicateQName(xmlElement, xmlElementQNames, messages);
}
}
protected void validateDuplicateType(XmlElement xmlElement, Bag<String> xmlElementTypes,
- List<IMessage> messages, CompilationUnit astRoot) {
+ List<IMessage> messages) {
String xmlElementType = xmlElement.getFullyQualifiedType();
if (xmlElementTypes.count(xmlElementType) > 1) {
messages.add(
@@ -366,12 +366,12 @@
JaxbValidationMessages.XML_ELEMENTS__DUPLICATE_XML_ELEMENT_TYPE,
new String[] { xmlElementType },
xmlElement,
- xmlElement.getTypeTextRange(astRoot)));
+ xmlElement.getTypeTextRange()));
}
}
protected void validateDuplicateQName(XmlElement xmlElement, Bag<QName> xmlElementQNames,
- List<IMessage> messages, CompilationUnit astRoot) {
+ List<IMessage> messages) {
String xmlElementNamespace = xmlElement.getQName().getNamespace();
String xmlElementName = xmlElement.getQName().getName();
if (xmlElementQNames.count(new QName(xmlElementNamespace, xmlElementName)) > 1) {
@@ -381,7 +381,7 @@
JaxbValidationMessages.XML_ELEMENTS__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName },
xmlElement,
- xmlElement.getQName().getNameTextRange(astRoot)));
+ xmlElement.getQName().getNameTextRange()));
}
}
@@ -479,16 +479,16 @@
return o.getFullyQualifiedType();
}
- public TextRange getTypeTextRange(CompilationUnit astRoot) {
- return o.getTypeTextRange(astRoot);
+ public TextRange getTypeTextRange() {
+ return o.getTypeTextRange();
}
public XsdFeature getXsdFeature() {
return o.getXsdElement();
}
- public TextRange getXsdFeatureTextRange(CompilationUnit astRoot) {
- return o.getQName().getNameTextRange(astRoot);
+ public TextRange getXsdFeatureTextRange() {
+ return o.getQName().getNameTextRange();
}
};
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java
index c9b039a..486c052 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlID;
@@ -49,10 +48,10 @@
//************* validation ****************
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateAttributeType(messages, astRoot);
+ validateAttributeType(messages);
XsdFeature xsdFeature = getMapping().getXsdFeature();
if (xsdFeature == null) {
@@ -67,23 +66,23 @@
JaxbValidationMessages.XML_ID__SCHEMA_TYPE_NOT_ID,
new String [] { xsdFeature.getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
if (! getPersistentAttribute().isJavaResourceAttributeTypeSubTypeOf(String.class.getName())) {
messages.add(
DefaultValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__ATTRIBUTE_TYPE_NOT_STRING,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.resourceXmlID.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.resourceXmlID.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java
index 903a8ea..3ff756b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
@@ -51,13 +50,13 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (ValidatableReference ref : this.context.getReferences()) {
String typeName = ref.getFullyQualifiedType();
@@ -73,7 +72,7 @@
JaxbValidationMessages.XML_ID_REF__TYPE_DOES_NOT_CONTAIN_XML_ID,
new String[] { typeName },
this,
- ref.getTypeTextRange(astRoot)));
+ ref.getTypeTextRange()));
}
}
@@ -89,7 +88,7 @@
JaxbValidationMessages.XML_ID_REF__SCHEMA_TYPE_NOT_IDREF,
new String [] { xsdFeature.getName() },
this,
- ref.getXsdFeatureTextRange(astRoot)));
+ ref.getXsdFeatureTextRange()));
}
}
}
@@ -109,10 +108,10 @@
String getFullyQualifiedType();
- TextRange getTypeTextRange(CompilationUnit astRoot);
+ TextRange getTypeTextRange();
XsdFeature getXsdFeature();
- TextRange getXsdFeatureTextRange(CompilationUnit astRoot);
+ TextRange getXsdFeatureTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java
index 4898ebd..9713608 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
@@ -42,7 +41,7 @@
//************* validation ****************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.resourceXmlMixed.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.resourceXmlMixed.getTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java
index 75234dc..9752b60 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java
@@ -122,13 +122,13 @@
int pos, Filter<String> filter, CompilationUnit astRoot) {
if (getResourceXmlNs().namespaceURITouches(pos)) {
- return getNamespaceURICompletionProposals(pos, filter, astRoot);
+ return getNamespaceURICompletionProposals(pos, filter);
}
return EmptyIterable.instance();
}
protected Iterable<String> getNamespaceURICompletionProposals(
- int pos, Filter<String> filter, CompilationUnit astRoot) {
+ int pos, Filter<String> filter) {
String packageNamespace = getJaxbPackageInfo().getJaxbPackage().getNamespace();
Iterable<String> result = (StringTools.stringIsEmpty(packageNamespace)) ?
@@ -144,8 +144,8 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getResourceXmlNs().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getResourceXmlNs().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java
index f4cea35..f2718fb 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java
@@ -157,14 +157,14 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = getAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : getJaxbClass().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = getAnnotation().getTextRange();
+ return (textRange != null) ? textRange : getJaxbClass().getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
Iterable<XmlRegistry> registries = getContextRoot().getXmlRegistries(getJaxbPackage());
if (CollectionTools.size(registries) > 1) {
@@ -173,17 +173,17 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_REGISTRY__MULTIPLE_XML_REGISTRIES_FOR_PACKAGE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
- validateDuplicateQNames(messages, reporter, astRoot);
+ validateDuplicateQNames(messages, reporter);
for (JaxbElementFactoryMethod efm : getElementFactoryMethods()) {
- efm.validate(messages, reporter, astRoot);
+ efm.validate(messages, reporter);
}
}
- protected void validateDuplicateQNames(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDuplicateQNames(List<IMessage> messages, IReporter reporter) {
Map<String, Bag<QName>> xmlElementDeclQnames = new HashMap<String, Bag<QName>>();
@@ -203,7 +203,7 @@
String xmlElementNamespace = xmlElementDecl.getQName().getNamespace();
String xmlElementName = xmlElementDecl.getQName().getName();
if (xmlElementDeclQnames.get(fqScope).count(new QName(xmlElementNamespace, xmlElementName)) > 1) {
- String scopeDesc = "";
+ String scopeDesc = ""; //$NON-NLS-1$
if (! JaxbElementFactoryMethod.DEFAULT_SCOPE_CLASS_NAME.equals(fqScope)) {
scopeDesc = NLS.bind(JptJaxbCoreMessages.XML_ELEMENT_DECL__SCOPE, fqScope);
}
@@ -213,7 +213,7 @@
JaxbValidationMessages.XML_REGISTRY__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName, scopeDesc },
xmlElementDecl,
- xmlElementDecl.getQName().getNameTextRange(astRoot)));
+ xmlElementDecl.getQName().getNameTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java
index 5147639..3ab4c4d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -109,15 +109,15 @@
// **************** validation ********************************************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.qName.validate(messages, reporter, astRoot);
+ this.qName.validate(messages, reporter);
}
@@ -178,7 +178,7 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
String name = getName();
String namespace = getNamespace();
XsdSchema schema = this.getXsdSchema();
@@ -187,7 +187,7 @@
// element must resolve
XsdElementDeclaration schemaElement = schema.getElementDeclaration(namespace, name);
if (schemaElement == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
else {
// element type must agree with parent's schema type
@@ -200,7 +200,7 @@
JaxbValidationMessages.XML_ROOT_ELEMENT_TYPE_CONFLICTS_WITH_XML_TYPE,
new String[] {name, namespace},
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
index 8929410..d4aca90 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java
@@ -292,15 +292,15 @@
// **************** validation ********************************************
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getXmlSchemaAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getXmlSchemaAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// removing this validation message for now: see jaxb bug 823 (http://java.net/jira/browse/JAXB-823)
// XsdSchema schema = getJaxbPackage().getXsdSchema();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java
index 4c76e02..562cdc8 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java
@@ -145,15 +145,15 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.qName.validate(messages, reporter, astRoot);
+ this.qName.validate(messages, reporter);
XsdTypeDefinition xsdType = getXsdTypeDefinition();
if (xsdType != null && xsdType.getKind() != XsdTypeDefinition.Kind.SIMPLE) {
@@ -163,7 +163,7 @@
JaxbValidationMessages.XML_SCHEMA_TYPE__NON_SIMPLE_TYPE,
new String[] { qName.getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@@ -219,7 +219,7 @@
}
@Override
- protected void validateReference(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateReference(List<IMessage> messages, IReporter reporter) {
String name = getName();
String namespace = getNamespace();
@@ -229,7 +229,7 @@
if (schema != null) {
XsdTypeDefinition schemaType = schema.getTypeDefinition(namespace, name);
if (schemaType == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java
index d4216aa..8ffb4ef 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jaxb.core.context.JaxbTypeMapping;
@@ -66,8 +65,8 @@
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.annotation.getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.annotation.getTextRange();
}
protected ListContainer<String, String> buildValueContainer() {
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java
index be352f4..f8ab01a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.MappingKeys;
import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
import org.eclipse.jpt.jaxb.core.context.XmlValueMapping;
@@ -52,13 +51,13 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateSchemaType(messages, reporter, astRoot);
+ validateSchemaType(messages, reporter);
}
- protected void validateSchemaType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateSchemaType(List<IMessage> messages, IReporter reporter) {
XsdTypeDefinition xsdClassType = getClassMapping().getXsdTypeDefinition();
if (xsdClassType == null) {
@@ -71,7 +70,7 @@
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__NO_TEXT_CONTENT,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
return;
}
@@ -89,7 +88,7 @@
JaxbValidationMessages.XML_VALUE__INVALID_SCHEMA_TYPE,
new String[] { getValueTypeName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java
index bbbc39d..3695c36 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -109,8 +108,7 @@
//if (getterIsAnnotated() && setterIsAnnotated()) error to user
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- // TODO Auto-generated method stub
+ public TextRange getValidationTextRange() {
return null;
}
}
\ No newline at end of file
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java
index 6b4814c..2aeb598 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
@@ -129,14 +128,6 @@
public boolean namespaceURITouches(int pos) {
return this.textRangeTouches(this.namespaceURITextRange, pos);
}
-
- public TextRange getNamespaceURITextRange(CompilationUnit astRoot) {
- return getElementTextRange(this.namespaceURIDeclarationAdapter, astRoot);
- }
-
- public boolean namespaceURITouches(int pos, CompilationUnit astRoot) {
- return elementTouches(this.namespaceURIDeclarationAdapter, pos, astRoot);
- }
// ***** prefix *****
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java
index 9f3bf2a..0b90fc3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java
@@ -12,7 +12,6 @@
import java.util.Arrays;
import java.util.Vector;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
@@ -117,7 +116,7 @@
this.namespaceTextRange = this.buildNamespaceTextRange(astAnnotation);
this.initializePropOrder(astAnnotation);
this.propOrderTextRange = this.buildPropOrderTextRange(astAnnotation);
- this.syncPropTextRanges((CompilationUnit) astAnnotation.getRoot());
+ this.syncPropTextRanges(astAnnotation);
}
@Override
@@ -134,7 +133,7 @@
this.namespaceTextRange = this.buildNamespaceTextRange(astAnnotation);
this.syncPropOrder(astAnnotation);
this.propOrderTextRange = this.buildPropOrderTextRange(astAnnotation);
- this.syncPropTextRanges((CompilationUnit) astAnnotation.getRoot());
+ this.syncPropTextRanges(astAnnotation);
}
@Override
@@ -354,11 +353,11 @@
return this.textRangeTouches(this.propOrderTextRange, pos);
}
- //TODO I think we should be able to do this from the Annotation instead of the CompilationUnit
- private void syncPropTextRanges(CompilationUnit astRoot) {
+ private void syncPropTextRanges(Annotation astAnnotation) {
this.propTextRanges.clear();
for (int i = 0; i < this.propOrder.size(); i++) {
- this.propTextRanges.add(i, getElementTextRange(this.selectAnnotationElementTextRange(this.propOrderDeclarationAdapter, i, astRoot), astRoot));
+ TextRange propTextRange = this.getElementTextRange(this.propOrderDeclarationAdapter, i, astAnnotation);
+ this.propTextRanges.add(i, propTextRange);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java
index 1065f4f..4272526 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java
@@ -1,3 +1,12 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
@@ -250,15 +259,15 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlDiscriminatorNode != null) {
- this.xmlDiscriminatorNode.validate(messages, reporter, astRoot);
+ this.xmlDiscriminatorNode.validate(messages, reporter);
}
if (this.xmlDiscriminatorValue != null) {
- this.xmlDiscriminatorValue.validate(messages, reporter, astRoot);
+ this.xmlDiscriminatorValue.validate(messages, reporter);
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java
index 54718ba..2119522 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.jaxb.core.context.XmlRegistry;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaElementFactoryMethod;
@@ -30,7 +29,7 @@
@Override
protected void validateMethodReturnType(
- JavaResourceMethod resourceMethod, List<IMessage> messages, CompilationUnit astRoot) {
+ JavaResourceMethod resourceMethod, List<IMessage> messages) {
if (! resourceMethod.getTypeBinding().isSubTypeOf(JAXB.JAXB_ELEMENT)) {
messages.add(
@@ -38,7 +37,7 @@
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_RETURN_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java
index dc5fc5d..b5e80cd 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java
@@ -134,16 +134,16 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlPath != null) {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java
index ee8b129..bc9621b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java
@@ -154,16 +154,16 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlPath != null) {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java
index 4418444..3f81228 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java
@@ -235,17 +235,17 @@
// ***** validation *****
@Override
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
if (this.xmlPath == null) {
- super.validateQName(messages, reporter, astRoot);
+ super.validateQName(messages, reporter);
}
else {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java
index f9679d3..956f5fc 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
@@ -31,8 +30,8 @@
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getAnnotation().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java
index daa689a..c984731 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java
@@ -109,13 +109,13 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.value)) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java
index 2ae45cd..6e2a6ad 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
@@ -82,13 +81,13 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.value)) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java
index 5414299..d49e517 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlElement;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -31,9 +30,9 @@
}
@Override
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
if (! getContext().hasXmlPath()) {
- super.validateQName(messages, reporter, astRoot);
+ super.validateQName(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java
index 3567470..3519eec 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java
@@ -310,16 +310,16 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.xmlPath != null) {
- validateXmlPath(messages, reporter, astRoot);
+ validateXmlPath(messages, reporter);
}
}
- protected void validateXmlPath(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.xmlPath.validate(messages, reporter, astRoot);
+ protected void validateXmlPath(List<IMessage> messages, IReporter reporter) {
+ this.xmlPath.validate(messages, reporter);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java
index d92928a..d2ca1ea 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java
@@ -1,7 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.JaxbAttributeMapping;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlElementWrapper;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -21,9 +29,9 @@
}
@Override
- protected void validateQName(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateQName(List<IMessage> messages, IReporter reporter) {
if (! getContext().hasXmlPath()) {
- super.validateQName(messages, reporter, astRoot);
+ super.validateQName(messages, reporter);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java
index 9f80892..a252c8f 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java
@@ -145,15 +145,15 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getXmlPathsSize() > 0 ) {
- validateXmlPaths(messages, reporter, astRoot);
+ validateXmlPaths(messages, reporter);
}
}
- protected void validateXmlPaths(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateXmlPaths(List<IMessage> messages, IReporter reporter) {
Iterator<XmlElement> xmlElements = getXmlElements().iterator();
Iterator<ELJavaXmlPath> xmlPaths = this.xmlPathContainer.getContextElements().iterator();
@@ -168,7 +168,7 @@
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_PATH__INSUFFICIENT_XML_PATHS_FOR_XML_ELEMENTS,
this,
- getXmlPathsTextRange(astRoot)));
+ getXmlPathsTextRange()));
}
while (xmlPaths.hasNext()) {
@@ -178,29 +178,29 @@
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_PATH__INSUFFICIENT_XML_ELEMENTS_FOR_XML_PATHS,
this,
- xmlPath.getValidationTextRange(astRoot)));
+ xmlPath.getValidationTextRange()));
}
for (ELJavaXmlPath xmlPath : this.xmlPathContainer.getContextElements()) {
- xmlPath.validate(messages, reporter, astRoot);
+ xmlPath.validate(messages, reporter);
}
}
@Override
protected void validateDuplicateQName(XmlElement xmlElement, Bag<QName> xmlElementQNames,
- List<IMessage> messages, CompilationUnit astRoot) {
+ List<IMessage> messages) {
if (getXmlPathsSize() == 0) {
- super.validateDuplicateQName(xmlElement, xmlElementQNames, messages, astRoot);
+ super.validateDuplicateQName(xmlElement, xmlElementQNames, messages);
}
}
- protected TextRange getXmlPathsTextRange(CompilationUnit astRoot) {
+ protected TextRange getXmlPathsTextRange() {
Annotation annotation = getJavaResourceAttribute().getAnnotation(ELJaxb.XML_PATHS);
if (annotation == null) {
annotation = getJavaResourceAttribute().getAnnotation(0, ELJaxb.XML_PATH);
}
- return annotation.getTextRange(astRoot);
+ return annotation.getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java
index 7a15891..91da7e0 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jaxb.core.context.XmlNamedNodeMapping;
import org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlID;
import org.eclipse.jpt.jaxb.core.resource.java.XmlIDAnnotation;
@@ -26,7 +25,7 @@
@Override
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
// no op - MOXy does not require String attribute types
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java
index 3e9aa0c..c53dd03 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java
@@ -161,20 +161,20 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- validateMappedBy(messages, reporter, astRoot);
+ validateMappedBy(messages, reporter);
}
- protected void validateMappedBy(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMappedBy(List<IMessage> messages, IReporter reporter) {
if (StringTools.stringIsEmpty(mappedBy)) {
messages.add(
ELJaxbValidationMessageBuilder.buildMessage(
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_NOT_SPECIFIED,
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
return;
}
@@ -192,7 +192,7 @@
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_NOT_RESOLVED,
new String[] { mappedBy, referencedClassMapping.getJaxbType().getFullyQualifiedName() },
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
}
else if (
! ArrayTools.contains(
@@ -204,7 +204,7 @@
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_ILLEGAL_MAPPING_TYPE,
new String[] { mappedBy, referencedClassMapping.getJaxbType().getFullyQualifiedName() },
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
}
}
@@ -219,8 +219,8 @@
MappingKeys.XML_VALUE_ATTRIBUTE_MAPPING_KEY
};
- protected TextRange getMappedByTextRange(CompilationUnit astRoot) {
+ protected TextRange getMappedByTextRange() {
TextRange textRange = getXmlInverseReferenceAnnotation().getMappedByTextRange();
- return (textRange != null) ? textRange : getValidationTextRange(astRoot);
+ return (textRange != null) ? textRange : getValidationTextRange();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java
index ef8a40b..63ae1c3 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java
@@ -170,13 +170,13 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
validateXmlPath(messages);
validateReferencedXmlPath(messages);
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java
index 898567e..31edb88 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java
@@ -175,8 +175,8 @@
// ***** validation *****
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
JaxbClassMapping referencedClass = getReferencedClassMapping();
@@ -187,13 +187,13 @@
ELJaxbValidationMessages.XML_JOIN_NODES__INVALID_REFERENCED_CLASS,
new String[] { getValueTypeName() },
ELJavaXmlJoinNodesMapping.this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
validateDuplicateXmlPaths(messages, reporter);
for (ELJavaXmlJoinNode xmlJoinNode : this.xmlJoinNodeContainer.getContextElements()) {
- xmlJoinNode.validate(messages, reporter, astRoot);
+ xmlJoinNode.validate(messages, reporter);
}
}
@@ -247,12 +247,12 @@
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
Annotation annotation = getAnnotation();
if (annotation == null) {
annotation = getJavaResourceAttribute().getAnnotation(0, ELJaxb.XML_JOIN_NODE);
}
- return annotation.getTextRange(astRoot);
+ return annotation.getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java
index 4f0122a..3c644f2 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
import org.eclipse.jpt.jaxb.core.internal.context.java.AbstractJavaContextNode;
@@ -31,8 +30,8 @@
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.context.getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.context.getAnnotation().getTextRange();
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java
index d73eefe..6e9339b 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java
@@ -119,13 +119,13 @@
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.value)) {
messages.add(
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java
index 44573ef..c728adf 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.resource.java.binary;
import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -71,7 +70,7 @@
throw new UnsupportedOperationException();
}
- public boolean valueTouches(int pos, CompilationUnit astRoot) {
+ public boolean valueTouches(int pos) {
throw new UnsupportedOperationException();
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java
index f1957a6..6ceb40d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jaxb.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
diff --git a/jpa/plugins/org.eclipse.jpt.doc.user/legal.htm b/jpa/plugins/org.eclipse.jpt.doc.user/legal.htm
index dfa0007..a771471 100644
--- a/jpa/plugins/org.eclipse.jpt.doc.user/legal.htm
+++ b/jpa/plugins/org.eclipse.jpt.doc.user/legal.htm
@@ -3,24 +3,23 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Legal</title>
-<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1.1" />
-<meta name="date" content="2010-05-19T8:12:49Z" />
+<meta name="copyright" content="Copyright (c) 2000, 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" />
+<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 1.0.11" />
+<meta name="date" content="2012-08-28T11:53:10Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content=" Legal" />
-<meta name="relnum" content="Release 2.3" />
-<meta name="copyright" content="Copyright (c) 2000, 2008 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" />
+<meta name="relnum" content="Release 3.2" />
+<meta name="partnum" content="" />
<link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" />
-<!-- contents -->
</head>
<body>
-<p><a id="sthref294" name="sthref294"></a></p>
+<p><a id="sthref481" name="sthref481"></a></p>
<h1>Legal</h1>
-<p>Copyright © 2006, 2010, Oracle. All rights reserved.</p>
+<p>Copyright © 2011, 2012, Oracle. All rights reserved.</p>
<p>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:</p>
<p><code><a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></code></p>
<p><a href="about.htm">Terms and conditions regarding the use of this guide.</a></p>
@@ -30,11 +29,11 @@
<col width="86%" />
<col width="*" />
<tr>
-<td align="left"><span class="copyrightlogo">Copyright © 2006, 2010, Oracle and/or its affiliates. All rights reserved.</span><br />
+<td align="left"><span class="copyrightlogo">Copyright © 2011, 2012, Oracle and/or its affiliates. All rights reserved.</span><br />
<a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
-</html>
+</html>
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
index 7d85127..ed877ce 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java
@@ -19,8 +19,10 @@
import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
import org.eclipse.jpt.jpa.core.context.MappingFile;
import org.eclipse.jpt.jpa.core.context.PersistentType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
import org.eclipse.jpt.jpa.core.context.Table;
@@ -64,8 +66,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
@@ -136,7 +136,7 @@
*
* @see org.eclipse.jpt.jpa.core.internal.jpa1.GenericJpaFactory
*
- * @version 3.1
+ * @version 3.3
* @since 2.0
*/
public interface JpaFactory
@@ -229,11 +229,11 @@
JavaVirtualColumn buildJavaVirtualColumn(JavaJpaContextNode parent, JavaVirtualColumn.Owner owner);
- JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner);
+ JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, ReadOnlyNamedDiscriminatorColumn.Owner owner);
- JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation);
+ JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation);
- JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
+ JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
JavaSecondaryTable buildJavaSecondaryTable(JavaEntity parent, Table.Owner owner, SecondaryTableAnnotation tableAnnotation);
@@ -243,7 +243,7 @@
JavaGeneratedValue buildJavaGeneratedValue(JavaIdMapping parent, GeneratedValueAnnotation generatedValueAnnotation);
- JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation);
+ JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation);
JavaAttributeOverrideContainer buildJavaAttributeOverrideContainer(JavaJpaContextNode parent, JavaAttributeOverrideContainer.Owner owner);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
index deb2a9c..734307d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.context;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
/**
* JPA attribute mapping converter.
@@ -21,7 +20,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 2.1
*/
public interface Converter
@@ -46,7 +45,7 @@
/**
*
*/
- JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver);
+ JptValidator buildValidator(Converter converter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
index 934a08f..025f79a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -9,6 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
+
/**
* JPA generated value
* <p>
@@ -18,7 +20,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.1
+ * @version 3.3
* @since 2.0
*/
public interface GeneratedValue
@@ -38,4 +40,9 @@
String SPECIFIED_GENERATOR_PROPERTY = "specifiedGenerator"; //$NON-NLS-1$
String getDefaultGenerator();
String DEFAULT_GENERATOR_PROPERTY = "defaultGenerator"; //$NON-NLS-1$
+
+ /**
+ * Return the (best guess) text location of the generator.
+ */
+ TextRange getGeneratorTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
index bb4bd3b..ec3ab91 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
@@ -36,6 +37,11 @@
{
/**
+ * Return the (best guess) text location of the name.
+ */
+ TextRange getNameTextRange();
+
+ /**
* Return the generator's type.
*/
Class<? extends Generator> getType();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
index 9e1e97a..8fbdc50 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java
@@ -9,12 +9,17 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceTypeReference;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.JpaNode;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceUnit;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Common protocol for JPA objects that have a context, as opposed to
@@ -26,7 +31,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface JpaContextNode
@@ -54,6 +59,16 @@
Schema getContextDefaultDbSchema();
+ // ********** validation **********
+
+ TextRange getValidationTextRange();
+
+ /**
+ * Add to the list of current validation messages
+ */
+ void validate(List<IMessage> messages, IReporter reporter);
+
+
// ********** synchronize/update **********
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
index 878eb81..6fa0853 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java
@@ -9,10 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import java.util.List;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Root of the Dali JPA context model.
@@ -23,7 +20,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.0
*/
public interface JpaRootContextNode
@@ -44,11 +41,4 @@
*/
PersistenceXml getPersistenceXml();
-
- // ********** validation **********
-
- /**
- * Add validation messages to the specified list.
- */
- public void validate(List<IMessage> messages, IReporter reporter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
index 6823b93..450f269 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,10 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
/**
@@ -24,7 +23,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.0
+ * @version 3.3
* @since 2.3
*/
public interface OverrideContainer
@@ -82,9 +81,9 @@
*/
String getDefaultTableName();
- JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver);
+ JptValidator buildOverrideValidator(ReadOnlyOverride override);
- JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
+ JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner);
// ********** overrides **********
@@ -210,8 +209,10 @@
*/
Iterable<String> getCandidateTableNames();
- JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver);
+ TextRange getValidationTextRange();
- JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver);
+ JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container);
+
+ JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
index 57a9550..9ec381e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -27,7 +28,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.0
*/
public interface Query
@@ -93,4 +94,9 @@
void moveHint(int targetIndex, int sourceIndex);
QueryHint getHint(int i);
+
+
+ TextRange getNameTextRange();
+
+ TextRange getQueryTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
index 6205b74..0a87c1f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.db.Table;
/**
@@ -37,6 +38,12 @@
String SPECIFIED_REFERENCED_COLUMN_NAME_PROPERTY = "specifiedReferencedColumnName"; //$NON-NLS-1$
String getDefaultReferencedColumnName();
String DEFAULT_REFERENCED_COLUMN_NAME_PROPERTY = "defaultReferencedColumnName"; //$NON-NLS-1$
+
+ /**
+ * Return the (best guess) text location of the join column's
+ * referenced column name.
+ */
+ TextRange getReferencedColumnNameTextRange();
// ********** misc **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
index 3a35c3a..4e3dc9f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
/**
@@ -46,7 +45,7 @@
boolean validatesAgainstDatabase();
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
index 936e49c..4cdd707 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java
@@ -9,8 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
/**
@@ -43,6 +43,10 @@
String getDefaultName();
String DEFAULT_NAME_PROPERTY = "defaultName"; //$NON-NLS-1$
+ /**
+ * Return the (best guess) text location of the column's name.
+ */
+ TextRange getNameTextRange();
// ********** table **********
@@ -103,7 +107,13 @@
* Return the database table for the specified table name.
*/
Table resolveDbTable(String tableName);
-
- JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver);
+
+ JptValidator buildColumnValidator(ReadOnlyNamedColumn column);
+
+ /**
+ * Return the column owner's text range. This can be returned by the
+ * column when its annotation is not present.
+ */
+ TextRange getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
index 4e027a8..a12bfaf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -9,7 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.db.Table;
@@ -68,5 +68,10 @@
*/
String getDefaultTableName();
- JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
+ /**
+ * Return the (best guess) text location of the override's name.
+ */
+ TextRange getNameTextRange();
+
+ JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
index 079b3a2..9178b88 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.db.Table;
@@ -53,7 +52,7 @@
String getDefaultTableName();
- JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver);
+ JptValidator buildColumnValidator(ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner);
void initializeOnSpecified(OverrideRelationship specifiedRelationship);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
index 43a7939..6cfad5b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -9,9 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
@@ -119,6 +119,12 @@
*/
boolean validatesAgainstDatabase();
+ TextRange getNameTextRange();
+
+ TextRange getSchemaTextRange();
+
+ TextRange getCatalogTextRange();
+
// ********** owner **********
@@ -127,6 +133,6 @@
* (e.g. basic mappings and attribute overrides)
*/
interface Owner {
- JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
+ JptValidator buildTableValidator(ReadOnlyTable table);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
index 9f7fc03..567978d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -9,6 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
+import org.eclipse.jpt.common.core.utility.TextRange;
+
/**
* Read-only
@@ -32,6 +34,11 @@
String getDefaultTable();
String DEFAULT_TABLE_PROPERTY = "defaultTable"; //$NON-NLS-1$
+ /**
+ * Return the (best guess) text location of the column's table.
+ */
+ TextRange getTableTextRange();
+
// ********** misc **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
index b4901c8..1e0ddf1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java
@@ -9,12 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context;
-import java.util.List;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-
/**
* XML JPA context node
* <p>
@@ -24,7 +18,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.1
*/
// TODO bjv rename to XmlJpaContextNode
@@ -37,10 +31,4 @@
*/
Iterable<String> getXmlCompletionProposals(int pos);
- /**
- * Add to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter);
-
- TextRange getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
index d483ec5..1ac7a1b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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,7 +17,6 @@
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.context.PersistentType;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
/**
* Represents a JPA accessor (field/property).
@@ -28,7 +27,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface Accessor extends JpaContextNode
@@ -51,5 +50,5 @@
AccessType getDefaultAccess();
- JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver);
+ JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
index 786fc76..44293c0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.context.java;
import org.eclipse.jpt.jpa.core.context.Column;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
/**
@@ -21,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface JavaColumn
@@ -37,7 +38,7 @@
* (e.g. basic mappings and attribute overrides)
*/
interface Owner
- extends JavaReadOnlyBaseColumn.Owner
+ extends ReadOnlyBaseColumn.Owner
{
CompleteColumnAnnotation getColumnAnnotation();
void removeColumnAnnotation();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
index e56e77e..6e5992d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java
@@ -16,7 +16,6 @@
import org.eclipse.jpt.jpa.core.JpaFactory;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
/**
* Java converter
@@ -141,7 +140,7 @@
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
};
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
index 995f0fc..f7daf72 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -21,7 +21,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 2.0
*/
public interface JavaDiscriminatorColumn
@@ -29,15 +29,4 @@
{
DiscriminatorColumnAnnotation getColumnAnnotation();
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- */
- interface Owner
- extends JavaReadOnlyNamedDiscriminatorColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
index d93495d..3f29656 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.GeneratedValue;
import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
@@ -23,16 +21,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public interface JavaGeneratedValue
extends GeneratedValue, JavaJpaContextNode
{
GeneratedValueAnnotation getGeneratedValueAnnotation();
-
- /**
- * Return the (best guess) text location of the generator.
- */
- TextRange getGeneratorTextRange(CompilationUnit astRoot);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
index 0d6b8ab..ae3476a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Generator;
import org.eclipse.jpt.jpa.core.context.orm.EntityMappings;
import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
@@ -24,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public interface JavaGenerator
@@ -32,8 +30,6 @@
{
GeneratorAnnotation getGeneratorAnnotation();
- TextRange getNameTextRange(CompilationUnit astRoot);
-
//********* metadata conversion *********
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
index 068f576..84c4bb3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -9,13 +9,9 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Java JPA context node.
@@ -26,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.2
+ * @version 3.3
* @since 2.0
*/
public interface JavaJpaContextNode
@@ -38,13 +34,4 @@
*/
Iterable<String> getJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot);
-
- // ********** validation **********
-
- /**
- * Adds to the list of current validation messages
- */
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- TextRange getValidationTextRange(CompilationUnit astRoot);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
index b300c2b..6814cba 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,9 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.OverrideContainer;
import org.eclipse.jpt.jpa.core.context.Override_;
@@ -26,7 +24,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
public interface JavaOverrideContainer
@@ -59,7 +57,5 @@
extends OverrideContainer.Owner
{
JavaResourceMember getResourceMember();
-
- TextRange getValidationTextRange(CompilationUnit astRoot);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
index b9fc81c..3126e07 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -67,7 +66,7 @@
* Return whether the attribute contains the given offset into its Java
* source code file.
*/
- boolean contains(int offset, CompilationUnit astRoot);
+ boolean contains(int offset);
// ********** type **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
index 500c90e..0bb932e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java
@@ -10,8 +10,6 @@
package org.eclipse.jpt.jpa.core.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
@@ -29,7 +27,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.2
+ * @version 3.3
* @since 2.0
*/
public interface JavaQuery
@@ -49,9 +47,7 @@
// ********** validation **********
- void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
-
- TextRange getNameTextRange(CompilationUnit astRoot);
+ void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
// ********** metadata conversion *********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
index 530065b..7f58a62 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -24,15 +24,4 @@
extends ReadOnlyBaseColumn, JavaReadOnlyTableColumn
{
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner, JavaReadOnlyTableColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
index e391b7f..d3b0ea5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
/**
@@ -25,22 +23,5 @@
public interface JavaReadOnlyBaseJoinColumn
extends ReadOnlyBaseJoinColumn, JavaReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the join column's
- * referenced column name.
- */
- TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot);
-
- // ********** owner **********
-
- /**
- * interface allowing join columns to be used in multiple places
- * (e.g. 1:1 mappings and join tables)
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
index 8e7a5b4..fb1e177 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -20,17 +20,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface JavaReadOnlyJoinColumn
extends ReadOnlyJoinColumn, JavaReadOnlyBaseJoinColumn, JavaReadOnlyBaseColumn
{
- // ********** owner **********
- interface Owner
- extends ReadOnlyJoinColumn.Owner, JavaReadOnlyBaseJoinColumn.Owner, JavaReadOnlyBaseColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
index bd3002a..6ae887c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
/**
@@ -31,25 +29,5 @@
public interface JavaReadOnlyNamedColumn
extends ReadOnlyNamedColumn, JavaJpaContextNode
{
- /**
- * Return the (best guess) text location of the column's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the column owner's text range. This can be returned by the
- * column when its annotation is not present.
- */
- TextRange getValidationTextRange(CompilationUnit astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
index 7c0b582..c958afd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -21,21 +21,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface JavaReadOnlyNamedDiscriminatorColumn
extends ReadOnlyNamedDiscriminatorColumn, JavaReadOnlyNamedColumn
{
- // ********** owner **********
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedDiscriminatorColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- //combining interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
index 651e56f..d44f394 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
/**
@@ -25,8 +23,5 @@
public interface JavaReadOnlyOverride
extends ReadOnlyOverride, JavaJpaContextNode
{
- /**
- * Return the (best guess) text location of the override's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
index b2b2d34..c866e0f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
/**
@@ -25,7 +23,5 @@
public interface JavaReadOnlyTable
extends ReadOnlyTable, JavaJpaContextNode
{
- TextRange getNameTextRange(CompilationUnit astRoot);
- TextRange getSchemaTextRange(CompilationUnit astRoot);
- TextRange getCatalogTextRange(CompilationUnit astRoot);
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
index f878635..be6cfff 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,8 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
/**
@@ -25,21 +23,4 @@
public interface JavaReadOnlyTableColumn
extends ReadOnlyTableColumn, JavaReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the column's table.
- */
- TextRange getTableTextRange(CompilationUnit astRoot);
-
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyTableColumn.Owner, JavaReadOnlyNamedColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
index 6e43119..7aa5171 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java
@@ -14,7 +14,6 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.JavaElementCollectionTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.JavaTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.resource.java.TemporalAnnotation;
@@ -70,8 +69,8 @@
@Override
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new JavaTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
@@ -92,8 +91,8 @@
@Override
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new JavaElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
index 0841b9c..fa5f1b1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.java;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
import org.eclipse.jpt.jpa.core.context.VirtualColumn;
@@ -35,7 +36,7 @@
// ********** owner **********
interface Owner
- extends VirtualColumn.Owner, JavaReadOnlyBaseColumn.Owner
+ extends VirtualColumn.Owner, ReadOnlyBaseColumn.Owner
{
/**
* The overridden column can be either a Java column or an
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
index 313fac9..5cf62db 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jpt.jpa.core.context.Column;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlColumn;
/**
@@ -37,7 +38,7 @@
* (e.g. basic mappings and attribute overrides)
*/
interface Owner
- extends OrmReadOnlyBaseColumn.Owner
+ extends ReadOnlyBaseColumn.Owner
{
XmlColumn getXmlColumn();
XmlColumn buildXmlColumn();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
index a376a1d..30ee19a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.jpt.jpa.core.context.DiscriminatorColumn;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
/**
@@ -21,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 2.0
*/
public interface OrmDiscriminatorColumn
@@ -36,7 +37,7 @@
* interface allowing discriminator columns to be used in multiple places
*/
interface Owner
- extends OrmReadOnlyNamedDiscriminatorColumn.Owner
+ extends ReadOnlyNamedDiscriminatorColumn.Owner
{
XmlDiscriminatorColumn getXmlColumn();
XmlDiscriminatorColumn buildXmlColumn();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
index 0a0f487..d0e1636 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java
@@ -13,7 +13,6 @@
import org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
@@ -64,7 +63,7 @@
public TextRange getEnumTextRange() {
return mapping.getEnumeratedTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
};
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
index f42e8c0..9b46749 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.GeneratedValue;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
@@ -23,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.1
+ * @version 3.3
* @since 2.0
*/
public interface OrmGeneratedValue
@@ -31,8 +30,4 @@
{
XmlGeneratedValue getXmlGeneratedValue();
- /**
- * Return the (best guess) text location of the generator.
- */
- TextRange getGeneratorTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
index cd1791f..75a644a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Generator;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator;
@@ -23,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.0
+ * @version 3.3
* @since 2.0
*/
public interface OrmGenerator
@@ -31,5 +30,4 @@
{
XmlGenerator getXmlGenerator();
- TextRange getNameTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
index 75a4744..dd1ecfd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.context.LobConverter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.jpt.jpa.core.resource.orm.XmlConvertibleMapping;
@@ -63,7 +62,7 @@
((XmlConvertibleMapping) xmlMapping).setLob(false);
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
index 0735752..c86e8ec 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.context.orm;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.OverrideContainer;
import org.eclipse.jpt.jpa.core.context.Override_;
@@ -27,7 +26,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
public interface OrmOverrideContainer
@@ -73,8 +72,6 @@
*/
Iterable<String> getJavaOverrideNames();
- TextRange getValidationTextRange();
-
OrmTypeMapping getTypeMapping();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
index f35bed7..9d2ee47 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.context.orm;
import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.Query;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -28,7 +27,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.2
+ * @version 3.3
* @since 2.0
*/
public interface OrmQuery
@@ -50,7 +49,4 @@
void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
- TextRange getNameTextRange();
-
- TextRange getQueryTextRange();
}
\ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
index 679d9ee..b3710cb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -24,15 +24,4 @@
extends ReadOnlyBaseColumn, OrmReadOnlyTableColumn
{
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyBaseColumn.Owner, OrmReadOnlyTableColumn.Owner
- {
- // combine two interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
index e31619f..60cce20 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
/**
@@ -24,22 +23,5 @@
public interface OrmReadOnlyBaseJoinColumn
extends ReadOnlyBaseJoinColumn, OrmReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the column's
- * referenced column name.
- */
- TextRange getReferencedColumnNameTextRange();
-
- // ********** owner **********
-
- /**
- * interface allowing join columns to be used in multiple places
- * (e.g. 1:1 mappings and join tables)
- */
- interface Owner
- extends ReadOnlyBaseJoinColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- // combine two interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
index 25ab84a..3fe6158 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -20,17 +20,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.0
*/
public interface OrmReadOnlyJoinColumn
extends ReadOnlyJoinColumn, OrmReadOnlyBaseJoinColumn, OrmReadOnlyBaseColumn
{
- // ********** owner **********
- interface Owner
- extends ReadOnlyJoinColumn.Owner, OrmReadOnlyBaseJoinColumn.Owner, OrmReadOnlyBaseColumn.Owner
- {
- // combine interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
index 736f6cd..117f78d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -31,25 +30,5 @@
public interface OrmReadOnlyNamedColumn
extends ReadOnlyNamedColumn, XmlContextNode
{
- /**
- * Return the (best guess) text location of the column's name.
- */
- TextRange getNameTextRange();
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyNamedColumn.Owner
- {
- /**
- * Return the column owner's text range. This can be returned by the
- * column when its annotation is not present.
- */
- TextRange getValidationTextRange();
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
index 1ec9da3..fd31237 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -21,22 +21,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface OrmReadOnlyNamedDiscriminatorColumn
extends ReadOnlyNamedDiscriminatorColumn, OrmReadOnlyNamedColumn
{
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- * (but pretty much just entities)
- */
- interface Owner
- extends ReadOnlyNamedDiscriminatorColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- //combining interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
index e38c0ac..857924c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -25,8 +24,5 @@
public interface OrmReadOnlyOverride
extends ReadOnlyOverride, XmlContextNode
{
- /**
- * Return the (best guess) text location of the override's name.
- */
- TextRange getNameTextRange();
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
index d49312a..14190cd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
@@ -25,7 +24,5 @@
public interface OrmReadOnlyTable
extends ReadOnlyTable, XmlContextNode
{
- TextRange getNameTextRange();
- TextRange getSchemaTextRange();
- TextRange getCatalogTextRange();
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
index 1dcd63e..7ffb482 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
/**
@@ -24,21 +23,5 @@
public interface OrmReadOnlyTableColumn
extends ReadOnlyTableColumn, OrmReadOnlyNamedColumn
{
- /**
- * Return the (best guess) text location of the column's table.
- */
- TextRange getTableTextRange();
-
- // ********** owner **********
-
- /**
- * interface allowing columns to be used in multiple places
- * (e.g. basic mappings and attribute overrides)
- */
- interface Owner
- extends ReadOnlyTableColumn.Owner, OrmReadOnlyNamedColumn.Owner
- {
- // combine two interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
index 166231a..b851bfe 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java
@@ -13,7 +13,6 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.context.Converter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmElementCollectionTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
@@ -90,8 +89,8 @@
public TextRange getTemporalTextRange() {
return mapping.getTemporalTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new OrmTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
@@ -121,8 +120,8 @@
public TextRange getTemporalTextRange() {
return mapping.getTemporalTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new OrmElementCollectionTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
index 1deafbb..77ab5fd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,6 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.context.orm;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
import org.eclipse.jpt.jpa.core.context.VirtualColumn;
@@ -35,7 +36,7 @@
// ********** owner **********
interface Owner
- extends VirtualColumn.Owner, OrmReadOnlyBaseColumn.Owner
+ extends VirtualColumn.Owner, ReadOnlyBaseColumn.Owner
{
/**
* The overridden column can be either a Java column or an
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
index c040b94..974a1ab 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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,6 +11,7 @@
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
@@ -61,7 +62,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
// TODO bjv we need a factory interface for a 1.0 orm.xml in a 2.0 project...
@@ -115,17 +116,17 @@
OrmVirtualSecondaryTable buildOrmVirtualSecondaryTable(OrmEntity parent, ReadOnlyTable.Owner owner, JavaSecondaryTable javaSecondaryTable);
- OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn);
+ OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn);
- OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn);
+ OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn);
OrmJoinTable buildOrmJoinTable(OrmJoinTableRelationshipStrategy parent, Table.Owner owner);
OrmVirtualJoinTable buildOrmVirtualJoinTable(OrmVirtualJoinTableRelationshipStrategy parent, ReadOnlyTable.Owner owner, ReadOnlyJoinTable overriddenTable);
- OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn);
+ OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, XmlJoinColumn resourceJoinColumn);
- OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
+ OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn);
OrmAttributeOverrideContainer buildOrmAttributeOverrideContainer(XmlContextNode parent, OrmAttributeOverrideContainer.Owner owner);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
index 107c129..3dcbea7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java
@@ -22,8 +22,10 @@
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
import org.eclipse.jpt.jpa.core.context.PersistentType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
import org.eclipse.jpt.jpa.core.context.Table;
@@ -67,8 +69,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryHint;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.java.JavaSequenceGenerator;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
@@ -253,15 +253,15 @@
return new GenericJavaVirtualColumn(parent, owner);
}
- public JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
+ public JavaDiscriminatorColumn buildJavaDiscriminatorColumn(JavaEntity parent, ReadOnlyNamedDiscriminatorColumn.Owner owner) {
return new GenericJavaDiscriminatorColumn(parent, owner);
}
- public JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation) {
+ public JavaJoinColumn buildJavaJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation joinColumnAnnotation) {
return new GenericJavaJoinColumn(parent, owner, joinColumnAnnotation);
}
- public JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
+ public JavaVirtualJoinColumn buildJavaVirtualJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
return new GenericJavaVirtualJoinColumn(parent, owner, overriddenColumn);
}
@@ -337,7 +337,7 @@
return new GenericJavaGeneratedValue(parent, generatedValueAnnotation);
}
- public JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation) {
+ public JavaPrimaryKeyJoinColumn buildJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation pkJoinColumnAnnotation) {
return new GenericJavaPrimaryKeyJoinColumn(parent, owner, pkJoinColumnAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
index 65a7d0a..a88c092 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java
@@ -9,7 +9,10 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context;
+import java.util.List;
+
import org.eclipse.jpt.common.core.JptResourceType;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.JpaNode;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.MappingFile;
@@ -18,6 +21,9 @@
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJpaContextNode
extends AbstractJpaNode
@@ -104,6 +110,45 @@
}
+ // ********** validation **********
+
+ /**
+ * All subclass implementations should be
+ * preceded by a "super" call to this method.
+ */
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ if (reporter.isCancelled()) {
+ throw new ValidationCancelledException();
+ }
+ }
+
+ /**
+ * Return the specified text range if it is not <code>null</code>; if it is
+ * <code>null</code>, return the node's validation text range.
+ */
+ protected TextRange getValidationTextRange(TextRange textRange) {
+ return (textRange != null) ? textRange : this.getValidationTextRange();
+ }
+
+ /**
+ * Validate the specified node if it is not <code>null</code>.
+ */
+ protected void validateNode(JpaContextNode node, List<IMessage> messages, IReporter reporter) {
+ if (node != null) {
+ node.validate(messages, reporter);
+ }
+ }
+
+ /**
+ * Validate the specified nodes.
+ */
+ protected void validateNodes(Iterable<? extends JpaContextNode> nodes, List<IMessage> messages, IReporter reporter) {
+ for (JpaContextNode node : nodes) {
+ node.validate(messages, reporter);
+ }
+ }
+
+
// ********** database stuff **********
public Schema getContextDefaultDbSchema() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
index 0af1269..d9dccef 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java
@@ -9,13 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context;
-import java.util.List;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractXmlContextNode
extends AbstractJpaContextNode
@@ -26,43 +21,6 @@
}
- // ********** validation **********
-
- /**
- * All subclass implementations should be have a "super" call to this method.
- */
- public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
-
- /**
- * Validate the specified node if it is not <code>null</code>.
- */
- protected void validateNode(XmlContextNode node, List<IMessage> messages, IReporter reporter) {
- if (node != null) {
- node.validate(messages, reporter);
- }
- }
-
- /**
- * Validate the specified nodes.
- */
- protected void validateNodes(Iterable<? extends XmlContextNode> nodes, List<IMessage> messages, IReporter reporter) {
- for (XmlContextNode node : nodes) {
- node.validate(messages, reporter);
- }
- }
-
- /**
- * Return the specified text range if it is not <code>null</code>; if it is
- * <code>null</code>, return the node's validation text range.
- */
- protected TextRange getValidationTextRange(TextRange textRange) {
- return (textRange != null) ? textRange : this.getValidationTextRange();
- }
-
// *********** completion proposals ***********
public Iterable<String> getXmlCompletionProposals(int pos) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java
deleted file mode 100644
index 8918e1c..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on join columns
- */
-public interface BaseJoinColumnTextRangeResolver extends NamedColumnTextRangeResolver
-{
- TextRange getReferencedColumnNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java
deleted file mode 100644
index 19b118f..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java
+++ /dev/null
@@ -1,18 +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.jpa.core.internal.context;
-
-
-public interface EntityTextRangeResolver
- extends PrimaryKeyTextRangeResolver
-{
-
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java
deleted file mode 100644
index 3d237dc..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-/**
- * Interface to resolve text ranges on join columns
- */
-public interface JoinColumnTextRangeResolver
- extends BaseJoinColumnTextRangeResolver, TableColumnTextRangeResolver
-{
- // combine interfaces
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java
deleted file mode 100644
index da47738..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface NamedColumnTextRangeResolver
-{
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java
deleted file mode 100644
index 901eae1..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface OverrideTextRangeResolver
-{
- TextRange getNameTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java
deleted file mode 100644
index a2345cc..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent attributes
- */
-public interface PersistentAttributeTextRangeResolver
-{
- TextRange getAttributeTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java
deleted file mode 100644
index 8a759ea..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java
+++ /dev/null
@@ -1,24 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent type mappings that can define primary keys
- */
-public interface PrimaryKeyTextRangeResolver extends TypeMappingTextRangeResolver
-{
-
- TextRange getIdClassTextRange();
-
- TextRange getAttributeMappingTextRange(String attributeName);
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java
deleted file mode 100644
index 877b397..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on named columns
- */
-public interface TableColumnTextRangeResolver extends NamedColumnTextRangeResolver
-{
- TextRange getTableTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java
deleted file mode 100644
index adb744d..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on tables.
- */
-public interface TableTextRangeResolver
-{
- TextRange getNameTextRange();
-
- TextRange getSchemaTextRange();
-
- TextRange getCatalogTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java
deleted file mode 100644
index a30cac2..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,21 +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.jpa.core.internal.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on persistent type mappings
- */
-public interface TypeMappingTextRangeResolver
-{
- TextRange getTypeMappingTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
index 88b544a..f43907c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.HashMap;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceNode;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
@@ -166,9 +165,9 @@
return this.member.isFor(memberName, occurrence);
}
- public TextRange getTextRange(CompilationUnit astRoot) {
+ public TextRange getTextRange() {
// should never be null
- return this.member.getTextRange(astRoot);
+ return this.member.getTextRange();
}
public TextRange getNameTextRange() {
@@ -176,9 +175,9 @@
return this.member.getNameTextRange();
}
- public TextRange getTextRange(String nestableAnnotationName, CompilationUnit astRoot) {
+ public TextRange getTextRange(String nestableAnnotationName) {
// should never be null
- return this.member.getTextRange(nestableAnnotationName, astRoot);
+ return this.member.getTextRange(nestableAnnotationName);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
index 01e4043..a458615 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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,7 +11,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -296,12 +295,12 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMappingType(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateMappingType(messages);
}
- protected void validateMappingType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMappingType(List<IMessage> messages) {
if ( ! this.getTypeMapping().attributeMappingKeyAllowed(this.getKey())) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -309,19 +308,19 @@
JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_MAPPING,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getMappingAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getPersistentAttribute().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getMappingAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getPersistentAttribute().getValidationTextRange();
}
- protected TextRange getMappingAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getMappingAnnotationTextRange() {
A annotation = this.getMappingAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
index 3b12b80..79e8e32 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java
@@ -17,14 +17,12 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaBaseColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.BaseColumnAnnotation;
/**
* Java column or join column
*/
-public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O extends JavaReadOnlyBaseColumn.Owner>
+public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O extends ReadOnlyBaseColumn.Owner>
extends AbstractJavaNamedColumn<A, O>
implements JavaBaseColumn
{
@@ -134,8 +132,8 @@
return this.owner.getDefaultTableName();
}
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange(), astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange());
}
@@ -365,9 +363,4 @@
public boolean tableNameIsInvalid() {
return this.owner.tableNameIsInvalid(this.getTable());
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
index ef53809..214c3f7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java
@@ -33,10 +33,8 @@
import org.eclipse.jpt.jpa.core.context.java.JavaBaseEmbeddedMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
@@ -207,15 +205,15 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- if (this.validateTargetEmbeddable(messages, astRoot)) {
- this.validateOverrides(messages, reporter, astRoot);
+ if (this.validateTargetEmbeddable(messages)) {
+ this.validateOverrides(messages, reporter);
}
}
- protected boolean validateTargetEmbeddable(List<IMessage> messages, CompilationUnit astRoot) {
+ protected boolean validateTargetEmbeddable(List<IMessage> messages) {
if (this.targetEmbeddable != null) {
return true;
}
@@ -227,7 +225,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_NOT_AN_EMBEDDABLE,
new String[] {this.getName(), targetEmbeddableTypeName},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -238,15 +236,15 @@
JpaValidationMessages.TARGET_NOT_AN_EMBEDDABLE,
new String[] {targetEmbeddableTypeName},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
return false;
}
- protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.attributeOverrideContainer.validate(messages, reporter, astRoot);
+ protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
+ this.attributeOverrideContainer.validate(messages, reporter);
}
@@ -314,16 +312,16 @@
return true;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaBaseEmbeddedMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaBaseEmbeddedMapping.this.getValidationTextRange();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new EntityTableDescriptionProvider());
}
protected JavaPersistentAttribute getPersistentAttribute() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
index 92290de..32f6ba3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java
@@ -30,9 +30,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
@@ -346,8 +344,8 @@
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
@@ -374,9 +372,9 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.column.validate(messages, reporter);
+ this.converter.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
index b256d72..7822d98 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java
@@ -13,7 +13,6 @@
import java.util.List;
import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
@@ -104,8 +103,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// [JPA 2.0] if the embedded id is mapped by a relationship, then any specified
// attribute overrides are in error
@@ -119,7 +118,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
new String[] {this.getName()},
this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange(astRoot)
+ this.attributeOverrideContainer.getValidationTextRange()
)
);
} else {
@@ -129,20 +128,20 @@
JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED,
EMPTY_STRING_ARRAY,
this.attributeOverrideContainer,
- this.attributeOverrideContainer.getValidationTextRange(astRoot)
+ this.attributeOverrideContainer.getValidationTextRange()
)
);
}
}
- validateTargetEmbeddableImplementsSerializable(messages, reporter, astRoot);
- validateNoRelationshipMappingsOnTargetEmbeddable(messages, reporter, astRoot);
- validateTargetEmbeddableImplementsEqualsAndHashcode(messages, reporter, astRoot);
- validateTargetEmbeddableIsPublic(messages, reporter, astRoot);
- validateTargetEmbeddableImplementsZeroArgConstructor(messages, reporter, astRoot);
+ validateTargetEmbeddableImplementsSerializable(messages, reporter);
+ validateNoRelationshipMappingsOnTargetEmbeddable(messages, reporter);
+ validateTargetEmbeddableImplementsEqualsAndHashcode(messages, reporter);
+ validateTargetEmbeddableIsPublic(messages, reporter);
+ validateTargetEmbeddableImplementsZeroArgConstructor(messages, reporter);
}
- protected void validateTargetEmbeddableImplementsZeroArgConstructor(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableImplementsZeroArgConstructor(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
IJavaProject javaProject = getJpaProject().getJavaProject();
@@ -154,7 +153,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -164,7 +163,7 @@
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -172,7 +171,7 @@
}
}
- protected void validateTargetEmbeddableImplementsEqualsAndHashcode(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableImplementsEqualsAndHashcode(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
JavaResourceType resourceType = getTargetEmbeddable().getJavaResourceType();
if (resourceType != null
@@ -185,7 +184,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -195,7 +194,7 @@
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -203,7 +202,7 @@
}
}
- protected void validateTargetEmbeddableIsPublic(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableIsPublic(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
if (!getTargetEmbeddable().getJavaResourceType().isPublic()) {
if (getPersistentAttribute().isVirtual()) {
@@ -213,7 +212,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -223,7 +222,7 @@
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -231,7 +230,7 @@
}
}
- protected void validateTargetEmbeddableImplementsSerializable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTargetEmbeddableImplementsSerializable(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
String targetEmbeddableClassName = this.getTargetEmbeddable().getPersistentType().getName();
IJavaProject javaProject = getJpaProject().getJavaProject();
@@ -243,7 +242,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -253,7 +252,7 @@
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -261,7 +260,7 @@
}
}
- protected void validateNoRelationshipMappingsOnTargetEmbeddable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateNoRelationshipMappingsOnTargetEmbeddable(List<IMessage> messages, IReporter reporter) {
if (this.getTargetEmbeddable() != null) {
TypeMapping targetEmbeddableTypeMapping = this.getTargetEmbeddable().getPersistentType().getMapping();
if (targetEmbeddableTypeMapping.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY).iterator().hasNext()
@@ -275,7 +274,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -285,7 +284,7 @@
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
index 149053e..a3c1a18 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -33,12 +33,8 @@
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseEmbeddedMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
@@ -203,9 +199,9 @@
// ********** validation **********
@Override
- protected void validateOverrides(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateOverrides(messages, reporter, astRoot);
- this.associationOverrideContainer.validate(messages, reporter, astRoot);
+ protected void validateOverrides(List<IMessage> messages, IReporter reporter) {
+ super.validateOverrides(messages, reporter);
+ this.associationOverrideContainer.validate(messages, reporter);
}
@@ -273,28 +269,28 @@
return true;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEmbeddedMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaEmbeddedMapping.this.getValidationTextRange();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, new EntityTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
+ return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table);
}
protected JavaPersistentAttribute getPersistentAttribute() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
index 31067ee..4fc14e7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java
@@ -74,19 +74,11 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
@@ -879,7 +871,7 @@
return this.getJpaFactory().buildJavaDiscriminatorColumn(this, this.buildDiscriminatorColumnOwner());
}
- protected JavaDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
+ protected ReadOnlyNamedDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
return new DiscriminatorColumnOwner();
}
@@ -1313,24 +1305,24 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
- this.validatePrimaryKey(messages, reporter, astRoot);
- this.validateTable(messages, reporter, astRoot);
+ this.validatePrimaryKey(messages, reporter);
+ this.validateTable(messages, reporter);
for (JavaSecondaryTable secondaryTable : this.getSecondaryTables()) {
- secondaryTable.validate(messages, reporter, astRoot);
+ secondaryTable.validate(messages, reporter);
}
- this.validateInheritance(messages, reporter, astRoot);
+ this.validateInheritance(messages, reporter);
for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
+ pkJoinColumn.validate(messages, reporter);
}
- this.generatorContainer.validate(messages, reporter, astRoot);
- this.queryContainer.validate(messages, reporter, astRoot);
- this.attributeOverrideContainer.validate(messages, reporter, astRoot);
- this.associationOverrideContainer.validate(messages, reporter, astRoot);
+ this.generatorContainer.validate(messages, reporter);
+ this.queryContainer.validate(messages, reporter);
+ this.attributeOverrideContainer.validate(messages, reporter);
+ this.associationOverrideContainer.validate(messages, reporter);
this.validateEntityName(messages);
- this.idClassReference.validate(messages, reporter, astRoot);
+ this.idClassReference.validate(messages, reporter);
}
@Override
@@ -1352,20 +1344,15 @@
}
}
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
+ protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
+ this.buildPrimaryKeyValidator().validate(messages, reporter);
}
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new GenericEntityPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildPrimaryKeyValidator() {
+ return new GenericEntityPrimaryKeyValidator(this);
}
- @Override
- protected EntityTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaEntityTextRangeResolver(this, astRoot);
- }
-
- protected void validateTable(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateTable(List<IMessage> messages, IReporter reporter) {
if (this.isAbstractTablePerClass()) {
if (this.table.isSpecifiedInResource()) {
messages.add(
@@ -1374,7 +1361,7 @@
JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
new String[] {this.getName()},
this,
- this.table.getValidationTextRange(astRoot)
+ this.table.getValidationTextRange()
)
);
}
@@ -1388,13 +1375,13 @@
JpaValidationMessages.ENTITY_SINGLE_TABLE_DESCENDANT_DEFINES_TABLE,
new String[] {this.getName()},
this,
- this.table.getValidationTextRange(astRoot)
+ this.table.getValidationTextRange()
)
);
}
return;
}
- this.table.validate(messages, reporter, astRoot);
+ this.table.validate(messages, reporter);
}
/**
@@ -1406,15 +1393,15 @@
(this.table.getDbTable() != this.getRootEntity().getTable().getDbTable());
}
- protected void validateInheritance(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateInheritanceStrategy(messages, astRoot);
- this.validateDiscriminatorColumn(messages, reporter, astRoot);
- this.validateDiscriminatorValue(messages, astRoot);
+ protected void validateInheritance(List<IMessage> messages, IReporter reporter) {
+ this.validateInheritanceStrategy(messages);
+ this.validateDiscriminatorColumn(messages, reporter);
+ this.validateDiscriminatorValue(messages);
}
- protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateDiscriminatorColumn(List<IMessage> messages, IReporter reporter) {
if (this.specifiedDiscriminatorColumnIsAllowed && ! this.discriminatorColumnIsUndefined) {
- this.discriminatorColumn.validate(messages, reporter, astRoot);
+ this.discriminatorColumn.validate(messages, reporter);
}
else if (!this.discriminatorColumn.isVirtual()) {
if (this.isDescendant()) {
@@ -1424,7 +1411,7 @@
JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorColumnTextRange(astRoot)
+ this.getDiscriminatorColumnTextRange()
)
);
}
@@ -1435,14 +1422,14 @@
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_COLUMN_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorColumnTextRange(astRoot)
+ this.getDiscriminatorColumnTextRange()
)
);
}
}
}
- protected void validateDiscriminatorValue(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateDiscriminatorValue(List<IMessage> messages) {
if (this.discriminatorValueIsUndefined && (this.specifiedDiscriminatorValue != null)) {
if (this.isAbstract()) {
messages.add(
@@ -1451,7 +1438,7 @@
JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorValueTextRange(astRoot)
+ this.getDiscriminatorValueTextRange()
)
);
}
@@ -1462,14 +1449,14 @@
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_DISCRIMINATOR_VALUE_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorValueTextRange(astRoot)
+ this.getDiscriminatorValueTextRange()
)
);
}
}
}
- protected void validateInheritanceStrategy(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateInheritanceStrategy(List<IMessage> messages) {
Supported tablePerConcreteClassInheritanceIsSupported = this.getJpaPlatformVariation().getTablePerConcreteClassInheritanceIsSupported();
if (tablePerConcreteClassInheritanceIsSupported == Supported.YES) {
return;
@@ -1482,7 +1469,7 @@
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
new String[] {this.getName()},
this,
- this.getInheritanceStrategyTextRange(astRoot)
+ this.getInheritanceStrategyTextRange()
)
);
}
@@ -1493,23 +1480,23 @@
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_PORTABLE_ON_PLATFORM,
new String[] {this.getName()},
this,
- this.getInheritanceStrategyTextRange(astRoot)
+ this.getInheritanceStrategyTextRange()
)
);
}
}
}
- protected TextRange getDiscriminatorValueTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getDiscriminatorValueAnnotation().getTextRange(astRoot), astRoot);
+ protected TextRange getDiscriminatorValueTextRange() {
+ return this.getValidationTextRange(this.getDiscriminatorValueAnnotation().getTextRange());
}
- protected TextRange getDiscriminatorColumnTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.discriminatorColumn.getValidationTextRange(astRoot), astRoot);
+ protected TextRange getDiscriminatorColumnTextRange() {
+ return this.getValidationTextRange(this.discriminatorColumn.getValidationTextRange());
}
- protected TextRange getInheritanceStrategyTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getInheritanceAnnotation().getStrategyTextRange(), astRoot);
+ protected TextRange getInheritanceStrategyTextRange() {
+ return this.getValidationTextRange(this.getInheritanceAnnotation().getStrategyTextRange());
}
@@ -1529,8 +1516,8 @@
return AbstractJavaEntity.this;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaEntity.this.getValidationTextRange();
}
public TypeMapping getOverridableTypeMapping() {
@@ -1599,12 +1586,12 @@
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new MappedSuperclassOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, new EntityTableDescriptionProvider());
}
}
@@ -1624,24 +1611,24 @@
return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new MappedSuperclassOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, new EntityTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t) {
+ return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t);
}
}
@@ -1662,8 +1649,8 @@
return AbstractJavaEntity.this.resolveDbTable(tableName);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaEntity.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaEntity.this.getValidationTextRange();
}
}
@@ -1672,7 +1659,7 @@
protected class PrimaryKeyJoinColumnOwner
extends NamedColumnOwner
- implements JavaReadOnlyBaseJoinColumn.Owner
+ implements ReadOnlyBaseJoinColumn.Owner
{
public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
Entity parentEntity = AbstractJavaEntity.this.getParentEntity();
@@ -1691,8 +1678,8 @@
return (parentEntity == null) ? AbstractJavaEntity.this.getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this);
}
}
@@ -1701,7 +1688,7 @@
protected class DiscriminatorColumnOwner
extends NamedColumnOwner
- implements JavaDiscriminatorColumn.Owner
+ implements ReadOnlyNamedDiscriminatorColumn.Owner
{
public String getDefaultColumnName(ReadOnlyNamedColumn column) {
return this.isDescendant() ?
@@ -1733,8 +1720,8 @@
return AbstractJavaEntity.this.discriminatorColumnIsUndefined;
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new DiscriminatorColumnValidator(column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new DiscriminatorColumnValidator(column);
}
}
@@ -1744,8 +1731,8 @@
protected class TableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new TableValidator(t, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable t) {
+ return new TableValidator(t);
}
}
@@ -1755,8 +1742,8 @@
protected class SecondaryTableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new SecondaryTableValidator((ReadOnlySecondaryTable) t, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable t) {
+ return new SecondaryTableValidator((ReadOnlySecondaryTable) t);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
index ce719f8..d47ae6e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.Tools;
@@ -73,8 +72,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (StringTools.stringIsEmpty(this.name)){
messages.add(
@@ -83,19 +82,19 @@
JpaValidationMessages.GENERATOR_NAME_UNDEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.generatorAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.generatorAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.generatorAnnotation.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.generatorAnnotation.getNameTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
index 7f3ae83..1c85bfd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java
@@ -34,9 +34,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
@@ -397,8 +395,8 @@
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
@@ -439,36 +437,36 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// JPA 2.0: If the column is specified or if the ID is not mapped by a relationship,
// the column is validated.
// JPA 1.0: The column is always be validated, since the ID is never mapped by a
// relationship.
if (this.columnIsSpecified() || ! this.derived) {
- this.column.validate(messages, reporter, astRoot);
+ this.column.validate(messages, reporter);
}
// JPA 2.0: If the column is specified and the ID is mapped by a relationship,
// we have an error.
// JPA 1.0: The ID cannot be mapped by a relationship.
if (this.columnIsSpecified() && this.derived) {
- messages.add(this.buildColumnSpecifiedAndDerivedMessage(astRoot));
+ messages.add(this.buildColumnSpecifiedAndDerivedMessage());
}
- this.generatorContainer.validate(messages, reporter, astRoot);
+ this.generatorContainer.validate(messages, reporter);
if (this.generatedValue != null) {
- this.generatedValue.validate(messages, reporter, astRoot);
+ this.generatedValue.validate(messages, reporter);
}
- this.converter.validate(messages, reporter, astRoot);
+ this.converter.validate(messages, reporter);
}
- protected IMessage buildColumnSpecifiedAndDerivedMessage(CompilationUnit astRoot) {
+ protected IMessage buildColumnSpecifiedAndDerivedMessage() {
return this.buildMessage(
JpaValidationMessages.ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_COLUMN_SPECIFIED,
EMPTY_STRING_ARRAY,
- this.column.getValidationTextRange(astRoot)
+ this.column.getValidationTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
index bd400ef..3208673 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java
@@ -24,7 +24,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationship;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -35,7 +34,7 @@
implements JavaJoinColumnRelationshipStrategy
{
protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected JavaJoinColumn defaultJoinColumn;
@@ -170,7 +169,7 @@
}
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
// ********** default join column **********
@@ -317,10 +316,10 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JavaJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
+ joinColumn.validate(messages, reporter);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
index 2b5f262..d66bb74 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -186,10 +186,10 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter, astRoot);
+ this.joinTable.validate(messages, reporter);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
index d462f5c..494412b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java
@@ -9,17 +9,12 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
import org.eclipse.jpt.jpa.core.context.JpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.internal.context.AbstractJpaContextNode;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public abstract class AbstractJavaJpaContextNode
extends AbstractJpaContextNode
@@ -55,42 +50,5 @@
protected Iterable<String> getConnectedJavaCompletionProposals(int pos, Filter<String> filter, CompilationUnit astRoot) {
return null;
}
-
- // ********** validation **********
-
- /**
- * All subclass implementations
- * should be preceded by a "super" call to this method.
- */
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- }
- /**
- * Validate the specified node if it is not <code>null</code>.
- */
- protected void validateNode(JavaJpaContextNode node, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- if (node != null) {
- node.validate(messages, reporter, astRoot);
- }
- }
-
- /**
- * Validate the specified nodes.
- */
- protected void validateNodes(Iterable<? extends JavaJpaContextNode> nodes, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- for (JavaJpaContextNode node : nodes) {
- node.validate(messages, reporter, astRoot);
- }
- }
-
- /**
- * Return the specified text range if it is not <code>null</code>; if it is
- * <code>null</code>, return the node's validation text range.
- */
- protected TextRange getValidationTextRange(TextRange textRange, CompilationUnit astRoot) {
- return (textRange != null) ? textRange : this.getValidationTextRange(astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
index ebf34eb..1756057 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMember;
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.Query;
@@ -19,7 +18,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
import org.eclipse.jpt.jpa.core.resource.java.MappedSuperclassAnnotation;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -112,11 +110,11 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validatePrimaryKey(messages, reporter, astRoot);
- this.idClassReference.validate(messages, reporter, astRoot);
- this.queryContainer.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validatePrimaryKey(messages, reporter);
+ this.idClassReference.validate(messages, reporter);
+ this.queryContainer.validate(messages, reporter);
}
@Override
@@ -124,17 +122,12 @@
return false;
}
- protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildPrimaryKeyValidator(astRoot).validate(messages, reporter);
+ protected void validatePrimaryKey(List<IMessage> messages, IReporter reporter) {
+ this.buildPrimaryKeyValidator().validate(messages, reporter);
}
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new GenericMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildPrimaryKeyValidator() {
+ return new GenericMappedSuperclassPrimaryKeyValidator(this);
// TODO - JPA 2.0 validation
}
-
- @Override
- protected PrimaryKeyTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaMappedSuperclassTextRangeResolver(this, astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
index 6293874..0da8c8d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.MappedByRelationship;
@@ -126,7 +125,7 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getMapping().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
index 270fd3c..118f1e7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java
@@ -52,14 +52,9 @@
import org.eclipse.jpt.jpa.core.context.java.JavaMultiRelationshipMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaOrderable;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
@@ -111,7 +106,7 @@
protected JavaConverter mapKeyConverter; // map key converter - never null
protected final ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> specifiedMapKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
protected JavaJoinColumn defaultMapKeyJoinColumn;
@@ -776,7 +771,7 @@
}
}
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -969,15 +964,15 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, reporter, astRoot);
- this.validateMapKeyClass(messages, astRoot);
- this.orderable.validate(messages, reporter, astRoot);
- this.validateMapKey(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateAttributeType(messages, reporter);
+ this.validateMapKeyClass(messages);
+ this.orderable.validate(messages, reporter);
+ this.validateMapKey(messages, reporter);
}
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages, IReporter reporter) {
JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
if (this.getPersistentAttribute().isVirtual()) {
@@ -987,7 +982,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
new String[] {getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -998,49 +993,49 @@
JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
}
- protected TextRange getMapKeyClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getMapKeyClassAnnotationTextRange(astRoot), astRoot);
+ protected TextRange getMapKeyClassTextRange() {
+ return this.getValidationTextRange(this.getMapKeyClassAnnotationTextRange());
}
- protected TextRange getMapKeyClassAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getMapKeyClassAnnotationTextRange() {
MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
- protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMapKey(List<IMessage> messages, IReporter reporter) {
if (this.getMapKeyAnnotation() != null) {//If MapKey annotation specified, no other MapKey* annotations can be specified, don't validate them
//TODO validate that the map key refers to an existing attribute
return;
}
if (this.getKeyType() == Type.BASIC_TYPE) {
- this.mapKeyColumn.validate(messages, reporter, astRoot);
- this.mapKeyConverter.validate(messages, reporter, astRoot);
+ this.mapKeyColumn.validate(messages, reporter);
+ this.mapKeyConverter.validate(messages, reporter);
}
else if (this.getKeyType() == Type.ENTITY_TYPE) {
for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
+ joinColumn.validate(messages, reporter);
}
}
else if (this.getKeyType() == Type.EMBEDDABLE_TYPE) {
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter, astRoot);
+ this.mapKeyAttributeOverrideContainer.validate(messages, reporter);
//validate map key association overrides - for eclipselink
}
}
- protected void validateMapKeyClass(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapKeyClass(List<IMessage> messages) {
if (this.isJpa2_0Compatible() && this.getPersistentAttribute().getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages, astRoot);
+ this.validateMapKeyClass_(messages);
}
}
- protected void validateMapKeyClass_(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapKeyClass_(List<IMessage> messages) {
if (this.getMapKeyClass() == null) {
if (this.getPersistentAttribute().isVirtual()) {
messages.add(
@@ -1049,7 +1044,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1059,7 +1054,7 @@
JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1078,7 +1073,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getName(), this.getFullyQualifiedMapKeyClass()},
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
@@ -1089,7 +1084,7 @@
JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getFullyQualifiedMapKeyClass()},
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
@@ -1121,8 +1116,8 @@
return EmptyIterable.instance();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange();
}
protected RelationshipStrategy getRelationshipStrategy() {
@@ -1157,8 +1152,8 @@
return this.getRelationshipStrategy().tableNameIsInvalid(tableName);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
}
}
@@ -1209,12 +1204,12 @@
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
}
}
@@ -1222,7 +1217,7 @@
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -1272,16 +1267,15 @@
return AbstractJavaMultiRelationshipMapping.this.getMapKeyJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaMultiRelationshipMapping.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return new MapKeyJoinColumnValidator(
this.getPersistentAttribute(),
(ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
+ this,
new RelationshipStrategyTableDescriptionProvider(getRelationship().getStrategy()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
index 662ffba..c9ea6f8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java
@@ -21,7 +21,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -247,26 +246,22 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.owner.buildColumnValidator(this);
}
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaNamedColumnTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getColumnAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.owner.getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getColumnAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.owner.getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getNameTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java
deleted file mode 100644
index a8139f4..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractJavaNamedColumnTextRangeResolver<C extends JavaReadOnlyNamedColumn>
- implements NamedColumnTextRangeResolver
-{
- protected final C column;
-
- protected final CompilationUnit astRoot;
-
-
- protected AbstractJavaNamedColumnTextRangeResolver(C column, CompilationUnit astRoot) {
- super();
- this.column = column;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.column.getNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
index 83595c5..b42fd98 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java
@@ -23,8 +23,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
import org.eclipse.jpt.jpa.db.Table;
@@ -161,8 +159,8 @@
return this.getContainer().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getContainer().buildColumnValidator(this, column, owner);
}
protected String prefix(String oldName) {
@@ -215,26 +213,22 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.getContainer().buildOverrideValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.getContainer().buildOverrideValidator(this);
}
- protected OverrideTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaOverrideTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.overrideAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getContainer().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.overrideAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getContainer().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.overrideAnnotation.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.overrideAnnotation.getNameTextRange());
}
public boolean tableNameIsInvalid(String tableName) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
index 075af3c..cdd5354 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java
@@ -38,7 +38,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelField;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaPersistentAttribute2_0;
import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
@@ -596,8 +595,8 @@
return null;
}
- public boolean contains(int offset, CompilationUnit astRoot) {
- TextRange fullTextRange = this.getResourceAttribute().getTextRange(astRoot);
+ public boolean contains(int offset) {
+ TextRange fullTextRange = this.getResourceAttribute().getTextRange();
// 'fullTextRange' will be null if the attribute no longer exists in the java;
// the context model can be out of sync with the resource model
// when a selection event occurs before the context model has a
@@ -613,28 +612,24 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.isVirtual() ?
this.getOwningPersistentType().getValidationTextRange() :
this.getSelectionTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttribute(messages, reporter, astRoot);
- this.mapping.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateAttribute(messages, reporter);
+ this.mapping.validate(messages, reporter);
}
- protected void validateAttribute(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildAttributeValidator(astRoot).validate(messages, reporter);
+ protected void validateAttribute(List<IMessage> messages, IReporter reporter) {
+ this.buildAttributeValidator().validate(messages, reporter);
}
- protected abstract JptValidator buildAttributeValidator(CompilationUnit astRoot);
-
- protected PersistentAttributeTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaPersistentAttributeTextRangeResolver(this, astRoot);
- }
+ protected abstract JptValidator buildAttributeValidator();
/**
* If the attribute's owning type is an <code>orm.xml</code> persistent
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
index e5ab9be..6b4d04b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java
@@ -53,7 +53,6 @@
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
import org.eclipse.jpt.jpa.core.internal.plugin.JptJpaCorePlugin;
import org.eclipse.jpt.jpa.core.jpa2.resource.java.Access2_0Annotation;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -569,7 +568,7 @@
private void syncFieldAccessAttributes() {
HashSet<JavaPersistentAttribute> contextAttributes = CollectionTools.set(this.getAttributes());
- this.syncFieldAttributes(contextAttributes, this.buildNonTransientNonStaticResourceFieldsFilter());
+ this.syncFieldAttributes(contextAttributes, buildNonTransientNonStaticResourceFieldsFilter());
this.syncAnnotatedPropertyAttributes(contextAttributes);
}
@@ -939,13 +938,10 @@
return JavaPersistentType.class;
}
- // TODO when we start caching text ranges we can stop building the ASTRoot.
public JpaStructureNode getStructureNode(int offset) {
- CompilationUnit astRoot = this.buildASTRoot();
-
- if (this.contains(offset, astRoot)) {
+ if (this.contains(offset)) {
for (JavaPersistentAttribute persistentAttribute : this.getAttributes()) {
- if (persistentAttribute.contains(offset, astRoot)) {
+ if (persistentAttribute.contains(offset)) {
return persistentAttribute;
}
}
@@ -954,8 +950,8 @@
return null;
}
- protected boolean contains(int offset, CompilationUnit astRoot) {
- TextRange fullTextRange = this.resourceType.getTextRange(astRoot);
+ protected boolean contains(int offset) {
+ TextRange fullTextRange = this.resourceType.getTextRange();
// 'fullTextRange' will be null if the type no longer exists in the java;
// the context model can be out of sync with the resource model
// when a selection event occurs before the context model has a
@@ -1013,49 +1009,37 @@
// ********** validation **********
- public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
- if (MappingTools.nodeIsInternalSource(this, this.resourceType)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
- }
- }
-
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMapping(messages, reporter, astRoot);
- this.validateAttributes(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ if (MappingTools.nodeIsInternalSource(this, this.resourceType)) {
+ this.validateMapping(messages, reporter);
+ this.validateAttributes(messages, reporter);
+ }
}
- protected void validateMapping(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMapping(List<IMessage> messages, IReporter reporter) {
try {
- this.mapping.validate(messages, reporter, astRoot);
+ this.mapping.validate(messages, reporter);
} catch(Throwable t) {
JptJpaCorePlugin.instance().logError(t);
}
}
- protected void validateAttributes(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateAttributes(List<IMessage> messages, IReporter reporter) {
for (JavaPersistentAttribute attribute : this.getAttributes()) {
- this.validateAttribute(attribute, reporter, messages, astRoot);
+ this.validateAttribute(attribute, reporter, messages);
}
}
- protected void validateAttribute(JavaPersistentAttribute attribute, IReporter reporter, List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttribute(JavaPersistentAttribute attribute, IReporter reporter, List<IMessage> messages) {
try {
- attribute.validate(messages, reporter, astRoot);
+ attribute.validate(messages, reporter);
} catch(Throwable t) {
JptJpaCorePlugin.instance().logError(t);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange();
- }
-
public TextRange getValidationTextRange() {
return this.getSelectionTextRange();
}
@@ -1085,10 +1069,6 @@
return this.getParent().getDefaultPersistentTypeAccess();
}
- protected CompilationUnit buildASTRoot() {
- return this.resourceType.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
protected JpaFile getJpaFile() {
return this.getJpaFile(this.resourceType.getFile());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
index 9c0e210..1c35815 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java
@@ -11,7 +11,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -191,13 +190,13 @@
// ********** validation **********
- public void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateName(messages, astRoot);
- this.validateQuery(queryHelper, messages, reporter, astRoot);
+ public void validate(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateName(messages);
+ this.validateQuery(queryHelper, messages, reporter);
}
- protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages) {
if (StringTools.stringIsEmpty(this.name)) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -205,13 +204,13 @@
JpaValidationMessages.QUERY_NAME_UNDEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
}
}
- public void validateQuery(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ public void validateQuery(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
if (StringTools.stringIsEmpty(this.query)){
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -219,7 +218,7 @@
JpaValidationMessages.QUERY_STATEMENT_UNDEFINED,
new String[] {this.name},
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
} else {
@@ -229,13 +228,17 @@
protected abstract void validateQuery_(JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter);
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.queryAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.queryAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.queryAnnotation.getNameTextRange(), astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.queryAnnotation.getNameTextRange());
+ }
+
+ public TextRange getQueryTextRange() {
+ return this.getValidationTextRange(this.queryAnnotation.getQueryTextRange());
}
public boolean isEquivalentTo(JpaNamedContextNode node) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
index a87afee..bbd66f5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java
@@ -319,13 +319,13 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateTargetEntity(messages, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateTargetEntity(messages);
+ this.relationship.validate(messages, reporter);
}
- protected void validateTargetEntity(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateTargetEntity(List<IMessage> messages) {
if (this.getTargetEntity() == null) {
String msg = this.getPersistentAttribute().isVirtual() ?
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_NOT_DEFINED :
@@ -336,7 +336,7 @@
msg,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
return;
@@ -355,7 +355,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_ENTITY_IS_NOT_AN_ENTITY,
new String[] {this.getName(), this.getFullyQualifiedTargetEntity()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -365,15 +365,15 @@
JpaValidationMessages.TARGET_ENTITY_IS_NOT_AN_ENTITY,
new String[] {this.getFullyQualifiedTargetEntity()},
this,
- this.getTargetEntityTextRange(astRoot)
+ this.getTargetEntityTextRange()
)
);
}
}
}
- protected TextRange getTargetEntityTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getAnnotationTargetEntityTextRange(), astRoot);
+ protected TextRange getTargetEntityTextRange() {
+ return this.getValidationTextRange(this.getAnnotationTargetEntityTextRange());
}
protected TextRange getAnnotationTargetEntityTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
index bc2e214..abd87dc 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java
@@ -148,8 +148,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.derivedIdentity.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.derivedIdentity.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
index d327a92..662abdb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java
@@ -25,7 +25,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaTable;
import org.eclipse.jpt.jpa.core.context.java.JavaUniqueConstraint;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.BaseTableAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
import org.eclipse.jpt.jpa.db.Catalog;
@@ -484,34 +483,30 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildTableValidator().validate(messages, reporter);
}
- protected JptValidator buildTableValidator(CompilationUnit astRoot) {
- return this.owner.buildTableValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildTableValidator() {
+ return this.owner.buildTableValidator(this);
}
- protected TableTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getTableAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getTableAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange(this.getTableAnnotation().getNameTextRange());
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getNameTextRange(), astRoot);
+ public TextRange getSchemaTextRange() {
+ return this.getValidationTextRange(this.getTableAnnotation().getSchemaTextRange());
}
- public TextRange getSchemaTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getSchemaTextRange(), astRoot);
- }
-
- public TextRange getCatalogTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getTableAnnotation().getCatalogTextRange(), astRoot);
+ public TextRange getCatalogTextRange() {
+ return this.getValidationTextRange(this.getTableAnnotation().getCatalogTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
index e53a0c0..444303f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -36,7 +35,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericTypeMappingValidator;
import org.eclipse.jpt.jpa.db.Schema;
@@ -298,29 +296,25 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateType(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateType(messages, reporter);
}
- protected void validateType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.buildTypeMappingValidator(astRoot).validate(messages, reporter);
+ protected void validateType(List<IMessage> messages, IReporter reporter) {
+ this.buildTypeMappingValidator().validate(messages, reporter);
}
- protected JptValidator buildTypeMappingValidator(CompilationUnit astRoot) {
- return new GenericTypeMappingValidator(this, this.getJavaResourceType(), buildTextRangeResolver(astRoot));
- }
-
- protected TypeMappingTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTypeMappingTextRangeResolver(this, astRoot);
+ protected JptValidator buildTypeMappingValidator() {
+ return new GenericTypeMappingValidator(this, this.getJavaResourceType());
}
public boolean validatesAgainstDatabase() {
return this.getPersistenceUnit().validatesAgainstDatabase();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.mappingAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getPersistentType().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.mappingAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getPersistentType().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
index e8bb482..2669551 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -28,9 +28,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaVersionMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.NullJavaConverter;
@@ -248,8 +246,8 @@
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
@@ -275,14 +273,14 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.column.validate(messages, reporter);
+ this.converter.validate(messages, reporter);
+ this.validateAttributeType(messages);
}
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
if (!ArrayTools.contains(SUPPORTED_TYPE_NAMES, this.getPersistentAttribute().getTypeName())) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -290,7 +288,7 @@
JpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
index f6718b2..d187beb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,15 +9,13 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.VirtualBaseColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-public abstract class AbstractJavaVirtualBaseColumn<O extends JavaReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
+public abstract class AbstractJavaVirtualBaseColumn<O extends ReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
extends AbstractJavaVirtualNamedColumn<O, C>
implements VirtualBaseColumn, JavaReadOnlyBaseColumn
{
@@ -254,12 +252,7 @@
// ********** validation **********
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
index f51541a..7a38bb6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java
@@ -10,14 +10,12 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.VirtualNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -150,25 +148,21 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.owner.buildColumnValidator(this);
}
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaNamedColumnTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
index 2d44d0a..0ad85f3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +15,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedDiscriminatorColumn;
-public abstract class AbstractJavaVirtualNamedDiscriminatorColumn<O extends JavaReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
+public abstract class AbstractJavaVirtualNamedDiscriminatorColumn<O extends ReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
extends AbstractJavaVirtualNamedColumn<O, C>
implements VirtualNamedDiscriminatorColumn, JavaReadOnlyNamedDiscriminatorColumn
{
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
index be591b8..ece272b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn.Owner;
@@ -18,9 +17,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -74,8 +71,8 @@
return this.getContainer().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getContainer().buildColumnValidator(this, column, owner);
}
@Override
@@ -87,25 +84,21 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildValidator().validate(messages, reporter);
}
- protected JptValidator buildValidator(CompilationUnit astRoot) {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildValidator() {
+ return this.getContainer().buildOverrideValidator(this);
}
- protected OverrideTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaOverrideTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getContainer().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getContainer().getValidationTextRange(astRoot);
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
public boolean tableNameIsInvalid(String tableName) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
index b89f1a2..b92578c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.SingleElementListIterable;
@@ -20,7 +19,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
import org.eclipse.jpt.jpa.core.context.VirtualReferenceTable;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -30,7 +28,7 @@
implements VirtualReferenceTable
{
protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected JavaVirtualJoinColumn defaultJoinColumn;
@@ -175,11 +173,11 @@
return this.buildJoinColumn(this.joinColumnOwner, joinColumn);
}
- protected JavaVirtualJoinColumn buildJoinColumn(JavaReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
+ protected JavaVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
return this.getJpaFactory().buildJavaVirtualJoinColumn(this, columnOwner, joinColumn);
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
@Override
protected String buildDefaultSchema() {
@@ -195,18 +193,18 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
//join column validation will handle the check for whether to validate against the database
//some validation messages are not database specific. If the database validation for the
//table fails we will stop there and not validate the join columns at all
if (continueValidating) {
- this.validateJoinColumns(messages, reporter, astRoot);
+ this.validateJoinColumns(messages, reporter);
}
}
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateNodes(this.getJoinColumns(), messages, reporter, astRoot);
+ protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+ this.validateNodes(this.getJoinColumns(), messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
index 3adde36..234f06d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.NameTools;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -22,7 +21,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualUniqueConstraint;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
@@ -317,33 +315,29 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.buildTableValidator().validate(messages, reporter);
}
- protected JptValidator buildTableValidator(CompilationUnit astRoot) {
- return this.owner.buildTableValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildTableValidator() {
+ return this.owner.buildTableValidator(this);
}
- protected TableTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableTextRangeResolver(this, astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getSchemaTextRange() {
+ return this.getValidationTextRange();
}
- public TextRange getSchemaTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- public TextRange getCatalogTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getCatalogTextRange() {
+ return this.getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
index 831c48c..137f218 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.FieldDeclaration;
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
@@ -22,7 +21,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.PersistentFieldValidator;
public class FieldAccessor
@@ -63,11 +61,11 @@
return this.resourceField.isFinal();
}
- public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
- return new PersistentFieldValidator(persistentAttribute, this, textRangeResolver);
+ public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute) {
+ return new PersistentFieldValidator(persistentAttribute, this);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.getResourceAttribute().getNameTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
index 06634f8..3c77a2b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement.Kind;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
@@ -248,12 +247,12 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateIdClass(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateIdClass(messages, reporter);
}
- protected void validateIdClass(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateIdClass(List<IMessage> messages, IReporter reporter) {
if (this.isSpecified()) {
JavaResourceType jrt = this.getIdClassJavaResourceType();
if (jrt != null) {
@@ -265,7 +264,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -277,7 +276,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -289,7 +288,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -301,7 +300,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -309,13 +308,13 @@
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
IdClassAnnotation annotation = this.getIdClassAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
index efbf688..58751be 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -191,9 +191,9 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mappedByStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
index d2a4bff..d0c5cc8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -187,9 +187,9 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinColumnStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
index 15c2bdf..762088d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java
@@ -198,8 +198,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.mappedByAttribute == null) {
return;
@@ -216,8 +216,7 @@
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
return;
@@ -227,8 +226,7 @@
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
return;
@@ -240,14 +238,13 @@
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_MAPPED_BY_ON_BOTH_SIDES,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
}
}
- protected IMessage buildMessage(String msgID, String[] parms, CompilationUnit astRoot) {
+ protected IMessage buildMessage(String msgID, String[] parms) {
PersistentAttribute attribute = this.getRelationshipMapping().getPersistentAttribute();
String attributeDescription = attribute.isVirtual() ?
JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC :
@@ -259,13 +256,13 @@
msgID,
parms,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
TextRange textRange = this.getAnnotationMappedByTextRange();
- return (textRange != null) ? textRange : this.getRelationship().getValidationTextRange(astRoot);
+ return (textRange != null) ? textRange : this.getRelationship().getValidationTextRange();
}
protected TextRange getAnnotationMappedByTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
index b817526..c60e214 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -24,10 +23,8 @@
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinColumnRelationship;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
@@ -101,7 +98,7 @@
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -143,15 +140,15 @@
return JpaValidationDescriptionMessages.NOT_VALID_FOR_THIS_ENTITY;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
// ********** join column owner **********
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -203,12 +200,12 @@
return GenericJavaMappingJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaMappingJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaMappingJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, new EntityTableDescriptionProvider());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
index e49cb15..815f50a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -265,10 +265,10 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mappedByStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
+ this.joinColumnStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
index c0335f4..ae00df9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -293,11 +293,11 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mappedByStrategy.validate(messages, reporter, astRoot);
- this.primaryKeyJoinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinColumnStrategy.validate(messages, reporter, astRoot);
- this.joinTableStrategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mappedByStrategy.validate(messages, reporter);
+ this.primaryKeyJoinColumnStrategy.validate(messages, reporter);
+ this.joinColumnStrategy.validate(messages, reporter);
+ this.joinTableStrategy.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
index 5a2dfa5..8dfc6f7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.jpa.core.context.Entity;
@@ -20,11 +19,8 @@
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
@@ -73,7 +69,7 @@
// ********** misc **********
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -158,15 +154,15 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
// ********** join column owner adapter **********
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -213,12 +209,12 @@
return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
index 4d4c157..a208be5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java
@@ -21,16 +21,14 @@
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
@@ -45,7 +43,7 @@
implements JavaMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
{
protected final ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> primaryKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
public GenericJavaPrimaryKeyJoinColumnRelationshipStrategy(JavaPrimaryKeyJoinColumnRelationship parent) {
@@ -145,7 +143,7 @@
}
}
- protected JavaReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -258,22 +256,22 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
+ pkJoinColumn.validate(messages, reporter);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
// ********** join column owner **********
protected class PrimaryKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected PrimaryKeyJoinColumnOwner() {
super();
@@ -326,16 +324,16 @@
return null;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
public int getJoinColumnsSize() {
return GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.this.getPrimaryKeyJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this);
}
protected JavaRelationshipMapping getRelationshipMapping() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
index bcfe509..192cb73 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
@@ -25,15 +24,12 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -46,7 +42,7 @@
{
protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected JavaVirtualJoinColumn defaultInverseJoinColumn;
@@ -197,11 +193,11 @@
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
- protected JavaReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -226,9 +222,9 @@
// ********** validation **********
@Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateJoinColumns(messages, reporter, astRoot);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter, astRoot);
+ protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+ super.validateJoinColumns(messages, reporter);
+ this.validateNodes(this.getInverseJoinColumns(), messages, reporter);
}
public boolean validatesAgainstDatabase() {
@@ -242,7 +238,7 @@
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -281,8 +277,8 @@
return GenericJavaVirtualJoinTable.this.getName();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaVirtualJoinTable.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaVirtualJoinTable.this.getValidationTextRange();
}
protected JavaVirtualRelationship getRelationship() {
@@ -322,8 +318,8 @@
return GenericJavaVirtualJoinTable.this.getJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
@@ -358,8 +354,8 @@
return GenericJavaVirtualJoinTable.this.getInverseJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaVirtualJoinTable.this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java
deleted file mode 100644
index af74224..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java
+++ /dev/null
@@ -1,44 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-
-public class JavaEntityTextRangeResolver
- implements EntityTextRangeResolver
-{
- private JavaEntity entity;
-
- private CompilationUnit astRoot;
-
-
- public JavaEntityTextRangeResolver(JavaEntity entity, CompilationUnit astRoot) {
- this.entity = entity;
- this.astRoot = astRoot;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.entity.getValidationTextRange(this.astRoot);
- }
-
- public TextRange getIdClassTextRange() {
- return this.entity.getIdClassReference().getValidationTextRange(this.astRoot);
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.entity.getPersistentType().
- getAttributeNamed(attributeName).getMapping().getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java
deleted file mode 100644
index 5d1f33c..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-
-public class JavaJoinColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaReadOnlyJoinColumn>
- implements JoinColumnTextRangeResolver
-{
- public JavaJoinColumnTextRangeResolver(JavaReadOnlyJoinColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange(this.astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java
deleted file mode 100644
index c931971..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java
+++ /dev/null
@@ -1,46 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaMappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-
-public class JavaMappedSuperclassTextRangeResolver
- implements PrimaryKeyTextRangeResolver
-{
- private JavaMappedSuperclass mappedSuperclass;
-
- private CompilationUnit astRoot;
-
-
- public JavaMappedSuperclassTextRangeResolver(
- JavaMappedSuperclass mappedSuperclass, CompilationUnit astRoot) {
-
- this.mappedSuperclass = mappedSuperclass;
- this.astRoot = astRoot;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.mappedSuperclass.getValidationTextRange(this.astRoot);
- }
-
- public TextRange getIdClassTextRange() {
- return this.mappedSuperclass.getIdClassReference().getValidationTextRange(this.astRoot);
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.mappedSuperclass.getPersistentType().
- getAttributeNamed(attributeName).getMapping().getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java
deleted file mode 100644
index 6dbf8d9..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
-
-public class JavaNamedColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaReadOnlyNamedColumn>
-{
- public JavaNamedColumnTextRangeResolver(JavaReadOnlyNamedColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java
index 1b98aea..66f3bfe 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
@@ -64,15 +63,15 @@
* We could also add a quick fix for this error.
*/
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
messages.add(
DefaultJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
JpaValidationMessages.PERSISTENCE_UNIT_INVALID_CLASS,
new String[] {this.getPersistentType().getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -83,7 +82,7 @@
}
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getPersistentType().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getPersistentType().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java
deleted file mode 100644
index cc39280..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-
-public class JavaOverrideTextRangeResolver
- implements OverrideTextRangeResolver
-{
- protected final JavaReadOnlyOverride javaOverride;
-
- protected final CompilationUnit astRoot;
-
- public JavaOverrideTextRangeResolver(JavaReadOnlyOverride javaOverride, CompilationUnit astRoot) {
- this.javaOverride = javaOverride;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.javaOverride.getNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java
deleted file mode 100644
index 83fe6f9..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,33 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-
-public class JavaPersistentAttributeTextRangeResolver
- implements PersistentAttributeTextRangeResolver
-{
- private JavaPersistentAttribute javaPersistentAttribute;
-
- private CompilationUnit astRoot;
-
- public JavaPersistentAttributeTextRangeResolver(JavaPersistentAttribute javaPersistentAttribute, CompilationUnit astRoot) {
- this.javaPersistentAttribute = javaPersistentAttribute;
- this.astRoot = astRoot;
- }
-
- public TextRange getAttributeTextRange() {
- return this.javaPersistentAttribute.getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java
deleted file mode 100644
index 5c48c75..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-
-public class JavaPrimaryKeyJoinColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaPrimaryKeyJoinColumn>
- implements BaseJoinColumnTextRangeResolver
-{
-
- public JavaPrimaryKeyJoinColumnTextRangeResolver(JavaPrimaryKeyJoinColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java
deleted file mode 100644
index 4b51f79..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTableColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-
-public class JavaTableColumnTextRangeResolver
- extends AbstractJavaNamedColumnTextRangeResolver<JavaReadOnlyTableColumn>
- implements TableColumnTextRangeResolver
-{
- public JavaTableColumnTextRangeResolver(JavaReadOnlyTableColumn column, CompilationUnit astRoot) {
- super(column, astRoot);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java
deleted file mode 100644
index 8d42bc6..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-public class JavaTableTextRangeResolver
- implements TableTextRangeResolver
-{
- protected final JavaReadOnlyTable table;
-
- protected final CompilationUnit astRoot;
-
-
- public JavaTableTextRangeResolver(JavaReadOnlyTable table, CompilationUnit astRoot) {
- super();
- this.table = table;
- this.astRoot = astRoot;
- }
-
- public TextRange getNameTextRange() {
- return this.table.getNameTextRange(this.astRoot);
- }
-
- public TextRange getCatalogTextRange() {
- return this.table.getCatalogTextRange(this.astRoot);
- }
-
- public TextRange getSchemaTextRange() {
- return this.table.getSchemaTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java
deleted file mode 100644
index 174e6b2..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,33 +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.jpa.core.internal.context.java;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.java.JavaTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-
-public class JavaTypeMappingTextRangeResolver
- implements TypeMappingTextRangeResolver
-{
- private JavaTypeMapping typeMapping;
-
- private CompilationUnit astRoot;
-
- public JavaTypeMappingTextRangeResolver(JavaTypeMapping typeMapping, CompilationUnit astRoot) {
- this.typeMapping = typeMapping;
- this.astRoot = astRoot;
- }
-
- public TextRange getTypeMappingTextRange() {
- return this.typeMapping.getValidationTextRange(this.astRoot);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java
index c418658..cb415a6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java
@@ -9,7 +9,6 @@
*******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
@@ -23,7 +22,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.PersistentPropertyValidator;
public class PropertyAccessor
@@ -90,11 +88,11 @@
}
- public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
- return new PersistentPropertyValidator(persistentAttribute, this, textRangeResolver);
+ public JptValidator buildAttributeValidator(PersistentAttribute persistentAttribute) {
+ return new PersistentPropertyValidator(persistentAttribute, this);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
return this.getResourceAttribute().getNameTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java
index 5c215f8..272f7c1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java
@@ -13,14 +13,12 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmBaseColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlBaseColumn;
/**
* <code>orm.xml</code> column or join column
*/
-public abstract class AbstractOrmBaseColumn<X extends XmlBaseColumn, O extends OrmReadOnlyBaseColumn.Owner>
+public abstract class AbstractOrmBaseColumn<X extends XmlBaseColumn, O extends ReadOnlyBaseColumn.Owner>
extends AbstractOrmNamedColumn<X, O>
implements OrmBaseColumn
{
@@ -294,11 +292,6 @@
X xmlColumn = this.getXmlColumn();
return (xmlColumn == null) ? null : xmlColumn.getTableTextRange();
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmTableColumnTextRangeResolver(this);
- }
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
index 7e64141..751246c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java
@@ -34,8 +34,6 @@
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AttributeOverrideValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
@@ -300,12 +298,12 @@
return this.getTypeMapping().getPrimaryTableName();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new EntityTableDescriptionProvider());
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java
index 8e0b48c..54edef4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java
@@ -27,8 +27,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
@@ -365,8 +363,8 @@
this.converter.validate(messages, reporter);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
index a94e4ce..4690e3b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java
@@ -86,22 +86,14 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmSecondaryTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
@@ -493,8 +485,8 @@
protected static class TableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new TableValidator(table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return new TableValidator(table);
}
}
@@ -759,8 +751,8 @@
protected static class SecondaryTableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new SecondaryTableValidator((ReadOnlySecondaryTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return new SecondaryTableValidator((ReadOnlySecondaryTable) table);
}
}
@@ -1797,15 +1789,10 @@
}
protected JptValidator buildPrimaryKeyValidator() {
- return new GenericEntityPrimaryKeyValidator(this, this.buildTextRangeResolver());
+ return new GenericEntityPrimaryKeyValidator(this);
// TODO - JPA 2.0 validation
}
- @Override
- protected EntityTextRangeResolver buildTextRangeResolver() {
- return new OrmEntityTextRangeResolver(this);
- }
-
protected void validateTable(List<IMessage> messages, IReporter reporter) {
if (this.isAbstractTablePerClass()) {
if (this.resourceTableIsSpecified()) {
@@ -2090,12 +2077,12 @@
return AbstractOrmEntity.this.xmlTypeMapping.getAttributeOverrides();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator((ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new MappedSuperclassOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AttributeOverrideColumnValidator((ReadOnlyAttributeOverride) override, column, new EntityTableDescriptionProvider());
}
public ReadOnlyColumn resolveOverriddenColumn(String attributeName) {
@@ -2134,24 +2121,24 @@
AbstractOrmEntity.this.resolveOverriddenRelationshipForAssociationOverride(attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new MappedSuperclassOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator((ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new MappedSuperclassOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator((ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, new EntityTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideInverseJoinColumnValidator(override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable t) {
+ return new AssociationOverrideJoinTableValidator(override, (ReadOnlyJoinTable) t);
}
}
@@ -2182,7 +2169,7 @@
protected class PrimaryKeyJoinColumnOwner
extends NamedColumnOwner
- implements OrmReadOnlyBaseJoinColumn.Owner
+ implements ReadOnlyBaseJoinColumn.Owner
{
public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
Entity parentEntity = AbstractOrmEntity.this.getParentEntity();
@@ -2201,8 +2188,8 @@
return (parentEntity == null) ? AbstractOrmEntity.this.getPrimaryKeyColumnName() : parentEntity.getPrimaryKeyColumnName();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new EntityPrimaryKeyJoinColumnValidator((ReadOnlyBaseJoinColumn) column, this);
}
}
@@ -2258,8 +2245,8 @@
this.isTablePerClass() ? null : ReadOnlyNamedDiscriminatorColumn.DEFAULT_DISCRIMINATOR_TYPE;
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new DiscriminatorColumnValidator(column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new DiscriminatorColumnValidator(column);
}
public XmlDiscriminatorColumn getXmlColumn() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java
index 4fd92d4..b9e8cc7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java
@@ -29,8 +29,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
@@ -446,8 +444,8 @@
return JpaValidationDescriptionMessages.ATTRIBUTE_DESC;
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java
index 043b819..f294d13 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java
@@ -23,7 +23,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationship;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumnContainer;
@@ -36,7 +35,7 @@
implements OrmJoinColumnRelationshipStrategy
{
protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected OrmJoinColumn defaultJoinColumn;
@@ -185,7 +184,7 @@
}
}
- protected abstract OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
// ********** default join column **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
index 94da3f2..6bc760e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -24,7 +24,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentType;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericMappedSuperclassPrimaryKeyValidator;
import org.eclipse.jpt.jpa.core.resource.orm.XmlEntityMappings;
import org.eclipse.jpt.jpa.core.resource.orm.XmlIdClassContainer;
@@ -211,12 +210,7 @@
}
protected JptValidator buildPrimaryKeyValidator() {
- return new GenericMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver());
+ return new GenericMappedSuperclassPrimaryKeyValidator(this);
// TODO - JPA 2.0 validation
}
-
- @Override
- protected PrimaryKeyTextRangeResolver buildTextRangeResolver() {
- return new OrmMappedSuperclassTextRangeResolver(this);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
index 8cc63ff..0ccc534 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java
@@ -52,16 +52,11 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmMultiRelationshipMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmOrderable;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EmbeddableOverrideDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.MapKeyAttributeOverrideValidator;
@@ -116,7 +111,7 @@
protected final OrmAttributeOverrideContainer mapKeyAttributeOverrideContainer;
protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedMapKeyJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
protected OrmJoinColumn defaultMapKeyJoinColumn;
@@ -802,7 +797,7 @@
return this.getContextNodeFactory().buildOrmJoinColumn(this, this.mapKeyJoinColumnOwner, xmlJoinColumn);
}
- protected OrmReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -1173,8 +1168,8 @@
AbstractOrmMultiRelationshipMapping.this.removeXmlMapKeyColumn();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
}
}
@@ -1218,12 +1213,12 @@
return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new RelationshipStrategyTableDescriptionProvider(this.getRelationshipStrategy()));
}
}
@@ -1231,7 +1226,7 @@
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -1285,12 +1280,11 @@
return AbstractOrmMultiRelationshipMapping.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return new MapKeyJoinColumnValidator(
this.getPersistentAttribute(),
(ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
+ this,
new RelationshipStrategyTableDescriptionProvider(getRelationship().getStrategy()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java
index 99df4a6..cca2a36 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java
@@ -15,9 +15,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmNamedColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlNamedColumn;
import org.eclipse.jpt.jpa.db.Column;
@@ -43,7 +41,7 @@
* Typically, a column belonging to a list of columns will directly hold its XML
* column; since the context column only exists if the XML column exists.
*/
-public abstract class AbstractOrmNamedColumn<X extends XmlNamedColumn, O extends OrmReadOnlyNamedColumn.Owner>
+public abstract class AbstractOrmNamedColumn<X extends XmlNamedColumn, O extends ReadOnlyNamedColumn.Owner>
extends AbstractOrmXmlContextNode
implements OrmNamedColumn
{
@@ -227,11 +225,7 @@
}
protected JptValidator buildColumnValidator() {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver());
- }
-
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmNamedColumnTextRangeResolver(this);
+ return this.owner.buildColumnValidator(this);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java
deleted file mode 100644
index 73f81db..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-
-public abstract class AbstractOrmNamedColumnTextRangeResolver<C extends OrmReadOnlyNamedColumn>
- implements NamedColumnTextRangeResolver
-{
- protected final C column;
-
-
- protected AbstractOrmNamedColumnTextRangeResolver(C column) {
- super();
- this.column = column;
- }
-
- public TextRange getNameTextRange() {
- return this.column.getNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
index 300920b..2dd10bb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
@@ -23,7 +23,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmUniqueConstraint;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlTable;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
import org.eclipse.jpt.jpa.core.resource.orm.XmlUniqueConstraint;
@@ -426,11 +425,7 @@
}
protected JptValidator buildTableValidator() {
- return this.owner.buildTableValidator(this, this.buildTextRangeResolver());
- }
-
- protected TableTextRangeResolver buildTextRangeResolver() {
- return new OrmTableTextRangeResolver(this);
+ return this.owner.buildTableValidator(this);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
index ffb0353..4c7d632 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java
@@ -39,7 +39,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTools;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.GenericTypeMappingValidator;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
@@ -583,11 +582,7 @@
}
protected JptValidator buildTypeMappingValidator() {
- return new GenericTypeMappingValidator(this, this.getJavaResourceType(), this.buildTextRangeResolver());
- }
-
- protected TypeMappingTextRangeResolver buildTextRangeResolver() {
- return new OrmTypeMappingTextRangeResolver(this);
+ return new GenericTypeMappingValidator(this, this.getJavaResourceType());
}
public boolean validatesAgainstDatabase() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java
index 91c75ad..6d8a424 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java
@@ -25,8 +25,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmVersionMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.NullOrmConverter;
@@ -288,8 +286,8 @@
}
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java
index e362a71..33f7ca4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -14,9 +14,8 @@
import org.eclipse.jpt.jpa.core.context.VirtualBaseColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-public abstract class AbstractOrmVirtualBaseColumn<O extends OrmReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
+public abstract class AbstractOrmVirtualBaseColumn<O extends ReadOnlyBaseColumn.Owner, C extends ReadOnlyBaseColumn>
extends AbstractOrmVirtualNamedColumn<O, C>
implements VirtualBaseColumn, OrmReadOnlyBaseColumn
{
@@ -255,9 +254,4 @@
public TextRange getTableTextRange() {
return this.getValidationTextRange();
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmTableColumnTextRangeResolver(this);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java
index 93ba7dc..9ad6e61 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -16,7 +16,6 @@
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -148,11 +147,7 @@
}
protected JptValidator buildColumnValidator() {
- return this.owner.buildColumnValidator(this, this.buildTextRangeResolver());
- }
-
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmNamedColumnTextRangeResolver(this);
+ return this.owner.buildColumnValidator(this);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java
index 2ab7e94..89f42a8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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,7 +15,7 @@
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedDiscriminatorColumn;
-public abstract class AbstractOrmVirtualNamedDiscriminatorColumn<O extends OrmReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
+public abstract class AbstractOrmVirtualNamedDiscriminatorColumn<O extends ReadOnlyNamedDiscriminatorColumn.Owner, C extends ReadOnlyNamedDiscriminatorColumn>
extends AbstractOrmVirtualNamedColumn<O, C>
implements VirtualNamedDiscriminatorColumn, OrmReadOnlyNamedDiscriminatorColumn
{
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java
index 54bb896..ce598a0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -18,7 +18,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
import org.eclipse.jpt.jpa.core.context.VirtualReferenceTable;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -28,7 +27,7 @@
implements VirtualReferenceTable
{
protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected OrmVirtualJoinColumn defaultJoinColumn;
@@ -173,11 +172,11 @@
return this.buildJoinColumn(this.joinColumnOwner, joinColumn);
}
- protected OrmVirtualJoinColumn buildJoinColumn(OrmReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
+ protected OrmVirtualJoinColumn buildJoinColumn(ReadOnlyJoinColumn.Owner columnOwner, ReadOnlyJoinColumn joinColumn) {
return this.getContextNodeFactory().buildOrmVirtualJoinColumn(this, columnOwner, joinColumn);
}
- protected abstract OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
@Override
protected String buildDefaultSchema() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java
index 6024883..2330cb9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -21,7 +21,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualUniqueConstraint;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.db.Catalog;
import org.eclipse.jpt.jpa.db.Schema;
import org.eclipse.jpt.jpa.db.SchemaContainer;
@@ -322,11 +321,7 @@
}
protected JptValidator buildTableValidator() {
- return this.owner.buildTableValidator(this, this.buildTextRangeResolver());
- }
-
- protected TableTextRangeResolver buildTextRangeResolver() {
- return new OrmTableTextRangeResolver(this);
+ return this.owner.buildTableValidator(this);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
index bb750eb..5d73b1a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java
@@ -11,6 +11,7 @@
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
@@ -59,8 +60,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmQuery;
import org.eclipse.jpt.jpa.core.context.orm.OrmQueryContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmQueryHint;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.orm.OrmSecondaryTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmSequenceGenerator;
@@ -220,11 +219,11 @@
return new GenericOrmVirtualSecondaryTable(parent, owner, javaSecondaryTable);
}
- public OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn) {
+ public OrmPrimaryKeyJoinColumn buildOrmPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn resourcePrimaryKeyJoinColumn) {
return new GenericOrmPrimaryKeyJoinColumn(parent, owner, resourcePrimaryKeyJoinColumn);
}
- public OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn) {
+ public OrmVirtualPrimaryKeyJoinColumn buildOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaPrimaryKeyJoinColumn) {
return new GenericOrmVirtualPrimaryKeyJoinColumn(parent, owner, javaPrimaryKeyJoinColumn);
}
@@ -236,11 +235,11 @@
return new GenericOrmVirtualJoinTable(parent, owner, overriddenTable);
}
- public OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn xmlJoinColumn) {
+ public OrmJoinColumn buildOrmJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, XmlJoinColumn xmlJoinColumn) {
return new GenericOrmJoinColumn(parent, owner, xmlJoinColumn);
}
- public OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
+ public OrmVirtualJoinColumn buildOrmVirtualJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
return new GenericOrmVirtualJoinColumn(parent, owner, overriddenColumn);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java
index 29557dd..1543de4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java
@@ -18,11 +18,8 @@
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
@@ -51,7 +48,7 @@
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -101,7 +98,7 @@
// ********** join column owner **********
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -154,8 +151,8 @@
return GenericOrmMappingJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, new EntityTableDescriptionProvider());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java
index 38e575d..bab7e57 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -16,9 +16,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.InverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinTableTableDescriptionProvider;
@@ -58,15 +56,15 @@
return getRelationshipMapping().getPersistentAttribute();
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new InverseJoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new InverseJoinColumnValidator(this.getPersistentAttribute(), column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new JoinTableValidator(this.getPersistentAttribute(), (ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return new JoinTableValidator(this.getPersistentAttribute(), (ReadOnlyJoinTable) table);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java
index a5e10e9..036df5b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java
@@ -18,11 +18,8 @@
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
public class GenericOrmOverrideJoinColumnRelationshipStrategy
@@ -33,7 +30,7 @@
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -123,7 +120,7 @@
// ********** join column owner **********
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -174,8 +171,8 @@
return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericOrmOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java
index 053052e..e94602d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java
@@ -17,16 +17,14 @@
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.context.PrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumnRelationship;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.OneToOnePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationDescriptionMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
@@ -43,7 +41,7 @@
implements OrmMappingPrimaryKeyJoinColumnRelationshipStrategy2_0
{
protected final ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> primaryKeyJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner primaryKeyJoinColumnOwner;
public GenericOrmPrimaryKeyJoinColumnRelationshipStrategy(OrmPrimaryKeyJoinColumnRelationship parent) {
@@ -149,7 +147,7 @@
}
}
- protected OrmReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -258,7 +256,7 @@
// ********** join column owner **********
protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected PrimaryKeyJoinColumnOwner() {
super();
@@ -316,8 +314,8 @@
return GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new OneToOnePrimaryKeyJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseJoinColumn) column, this);
}
protected RelationshipMapping getRelationshipMapping() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java
index 7febe03..55bf49a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java
@@ -24,15 +24,12 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -45,7 +42,7 @@
{
protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected OrmVirtualJoinColumn defaultInverseJoinColumn;
@@ -196,11 +193,11 @@
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
- protected OrmReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -241,7 +238,7 @@
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -331,8 +328,8 @@
return GenericOrmVirtualJoinTable.this.getJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
@@ -377,8 +374,8 @@
return GenericOrmVirtualJoinTable.this.getInverseJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java
index fb73c1b..737e39d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java
@@ -25,14 +25,11 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -42,7 +39,7 @@
implements OrmVirtualJoinColumnRelationshipStrategy
{
protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected OrmVirtualJoinColumn defaultJoinColumn;
@@ -132,7 +129,7 @@
}
}
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -315,7 +312,7 @@
// ********** join column owner **********
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -361,8 +358,8 @@
return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java
index dd57b2b..326d102 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java
@@ -20,12 +20,9 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTablePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -40,7 +37,7 @@
{
protected final ContextListContainer<OrmVirtualPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumnContainer;
- protected final OrmReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
protected OrmVirtualPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
@@ -191,7 +188,7 @@
return true;
}
- protected OrmReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -243,7 +240,7 @@
// ********** primary key join column owner **********
protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyBaseJoinColumn.Owner
+ implements ReadOnlyBaseJoinColumn.Owner
{
protected OrmEntity getEntity() {
return GenericOrmVirtualSecondaryTable.this.getEntity();
@@ -279,8 +276,8 @@
return GenericOrmVirtualSecondaryTable.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericOrmVirtualSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericOrmVirtualSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java
index 9902535..06a161c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +15,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmMappingJoinTableRelationshipStrategy2_0;
@@ -59,11 +58,11 @@
return this.getRelationship().getValidationTextRange();
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
throw new UnsupportedOperationException();
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
throw new UnsupportedOperationException();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java
deleted file mode 100644
index af7d7c0..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java
+++ /dev/null
@@ -1,44 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.EntityTextRangeResolver;
-
-public class OrmEntityTextRangeResolver
- implements EntityTextRangeResolver
-{
- private OrmEntity entity;
-
-
- public OrmEntityTextRangeResolver(OrmEntity entity) {
- this.entity = entity;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.entity.getValidationTextRange();
- }
-
- public TextRange getIdClassTextRange() {
- return this.entity.getIdClassReference().getValidationTextRange();
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.getAttributeNamed(attributeName).getValidationTextRange();
- }
-
- protected OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName) {
- return this.entity.getPersistentType().getAttributeNamed(attributeName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java
deleted file mode 100644
index 269baad..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
-
-public class OrmJoinColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyJoinColumn>
- implements JoinColumnTextRangeResolver
-{
-
- public OrmJoinColumnTextRangeResolver(OrmReadOnlyJoinColumn column) {
- super(column);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange();
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java
deleted file mode 100644
index 03c139a..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java
+++ /dev/null
@@ -1,44 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmMappedSuperclass;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
-
-public class OrmMappedSuperclassTextRangeResolver
- implements PrimaryKeyTextRangeResolver
-{
- private OrmMappedSuperclass mappedSuperclass;
-
-
- public OrmMappedSuperclassTextRangeResolver(OrmMappedSuperclass mappedSuperclass) {
- this.mappedSuperclass = mappedSuperclass;
- }
-
-
- public TextRange getTypeMappingTextRange() {
- return this.mappedSuperclass.getValidationTextRange();
- }
-
- public TextRange getIdClassTextRange() {
- return this.mappedSuperclass.getIdClassReference().getValidationTextRange();
- }
-
- public TextRange getAttributeMappingTextRange(String attributeName) {
- return this.getAttributeNamed(attributeName).getValidationTextRange();
- }
-
- protected OrmReadOnlyPersistentAttribute getAttributeNamed(String attributeName) {
- return this.mappedSuperclass.getPersistentType().getAttributeNamed(attributeName);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java
deleted file mode 100644
index 0b1cd61..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn;
-
-public class OrmNamedColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyNamedColumn>
-{
- public OrmNamedColumnTextRangeResolver(OrmReadOnlyNamedColumn column) {
- super(column);
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java
deleted file mode 100644
index 5f90af8..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-
-public class OrmOverrideTextRangeResolver
- implements OverrideTextRangeResolver
-{
- protected final OrmReadOnlyOverride ormOverride;
-
- public OrmOverrideTextRangeResolver(OrmReadOnlyOverride ormOverride) {
- this.ormOverride = ormOverride;
- }
-
- public TextRange getNameTextRange() {
- return this.ormOverride.getNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java
deleted file mode 100644
index fe9b812..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java
+++ /dev/null
@@ -1,29 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
-
-public class OrmPersistentAttributeTextRangeResolver
- implements PersistentAttributeTextRangeResolver
-{
- private OrmPersistentAttribute persistentAttribute;
-
- public OrmPersistentAttributeTextRangeResolver(OrmPersistentAttribute persistentAttribute) {
- this.persistentAttribute = persistentAttribute;
- }
-
- public TextRange getAttributeTextRange() {
- return this.persistentAttribute.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java
deleted file mode 100644
index 385aef2..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
-
-public class OrmPrimaryKeyJoinColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyBaseJoinColumn>
- implements BaseJoinColumnTextRangeResolver
-{
-
- public OrmPrimaryKeyJoinColumnTextRangeResolver(OrmReadOnlyBaseJoinColumn column) {
- super(column);
- }
-
- public TextRange getReferencedColumnNameTextRange() {
- return this.column.getReferencedColumnNameTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java
deleted file mode 100644
index dc950eb..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTableColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-
-public class OrmTableColumnTextRangeResolver
- extends AbstractOrmNamedColumnTextRangeResolver<OrmReadOnlyTableColumn>
- implements TableColumnTextRangeResolver
-{
-
- public OrmTableColumnTextRangeResolver(OrmReadOnlyTableColumn column) {
- super(column);
- }
-
- public TextRange getTableTextRange() {
- return this.column.getTableTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java
deleted file mode 100644
index 62ef537..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
-
-public class OrmTableTextRangeResolver
- implements TableTextRangeResolver
-{
- protected final OrmReadOnlyTable table;
-
-
- public OrmTableTextRangeResolver(OrmReadOnlyTable table) {
- super();
- this.table = table;
- }
-
- public TextRange getNameTextRange() {
- return this.table.getNameTextRange();
- }
-
- public TextRange getCatalogTextRange() {
- return this.table.getCatalogTextRange();
- }
-
- public TextRange getSchemaTextRange() {
- return this.table.getSchemaTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java
deleted file mode 100644
index 3a76959..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java
+++ /dev/null
@@ -1,29 +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.jpa.core.internal.context.orm;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
-
-public class OrmTypeMappingTextRangeResolver
- implements TypeMappingTextRangeResolver
-{
- private OrmTypeMapping typeMapping;
-
- public OrmTypeMappingTextRangeResolver(OrmTypeMapping typeMapping) {
- this.typeMapping = typeMapping;
- }
-
- public TextRange getTypeMappingTextRange() {
- return this.typeMapping.getValidationTextRange();
- }
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java
index 47dc36e..87774cd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java
@@ -35,7 +35,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentType;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -500,10 +499,6 @@
}
}
- protected PersistentAttributeTextRangeResolver buildTextRangeResolver() {
- return new OrmPersistentAttributeTextRangeResolver(this);
- }
-
protected abstract JptValidator buildAttibuteValidator();
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java
index 060ceec..04e1026 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java
@@ -328,7 +328,7 @@
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
// the Java attribute should not need an AST for validation from here
- this.getJavaPersistentAttribute().validate(messages, reporter, null);
+ this.getJavaPersistentAttribute().validate(messages, reporter);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
index 6553ee9..588a98f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java
@@ -2513,7 +2513,7 @@
JpaValidationMessages.GENERATOR_DUPLICATE_NAME,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -2529,20 +2529,13 @@
}
// TODO bjv isn't it obvious?
- protected TextRange extractNameTextRange(Generator generator) {
- return (generator instanceof OrmGenerator) ?
- ((OrmGenerator) generator).getNameTextRange() :
- ((JavaGenerator) generator).getNameTextRange(null);
- }
-
- // TODO bjv isn't it obvious?
protected void validate(Generator generator, List<IMessage> messages, IReporter reporter) {
if (generator instanceof OrmGenerator) {
((OrmGenerator) generator).validate(messages, reporter);
} else {
JavaGenerator javaGenerator = (JavaGenerator) generator;
if (this.generatorSupportsValidationMessages(javaGenerator)) {
- javaGenerator.validate(messages, reporter, null);
+ javaGenerator.validate(messages, reporter);
}
}
}
@@ -2584,7 +2577,7 @@
JpaValidationMessages.QUERY_DUPLICATE_NAME,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -2600,20 +2593,13 @@
}
// TODO bjv isn't it obvious?
- protected TextRange extractNameTextRange(Query query) {
- return (query instanceof OrmQuery) ?
- ((OrmQuery) query).getNameTextRange() :
- ((JavaQuery) query).getNameTextRange(null);
- }
-
- // TODO bjv isn't it obvious?
protected void validate(Query query, JpaJpqlQueryHelper queryHelper, List<IMessage> messages, IReporter reporter) {
if (query instanceof OrmQuery) {
((OrmQuery) query).validate(queryHelper, messages, reporter);
} else {
JavaQuery javaQuery = (JavaQuery) query;
if (this.querySupportsValidationMessages(javaQuery)) {
- javaQuery.validate(queryHelper, messages, reporter, null);
+ javaQuery.validate(queryHelper, messages, reporter);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
index 6cb8ecd..2f87bde 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -13,8 +13,6 @@
import org.eclipse.jpt.jpa.core.context.AttributeMapping;
import org.eclipse.jpt.jpa.core.context.Entity;
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -23,20 +21,14 @@
public abstract class AbstractEntityPrimaryKeyValidator extends
AbstractPrimaryKeyValidator {
- protected AbstractEntityPrimaryKeyValidator(Entity entity,
- PrimaryKeyTextRangeResolver textRangeResolver) {
- super(entity, textRangeResolver);
+ protected AbstractEntityPrimaryKeyValidator(Entity entity) {
+ super(entity);
}
protected Entity entity() {
return (Entity) this.typeMapping();
}
- @Override
- protected IdClassReference idClassReference() {
- return entity().getIdClassReference();
- }
-
public boolean validate(List<IMessage> messages, IReporter reporter) {
// if an entity is non-root, it is not allowed to define primary keys
if (! entity().isRootEntity()) {
@@ -65,7 +57,7 @@
JpaValidationMessages.ENTITY_NO_PK,
EMPTY_STRING_ARRAY,
entity(),
- textRangeResolver().getTypeMappingTextRange()));
+ entity().getValidationTextRange()));
}
// if primary key is composite, it may either use an id class or embedded id, not both
@@ -90,7 +82,7 @@
JpaValidationMessages.ENTITY_NON_ROOT_ID_CLASS_SPECIFIED,
EMPTY_STRING_ARRAY,
entity(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
@@ -102,7 +94,7 @@
JpaValidationMessages.ENTITY_NON_ROOT_ID_ATTRIBUTE_SPECIFIED,
EMPTY_STRING_ARRAY,
each,
- textRangeResolver().getAttributeMappingTextRange(each.getName())));
+ getAttributeMappingTextRange(each.getName())));
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java
index 56d9ae3..7c290b0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,18 +11,17 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public abstract class AbstractJoinTableValidator
extends AbstractTableValidator
{
- protected AbstractJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
+ protected AbstractJoinTableValidator(ReadOnlyJoinTable table) {
+ super(table);
}
- protected AbstractJoinTableValidator(ReadOnlyPersistentAttribute persistentAttribute, ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
+ protected AbstractJoinTableValidator(ReadOnlyPersistentAttribute persistentAttribute, ReadOnlyJoinTable table) {
+ super(persistentAttribute, table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
index 48440aa..74fd1c7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,9 +10,7 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context;
import java.util.List;
-import org.eclipse.jpt.jpa.core.context.IdClassReference;
import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -20,9 +18,9 @@
extends AbstractPrimaryKeyValidator
{
protected AbstractMappedSuperclassPrimaryKeyValidator(
- MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
+ MappedSuperclass mappedSuperclass) {
- super(mappedSuperclass, textRangeResolver);
+ super(mappedSuperclass);
}
@@ -30,11 +28,6 @@
return (MappedSuperclass) this.typeMapping();
}
- @Override
- protected IdClassReference idClassReference() {
- return mappedSuperclass().getIdClassReference();
- }
-
public boolean validate(List<IMessage> messages, IReporter reporter) {
validatePrimaryKeyIsNotRedefined(messages, reporter);
validateIdClassIsUsedIfNecessary(messages, reporter);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java
index 0c5ee3d..8198b71 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -14,16 +14,14 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn, R extends NamedColumnTextRangeResolver>
+public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn>
implements JptValidator
{
/** this is <code>null</code> for columns defined on entities and secondary tables */
@@ -31,41 +29,34 @@
protected final C column;
- protected final R textRangeResolver;
-
protected final TableDescriptionProvider tableDescriptionProvider;
protected final JptValidator tableValidator;
protected AbstractNamedColumnValidator(
- C column,
- R textRangeResolver) {
- this(null, column, textRangeResolver);
+ C column) {
+ this(null, column);
}
protected AbstractNamedColumnValidator(
C column,
- R textRangeResolver,
TableDescriptionProvider provider) {
- this(null, column, textRangeResolver, provider);
+ this(null, column, provider);
+ }
+
+ protected AbstractNamedColumnValidator(
+ ReadOnlyPersistentAttribute persistentAttribute,
+ C column) {
+ this(persistentAttribute, column, TableDescriptionProvider.Null.instance());
}
protected AbstractNamedColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
C column,
- R textRangeResolver) {
- this(persistentAttribute, column, textRangeResolver, TableDescriptionProvider.Null.instance());
- }
-
- protected AbstractNamedColumnValidator(
- ReadOnlyPersistentAttribute persistentAttribute,
- C column,
- R textRangeResolver,
TableDescriptionProvider tableDescriptionProvider) {
this.persistentAttribute = persistentAttribute;
this.column = column;
- this.textRangeResolver = textRangeResolver;
this.tableDescriptionProvider = tableDescriptionProvider;
this.tableValidator = this.buildTableValidator();
}
@@ -104,7 +95,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -120,7 +111,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -208,7 +199,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -219,10 +210,6 @@
protected String getColumnTableDescriptionMessage() {
return AbstractNamedColumnValidator.this.tableDescriptionProvider.getColumnTableDescriptionMessage();
}
-
- protected TableColumnTextRangeResolver getTextRangeResolver() {
- return (TableColumnTextRangeResolver) AbstractNamedColumnValidator.this.textRangeResolver;
- }
protected IMessage buildVirtualAttributeTableNotValidMessage() {
return DefaultJpaValidationMessages.buildMessage(
@@ -235,7 +222,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java
index 3cf01ea..9e154fa 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -13,7 +13,6 @@
import org.eclipse.jpt.jpa.core.MappingKeys;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -23,13 +22,10 @@
{
protected ReadOnlyPersistentAttribute persistentAttribute;
- protected PersistentAttributeTextRangeResolver textRangeResolver;
-
protected AbstractPersistentAttributeValidator(
- ReadOnlyPersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver) {
+ ReadOnlyPersistentAttribute persistentAttribute) {
this.persistentAttribute = persistentAttribute;
- this.textRangeResolver = textRangeResolver;
}
public final boolean validate(List<IMessage> messages, IReporter reporter) {
@@ -47,7 +43,7 @@
msgID,
new String[] {this.persistentAttribute.getName()},
this.persistentAttribute,
- this.textRangeResolver.getAttributeTextRange()
+ this.persistentAttribute.getValidationTextRange()
);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
index 7d9605e..5d92c9e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java
@@ -13,6 +13,7 @@
import java.util.List;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.ClassName;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.HashBag;
@@ -29,12 +30,12 @@
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.IdClassReference;
import org.eclipse.jpt.jpa.core.context.IdMapping;
+import org.eclipse.jpt.jpa.core.context.IdTypeMapping;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
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.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.PropertyAccessor;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -45,30 +46,30 @@
public abstract class AbstractPrimaryKeyValidator
implements JptValidator
{
- private final TypeMapping typeMapping;
-
- private final PrimaryKeyTextRangeResolver textRangeResolver;
+ private final IdTypeMapping typeMapping;
public static final String[] EMPTY_STRING_ARRAY = StringTools.EMPTY_STRING_ARRAY;
- protected AbstractPrimaryKeyValidator(
- TypeMapping typeMapping, PrimaryKeyTextRangeResolver textRangeResolver) {
+ protected AbstractPrimaryKeyValidator(IdTypeMapping typeMapping) {
this.typeMapping = typeMapping;
- this.textRangeResolver = textRangeResolver;
}
- protected TypeMapping typeMapping() {
+ protected IdTypeMapping typeMapping() {
return this.typeMapping;
}
- protected abstract IdClassReference idClassReference();
-
- protected PrimaryKeyTextRangeResolver textRangeResolver() {
- return this.textRangeResolver;
+ protected IdClassReference idClassReference() {
+ return typeMapping().getIdClassReference();
+
}
-
+
+ protected TextRange getAttributeMappingTextRange(String attributeName) {
+ return this.typeMapping().getPersistentType().
+ getAttributeNamed(attributeName).getMapping().getValidationTextRange();
+ }
+
// for JPA portability, a hierarchy must define its primary key on one class
// (entity *or* mapped superclass)
protected void validatePrimaryKeyIsNotRedefined(List<IMessage> messages, IReporter reporter) {
@@ -80,7 +81,7 @@
JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_CLASS,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
for (AttributeMapping each : getPrimaryKeyMappingsDefinedLocally(typeMapping())) {
messages.add(
@@ -89,7 +90,7 @@
JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE,
EMPTY_STRING_ARRAY,
each,
- textRangeResolver().getAttributeMappingTextRange(each.getName())));
+ getAttributeMappingTextRange(each.getName())));
}
return;
}
@@ -104,7 +105,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REQUIRED,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -118,7 +119,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -131,7 +132,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_AND_EMBEDDED_ID_BOTH_USED,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -144,7 +145,7 @@
JpaValidationMessages.TYPE_MAPPING_MULTIPLE_EMBEDDED_ID,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -157,7 +158,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_WITH_MAPS_ID,
new String[] {mapsIdRelationshipMapping.getName()},
mapsIdRelationshipMapping,
- textRangeResolver().getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
+ getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
}
AttributeMapping resolvedAttributeMapping =
@@ -171,7 +172,7 @@
JpaValidationMessages.TYPE_MAPPING_MAPS_ID_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
new String[] {mapsIdRelationshipMapping.getName()},
mapsIdRelationshipMapping,
- textRangeResolver().getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
+ getAttributeMappingTextRange(mapsIdRelationshipMapping.getName())));
}
}
}
@@ -200,7 +201,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NOT_PRIMARY_KEY,
new String[] {idClassAttribute.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
// the matching attribute's type should agree
@@ -214,7 +215,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
new String[] {idClassAttribute.getName(), idClassAttributeTypeName},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
}
@@ -225,7 +226,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH,
new String[] {idClassAttribute.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
@@ -244,7 +245,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST,
new String[] {attributeMapping.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
} else {
// Validation for missing property methods is only for generic platform
checkMissingAttributeWithPropertyAccess(idClass, attributeMapping, messages, reporter);
@@ -268,7 +269,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST,
new String[] {attributeMapping.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange())
+ idClassReference().getValidationTextRange())
);
}
}
@@ -286,7 +287,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_NO_ARG_CONSTRUCTOR,
new String[] {idClass.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange())
+ idClassReference().getValidationTextRange())
);
}
}
@@ -330,7 +331,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_NO_MATCH,
new String[] {attributeMapping.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
protected void addDuplicateIdClassAttributeMatchError(AttributeMapping attributeMapping, List<IMessage> messages) {
@@ -339,7 +340,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_MAPPING_DUPLICATE_MATCH,
new String[] {attributeMapping.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
protected void validateIdClassPropertyMethods(
@@ -373,7 +374,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_PROPERTY_METHOD_NOT_PUBLIC,
new String[] {idClass.getJavaResourceType().getTypeBinding().getQualifiedName(), methodName},
typeMapping(),
- textRangeResolver().getIdClassTextRange()
+ idClassReference().getValidationTextRange()
));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java
index da999a2..b1926fa 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -13,7 +13,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -26,26 +25,17 @@
protected final ReadOnlyTable table;
- protected final TableTextRangeResolver textRangeResolver;
-
protected AbstractTableValidator(
- ReadOnlyTable table,
- TableTextRangeResolver textRangeResolver) {
- this(null, table, textRangeResolver);
+ ReadOnlyTable table) {
+ this(null, table);
}
protected AbstractTableValidator(
ReadOnlyPersistentAttribute persistentAttribute,
- ReadOnlyTable table,
- TableTextRangeResolver textRangeResolver) {
+ ReadOnlyTable table) {
super();
this.persistentAttribute = persistentAttribute;
this.table = table;
- this.textRangeResolver = textRangeResolver;
- }
-
- protected TableTextRangeResolver getTextRangeResolver() {
- return this.textRangeResolver;
}
public boolean validate(List<IMessage> messages, IReporter reporter) {
@@ -94,7 +84,7 @@
this.table.getName()
},
this.table,
- this.textRangeResolver.getCatalogTextRange()
+ this.table.getCatalogTextRange()
);
}
@@ -108,7 +98,7 @@
this.table.getName()
},
this.table,
- this.textRangeResolver.getCatalogTextRange()
+ this.table.getCatalogTextRange()
);
}
@@ -131,7 +121,7 @@
this.table.getName()
},
this.table,
- this.textRangeResolver.getSchemaTextRange()
+ this.table.getSchemaTextRange()
);
}
@@ -145,7 +135,7 @@
this.table.getName()
},
this.table,
- this.textRangeResolver.getSchemaTextRange()
+ this.table.getSchemaTextRange()
);
}
@@ -165,7 +155,7 @@
message,
new String[] {this.table.getName()},
this.table,
- this.textRangeResolver.getNameTextRange()
+ this.table.getNameTextRange()
);
}
@@ -178,7 +168,7 @@
this.table.getName()
},
this.table,
- this.textRangeResolver.getNameTextRange()
+ this.table.getNameTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java
index 353e98a..7f1491f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java
@@ -25,16 +25,9 @@
{
protected final BaseTemporalConverter converter;
- protected final ConverterTextRangeResolver textRangeResolver;
-
- protected AbstractTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
+ protected AbstractTemporalConverterValidator(BaseTemporalConverter converter) {
super();
this.converter = converter;
- this.textRangeResolver = textRangeResolver;
- }
-
- protected ConverterTextRangeResolver getTextRangeResolver() {
- return this.textRangeResolver;
}
protected AttributeMapping getAttributeMapping() {
@@ -76,7 +69,7 @@
this.getInvalidTemporalMappingType(),
StringTools.EMPTY_STRING_ARRAY,
this.converter,
- this.getTextRangeResolver().getConverterTextRange()
+ this.converter.getValidationTextRange()
);
}
@@ -88,7 +81,7 @@
this.getVirtualAttributeInvalidTemporalMappingType(),
new String[] {this.getPersistentAttribute().getName()},
this.converter,
- this.getTextRangeResolver().getConverterTextRange()
+ this.converter.getValidationTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
index cba68a1..4bdb696 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java
@@ -14,7 +14,6 @@
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -26,14 +25,11 @@
protected JavaResourceType jrt;
- protected TypeMappingTextRangeResolver textRangeResolver;
-
protected AbstractTypeMappingValidator(
- T typeMapping, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
+ T typeMapping, JavaResourceType jrt) {
this.typeMapping = typeMapping;
this.jrt = jrt;
- this.textRangeResolver = textRangeResolver;
}
@@ -85,7 +81,7 @@
msgID,
new String[] {this.typeMapping.getName()},
this.typeMapping,
- this.textRangeResolver.getTypeMappingTextRange()
+ this.typeMapping.getValidationTextRange()
);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java
index d7df3d5..a07e315 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -27,9 +26,8 @@
ReadOnlyAssociationOverride override,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
+ super(column, joinColumnOwner, provider);
this.override = override;
}
@@ -38,9 +36,8 @@
ReadOnlyAssociationOverride override,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
+ super(persistentAttribute, column, joinColumnOwner, provider);
this.override = override;
}
@@ -66,7 +63,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -82,7 +79,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -108,7 +105,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -124,7 +121,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -146,7 +143,7 @@
JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS,
new String[] {this.override.getName()},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -160,7 +157,7 @@
this.override.getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -182,7 +179,7 @@
JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_INVERSE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_INVERSE_JOIN_COLUMNS,
new String[] {this.override.getName()},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -196,7 +193,7 @@
this.override.getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -233,7 +230,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -254,7 +251,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java
index a495440..b2af74f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -28,9 +27,8 @@
ReadOnlyAssociationOverride override,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
+ super(column, joinColumnOwner, provider);
this.override = override;
}
@@ -39,9 +37,8 @@
ReadOnlyAssociationOverride override,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
+ super(persistentAttribute, column, joinColumnOwner, provider);
this.override = override;
}
@@ -67,7 +64,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -83,7 +80,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -109,7 +106,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -125,7 +122,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -147,7 +144,7 @@
JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
new String[] {this.override.getName()},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -161,7 +158,7 @@
this.override.getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -183,7 +180,7 @@
JpaValidationMessages.VIRTUAL_ASSOCIATION_OVERRIDE_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
new String[] {this.override.getName()},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -197,7 +194,7 @@
this.override.getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -234,7 +231,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -255,7 +252,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java
index 24731b8..7acdd11 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -24,18 +23,16 @@
public AssociationOverrideJoinTableValidator(
ReadOnlyAssociationOverride override,
- ReadOnlyJoinTable table,
- TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
+ ReadOnlyJoinTable table) {
+ super(table);
this.override = override;
}
public AssociationOverrideJoinTableValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyAssociationOverride override,
- ReadOnlyJoinTable table,
- TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
+ ReadOnlyJoinTable table) {
+ super(persistentAttribute, table);
this.override = override;
}
@@ -55,7 +52,7 @@
this.table.getName()
},
this.table,
- this.getTextRangeResolver().getNameTextRange()
+ this.table.getNameTextRange()
);
}
@@ -75,7 +72,7 @@
this.table.getCatalog()
},
this.table,
- this.getTextRangeResolver().getCatalogTextRange()
+ this.table.getCatalogTextRange()
);
}
@@ -95,7 +92,7 @@
this.table.getSchema()
},
this.table,
- this.getTextRangeResolver().getSchemaTextRange()
+ this.table.getSchemaTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java
index b8417c6..8341ada 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.AssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class AssociationOverrideValidator
@@ -21,18 +20,16 @@
public AssociationOverrideValidator(
ReadOnlyAssociationOverride override,
AssociationOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
- super(override, container, textRangeResolver, overrideDescriptionProvider);
+ super(override, container, overrideDescriptionProvider);
}
public AssociationOverrideValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyAssociationOverride override,
AssociationOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
- super(persistentAttribute, override, container, textRangeResolver, overrideDescriptionProvider);
+ super(persistentAttribute, override, container, overrideDescriptionProvider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java
index 7f51474..cbcfec0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -26,9 +25,8 @@
public AttributeOverrideColumnValidator(
ReadOnlyAttributeOverride override,
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider message) {
- super(column, textRangeResolver, message);
+ super(column, message);
this.override = override;
}
@@ -36,9 +34,8 @@
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyAttributeOverride override,
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider message) {
- super(persistentAttribute, column, textRangeResolver, message);
+ super(persistentAttribute, column, message);
this.override = override;
}
@@ -64,7 +61,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -84,7 +81,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -121,7 +118,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -142,7 +139,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java
index 7f820a4..fb1de8b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class AttributeOverrideValidator
@@ -21,18 +20,16 @@
public AttributeOverrideValidator(
ReadOnlyAttributeOverride override,
AttributeOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
- super(override, container, textRangeResolver, overrideDescriptionProvider);
+ super(override, container, overrideDescriptionProvider);
}
public AttributeOverrideValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyAttributeOverride override,
AttributeOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
- super(persistentAttribute, override, container, textRangeResolver, overrideDescriptionProvider);
+ super(persistentAttribute, override, container, overrideDescriptionProvider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java
index 5bab03a..967c352 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -13,21 +13,19 @@
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn, R extends BaseJoinColumnTextRangeResolver>
- extends AbstractNamedColumnValidator<C, R>
+public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn>
+ extends AbstractNamedColumnValidator<C>
{
private final ReadOnlyBaseJoinColumn.Owner joinColumnOwner;
protected BaseJoinColumnValidator(
C column,
ReadOnlyBaseJoinColumn.Owner joinColumnOwner,
- R textRangeResolver,
TableDescriptionProvider provider) {
- super(column, textRangeResolver, provider);
+ super(column, provider);
this.joinColumnOwner = joinColumnOwner;
}
@@ -35,9 +33,8 @@
ReadOnlyPersistentAttribute persistentAttribute,
C column,
ReadOnlyBaseJoinColumn.Owner joinColumnOwner,
- R textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, textRangeResolver, provider);
+ super(persistentAttribute, column, provider);
this.joinColumnOwner = joinColumnOwner;
}
@@ -94,7 +91,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -108,7 +105,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -128,7 +125,7 @@
message,
StringTools.EMPTY_STRING_ARRAY,
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -138,7 +135,7 @@
this.getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(),
new String[] {this.persistentAttribute.getName()},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -158,7 +155,7 @@
message,
StringTools.EMPTY_STRING_ARRAY,
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -168,7 +165,7 @@
this.getVirtualAttributeUnspecifiedReferencedColumnNameMultipleJoinColumnsMessage(),
new String[] {this.persistentAttribute.getName()},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java
deleted file mode 100644
index 793fd8d..0000000
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java
+++ /dev/null
@@ -1,20 +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.core.internal.jpa1.context;
-
-import org.eclipse.jpt.common.core.utility.TextRange;
-
-/**
- * Interface to resolve text ranges on converters.
- */
-public interface ConverterTextRangeResolver
-{
- TextRange getConverterTextRange();
-}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java
index c993c07..c32a75a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,16 +10,14 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class DiscriminatorColumnValidator
- extends AbstractNamedColumnValidator<ReadOnlyNamedColumn, NamedColumnTextRangeResolver>
+ extends AbstractNamedColumnValidator<ReadOnlyNamedColumn>
{
public DiscriminatorColumnValidator(
- ReadOnlyNamedColumn namedColumn,
- NamedColumnTextRangeResolver textRangeResolver) {
- super(namedColumn, textRangeResolver);
+ ReadOnlyNamedColumn namedColumn) {
+ super(namedColumn);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
index cafc2d9..9d45cd3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,16 +10,14 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
public class EntityPrimaryKeyJoinColumnValidator
extends PrimaryKeyJoinColumnValidator
{
public EntityPrimaryKeyJoinColumnValidator(
ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(column, owner, textRangeResolver);
+ ReadOnlyBaseJoinColumn.Owner owner) {
+ super(column, owner);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
index 058f7b0..3c18161 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java
@@ -14,7 +14,6 @@
import org.eclipse.jpt.jpa.core.context.AttributeMapping;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -23,8 +22,8 @@
public class GenericEntityPrimaryKeyValidator
extends AbstractEntityPrimaryKeyValidator
{
- public GenericEntityPrimaryKeyValidator(Entity entity, PrimaryKeyTextRangeResolver textRangeResolver) {
- super(entity, textRangeResolver);
+ public GenericEntityPrimaryKeyValidator(Entity entity) {
+ super(entity);
}
@Override
@@ -47,7 +46,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_PUBLIC_NO_ARG_CONSTRUCTOR,
new String[] {idClass.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
index c431490..21cda0f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java
@@ -14,7 +14,6 @@
import org.eclipse.jpt.jpa.core.context.AttributeMapping;
import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -23,8 +22,8 @@
public class GenericMappedSuperclassPrimaryKeyValidator extends
AbstractMappedSuperclassPrimaryKeyValidator {
- public GenericMappedSuperclassPrimaryKeyValidator(MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
- super(mappedSuperclass, textRangeResolver);
+ public GenericMappedSuperclassPrimaryKeyValidator(MappedSuperclass mappedSuperclass) {
+ super(mappedSuperclass);
}
@Override
@@ -47,7 +46,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_PUBLIC_NO_ARG_CONSTRUCTOR,
new String[] {idClass.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
index c811254..d071191 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java
@@ -19,6 +19,7 @@
import org.eclipse.jpt.common.core.JptResourceType;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
import org.eclipse.jpt.common.core.resource.xml.JptXmlResource;
+import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.HashBag;
import org.eclipse.jpt.jpa.core.JpaProject;
@@ -33,7 +34,6 @@
import org.eclipse.jpt.jpa.core.jpa2.context.JpaRootContextNode2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.persistence.PersistenceXml2_0;
import org.eclipse.jpt.jpa.core.resource.persistence.XmlPersistence;
-import org.eclipse.jst.j2ee.model.internal.validation.ValidationCancelledException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -228,10 +228,13 @@
// ********** validation **********
+ public TextRange getValidationTextRange() {
+ return TextRange.Empty.instance(); //?
+ }
+
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
if (this.persistenceXml == null) {
messages.add(buildPersistenceXmlValidationMessage());
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java
index 21e505e..d099c80 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle.
+ * Copyright (c) 2010, 2012 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
@@ -13,15 +13,14 @@
import java.util.List;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
public class GenericTypeMappingValidator
extends AbstractTypeMappingValidator<TypeMapping>
{
- public GenericTypeMappingValidator(TypeMapping typeMapping, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
- super(typeMapping, jrt, textRangeResolver);
+ public GenericTypeMappingValidator(TypeMapping typeMapping, JavaResourceType jrt) {
+ super(typeMapping, jrt);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java
index a495cc4..06c8da2 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,28 +11,25 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class InverseJoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyJoinColumn, JoinColumnTextRangeResolver>
+ extends BaseJoinColumnValidator<ReadOnlyJoinColumn>
{
protected InverseJoinColumnValidator(
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
+ super(column, joinColumnOwner, provider);
}
public InverseJoinColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
+ super(persistentAttribute, column, joinColumnOwner, provider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java
index 87ddf14..c5d2a48 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,28 +11,25 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class JoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyJoinColumn, JoinColumnTextRangeResolver>
+ extends BaseJoinColumnValidator<ReadOnlyJoinColumn>
{
protected JoinColumnValidator(
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
+ super(column, joinColumnOwner, provider);
}
public JoinColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
+ super(persistentAttribute, column, joinColumnOwner, provider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java
index 982d7c1..57794bf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,14 +11,13 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class JoinTableValidator
extends AbstractJoinTableValidator
{
- public JoinTableValidator(ReadOnlyPersistentAttribute persistentAttribute, ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
+ public JoinTableValidator(ReadOnlyPersistentAttribute persistentAttribute, ReadOnlyJoinTable table) {
+ super(persistentAttribute, table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java
index d9c3c2f..857fdea 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -23,9 +22,8 @@
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyAttributeOverride override,
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, override, column, textRangeResolver, provider);
+ super(persistentAttribute, override, column, provider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java
index 951bd56..ae5ee1e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import org.eclipse.jpt.jpa.core.context.AttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class MapKeyAttributeOverrideValidator
@@ -22,9 +21,8 @@
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyAttributeOverride override,
AttributeOverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
- super(persistentAttribute, override, container, textRangeResolver, overrideDescriptionProvider);
+ super(persistentAttribute, override, container, overrideDescriptionProvider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java
index ceced2b..88792ba 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,19 +11,17 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class MapKeyColumnValidator
- extends AbstractNamedColumnValidator<ReadOnlyBaseColumn, TableColumnTextRangeResolver>
+ extends AbstractNamedColumnValidator<ReadOnlyBaseColumn>
{
public MapKeyColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, textRangeResolver, provider);
+ super(persistentAttribute, column, provider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java
index 0487f75..1a54fdd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,27 +11,24 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class NamedColumnValidator
- extends AbstractNamedColumnValidator<ReadOnlyBaseColumn, TableColumnTextRangeResolver>
+ extends AbstractNamedColumnValidator<ReadOnlyBaseColumn>
{
protected NamedColumnValidator(
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(column, textRangeResolver, provider);
+ super(column, provider);
}
public NamedColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, textRangeResolver, provider);
+ super(persistentAttribute, column, provider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
index 5f29dd7..066ca4e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +11,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class OneToOnePrimaryKeyJoinColumnValidator
@@ -20,9 +19,8 @@
public OneToOnePrimaryKeyJoinColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(persistentAttribute, column, owner, textRangeResolver);
+ ReadOnlyBaseJoinColumn.Owner owner) {
+ super(persistentAttribute, column, owner);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java
index 3060549..2c9dee4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +15,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -31,16 +30,13 @@
protected final OverrideContainer container;
- protected final OverrideTextRangeResolver textRangeResolver;
-
protected final OverrideDescriptionProvider overrideDescriptionProvider;
protected OverrideValidator(
ReadOnlyOverride override,
OverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
- this(null, override, container, textRangeResolver, overrideDescriptionProvider);
+ this(null, override, container, overrideDescriptionProvider);
}
@@ -48,12 +44,10 @@
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyOverride override,
OverrideContainer container,
- OverrideTextRangeResolver textRangeResolver,
OverrideDescriptionProvider overrideDescriptionProvider) {
this.persistentAttribute = persistentAttribute;
this.override = override;
this.container = container;
- this.textRangeResolver = textRangeResolver;
this.overrideDescriptionProvider = overrideDescriptionProvider;
}
@@ -83,7 +77,7 @@
this.getUnresolvedOverrideTypeMessage(),
new String[] {this.override.getName()},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
@@ -123,7 +117,7 @@
this.container.getOverridableTypeMapping().getName()
},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
@@ -139,7 +133,7 @@
this.container.getOverridableTypeMapping().getName()
},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
@@ -156,7 +150,7 @@
this.container.getOverridableTypeMapping().getName()
},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java
index 6d06448..6c6a1d6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +11,6 @@
import java.util.List;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.FieldAccessor;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -23,9 +22,9 @@
protected FieldAccessor fieldAccessor;
public PersistentFieldValidator(
- ReadOnlyPersistentAttribute persistentAttribute, FieldAccessor fieldAccessor, PersistentAttributeTextRangeResolver textRangeResolver)
+ ReadOnlyPersistentAttribute persistentAttribute, FieldAccessor fieldAccessor)
{
- super(persistentAttribute, textRangeResolver);
+ super(persistentAttribute);
this.fieldAccessor = fieldAccessor;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java
index b444438..cad66b3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +11,6 @@
import java.util.List;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.PropertyAccessor;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -23,9 +22,9 @@
protected PropertyAccessor propertyAccessor;
public PersistentPropertyValidator(
- ReadOnlyPersistentAttribute persistentAttribute, PropertyAccessor propertyAccessor, PersistentAttributeTextRangeResolver textRangeResolver)
+ ReadOnlyPersistentAttribute persistentAttribute, PropertyAccessor propertyAccessor)
{
- super(persistentAttribute, textRangeResolver);
+ super(persistentAttribute);
this.propertyAccessor = propertyAccessor;
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
index c531b28..84da4f8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,26 +11,23 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
public abstract class PrimaryKeyJoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyBaseJoinColumn, BaseJoinColumnTextRangeResolver>
+ extends BaseJoinColumnValidator<ReadOnlyBaseJoinColumn>
{
protected PrimaryKeyJoinColumnValidator(
ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(column, owner, textRangeResolver, TableDescriptionProvider.Null.instance());
+ ReadOnlyBaseJoinColumn.Owner owner) {
+ super(column, owner, TableDescriptionProvider.Null.instance());
}
protected PrimaryKeyJoinColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(persistentAttribute, column, owner, textRangeResolver, TableDescriptionProvider.Null.instance());
+ ReadOnlyBaseJoinColumn.Owner owner) {
+ super(persistentAttribute, column, owner, TableDescriptionProvider.Null.instance());
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
index 7ecf62d..1c56c3c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +11,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -24,9 +23,8 @@
public SecondaryTablePrimaryKeyJoinColumnValidator(
ReadOnlySecondaryTable secondaryTable,
ReadOnlyBaseJoinColumn column,
- ReadOnlyBaseJoinColumn.Owner owner,
- BaseJoinColumnTextRangeResolver textRangeResolver) {
- super(column, owner, textRangeResolver);
+ ReadOnlyBaseJoinColumn.Owner owner) {
+ super(column, owner);
this.secondaryTable = secondaryTable;
}
@@ -55,7 +53,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -81,7 +79,7 @@
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -103,7 +101,7 @@
JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
new String[] {this.getSecondaryTableName()},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -125,7 +123,7 @@
JpaValidationMessages.VIRTUAL_SECONDARY_TABLE_PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME_MUST_BE_SPECIFIED_MULTIPLE_JOIN_COLUMNS,
new String[] {this.getSecondaryTableName()},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java
index ff7cbe3..a976ea6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,14 +10,13 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context;
import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class SecondaryTableValidator
extends AbstractTableValidator
{
- public SecondaryTableValidator(ReadOnlySecondaryTable table, TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
+ public SecondaryTableValidator(ReadOnlySecondaryTable table) {
+ super(table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java
index 6a099e5..f942836 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,14 +10,13 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class TableValidator
extends AbstractTableValidator
{
- public TableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- super(table, textRangeResolver);
+ public TableValidator(ReadOnlyTable table) {
+ super(table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java
index 413f615..0c25be7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,13 +10,11 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -36,27 +34,18 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.owner.buildValidator(this, this.buildConverterTextRangeResolver(astRoot)).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.owner.buildValidator(this).validate(messages, reporter);
}
-
- protected ConverterTextRangeResolver buildConverterTextRangeResolver(final CompilationUnit astRoot) {
- return new ConverterTextRangeResolver() {
- public TextRange getConverterTextRange() {
- return getValidationTextRange(astRoot);
- }
- };
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
- }
-
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- return this.getConverterAnnotation().getTextRange(astRoot);
+ protected TextRange getAnnotationTextRange() {
+ return this.getConverterAnnotation().getTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java
index b4a8322..4522137 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java
@@ -10,16 +10,16 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
/**
* Java named discriminator column
*/
-public abstract class AbstractJavaNamedDiscriminatorColumn<A extends DiscriminatorColumnAnnotation, O extends JavaReadOnlyNamedDiscriminatorColumn.Owner>
+public abstract class AbstractJavaNamedDiscriminatorColumn<A extends DiscriminatorColumnAnnotation, O extends ReadOnlyNamedDiscriminatorColumn.Owner>
extends AbstractJavaNamedColumn<A, O>
implements JavaNamedDiscriminatorColumn
{
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java
index 9671612..18fcd88 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -38,10 +38,8 @@
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.resource.java.OverrideAnnotation;
@@ -515,12 +513,12 @@
return this.owner.getDefaultTableName();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver) {
- return this.owner.buildOverrideValidator(override, this, textRangeResolver);
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override) {
+ return this.owner.buildOverrideValidator(override, this);
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return this.owner.buildColumnValidator(override, column, columnOwner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return this.owner.buildColumnValidator(override, column, columnOwner);
}
public String getPossiblePrefix() {
@@ -569,21 +567,21 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (R override: this.getOverrides()) {
- override.validate(messages, reporter, astRoot);
+ override.validate(messages, reporter);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getValidationAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.owner.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getValidationAnnotationTextRange();
+ return (textRange != null) ? textRange : this.owner.getValidationTextRange();
}
- protected TextRange getValidationAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getValidationAnnotationTextRange() {
Annotation annotation = this.getValidationAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
protected Annotation getValidationAnnotation() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
index 55f80de..0bb359f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -19,9 +19,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaOverrideRelationship;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaOverride;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverride2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
@@ -125,20 +123,20 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.relationship.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getContainer2_0().buildJoinTableValidator(this, table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
index 215fc57..1b8c6d2 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -20,10 +20,8 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.resource.java.AssociationOverrideAnnotation;
@@ -62,16 +60,16 @@
return (JavaAssociationOverrideContainer2_0.Owner) super.getOwner2_0();
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner o, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableJoinColumnValidator(override, column, o, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner o) {
+ return this.getOwner2_0().buildJoinTableJoinColumnValidator(override, column, o);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner o, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableInverseJoinColumnValidator(override, column, o, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner o) {
+ return this.getOwner2_0().buildJoinTableInverseJoinColumnValidator(override, column, o);
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableValidator(override, table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
+ return this.getOwner2_0().buildJoinTableValidator(override, table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
index 0f7fbab..944f081 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2012 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.
@@ -19,9 +19,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaOverride;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -99,8 +97,8 @@
return this.name;
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this);
}
public CompleteColumnAnnotation getColumnAnnotation() {
@@ -143,8 +141,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.attributeIsDerivedId()) {
messages.add(
@@ -153,16 +151,16 @@
JpaValidationMessages.ATTRIBUTE_OVERRIDE_DERIVED_AND_SPECIFIED,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
// validate the column if it is specified
if (this.columnAnnotationIsSpecified()) {
- this.column.validate(messages, reporter, astRoot);
+ this.column.validate(messages, reporter);
}
} else {
- this.column.validate(messages, reporter, astRoot);
+ this.column.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java
index 7a26de7..4082526 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipMapping;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -248,9 +247,9 @@
return (RelationshipMapping2_0Annotation) this.getMappingAnnotationForUpdate();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
TextRange textRange = this.getAnnotationCascadeTextRange();
- return (textRange != null) ? textRange : this.getMapping().getValidationTextRange(astRoot);
+ return (textRange != null) ? textRange : this.getMapping().getValidationTextRange();
}
protected TextRange getAnnotationCascadeTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
index 4d2f686..835f23f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java
@@ -10,6 +10,7 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
@@ -19,11 +20,11 @@
* Java discriminator column
*/
public class GenericJavaDiscriminatorColumn
- extends AbstractJavaNamedDiscriminatorColumn<DiscriminatorColumnAnnotation, JavaDiscriminatorColumn.Owner>
+ extends AbstractJavaNamedDiscriminatorColumn<DiscriminatorColumnAnnotation, ReadOnlyNamedDiscriminatorColumn.Owner>
implements JavaDiscriminatorColumn
{
- public GenericJavaDiscriminatorColumn(JavaEntity parent, JavaDiscriminatorColumn.Owner owner) {
+ public GenericJavaDiscriminatorColumn(JavaEntity parent, ReadOnlyNamedDiscriminatorColumn.Owner owner) {
super(parent, owner);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
index 4f8f308..00eaff0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java
@@ -193,8 +193,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
String generator = this.getGenerator();
if (generator == null) {
@@ -213,21 +213,21 @@
JpaValidationMessages.ID_MAPPING_UNRESOLVED_GENERATOR_NAME,
new String[] {generator},
this.getIdMapping(),
- this.getGeneratorTextRange(astRoot)
+ this.getGeneratorTextRange()
)
);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getIdMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getIdMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- return this.generatedValueAnnotation.getTextRange(astRoot);
+ protected TextRange getAnnotationTextRange() {
+ return this.generatedValueAnnotation.getTextRange();
}
- public TextRange getGeneratorTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.generatedValueAnnotation.getGeneratorTextRange(), astRoot);
+ public TextRange getGeneratorTextRange() {
+ return this.getValidationTextRange(this.generatedValueAnnotation.getGeneratorTextRange());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
index 350c7b1..23827c0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
@@ -228,18 +228,18 @@
* @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateGenerators(List, IReporter)
*/
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// generators are validated in the persistence unit
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getResourceTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getResourceTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- protected TextRange getResourceTextRange(CompilationUnit astRoot) {
- return this.parentAdapter.getResourceAnnotatedElement().getTextRange(astRoot);
+ protected TextRange getResourceTextRange() {
+ return this.parentAdapter.getResourceAnnotatedElement().getTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
index 9669a2a..b3e3fde 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java
@@ -18,12 +18,9 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaBaseColumn;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.CompleteJoinColumnAnnotation;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -32,7 +29,7 @@
* Java join column
*/
public class GenericJavaJoinColumn
- extends AbstractJavaBaseColumn<CompleteJoinColumnAnnotation, JavaReadOnlyJoinColumn.Owner>
+ extends AbstractJavaBaseColumn<CompleteJoinColumnAnnotation, ReadOnlyJoinColumn.Owner>
implements JavaJoinColumn
{
/** @see AbstractJavaNamedColumn#AbstractJavaNamedColumn(JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation) */
@@ -42,7 +39,7 @@
protected String defaultReferencedColumnName;
- public GenericJavaJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation columnAnnotation) {
+ public GenericJavaJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, CompleteJoinColumnAnnotation columnAnnotation) {
super(parent, owner, columnAnnotation);
}
@@ -190,12 +187,7 @@
// ********** validation **********
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaJoinColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getReferencedColumnNameTextRange(), astRoot);
+ public TextRange getReferencedColumnNameTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getReferencedColumnNameTextRange());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java
index 9dad944..920e2a7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java
@@ -29,12 +29,9 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.resource.java.NullJoinColumnAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JoinColumnAnnotation;
import org.eclipse.jpt.jpa.core.resource.java.JoinTableAnnotation;
@@ -53,7 +50,7 @@
implements JavaJoinTable
{
protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedInverseJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected JavaJoinColumn defaultInverseJoinColumn;
@@ -65,7 +62,7 @@
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -197,7 +194,7 @@
}
}
- protected JavaReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -310,9 +307,9 @@
// ********** validation **********
@Override
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validateJoinColumns(messages, reporter, astRoot);
- this.validateNodes(this.getInverseJoinColumns(), messages, reporter, astRoot);
+ protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+ super.validateJoinColumns(messages, reporter);
+ this.validateNodes(this.getInverseJoinColumns(), messages, reporter);
}
public boolean validatesAgainstDatabase() {
@@ -326,7 +323,7 @@
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -365,8 +362,8 @@
return GenericJavaJoinTable.this.getName();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaJoinTable.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaJoinTable.this.getValidationTextRange();
}
protected JavaRelationship getRelationship() {
@@ -410,8 +407,8 @@
return GenericJavaJoinTable.this.getJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
@@ -446,8 +443,8 @@
return GenericJavaJoinTable.this.getInverseJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java
index d088cf3..a0d566c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.JoinTable;
@@ -18,9 +17,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.java.JavaMappingJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.InverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
@@ -87,23 +84,23 @@
return this.getRelationshipMapping().validatesAgainstDatabase();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
protected PersistentAttribute getPersistentAttribute() {
return this.getRelationshipMapping().getPersistentAttribute();
}
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new JoinTableValidator(this.getPersistentAttribute(), (JoinTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return new JoinTableValidator(this.getPersistentAttribute(), (JoinTable) table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new InverseJoinColumnValidator(this.getPersistentAttribute(), column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new InverseJoinColumnValidator(this.getPersistentAttribute(), column, owner, new JoinTableTableDescriptionProvider());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java
index ba9d430..b6beaff 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java
@@ -19,7 +19,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.OrderColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaOrderColumn2_0;
@@ -416,19 +415,19 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getOrderByAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getOrderByAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
}
- protected TextRange getOrderByAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getOrderByAnnotationTextRange() {
OrderByAnnotation orderByAnnotation = this.getOrderByAnnotation();
- return (orderByAnnotation == null) ? null : orderByAnnotation.getTextRange(astRoot);
+ return (orderByAnnotation == null) ? null : orderByAnnotation.getTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.orderColumnAnnotationIsPresent() && (this.getOrderByAnnotation() != null)) {
messages.add(
DefaultJpaValidationMessages.buildMessage(
@@ -436,13 +435,13 @@
JpaValidationMessages.ORDER_COLUMN_AND_ORDER_BY_BOTH_SPECIFIED,
new String[] {this.getPersistentAttribute().getName()},
this.getAttributeMapping(),
- this.getOrderByAnnotationTextRange(astRoot)
+ this.getOrderByAnnotationTextRange()
)
);
}
if (this.orderColumnOrdering) {
//TODO validation message if type is not List
- this.orderColumn.validate(messages, reporter, astRoot);
+ this.orderColumn.validate(messages, reporter);
}
}
@@ -464,12 +463,12 @@
return this.getPersistentAttribute().getName() + "_ORDER"; //$NON-NLS-1$
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaOrderable.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaOrderable.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OrderColumnValidator(this.getPersistentAttribute(), (OrderColumn2_0) column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new OrderColumnValidator(this.getPersistentAttribute(), (OrderColumn2_0) column);
}
protected JavaPersistentAttribute getPersistentAttribute() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java
index 47085a1..4b8352f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -31,10 +31,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.internal.context.java.GenericJavaOverrideJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaOverrideJoinTableRelationshipStrategy2_0;
@@ -259,8 +256,8 @@
return this.getAssociationOverride().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getAssociationOverride().buildColumnValidator(column, owner);
}
public AssociationOverrideAnnotation getOverrideAnnotation() {
@@ -296,25 +293,25 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getAssociationOverride().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getAssociationOverride().getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.strategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.strategy.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getAssociationOverride2_0().buildJoinTableValidator(table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
index a1c781c..3f496ed 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
import org.eclipse.jpt.jpa.core.context.PersistentType;
@@ -39,7 +38,7 @@
// ********** validation **********
@Override
- protected JptValidator buildAttributeValidator(CompilationUnit astRoot) {
- return getAccessor().buildAttributeValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildAttributeValidator() {
+ return getAccessor().buildAttributeValidator(this);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
index fefc5bc..479581a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java
@@ -15,12 +15,10 @@
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaPrimaryKeyJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.java.PrimaryKeyJoinColumnAnnotation;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -29,7 +27,7 @@
* Java primary key join column
*/
public class GenericJavaPrimaryKeyJoinColumn
- extends AbstractJavaNamedColumn<PrimaryKeyJoinColumnAnnotation, JavaReadOnlyBaseJoinColumn.Owner>
+ extends AbstractJavaNamedColumn<PrimaryKeyJoinColumnAnnotation, ReadOnlyBaseJoinColumn.Owner>
implements JavaPrimaryKeyJoinColumn
{
/** @see AbstractJavaNamedColumn#AbstractJavaNamedColumn(org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation) */
@@ -39,7 +37,7 @@
protected String defaultReferencedColumnName;
- public GenericJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, JavaReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation columnAnnotation) {
+ public GenericJavaPrimaryKeyJoinColumn(JavaJpaContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, PrimaryKeyJoinColumnAnnotation columnAnnotation) {
super(parent, owner, columnAnnotation);
}
@@ -185,13 +183,8 @@
// ********** validation **********
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaPrimaryKeyJoinColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.columnAnnotation.getReferencedColumnNameTextRange(), astRoot);
+ public TextRange getReferencedColumnNameTextRange() {
+ return this.getValidationTextRange(this.columnAnnotation.getReferencedColumnNameTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
index 3b77df2..afb406a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
@@ -11,7 +11,6 @@
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
@@ -252,14 +251,14 @@
* @see org.eclipse.jpt.jpa.core.internal.context.persistence.AbstractPersistenceUnit#validateQueries(List, IReporter)
*/
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// queries are validated in the persistence unit
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.owner.getResourceAnnotatedElement().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.owner.getResourceAnnotatedElement().getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java
index a5a5c46..639cf4d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.jpa.core.context.QueryHint;
@@ -87,9 +86,9 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.queryHintAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getQuery().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.queryHintAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getQuery().getValidationTextRange();
}
public boolean isEquivalentTo(QueryHint hint) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
index ffef9ec..b2bf515 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java
@@ -38,7 +38,7 @@
implements JavaReferenceTable
{
protected final ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected JavaJoinColumn defaultJoinColumn;
@@ -165,7 +165,7 @@
}
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
protected ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> buildSpecifiedJoinColumnContainer(){
SpecifiedJoinColumnContainer container = new SpecifiedJoinColumnContainer();
@@ -232,7 +232,7 @@
return this.buildJoinColumn(this.joinColumnOwner, joinColumnAnnotation);
}
- protected JavaJoinColumn buildJoinColumn(JavaReadOnlyJoinColumn.Owner jcOwner, JoinColumnAnnotation joinColumnAnnotation) {
+ protected JavaJoinColumn buildJoinColumn(ReadOnlyJoinColumn.Owner jcOwner, JoinColumnAnnotation joinColumnAnnotation) {
return this.getJpaFactory().buildJavaJoinColumn(this, jcOwner, joinColumnAnnotation);
}
@@ -268,19 +268,19 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
//join column validation will handle the check for whether to validate against the database
//some validation messages are not database specific. If the database validation for the
//table fails we will stop there and not validate the join columns at all
if (continueValidating) {
- this.validateJoinColumns(messages, reporter, astRoot);
+ this.validateJoinColumns(messages, reporter);
}
}
- protected void validateJoinColumns(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.validateNodes(this.getJoinColumns(), messages, reporter, astRoot);
+ protected void validateJoinColumns(List<IMessage> messages, IReporter reporter) {
+ this.validateNodes(this.getJoinColumns(), messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
index 425f950..c780b8c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java
@@ -21,11 +21,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaEntity;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaTable;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTablePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.resource.java.NullPrimaryKeyJoinColumnAnnotation;
@@ -46,7 +43,7 @@
protected /* final */ SecondaryTableAnnotation tableAnnotation;
protected final ContextListContainer<JavaPrimaryKeyJoinColumn, PrimaryKeyJoinColumnAnnotation> specifiedPrimaryKeyJoinColumnContainer;
- protected final JavaReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
protected JavaPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
@@ -209,7 +206,7 @@
}
}
- protected JavaReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -320,15 +317,15 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- boolean continueValidating = this.buildTableValidator(astRoot).validate(messages, reporter);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ boolean continueValidating = this.buildTableValidator().validate(messages, reporter);
//join column validation will handle the check for whether to validate against the database
//some validation messages are not database specific. If the database validation for the
//table fails we will stop there and not validate the join columns at all
if (continueValidating) {
for (JavaPrimaryKeyJoinColumn pkJoinColumn : this.getPrimaryKeyJoinColumns()) {
- pkJoinColumn.validate(messages, reporter, astRoot);
+ pkJoinColumn.validate(messages, reporter);
}
}
}
@@ -341,7 +338,7 @@
// ********** primary key join column owner adapter **********
protected class PrimaryKeyJoinColumnOwner
- implements JavaReadOnlyBaseJoinColumn.Owner
+ implements ReadOnlyBaseJoinColumn.Owner
{
protected JavaEntity getEntity() {
return GenericJavaSecondaryTable.this.getEntity();
@@ -370,12 +367,12 @@
return this.getEntity().getPrimaryKeyColumnName();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaSecondaryTable.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaSecondaryTable.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericJavaSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericJavaSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
index 0fc14bd..b4f4d88 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java
@@ -116,9 +116,9 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.uniqueConstraintAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.uniqueConstraintAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
public boolean isEquivalentTo(UniqueConstraint uniqueConstraint) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java
index d7f6b3b..d0a88fe 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
@@ -18,9 +17,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaAssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualOverride;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaAssociationOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaVirtualAssociationOverride2_0;
@@ -84,20 +81,20 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.relationship.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.relationship.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getContainer2_0().buildJoinTableValidator(this, table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java
index a4c5705..76ede69 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
@@ -18,9 +17,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualAttributeOverride;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualOverride;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -95,16 +92,16 @@
return this.getContainer().resolveOverriddenColumn(this.name);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this);
}
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.column.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java
index 61d73f8..d4ea8d0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,16 +9,12 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -26,7 +22,7 @@
* Java virtual join column
*/
public class GenericJavaVirtualJoinColumn
- extends AbstractJavaVirtualBaseColumn<JavaReadOnlyJoinColumn.Owner, ReadOnlyJoinColumn>
+ extends AbstractJavaVirtualBaseColumn<ReadOnlyJoinColumn.Owner, ReadOnlyJoinColumn>
implements JavaVirtualJoinColumn
{
protected final ReadOnlyJoinColumn overriddenColumn;
@@ -35,7 +31,7 @@
protected String defaultReferencedColumnName;
- public GenericJavaVirtualJoinColumn(JavaJpaContextNode parent, JavaReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
+ public GenericJavaVirtualJoinColumn(JavaJpaContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
super(parent, owner);
this.overriddenColumn = overriddenColumn;
}
@@ -113,12 +109,7 @@
// ********** validation **********
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaJoinColumnTextRangeResolver(this, astRoot);
- }
-
- public TextRange getReferencedColumnNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getReferencedColumnNameTextRange() {
+ return this.getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java
index 71ef4b4..4de05f6 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
@@ -26,14 +25,11 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationship;
import org.eclipse.jpt.jpa.core.context.RelationshipMapping;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualOverrideRelationship;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -44,7 +40,7 @@
implements JavaVirtualJoinColumnRelationshipStrategy
{
protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected JavaVirtualJoinColumn defaultJoinColumn;
@@ -130,7 +126,7 @@
}
}
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -290,8 +286,8 @@
return (typeMapping != null) ? typeMapping.getAllAssociatedTableNames() : EmptyIterable.<String>instance();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
protected String getAttributeName() {
@@ -306,10 +302,10 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
for (JavaVirtualJoinColumn joinColumn : this.getJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
+ joinColumn.validate(messages, reporter);
}
}
@@ -317,7 +313,7 @@
// ********** join column owner **********
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -359,12 +355,12 @@
return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.this.getRelationship().buildColumnValidator((ReadOnlyBaseColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java
index 073d0ca..f0d8c9f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Entity;
import org.eclipse.jpt.jpa.core.context.OverrideRelationship;
@@ -26,10 +25,7 @@
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.MappingRelationshipStrategy2_0;
@@ -208,8 +204,8 @@
return this.getAssociationOverride().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getAssociationOverride().buildColumnValidator(column, owner);
}
public Entity getEntity() {
@@ -232,25 +228,25 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getAssociationOverride().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getAssociationOverride().getValidationTextRange();
}
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.strategy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.strategy.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getAssociationOverride2_0().buildJoinTableValidator(table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java
index 0b5c080..10a836d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyUniqueConstraint;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
@@ -40,8 +39,8 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java
index 981ebaf..313255e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java
@@ -11,15 +11,14 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaElementCollectionMapping2_0;
public class JavaElementCollectionTemporalConverterValidator extends AbstractTemporalConverterValidator
{
- public JavaElementCollectionTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
+ public JavaElementCollectionTemporalConverterValidator(BaseTemporalConverter converter) {
+ super(converter);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java
index fa5ddd6..000860f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java
@@ -11,14 +11,13 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class JavaTemporalConverterValidator extends AbstractTemporalConverterValidator
{
- public JavaTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
+ public JavaTemporalConverterValidator(BaseTemporalConverter converter) {
+ super(converter);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java
index 90d1ba4..e37bb8d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.Converter;
@@ -42,7 +41,7 @@
// NOP
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java
index 1787c76..301ec25 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -169,8 +168,8 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
public String getColumnTableNotValidDescription() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java
index 547a93f..abbe864 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -9,14 +9,12 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.ReadOnlyRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.ReadOnlyOverrideRelationship2_0;
@@ -46,8 +44,8 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
@@ -110,11 +108,11 @@
return false;
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
throw new UnsupportedOperationException();
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
throw new UnsupportedOperationException();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java
index d4457f3..3805f25 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -14,7 +14,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -55,17 +54,9 @@
@Override
public void validate(List<IMessage> messages, IReporter reporter) {
super.validate(messages, reporter);
- this.owner.buildValidator(this, this.buildConverterTextRangeResolver()).validate(messages, reporter);
+ this.owner.buildValidator(this).validate(messages, reporter);
}
-
- protected ConverterTextRangeResolver buildConverterTextRangeResolver() {
- return new ConverterTextRangeResolver() {
- public TextRange getConverterTextRange() {
- return getValidationTextRange();
- }
- };
- }
public TextRange getValidationTextRange() {
TextRange textRange = this.getXmlValidationTextRange();
return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java
index a1cb23f..2aefecf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java
@@ -36,12 +36,8 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseEmbeddedMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideInverseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
@@ -298,24 +294,24 @@
return AbstractOrmEmbeddedMapping.this.getValidationTextRange();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, (JoinColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) owner, new EntityTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, textRangeResolver, new JoinTableTableDescriptionProvider());
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return new AssociationOverrideInverseJoinColumnValidator(this.getPersistentAttribute(), override, column, owner, new JoinTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
+ return new AssociationOverrideJoinTableValidator(this.getPersistentAttribute(), override, (ReadOnlyJoinTable) table);
}
protected OrmPersistentAttribute getPersistentAttribute() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java
index 2a5aecc..3b38cfb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java
@@ -10,16 +10,16 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.orm;
import org.eclipse.jpt.jpa.core.context.DiscriminatorType;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlBaseDiscriminatorColumn;
/**
* <code>orm.xml</code> named discriminator column
*/
-public abstract class AbstractOrmNamedDiscriminatorColumn<X extends XmlBaseDiscriminatorColumn, O extends OrmReadOnlyNamedDiscriminatorColumn.Owner>
+public abstract class AbstractOrmNamedDiscriminatorColumn<X extends XmlBaseDiscriminatorColumn, O extends ReadOnlyNamedDiscriminatorColumn.Owner>
extends AbstractOrmNamedColumn<X, O>
implements OrmNamedDiscriminatorColumn
{
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java
index 93c19b4..b41cbc9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java
@@ -19,10 +19,7 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverride;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -121,8 +118,8 @@
return this.getContainer().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getContainer().buildColumnValidator(this, column, owner);
}
@Override
@@ -140,11 +137,7 @@
}
protected JptValidator buildValidator() {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver());
- }
-
- protected OverrideTextRangeResolver buildTextRangeResolver() {
- return new OrmOverrideTextRangeResolver(this);
+ return this.getContainer().buildOverrideValidator(this);
}
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java
index 038e1f2..7ab0fe3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java
@@ -30,8 +30,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverride;
import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -431,12 +429,12 @@
return this.owner.getDefaultTableName();
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideTextRangeResolver textRangeResolver) {
- return this.owner.buildOverrideValidator(override, this, textRangeResolver);
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override) {
+ return this.owner.buildOverrideValidator(override, this);
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return this.owner.buildColumnValidator(override, column, columnOwner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return this.owner.buildColumnValidator(override, column, columnOwner);
}
protected R selectOverrideNamed(Iterable<R> overrides, String name) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java
index 2a46f57..5f53f12 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,11 +17,8 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmOverride;
import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverride;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmOverrideTextRangeResolver;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -75,8 +72,8 @@
return this.getContainer().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getContainer().buildColumnValidator(this, column, owner);
}
@Override
@@ -94,11 +91,7 @@
}
protected JptValidator buildValidator() {
- return this.getContainer().buildOverrideValidator(this, this.buildTextRangeResolver());
- }
-
- protected OverrideTextRangeResolver buildTextRangeResolver() {
- return new OrmOverrideTextRangeResolver(this);
+ return this.getContainer().buildOverrideValidator(this);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
index af85f00..6bfa16d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java
@@ -17,9 +17,7 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmOverrideRelationship;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverride2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
@@ -105,16 +103,16 @@
this.relationship.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getContainer2_0().buildJoinTableValidator(this, table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner);
}
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
index f0d0118..a0c014f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -20,10 +20,8 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAssociationOverride;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAssociationOverride;
@@ -58,16 +56,16 @@
return (OrmAssociationOverrideContainer2_0.Owner) this.owner;
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner columnOwner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableJoinColumnValidator(override, column, columnOwner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner columnOwner) {
+ return this.getOwner2_0().buildJoinTableJoinColumnValidator(override, column, columnOwner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner columnOwner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableInverseJoinColumnValidator(override, column, columnOwner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner columnOwner) {
+ return this.getOwner2_0().buildJoinTableInverseJoinColumnValidator(override, column, columnOwner);
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getOwner2_0().buildJoinTableValidator(override, table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
+ return this.getOwner2_0().buildJoinTableValidator(override, table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
index 22ea7a8..c6c768f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java
@@ -18,8 +18,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAttributeOverride;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
@@ -97,8 +95,8 @@
return this.name;
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this);
}
public XmlColumn getXmlColumn() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
index 82c9b8b..25bdf52 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java
@@ -14,11 +14,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -27,7 +24,7 @@
* <code>orm.xml</code> join column
*/
public class GenericOrmJoinColumn
- extends AbstractOrmBaseColumn<XmlJoinColumn, OrmReadOnlyJoinColumn.Owner>
+ extends AbstractOrmBaseColumn<XmlJoinColumn, ReadOnlyJoinColumn.Owner>
implements OrmJoinColumn
{
/** @see org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn#AbstractOrmNamedColumn(XmlContextNode, org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn) */
@@ -37,11 +34,11 @@
protected String defaultReferencedColumnName;
- public GenericOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner) {
+ public GenericOrmJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner) {
this(parent, owner, null);
}
- public GenericOrmJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, XmlJoinColumn xmlColumn) {
+ public GenericOrmJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, XmlJoinColumn xmlColumn) {
super(parent, owner, xmlColumn);
this.specifiedReferencedColumnName = this.buildSpecifiedReferencedColumnName();
}
@@ -170,11 +167,6 @@
return this.getValidationTextRange(this.xmlColumn.getReferencedColumnNameTextRange());
}
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmJoinColumnTextRangeResolver(this);
- }
-
// ********** completion proposals **********
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
index 6a69301..e814828 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java
@@ -28,12 +28,9 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinColumn;
import org.eclipse.jpt.jpa.core.resource.orm.XmlJoinTable;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -47,7 +44,7 @@
implements OrmJoinTable
{
protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedInverseJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected OrmJoinColumn defaultInverseJoinColumn;
@@ -59,7 +56,7 @@
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -208,7 +205,7 @@
}
}
- protected OrmReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -330,7 +327,7 @@
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -420,8 +417,8 @@
return GenericOrmJoinTable.this.getJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return this.getRelationshipStrategy().buildJoinTableJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
@@ -466,8 +463,8 @@
return GenericOrmJoinTable.this.getInverseJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return this.getRelationshipStrategy().buildJoinTableInverseJoinColumnValidator((ReadOnlyJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java
index 45656e8..18203e7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java
@@ -15,7 +15,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistentAttribute;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.OrderColumnValidator;
import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
@@ -440,8 +439,8 @@
return GenericOrmOrderable.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new OrderColumnValidator(this.getPersistentAttribute(), (OrderColumn2_0) column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new OrderColumnValidator(this.getPersistentAttribute(), (OrderColumn2_0) column);
}
public XmlOrderColumn getXmlColumn() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java
index 0f010df..3b8657c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java
@@ -29,10 +29,7 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmOverrideJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.internal.context.orm.NullOrmJoinTableRelationshipStrategy;
@@ -264,8 +261,8 @@
return this.getAssociationOverride().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getAssociationOverride().buildColumnValidator(column, owner);
}
public Entity getEntity() {
@@ -294,16 +291,16 @@
this.strategy.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getAssociationOverride2_0().buildJoinTableValidator(table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner);
}
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
index 83ce299..5bf20e8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2012 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.
@@ -57,6 +57,6 @@
@Override
protected JptValidator buildAttibuteValidator() {
- return this.getJavaPersistentAttribute().getAccessor().buildAttributeValidator(this, buildTextRangeResolver());
+ return this.getJavaPersistentAttribute().getAccessor().buildAttributeValidator(this);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
index 26c08d3..8d22194 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java
@@ -11,13 +11,11 @@
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmPrimaryKeyJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.XmlPrimaryKeyJoinColumn;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -26,7 +24,7 @@
* <code>orm.xml</code> primary key join column
*/
public class GenericOrmPrimaryKeyJoinColumn
- extends AbstractOrmNamedColumn<XmlPrimaryKeyJoinColumn, OrmReadOnlyBaseJoinColumn.Owner>
+ extends AbstractOrmNamedColumn<XmlPrimaryKeyJoinColumn, ReadOnlyBaseJoinColumn.Owner>
implements OrmPrimaryKeyJoinColumn
{
/** @see org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmNamedColumn#AbstractOrmNamedColumn(XmlContextNode, org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.orm.AbstractXmlNamedColumn) */
@@ -36,7 +34,7 @@
protected String defaultReferencedColumnName;
- public GenericOrmPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn xmlColumn) {
+ public GenericOrmPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, XmlPrimaryKeyJoinColumn xmlColumn) {
super(parent, owner, xmlColumn);
this.specifiedReferencedColumnName = this.buildSpecifiedReferencedColumnName();
}
@@ -162,11 +160,6 @@
// ********** validation **********
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmPrimaryKeyJoinColumnTextRangeResolver(this);
- }
-
public TextRange getReferencedColumnNameTextRange() {
return this.getValidationTextRange(this.xmlColumn.getReferencedColumnNameTextRange());
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
index 1c99fd1..ca18fc7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java
@@ -19,7 +19,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyReferenceTable;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmReferenceTable;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmTable;
@@ -37,7 +36,7 @@
implements OrmReferenceTable
{
protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner joinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner joinColumnOwner;
protected OrmJoinColumn defaultJoinColumn;
@@ -176,7 +175,7 @@
}
}
- protected abstract OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
// ********** default join column **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
index 11ab77c..8947aad 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java
@@ -23,11 +23,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlySecondaryTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmEntity;
import org.eclipse.jpt.jpa.core.context.orm.OrmPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmSecondaryTable;
-import org.eclipse.jpt.jpa.core.internal.context.BaseJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmTable;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.SecondaryTablePrimaryKeyJoinColumnValidator;
import org.eclipse.jpt.jpa.core.resource.orm.OrmFactory;
@@ -48,7 +45,7 @@
protected /* final */ XmlSecondaryTable xmlSecondaryTable;
protected final ContextListContainer<OrmPrimaryKeyJoinColumn, XmlPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumnContainer;
- protected final OrmReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
protected OrmPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
@@ -230,7 +227,7 @@
}
}
- protected OrmReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -360,7 +357,7 @@
// ********** primary key join column owner adapter **********
protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyBaseJoinColumn.Owner
+ implements ReadOnlyBaseJoinColumn.Owner
{
protected OrmEntity getEntity() {
return GenericOrmSecondaryTable.this.getEntity();
@@ -396,8 +393,8 @@
return GenericOrmSecondaryTable.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericOrmSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this, (BaseJoinColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new SecondaryTablePrimaryKeyJoinColumnValidator(GenericOrmSecondaryTable.this, (ReadOnlyBaseJoinColumn) column, this);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java
index 4618e9f..a549c17 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverride;
import org.eclipse.jpt.jpa.core.context.orm.OrmAssociationOverrideContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmAssociationOverrideContainer2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmVirtualAssociationOverride2_0;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -87,15 +85,15 @@
this.relationship.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableValidator(this, table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getContainer2_0().buildJoinTableValidator(this, table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableJoinColumnValidator(this, column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getContainer2_0().buildJoinTableInverseJoinColumnValidator(this, column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java
index ca5d64a..e9e188e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmAttributeOverrideContainer;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualAttributeOverride;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualColumn;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -93,8 +91,8 @@
return this.getContainer().resolveOverriddenColumn(this.name);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this, (TableColumnTextRangeResolver) textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return this.getContainer().buildColumnValidator(this, (ReadOnlyBaseColumn) col, this);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java
index 25909ad..477f897 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java
@@ -12,12 +12,9 @@
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumn;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVirtualBaseColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -25,7 +22,7 @@
* <code>orm.xml</code> virtual join column
*/
public class GenericOrmVirtualJoinColumn
- extends AbstractOrmVirtualBaseColumn<OrmReadOnlyJoinColumn.Owner, ReadOnlyJoinColumn>
+ extends AbstractOrmVirtualBaseColumn<ReadOnlyJoinColumn.Owner, ReadOnlyJoinColumn>
implements OrmVirtualJoinColumn
{
protected final ReadOnlyJoinColumn overriddenColumn;
@@ -34,7 +31,7 @@
protected String defaultReferencedColumnName;
- public GenericOrmVirtualJoinColumn(XmlContextNode parent, OrmReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
+ public GenericOrmVirtualJoinColumn(XmlContextNode parent, ReadOnlyJoinColumn.Owner owner, ReadOnlyJoinColumn overriddenColumn) {
super(parent, owner);
this.overriddenColumn = overriddenColumn;
}
@@ -115,9 +112,4 @@
public TextRange getReferencedColumnNameTextRange() {
return this.getValidationTextRange();
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmJoinColumnTextRangeResolver(this);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java
index e77e69e..ee60d5f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java
@@ -25,10 +25,7 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.jpa.core.internal.context.orm.GenericOrmVirtualOverrideJoinColumnRelationshipStrategy;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0;
@@ -208,8 +205,8 @@
return this.getAssociationOverride().getDefaultTableName();
}
- public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner, TableColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride().buildColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyBaseColumn column, Owner owner) {
+ return this.getAssociationOverride().buildColumnValidator(column, owner);
}
public Entity getEntity() {
@@ -242,15 +239,15 @@
this.strategy.validate(messages, reporter);
}
- public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableValidator(table, textRangeResolver);
+ public JptValidator buildJoinTableValidator(ReadOnlyJoinTable table) {
+ return this.getAssociationOverride2_0().buildJoinTableValidator(table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getAssociationOverride2_0().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java
index 03c9959..a3caa4e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java
@@ -10,13 +10,11 @@
package org.eclipse.jpt.jpa.core.internal.jpa1.context.orm;
import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyBaseJoinColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualPrimaryKeyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVirtualNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmPrimaryKeyJoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.db.Column;
import org.eclipse.jpt.jpa.db.Table;
@@ -24,7 +22,7 @@
* <code>orm.xml</code> virtual primary key join column
*/
public class GenericOrmVirtualPrimaryKeyJoinColumn
- extends AbstractOrmVirtualNamedColumn<OrmReadOnlyBaseJoinColumn.Owner, JavaPrimaryKeyJoinColumn>
+ extends AbstractOrmVirtualNamedColumn<ReadOnlyBaseJoinColumn.Owner, JavaPrimaryKeyJoinColumn>
implements OrmVirtualPrimaryKeyJoinColumn
{
protected final JavaPrimaryKeyJoinColumn javaColumn;
@@ -33,7 +31,7 @@
protected String defaultReferencedColumnName;
- public GenericOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, OrmReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaColumn) {
+ public GenericOrmVirtualPrimaryKeyJoinColumn(XmlContextNode parent, ReadOnlyBaseJoinColumn.Owner owner, JavaPrimaryKeyJoinColumn javaColumn) {
super(parent, owner);
this.javaColumn = javaColumn;
}
@@ -118,11 +116,6 @@
// ********** validation **********
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmPrimaryKeyJoinColumnTextRangeResolver(this);
- }
-
public TextRange getReferencedColumnNameTextRange() {
return this.getValidationTextRange();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java
index f3e4502..ae6dcfb 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa2.context;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTableValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
@@ -18,8 +17,8 @@
public class CollectionTableValidator
extends AbstractTableValidator
{
- public CollectionTableValidator(ReadOnlyPersistentAttribute persistentAttribute, CollectionTable2_0 table, TableTextRangeResolver textRangeResolver) {
- super(persistentAttribute, table, textRangeResolver);
+ public CollectionTableValidator(ReadOnlyPersistentAttribute persistentAttribute, CollectionTable2_0 table) {
+ super(persistentAttribute, table);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java
index 082cd49..ff43925 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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,29 +11,26 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.BaseJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class MapKeyJoinColumnValidator
- extends BaseJoinColumnValidator<ReadOnlyJoinColumn, JoinColumnTextRangeResolver>
+ extends BaseJoinColumnValidator<ReadOnlyJoinColumn>
{
protected MapKeyJoinColumnValidator(
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(column, joinColumnOwner, textRangeResolver, provider);
+ super(column, joinColumnOwner, provider);
}
public MapKeyJoinColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
ReadOnlyJoinColumn column,
ReadOnlyJoinColumn.Owner joinColumnOwner,
- JoinColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider provider) {
- super(persistentAttribute, column, joinColumnOwner, textRangeResolver, provider);
+ super(persistentAttribute, column, joinColumnOwner, provider);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java
index 4714555..872d295 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,19 +10,17 @@
package org.eclipse.jpt.jpa.core.internal.jpa2.context;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractNamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.OrderColumn2_0;
public class OrderColumnValidator
- extends AbstractNamedColumnValidator<OrderColumn2_0, NamedColumnTextRangeResolver>
+ extends AbstractNamedColumnValidator<OrderColumn2_0>
{
public OrderColumnValidator(
ReadOnlyPersistentAttribute persistentAttribute,
- OrderColumn2_0 column,
- NamedColumnTextRangeResolver textRangeResolver) {
- super(persistentAttribute, column, textRangeResolver);
+ OrderColumn2_0 column) {
+ super(persistentAttribute, column);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
index 36d824f..1381216 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java
@@ -69,16 +69,10 @@
import org.eclipse.jpt.jpa.core.context.java.JavaJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaLobConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaAttributeMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
@@ -164,7 +158,7 @@
protected final JavaAttributeOverrideContainer mapKeyAttributeOverrideContainer;
protected final ContextListContainer<JavaJoinColumn, MapKeyJoinColumn2_0Annotation> specifiedMapKeyJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
protected JavaJoinColumn defaultMapKeyJoinColumn;
@@ -432,8 +426,8 @@
protected class CollectionTableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new CollectionTableValidator(AbstractJavaElementCollectionMapping2_0.this.getPersistentAttribute(), (CollectionTable2_0) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return new CollectionTableValidator(AbstractJavaElementCollectionMapping2_0.this.getPersistentAttribute(), (CollectionTable2_0) table);
}
}
@@ -1149,7 +1143,7 @@
return this.getJpaFactory().buildJavaJoinColumn(this, this.mapKeyJoinColumnOwner, joinColumnAnnotation);
}
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -1471,43 +1465,43 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateAttributeType(messages, reporter, astRoot);
- this.validateTargetClass(messages, astRoot);
- this.validateMapKeyClass(messages, astRoot);
- this.orderable.validate(messages, reporter, astRoot);
- this.collectionTable.validate(messages, reporter, astRoot);
- this.validateValue(messages, reporter, astRoot);
- this.validateMapKey(messages, reporter, astRoot);
- this.validateNoEmbeddableInMappingContainsProhibitedMapping(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateAttributeType(messages, reporter);
+ this.validateTargetClass(messages);
+ this.validateMapKeyClass(messages);
+ this.orderable.validate(messages, reporter);
+ this.collectionTable.validate(messages, reporter);
+ this.validateValue(messages, reporter);
+ this.validateMapKey(messages, reporter);
+ this.validateNoEmbeddableInMappingContainsProhibitedMapping(messages);
}
- protected void validateNoEmbeddableInMappingContainsProhibitedMapping(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateNoEmbeddableInMappingContainsProhibitedMapping(List<IMessage> messages) {
Embeddable embeddableClass = getResolvedTargetEmbeddable();
if (embeddableClass != null) {
- embeddableContainsElementCollection(messages, astRoot, embeddableClass);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddableClass);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddableClass, new ArrayList<Embeddable>());
+ embeddableContainsElementCollection(messages, embeddableClass);
+ embeddableContainsProhibitedRelationshipMapping(messages, embeddableClass);
+ embeddableHierarchyContainsProhibitedMapping(messages, embeddableClass, new ArrayList<Embeddable>());
}
embeddableClass = getResolvedMapKeyEmbeddable();
if (embeddableClass != null) {
- embeddableContainsElementCollection(messages, astRoot, embeddableClass);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddableClass);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddableClass, new ArrayList<Embeddable>());
+ embeddableContainsElementCollection(messages, embeddableClass);
+ embeddableContainsProhibitedRelationshipMapping(messages, embeddableClass);
+ embeddableHierarchyContainsProhibitedMapping(messages, embeddableClass, new ArrayList<Embeddable>());
}
}
- private void embeddableHierarchyContainsProhibitedMapping(List<IMessage> messages, CompilationUnit astRoot, Embeddable parentEmbeddable, List<Embeddable> visited) {
+ private void embeddableHierarchyContainsProhibitedMapping(List<IMessage> messages, Embeddable parentEmbeddable, List<Embeddable> visited) {
Iterable<AttributeMapping> embeddedIterable = parentEmbeddable.getAllAttributeMappings(MappingKeys.EMBEDDED_ATTRIBUTE_MAPPING_KEY);
for(AttributeMapping mapping : embeddedIterable) {
Embeddable embeddable = ((BaseEmbeddedMapping)mapping).getTargetEmbeddable();
if (embeddable != null && embeddable != parentEmbeddable) {
- embeddableContainsElementCollection(messages, astRoot, embeddable);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddable);
+ embeddableContainsElementCollection(messages, embeddable);
+ embeddableContainsProhibitedRelationshipMapping(messages, embeddable);
if (!CollectionTools.contains(visited, embeddable)) {
visited.add(embeddable);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddable, visited);
+ embeddableHierarchyContainsProhibitedMapping(messages, embeddable, visited);
}
}
}
@@ -1515,17 +1509,17 @@
for(AttributeMapping mapping : embeddedIdIterable) {
Embeddable embeddable = ((BaseEmbeddedMapping)mapping).getTargetEmbeddable();
if (embeddable != null && embeddable != parentEmbeddable) {
- embeddableContainsElementCollection(messages, astRoot, embeddable);
- embeddableContainsProhibitedRelationshipMapping(messages, astRoot, embeddable);
+ embeddableContainsElementCollection(messages, embeddable);
+ embeddableContainsProhibitedRelationshipMapping(messages, embeddable);
if (!CollectionTools.contains(visited, embeddable)) {
visited.add(embeddable);
- embeddableHierarchyContainsProhibitedMapping(messages, astRoot, embeddable, visited);
+ embeddableHierarchyContainsProhibitedMapping(messages, embeddable, visited);
}
}
}
}
- private void embeddableContainsProhibitedRelationshipMapping(List<IMessage> messages, CompilationUnit astRoot, Embeddable embeddable) {
+ private void embeddableContainsProhibitedRelationshipMapping(List<IMessage> messages, Embeddable embeddable) {
boolean prohibitedMappingFound = false;
RelationshipMapping relationshipMapping = null;
Iterable<AttributeMapping> manyToManyMappings = embeddable.getAllAttributeMappings(MappingKeys.MANY_TO_MANY_ATTRIBUTE_MAPPING_KEY);
@@ -1563,7 +1557,7 @@
new String[] {this.getName(),
embeddable.getName(), relationshipMapping.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1573,14 +1567,14 @@
JpaValidationMessages.ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_PROHIBITED_RELATIONSHIP_MAPPING,
new String[] {embeddable.getName(), relationshipMapping.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
}
- private void embeddableContainsElementCollection(List<IMessage> messages, CompilationUnit astRoot, Embeddable embeddable) {
+ private void embeddableContainsElementCollection(List<IMessage> messages, Embeddable embeddable) {
Iterable<AttributeMapping> elementCollectionMappings = embeddable.getAllAttributeMappings(MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY);
if (elementCollectionMappings.iterator().hasNext()) {
if (getPersistentAttribute().isVirtual()) {
@@ -1590,7 +1584,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING,
new String[] {this.getName(), embeddable.getName(), elementCollectionMappings.iterator().next().getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1600,14 +1594,14 @@
JpaValidationMessages.ELEMENT_COLLECTION_CONTAINS_EMBEDDABLE_WITH_ELEMENT_COLLECTION_MAPPING,
new String[] {embeddable.getName(), elementCollectionMappings.iterator().next().getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
}
- protected void validateAttributeType(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages, IReporter reporter) {
JavaPersistentAttribute javaAttribute = this.getJavaPersistentAttribute();
if ((javaAttribute != null) && !javaAttribute.getJpaContainerDefinition().isContainer()) {
if (this.getPersistentAttribute().isVirtual()) {
@@ -1617,7 +1611,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1628,14 +1622,14 @@
JpaValidationMessages.ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
}
- protected void validateTargetClass(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateTargetClass(List<IMessage> messages) {
String targetClass = this.getFullyQualifiedTargetClass();
if (targetClass == null) {
if (this.getPersistentAttribute().isVirtual()) {
@@ -1645,7 +1639,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1655,7 +1649,7 @@
JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1673,7 +1667,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getName(), targetClass},
this,
- this.getTargetClassTextRange(astRoot)
+ this.getTargetClassTextRange()
)
);
} else {
@@ -1683,15 +1677,15 @@
JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_MUST_BE_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {targetClass},
this,
- this.getTargetClassTextRange(astRoot)
+ this.getTargetClassTextRange()
)
);
}
}
}
- protected TextRange getTargetClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getAnnotationTargetClassTextRange(), astRoot);
+ protected TextRange getTargetClassTextRange() {
+ return this.getValidationTextRange(this.getAnnotationTargetClassTextRange());
}
protected TextRange getAnnotationTargetClassTextRange() {
@@ -1699,18 +1693,18 @@
return (annotation == null) ? null : annotation.getTargetClassTextRange();
}
- protected TextRange getMapKeyClassTextRange(CompilationUnit astRoot) {
+ protected TextRange getMapKeyClassTextRange() {
MapKeyClass2_0Annotation annotation = this.getMapKeyClassAnnotation();
- return annotation == null ? getMappingAnnotationTextRange(astRoot) : annotation.getTextRange(astRoot);
+ return annotation == null ? getMappingAnnotationTextRange() : annotation.getTextRange();
}
- protected void validateMapKeyClass(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapKeyClass(List<IMessage> messages) {
if (this.getPersistentAttribute().getJpaContainerDefinition().isMap()) {
- this.validateMapKeyClass_(messages, astRoot);
+ this.validateMapKeyClass_(messages);
}
}
- protected void validateMapKeyClass_(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapKeyClass_(List<IMessage> messages) {
if (this.getMapKeyClass() == null) {
if (this.getPersistentAttribute().isVirtual()) {
messages.add(
@@ -1719,7 +1713,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1729,7 +1723,7 @@
JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
@@ -1747,7 +1741,7 @@
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getName(), this.getFullyQualifiedMapKeyClass()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1757,51 +1751,51 @@
JpaValidationMessages.MAP_KEY_CLASS_MUST_BE_ENTITY_EMBEDDABLE_OR_BASIC_TYPE,
new String[] {this.getFullyQualifiedMapKeyClass()},
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
}
}
- protected void validateValue(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- this.converter.validate(messages, reporter, astRoot);
+ protected void validateValue(List<IMessage> messages, IReporter reporter) {
+ this.converter.validate(messages, reporter);
//TODO should we handle validation when the type is embeddable,
//but a value column is specified, or things like that if that is invalid?
switch (this.valueType) {
case BASIC_TYPE :
- this.valueColumn.validate(messages, reporter, astRoot);
+ this.valueColumn.validate(messages, reporter);
break;
case EMBEDDABLE_TYPE :
- this.valueAttributeOverrideContainer.validate(messages, reporter, astRoot);
- this.valueAssociationOverrideContainer.validate(messages, reporter, astRoot);
+ this.valueAttributeOverrideContainer.validate(messages, reporter);
+ this.valueAssociationOverrideContainer.validate(messages, reporter);
break;
default :
break;
}
}
- protected void validateMapKey(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMapKey(List<IMessage> messages, IReporter reporter) {
if (this.getMapKey() == null) {
- this.validateMapKey_(messages, reporter, astRoot);
+ this.validateMapKey_(messages, reporter);
} else {
//TODO validate that the map key refers to an existing attribute
}
}
- protected void validateMapKey_(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ protected void validateMapKey_(List<IMessage> messages, IReporter reporter) {
switch (this.keyType) {
case BASIC_TYPE :
- this.mapKeyColumn.validate(messages, reporter, astRoot);
- this.mapKeyConverter.validate(messages, reporter, astRoot);
+ this.mapKeyColumn.validate(messages, reporter);
+ this.mapKeyConverter.validate(messages, reporter);
break;
case ENTITY_TYPE :
for (JavaJoinColumn joinColumn : this.getMapKeyJoinColumns()) {
- joinColumn.validate(messages, reporter, astRoot);
+ joinColumn.validate(messages, reporter);
}
break;
case EMBEDDABLE_TYPE :
- this.mapKeyAttributeOverrideContainer.validate(messages, reporter, astRoot);
+ this.mapKeyAttributeOverrideContainer.validate(messages, reporter);
//validate map key association overrides - for eclipselink
break;
default :
@@ -1847,8 +1841,8 @@
return Tools.valuesAreDifferent(this.getDefaultTableName(), tableName);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange();
}
protected String getMappingName() {
@@ -1883,8 +1877,8 @@
return this.getMappingName();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new CollectionTableTableDescriptionProvider());
}
}
@@ -1907,8 +1901,8 @@
return this.getMappingName() + "_KEY"; //$NON-NLS-1$
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new CollectionTableTableDescriptionProvider());
}
}
@@ -1959,12 +1953,12 @@
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new CollectionTableTableDescriptionProvider());
}
}
@@ -1984,23 +1978,23 @@
return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) columnOwner, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) columnOwner, new CollectionTableTableDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
return JptValidator.Null.instance();
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
return JptValidator.Null.instance();
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
return JptValidator.Null.instance();
}
}
@@ -2008,7 +2002,7 @@
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -2058,16 +2052,15 @@
return AbstractJavaElementCollectionMapping2_0.this.getMapKeyJoinColumnsSize();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return AbstractJavaElementCollectionMapping2_0.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return new MapKeyJoinColumnValidator(
this.getPersistentAttribute(),
(ReadOnlyJoinColumn) column,
this,
- (JoinColumnTextRangeResolver) textRangeResolver,
new CollectionTableTableDescriptionProvider());
}
}
@@ -2112,12 +2105,12 @@
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new CollectionTableTableDescriptionProvider());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
index 5b8595b..aab221c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -158,13 +157,13 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getCacheableHolder().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getCacheableHolder().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
Cacheable2_0Annotation annotation = this.getCacheableAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
index dbcea83..3f9022e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.Tools;
@@ -19,11 +18,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.CollectionTableTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaReferenceTable;
@@ -43,7 +39,7 @@
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -96,7 +92,7 @@
* these point at the source/owning entity
*/
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -124,8 +120,8 @@
return GenericJavaCollectionTable2_0.this.getName();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return GenericJavaCollectionTable2_0.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return GenericJavaCollectionTable2_0.this.getValidationTextRange();
}
public org.eclipse.jpt.jpa.db.Table getReferencedColumnDbTable() {
@@ -164,8 +160,8 @@
return GenericJavaCollectionTable2_0.this.getJoinColumnsSize();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, new CollectionTableTableDescriptionProvider());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
index 6050364..3d4720b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -175,14 +175,14 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.strategy != null) {
- ((JavaJpaContextNode) this.strategy).validate(messages, reporter, astRoot);
+ ((JavaJpaContextNode) this.strategy).validate(messages, reporter);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getMapping().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
index bdd4cd8..679087b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -125,18 +124,18 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// no validation rules
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
IdAnnotation annotation = this.getAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
index 6ba8363..75a15ea 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java
@@ -310,31 +310,31 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateMapsId(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateMapsId(messages);
}
- protected void validateMapsId(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapsId(List<IMessage> messages) {
if (this.getDerivedIdentity().usesMapsIdDerivedIdentityStrategy()) {
- this.validateMapsId_(messages, astRoot);
+ this.validateMapsId_(messages);
}
}
- protected void validateMapsId_(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateMapsId_(List<IMessage> messages) {
// test whether id attribute name can be resolved
AttributeMapping attributeMapping = this.getDerivedIdAttributeMapping();
if (attributeMapping == null) {
// if id attribute name is not specified, use that message
if (this.specifiedIdAttributeName == null) {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_SPECIFIED, EMPTY_STRING_ARRAY, astRoot));
+ messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_SPECIFIED, EMPTY_STRING_ARRAY));
} else {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_RESOLVED, new String[] {this.getIdAttributeName()}, astRoot));
+ messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_NOT_RESOLVED, new String[] {this.getIdAttributeName()}));
}
} else {
// test whether attribute mapping is allowable
if ( ! CollectionTools.contains(this.getValidAttributeMappingChoices(), attributeMapping)) {
- messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_INVALID, new String[] {this.getIdAttributeName()}, astRoot));
+ messages.add(this.buildMessage(JpaValidationMessages.MAPS_ID_VALUE_INVALID, new String[] {this.getIdAttributeName()}));
}
}
}
@@ -343,7 +343,7 @@
return this.buildAttributeMappingChoices(this.getIdAttributeMappings());
}
- protected IMessage buildMessage(String msgID, String[] parms, CompilationUnit astRoot) {
+ protected IMessage buildMessage(String msgID, String[] parms) {
PersistentAttribute attribute = this.getPersistentAttribute();
String attributeDescription = attribute.isVirtual() ?
JpaValidationDescriptionMessages.VIRTUAL_ATTRIBUTE_DESC :
@@ -355,16 +355,16 @@
msgID,
parms,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getDerivedIdentity().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
- return this.getAnnotation().getTextRange(astRoot);
+ protected TextRange getAnnotationTextRange() {
+ return this.getAnnotation().getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
index bc15a03..c73f0f4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -114,9 +113,9 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
TextRange textRange = this.getAnnotationTextRange();
- return (textRange != null) ? textRange : this.getMapping().getValidationTextRange(astRoot);
+ return (textRange != null) ? textRange : this.getMapping().getValidationTextRange();
}
protected TextRange getAnnotationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java
index c4a7ab7..d20a993 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,14 +9,11 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOverrideRelationship2_0;
import org.eclipse.jpt.jpa.core.jpa2.resource.java.AssociationOverride2_0Annotation;
@@ -75,19 +72,19 @@
return this.getRelationship().getTypeMapping().validatesAgainstDatabase();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java
index 4bdd41b..8d9b3ee 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
@@ -20,10 +19,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTable;
import org.eclipse.jpt.jpa.core.context.java.JavaVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaVirtualOverrideRelationship2_0;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -124,10 +121,10 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (this.joinTable != null) {
- this.joinTable.validate(messages, reporter, astRoot);
+ this.joinTable.validate(messages, reporter);
}
}
@@ -135,19 +132,19 @@
return this.getRelationship().getTypeMapping().validatesAgainstDatabase();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java
index ec9d7da..7706287 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java
@@ -11,15 +11,14 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCollectionMapping2_0;
public class JavaMapKeyTemporalConverterValidator extends AbstractTemporalConverterValidator
{
- public JavaMapKeyTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
+ public JavaMapKeyTemporalConverterValidator(BaseTemporalConverter converter) {
+ super(converter);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
index cedad0c..87d1193 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaCacheable2_0;
@@ -60,7 +59,7 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getCacheableHolder().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getCacheableHolder().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
index c0259ae..1025653 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaSingleRelationshipMapping;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -87,7 +86,7 @@
return null;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
index 223f805..9a7a1bd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyColumn;
@@ -260,16 +259,16 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getNameTextRange() {
+ return this.getValidationTextRange();
}
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange();
}
public boolean tableNameIsInvalid() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
index 200f205..89ae8ab 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.java.JavaOrphanRemovable2_0;
@@ -55,7 +54,7 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getParent().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
index 1afa139..9f333f7 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java
@@ -72,13 +72,8 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.AttributeMappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.OverrideTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmAttributeMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideJoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AssociationOverrideValidator;
@@ -163,7 +158,7 @@
protected final OrmAttributeOverrideContainer mapKeyAttributeOverrideContainer;
protected final ContextListContainer<OrmJoinColumn, XmlJoinColumn> specifiedMapKeyJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner mapKeyJoinColumnOwner;
protected OrmJoinColumn defaultMapKeyJoinColumn;
@@ -438,8 +433,8 @@
protected class CollectionTableOwner
implements ReadOnlyTable.Owner
{
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return new CollectionTableValidator(AbstractOrmElementCollectionMapping2_0.this.getPersistentAttribute(), (CollectionTable2_0) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return new CollectionTableValidator(AbstractOrmElementCollectionMapping2_0.this.getPersistentAttribute(), (CollectionTable2_0) table);
}
}
@@ -1128,7 +1123,7 @@
return this.getContextNodeFactory().buildOrmJoinColumn(this, this.mapKeyJoinColumnOwner, xmlJoinColumn);
}
- protected OrmReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -1886,8 +1881,8 @@
return this.getMappingName();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new CollectionTableTableDescriptionProvider());
}
}
@@ -1916,8 +1911,8 @@
return this.getMappingName() + "_KEY"; //$NON-NLS-1$
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, (TableColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new MapKeyColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) column, new CollectionTableTableDescriptionProvider());
}
}
@@ -1945,23 +1940,23 @@
return MappingTools.resolveOverriddenRelationship(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) columnOwner, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return new AssociationOverrideJoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (ReadOnlyJoinColumn) column, (ReadOnlyJoinColumn.Owner) columnOwner, new CollectionTableTableDescriptionProvider());
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AssociationOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAssociationOverride) override, (AssociationOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
return JptValidator.Null.instance();
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
return JptValidator.Null.instance();
}
- public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
+ public JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table) {
return JptValidator.Null.instance();
}
}
@@ -1990,12 +1985,12 @@
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new AttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return new AttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new CollectionTableTableDescriptionProvider());
}
}
@@ -2023,19 +2018,19 @@
return MappingTools.resolveOverriddenColumn(this.getOverridableTypeMapping(), attributeName);
}
- public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container, OverrideTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, textRangeResolver, new EmbeddableOverrideDescriptionProvider());
+ public JptValidator buildOverrideValidator(ReadOnlyOverride override, OverrideContainer container) {
+ return new MapKeyAttributeOverrideValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, (AttributeOverrideContainer) container, new EmbeddableOverrideDescriptionProvider());
}
- public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner, TableColumnTextRangeResolver textRangeResolver) {
- return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyOverride override, ReadOnlyBaseColumn column, ReadOnlyBaseColumn.Owner columnOwner) {
+ return new MapKeyAttributeOverrideColumnValidator(this.getPersistentAttribute(), (ReadOnlyAttributeOverride) override, column, new CollectionTableTableDescriptionProvider());
}
}
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -2089,12 +2084,11 @@
return AbstractOrmElementCollectionMapping2_0.this.getValidationTextRange();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return new MapKeyJoinColumnValidator(
this.getPersistentAttribute(),
(ReadOnlyJoinColumn) column,
- this,
- (JoinColumnTextRangeResolver) textRangeResolver,
+ this,
new CollectionTableTableDescriptionProvider());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
index cb2c10d..fa916e2 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java
@@ -17,11 +17,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyJoinColumn;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.CollectionTableTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.JoinColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.GenericOrmReferenceTable;
@@ -44,7 +41,7 @@
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -112,7 +109,7 @@
* these point at the source/owning entity
*/
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -192,8 +189,8 @@
return GenericOrmCollectionTable2_0.this.getElementCollectionMapping();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, (JoinColumnTextRangeResolver) textRangeResolver, new CollectionTableTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new JoinColumnValidator(this.getPersistentAttribute(), (ReadOnlyJoinColumn) column, this, new CollectionTableTableDescriptionProvider());
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java
index ce3c95d..ee7a6d5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -13,9 +13,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOverrideRelationship2_0;
@@ -47,15 +45,15 @@
return this.getRelationship().getValidationTextRange();
}
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java
index 7913336..0b4c77e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -19,10 +19,8 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmVirtualJoinTableRelationshipStrategy;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
import org.eclipse.jpt.jpa.core.internal.context.MappingTools;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmVirtualOverrideRelationship2_0;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -138,15 +136,15 @@
return this.getRelationship().getValidationTextRange();
}
- public JptValidator buildTableValidator(ReadOnlyTable table, TableTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table, textRangeResolver);
+ public JptValidator buildTableValidator(ReadOnlyTable table) {
+ return this.getRelationship().buildJoinTableValidator((ReadOnlyJoinTable) table);
}
- public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableJoinColumnValidator(column, owner);
}
- public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver) {
- return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner, textRangeResolver);
+ public JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner) {
+ return this.getRelationship().buildJoinTableInverseJoinColumnValidator(column, owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java
index eb31b52..1dfb787 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java
@@ -11,15 +11,14 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmElementCollectionMapping2_0;
public class OrmElementCollectionTemporalConverterValidator extends AbstractTemporalConverterValidator
{
- public OrmElementCollectionTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
+ public OrmElementCollectionTemporalConverterValidator(BaseTemporalConverter converter) {
+ super(converter);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java
index 1e37f03..97331a5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java
@@ -11,15 +11,14 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCollectionMapping2_0;
public class OrmMapKeyTemporalConverterValidator extends AbstractTemporalConverterValidator
{
- public OrmMapKeyTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
+ public OrmMapKeyTemporalConverterValidator(BaseTemporalConverter converter) {
+ super(converter);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java
index 15a5e74..c14931f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java
@@ -11,14 +11,13 @@
import org.eclipse.jpt.jpa.core.context.BaseTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTemporalConverterValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
public class OrmTemporalConverterValidator extends AbstractTemporalConverterValidator
{
- public OrmTemporalConverterValidator(BaseTemporalConverter converter, ConverterTextRangeResolver textRangeResolver) {
- super(converter, textRangeResolver);
+ public OrmTemporalConverterValidator(BaseTemporalConverter converter) {
+ super(converter);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java
index b705048..293854f 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -13,9 +13,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
/**
* JPA 2.0
@@ -31,11 +29,11 @@
public interface AssociationOverrideContainer2_0
extends AssociationOverrideContainer
{
- JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table);
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owne);
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
// ********** owner **********
@@ -43,10 +41,10 @@
interface Owner
extends AssociationOverrideContainer.Owner
{
- JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table, TableTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableValidator(ReadOnlyAssociationOverride override, ReadOnlyTable table);
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyAssociationOverride override, ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java
index ca67250..0c0d64e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -12,9 +12,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyAssociationOverride;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
/**
* JPA 2.0
@@ -29,9 +27,9 @@
public interface ReadOnlyAssociationOverride2_0
extends ReadOnlyAssociationOverride
{
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableValidator(ReadOnlyJoinTable table);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java
index da67243..90bc2de 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -14,9 +14,7 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTable;
import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinTableRelationship;
import org.eclipse.jpt.jpa.core.context.ReadOnlyOverrideRelationship;
-import org.eclipse.jpt.jpa.core.internal.context.JoinColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
/**
* JPA 2.0 association override relationship
@@ -33,9 +31,9 @@
extends ReadOnlyOverrideRelationship,
ReadOnlyJoinTableRelationship
{
- JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner, JoinColumnTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableInverseJoinColumnValidator(ReadOnlyJoinColumn column, ReadOnlyJoinColumn.Owner owner);
- JptValidator buildJoinTableValidator(ReadOnlyJoinTable table, TableTextRangeResolver textRangeResolver);
+ JptValidator buildJoinTableValidator(ReadOnlyJoinTable table);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java
index 8deb0ad..b43f1cc 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2012 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.
@@ -9,12 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.jpa.core.jpa2.context.java;
-import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.jpa2.context.DerivedIdentity2_0;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
/**
* Java derived identity
@@ -25,7 +21,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.3
*/
public interface JavaDerivedIdentity2_0
@@ -36,6 +32,4 @@
JavaIdDerivedIdentityStrategy2_0 getIdDerivedIdentityStrategy();
JavaMapsIdDerivedIdentityStrategy2_0 getMapsIdDerivedIdentityStrategy();
-
- void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java
index 2b0793d..14cb26e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java
@@ -17,7 +17,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaBaseTemporalConverter;
import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.JavaMapKeyTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
@@ -63,8 +62,8 @@
@Override
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new JavaMapKeyTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new JavaMapKeyTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java
index ce24f39..3e24e49 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java
@@ -17,7 +17,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.resource.orm.EnumType;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlMapKeyConvertibleMapping_2_0;
@@ -71,7 +70,7 @@
return mapping.getMapKeyEnumeratedTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
+ public JptValidator buildValidator(Converter converter) {
return JptValidator.Null.instance();
}
};
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java
index b63d328..b5daa9c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java
@@ -17,7 +17,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.orm.OrmMapKeyTemporalConverterValidator;
import org.eclipse.jpt.jpa.core.resource.orm.TemporalType;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
@@ -72,8 +71,8 @@
return mapping.getMapKeyTemporalTextRange();
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new OrmMapKeyTemporalConverterValidator((BaseTemporalConverter) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new OrmMapKeyTemporalConverterValidator((BaseTemporalConverter) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java
index c10376f..2b29950 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java
Binary files differ
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java
index 0169a52..5da9b35 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2012 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.
@@ -22,21 +22,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface JavaReadOnlyTenantDiscriminatorColumn2_3
extends JavaReadOnlyNamedDiscriminatorColumn, ReadOnlyTenantDiscriminatorColumn2_3, JavaReadOnlyTableColumn
{
- // ********** owner **********
-
- /**
- * interface allowing tenant discriminator columns to be used in multiple places
- */
- interface Owner
- extends ReadOnlyTenantDiscriminatorColumn2_3.Owner, JavaReadOnlyNamedDiscriminatorColumn.Owner
- {
- //combining interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java
index 8879430..c0ee833 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -22,21 +22,11 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 3.1
+ * @version 3.3
* @since 3.1
*/
public interface OrmReadOnlyTenantDiscriminatorColumn2_3
extends OrmReadOnlyNamedDiscriminatorColumn, ReadOnlyTenantDiscriminatorColumn2_3, OrmReadOnlyTableColumn
{
- // ********** owner **********
-
- /**
- * interface allowing discriminator columns to be used in multiple places
- */
- interface Owner
- extends ReadOnlyTenantDiscriminatorColumn2_3.Owner, OrmReadOnlyNamedDiscriminatorColumn.Owner
- {
- //combining interfaces
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java
index 83698b0..ea43886 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java
@@ -24,7 +24,6 @@
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IType;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
-import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.ArrayTools;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.NonEmptyStringFilter;
@@ -1015,7 +1014,7 @@
EclipseLinkJpaValidationMessages.CONVERTER_DUPLICATE_NAME,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -1054,20 +1053,13 @@
}
// TODO bjv isn't it obvious?
- protected TextRange extractNameTextRange(EclipseLinkConverter converter) {
- return (converter instanceof OrmEclipseLinkConverter<?>) ?
- ((OrmEclipseLinkConverter<?>) converter).getNameTextRange() :
- ((JavaEclipseLinkConverter<?>) converter).getNameTextRange(null);
- }
-
- // TODO bjv isn't it obvious?
protected void validate(EclipseLinkConverter converter, List<IMessage> messages, IReporter reporter) {
if (converter instanceof OrmEclipseLinkConverter<?>) {
((OrmEclipseLinkConverter<?>) converter).validate(messages, reporter);
} else {
JavaEclipseLinkConverter<?> javaConverter = (JavaEclipseLinkConverter<?>) converter;
if (this.converterSupportsValidationMessages(javaConverter)) {
- javaConverter.validate(messages, reporter, null);
+ javaConverter.validate(messages, reporter);
}
}
}
@@ -1088,7 +1080,7 @@
EclipseLinkJpaValidationMessages.GENERATOR_EQUIVALENT,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -1113,7 +1105,7 @@
EclipseLinkJpaValidationMessages.QUERY_EQUIVALENT,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/AbstractEclipseLinkTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/AbstractEclipseLinkTypeMappingValidator.java
index 0ada0fb..3b339dd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/AbstractEclipseLinkTypeMappingValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/AbstractEclipseLinkTypeMappingValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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.
@@ -12,7 +12,6 @@
import java.util.List;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractTypeMappingValidator;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.jpt.jpa.eclipselink.core.internal.DefaultEclipseLinkJpaValidationMessages;
@@ -22,8 +21,8 @@
public abstract class AbstractEclipseLinkTypeMappingValidator<T extends TypeMapping>
extends AbstractTypeMappingValidator<T>
{
- protected AbstractEclipseLinkTypeMappingValidator(T typeMapping, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
- super(typeMapping, jrt, textRangeResolver);
+ protected AbstractEclipseLinkTypeMappingValidator(T typeMapping, JavaResourceType jrt) {
+ super(typeMapping, jrt);
}
@@ -43,7 +42,7 @@
msgID,
new String[] {this.typeMapping.getName()},
this.typeMapping,
- this.textRangeResolver.getTypeMappingTextRange()
+ this.typeMapping.getValidationTextRange()
);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkConvertValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkConvertValidator.java
index 8a9057b..45a51c9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkConvertValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkConvertValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -14,7 +14,6 @@
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jpa.core.context.AttributeMapping;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConvert;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit;
import org.eclipse.jpt.jpa.eclipselink.core.internal.DefaultEclipseLinkJpaValidationMessages;
@@ -27,13 +26,10 @@
{
protected final EclipseLinkConvert convert;
- protected final ConverterTextRangeResolver textRangeResolver;
-
- public EclipseLinkConvertValidator(EclipseLinkConvert convert, ConverterTextRangeResolver textRangeResolver) {
+ public EclipseLinkConvertValidator(EclipseLinkConvert convert) {
super();
this.convert = convert;
- this.textRangeResolver = textRangeResolver;
}
protected AttributeMapping getAttributeMapping() {
@@ -77,7 +73,7 @@
this.getAttributeMapping().getName()
},
this.getAttributeMapping(),
- this.textRangeResolver.getConverterTextRange()
+ this.convert.getValidationTextRange()
)
);
return false;
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkDynamicTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkDynamicTypeMappingValidator.java
index 947aecf..db4da9a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkDynamicTypeMappingValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkDynamicTypeMappingValidator.java
@@ -18,7 +18,7 @@
extends AbstractEclipseLinkTypeMappingValidator<TypeMapping>
{
public EclipseLinkDynamicTypeMappingValidator(TypeMapping typeMapping) {
- super(typeMapping, null, null);
+ super(typeMapping, null);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkEntityPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkEntityPrimaryKeyValidator.java
index 29a3a3f..d56ca69 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkEntityPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkEntityPrimaryKeyValidator.java
@@ -13,7 +13,6 @@
import java.util.List;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractEntityPrimaryKeyValidator;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -26,9 +25,9 @@
extends AbstractEntityPrimaryKeyValidator
{
public EclipseLinkEntityPrimaryKeyValidator(
- EclipseLinkEntity entity, PrimaryKeyTextRangeResolver textRangeResolver) {
+ EclipseLinkEntity entity) {
- super(entity, textRangeResolver);
+ super(entity);
}
@@ -49,7 +48,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REDEFINED,
new String[0],
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassPrimaryKeyValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassPrimaryKeyValidator.java
index b3b97d2..52b5068 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassPrimaryKeyValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassPrimaryKeyValidator.java
@@ -13,7 +13,6 @@
import java.util.List;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
-import org.eclipse.jpt.jpa.core.internal.context.PrimaryKeyTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractMappedSuperclassPrimaryKeyValidator;
import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
@@ -26,9 +25,9 @@
extends AbstractMappedSuperclassPrimaryKeyValidator
{
public EclipseLinkMappedSuperclassPrimaryKeyValidator(
- EclipseLinkMappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
+ EclipseLinkMappedSuperclass mappedSuperclass) {
- super(mappedSuperclass, textRangeResolver);
+ super(mappedSuperclass);
}
@@ -49,7 +48,7 @@
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REDEFINED,
new String[0],
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassValidator.java
index aab2123..fe4a009 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle.
+ * Copyright (c) 2010, 2012 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
@@ -13,15 +13,14 @@
import java.util.List;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jpa.core.context.MappedSuperclass;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
public class EclipseLinkMappedSuperclassValidator
extends AbstractEclipseLinkTypeMappingValidator<MappedSuperclass>
{
- public EclipseLinkMappedSuperclassValidator(MappedSuperclass mappedSuperclass, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
- super(mappedSuperclass, jrt, textRangeResolver);
+ public EclipseLinkMappedSuperclassValidator(MappedSuperclass mappedSuperclass, JavaResourceType jrt) {
+ super(mappedSuperclass, jrt);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkPersistentAttributeValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkPersistentAttributeValidator.java
index 1a0f14d..7e96c78 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkPersistentAttributeValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkPersistentAttributeValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2010, 2012 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,7 +11,6 @@
import java.util.List;
import org.eclipse.jpt.jpa.core.context.ReadOnlyPersistentAttribute;
-import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractPersistentAttributeValidator;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -19,9 +18,9 @@
extends AbstractPersistentAttributeValidator
{
public EclipseLinkPersistentAttributeValidator(
- ReadOnlyPersistentAttribute persistentAttribute, PersistentAttributeTextRangeResolver textRangeResolver)
+ ReadOnlyPersistentAttribute persistentAttribute)
{
- super(persistentAttribute, textRangeResolver);
+ super(persistentAttribute);
}
/**
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkTypeMappingValidator.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkTypeMappingValidator.java
index a2f720f..82704c5 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkTypeMappingValidator.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkTypeMappingValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 Oracle.
+ * Copyright (c) 2010, 2012 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
@@ -12,12 +12,11 @@
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
-import org.eclipse.jpt.jpa.core.internal.context.TypeMappingTextRangeResolver;
public class EclipseLinkTypeMappingValidator
extends AbstractEclipseLinkTypeMappingValidator<TypeMapping>
{
- public EclipseLinkTypeMappingValidator(TypeMapping typeMapping, JavaResourceType jrt, TypeMappingTextRangeResolver textRangeResolver) {
- super(typeMapping, jrt, textRangeResolver);
+ public EclipseLinkTypeMappingValidator(TypeMapping typeMapping, JavaResourceType jrt) {
+ super(typeMapping, jrt);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/TenantDiscriminatorColumnValidator2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/TenantDiscriminatorColumnValidator2_3.java
index 0ca15e5..d2f4495 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/TenantDiscriminatorColumnValidator2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/TenantDiscriminatorColumnValidator2_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.AbstractNamedColumnValidator;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3;
@@ -19,12 +18,11 @@
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
public class TenantDiscriminatorColumnValidator2_3
- extends AbstractNamedColumnValidator<ReadOnlyTenantDiscriminatorColumn2_3, NamedColumnTextRangeResolver>
+ extends AbstractNamedColumnValidator<ReadOnlyTenantDiscriminatorColumn2_3>
{
public TenantDiscriminatorColumnValidator2_3(
- ReadOnlyTenantDiscriminatorColumn2_3 namedColumn,
- NamedColumnTextRangeResolver textRangeResolver) {
- super(namedColumn, textRangeResolver, new EntityTableDescriptionProvider());
+ ReadOnlyTenantDiscriminatorColumn2_3 namedColumn) {
+ super(namedColumn, new EntityTableDescriptionProvider());
}
@Override
@@ -42,7 +40,7 @@
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -93,7 +91,7 @@
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTenantDiscriminatorColumn2_3.java
index 4d558ee..6abdf9c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTenantDiscriminatorColumn2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTenantDiscriminatorColumn2_3.java
@@ -16,10 +16,9 @@
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaNamedColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.AbstractJavaNamedDiscriminatorColumn;
+import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLinkTenantDiscriminatorColumnAnnotation2_3;
@@ -28,7 +27,7 @@
* Java tenant discriminator column
*/
public class EclipseLinkJavaTenantDiscriminatorColumn2_3
- extends AbstractJavaNamedDiscriminatorColumn<EclipseLinkTenantDiscriminatorColumnAnnotation2_3, JavaReadOnlyTenantDiscriminatorColumn2_3.Owner>
+ extends AbstractJavaNamedDiscriminatorColumn<EclipseLinkTenantDiscriminatorColumnAnnotation2_3, ReadOnlyTenantDiscriminatorColumn2_3.Owner>
implements JavaTenantDiscriminatorColumn2_3
{
/** @see AbstractJavaNamedColumn#AbstractJavaNamedColumn(JavaJpaContextNode, org.eclipse.jpt.jpa.core.context.java.JavaReadOnlyNamedColumn.Owner, org.eclipse.jpt.jpa.core.resource.java.NamedColumnAnnotation) */
@@ -43,7 +42,7 @@
protected Boolean specifiedPrimaryKey;
protected boolean defaultPrimaryKey = DEFAULT_PRIMARY_KEY;
- public EclipseLinkJavaTenantDiscriminatorColumn2_3(JavaEclipseLinkMultitenancyImpl2_3 parent, JavaReadOnlyTenantDiscriminatorColumn2_3.Owner owner, EclipseLinkTenantDiscriminatorColumnAnnotation2_3 columnAnnotation) {
+ public EclipseLinkJavaTenantDiscriminatorColumn2_3(JavaEclipseLinkMultitenancyImpl2_3 parent, ReadOnlyTenantDiscriminatorColumn2_3.Owner owner, EclipseLinkTenantDiscriminatorColumnAnnotation2_3 columnAnnotation) {
super(parent, owner, columnAnnotation);
this.specifiedTable = this.buildSpecifiedTable();
this.specifiedContextProperty = this.buildSpecifiedContextProperty();
@@ -130,8 +129,8 @@
return this.owner.getDefaultTableName();
}
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange(), astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getTableTextRange());
}
@@ -177,8 +176,8 @@
return this.owner.getDefaultContextPropertyName();
}
- public TextRange getContextPropertyTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getColumnAnnotation().getContextPropertyTextRange(), astRoot);
+ public TextRange getContextPropertyTextRange() {
+ return this.getValidationTextRange(this.getColumnAnnotation().getContextPropertyTextRange());
}
@@ -273,9 +272,4 @@
public boolean tableNameIsInvalid() {
return this.owner.tableNameIsInvalid(this.getTable());
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTimeOfDay.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTimeOfDay.java
index d04f0dc..b33766c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTimeOfDay.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTimeOfDay.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkTimeOfDay;
@@ -140,8 +139,8 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.todAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getCaching().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.todAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getCaching().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3.java
index cc66614..a2e8a96 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3.java
@@ -9,21 +9,17 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaVirtualNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.internal.context.java.JavaTableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3;
-import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaVirtualTenantDiscriminatorColumn2_3;
/**
* Java virtual tenant discriminator column
*/
public class EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3
- extends AbstractJavaVirtualNamedDiscriminatorColumn<JavaReadOnlyTenantDiscriminatorColumn2_3.Owner, ReadOnlyTenantDiscriminatorColumn2_3>
+ extends AbstractJavaVirtualNamedDiscriminatorColumn<ReadOnlyTenantDiscriminatorColumn2_3.Owner, ReadOnlyTenantDiscriminatorColumn2_3>
implements JavaVirtualTenantDiscriminatorColumn2_3
{
protected final ReadOnlyTenantDiscriminatorColumn2_3 overriddenColumn;
@@ -38,7 +34,7 @@
protected boolean defaultPrimaryKey;
- public EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3(JavaJpaContextNode parent, JavaReadOnlyTenantDiscriminatorColumn2_3.Owner owner, ReadOnlyTenantDiscriminatorColumn2_3 overriddenColumn) {
+ public EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3(JavaJpaContextNode parent, ReadOnlyTenantDiscriminatorColumn2_3.Owner owner, ReadOnlyTenantDiscriminatorColumn2_3 overriddenColumn) {
super(parent, owner);
this.overriddenColumn = overriddenColumn;
}
@@ -186,12 +182,7 @@
// ********** validation **********
- public TextRange getTableTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(astRoot);
- }
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver(CompilationUnit astRoot) {
- return new JavaTableColumnTextRangeResolver(this, astRoot);
+ public TextRange getTableTextRange() {
+ return this.getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkArrayMapping2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkArrayMapping2_3.java
index 082ca1d..814459c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkArrayMapping2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkArrayMapping2_3.java
@@ -31,8 +31,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.jpa.core.context.java.JavaTemporalConverter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaAttributeMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
@@ -297,8 +295,8 @@
return this.getTypeMapping().getAllAssociatedTableNames();
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
// ********** Java completion proposals **********
@@ -324,9 +322,9 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.column.validate(messages, reporter, astRoot);
- this.converter.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.column.validate(messages, reporter);
+ this.converter.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkBasicMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkBasicMapping.java
index 131a82a..912f542 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkBasicMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkBasicMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
@@ -105,8 +104,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mutable.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mutable.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCachingImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCachingImpl.java
index ff5600b..68aac4c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCachingImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCachingImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -629,12 +628,12 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateExpiry(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateExpiry(messages);
}
- protected void validateExpiry(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateExpiry(List<IMessage> messages) {
if ((this.expiry != null) && (this.expiryTimeOfDay != null)) {
messages.add(
DefaultEclipseLinkJpaValidationMessages.buildMessage(
@@ -642,14 +641,14 @@
EclipseLinkJpaValidationMessages.CACHE_EXPIRY_AND_EXPIRY_TIME_OF_DAY_BOTH_SPECIFIED,
new String[] {this.getPersistentType().getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getCacheAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getCacheAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkChangeTracking.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkChangeTracking.java
index b391bc8..6f0abb9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkChangeTracking.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkChangeTracking.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
@@ -130,13 +129,13 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
EclipseLinkChangeTrackingAnnotation annotation = this.getChangeTrackingAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConversionValue.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConversionValue.java
index 41c83ce..efe66b8 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConversionValue.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConversionValue.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -103,21 +102,21 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
}
- public TextRange getDataValueTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.conversionValueAnnotation.getDataValueTextRange(), astRoot);
+ public TextRange getDataValueTextRange() {
+ return this.getValidationTextRange(this.conversionValueAnnotation.getDataValueTextRange());
}
- protected TextRange getObjectValueTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.conversionValueAnnotation.getObjectValueTextRange(), astRoot);
+ protected TextRange getObjectValueTextRange() {
+ return this.getValidationTextRange(this.conversionValueAnnotation.getObjectValueTextRange());
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.conversionValueAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getObjectTypeConverter().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.conversionValueAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getObjectTypeConverter().getValidationTextRange();
}
public boolean isEquivalentTo(EclipseLinkConversionValue conversionValue) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConvert.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConvert.java
index 5704051..5e4592c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConvert.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConvert.java
@@ -21,7 +21,6 @@
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.AbstractJavaConverter;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConvert;
import org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit;
@@ -190,8 +189,8 @@
@Override
protected Owner buildOwner() {
return new Owner() {
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new EclipseLinkConvertValidator((EclipseLinkConvert) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new EclipseLinkConvertValidator((EclipseLinkConvert) converter);
}
};
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverter.java
index 0b15ca6..b2fb77c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.ArrayTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -116,12 +115,12 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateName(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateName(messages);
}
- protected void validateName(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateName(List<IMessage> messages) {
if (StringTools.stringIsEmpty(this.name)) {
messages.add(
DefaultEclipseLinkJpaValidationMessages.buildMessage(
@@ -129,7 +128,7 @@
EclipseLinkJpaValidationMessages.CONVERTER_NAME_UNDEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
return;
@@ -142,19 +141,19 @@
EclipseLinkJpaValidationMessages.RESERVED_CONVERTER_NAME,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
}
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.converterAnnotation.getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.converterAnnotation.getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
- public TextRange getNameTextRange(CompilationUnit astRoot){
- return this.getValidationTextRange(this.getConverterAnnotation().getNameTextRange(), astRoot);
+ public TextRange getNameTextRange(){
+ return this.getValidationTextRange(this.getConverterAnnotation().getNameTextRange());
}
public boolean isEquivalentTo(JpaNamedContextNode node) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterClassConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterClassConverter.java
index 549acbf..a2eafbf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterClassConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterClassConverter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -98,12 +97,12 @@
//************ validation ***************
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateConverterClass(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateConverterClass(messages);
}
- protected void validateConverterClass(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateConverterClass(List<IMessage> messages) {
if (this.converterClass == null) {
// the annotation will have a compile error if its converter class is missing
return;
@@ -115,14 +114,14 @@
IMessage.HIGH_SEVERITY,
EclipseLinkJpaValidationMessages.CONVERTER_CLASS_DEFINED,
this,
- this.getConverterClassTextRange(astRoot)
+ this.getConverterClassTextRange()
)
);
return;
}
if ( ! this.converterClassExists()) {
- this.addConverterClassDoesNotExistMessageTo(messages, astRoot);
+ this.addConverterClassDoesNotExistMessageTo(messages);
return;
}
@@ -133,20 +132,20 @@
this.getEclipseLinkConverterInterfaceErrorMessage(),
new String[] {this.getFullyQualifiedConverterClass()},
this,
- this.getConverterClassTextRange(astRoot)
+ this.getConverterClassTextRange()
)
);
}
}
- protected void addConverterClassDoesNotExistMessageTo(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void addConverterClassDoesNotExistMessageTo(List<IMessage> messages) {
messages.add(
DefaultEclipseLinkJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
EclipseLinkJpaValidationMessages.CONVERTER_CLASS_EXISTS,
new String[] {this.getFullyQualifiedConverterClass()},
this,
- this.getConverterClassTextRange(astRoot)
+ this.getConverterClassTextRange()
)
);
}
@@ -167,8 +166,8 @@
return this.typeImplementsInterface(this.getFullyQualifiedConverterClass(), interfaceName);
}
- protected TextRange getConverterClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getAnnotationConverterClassTextRange(), astRoot);
+ protected TextRange getConverterClassTextRange() {
+ return this.getValidationTextRange(this.getAnnotationConverterClassTextRange());
}
protected abstract TextRange getAnnotationConverterClassTextRange();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterContainerImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterContainerImpl.java
index 48f7bce..2d5fe91 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterContainerImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterContainerImpl.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -462,13 +461,13 @@
* @see org.eclipse.jpt.jpa.eclipselink.core.context.persistence.EclipseLinkPersistenceUnit#validateConverters(List, IReporter)
*/
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
// converters are validated in the persistence unit
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getJavaResourceAnnotatedElement().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getParent().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getJavaResourceAnnotatedElement().getTextRange();
+ return (textRange != null) ? textRange : this.getParent().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomConverter.java
index 70b7d67..e13d9e3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomConverter.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCustomConverter;
import org.eclipse.jpt.jpa.eclipselink.core.context.java.JavaEclipseLinkConverterContainer;
@@ -94,7 +93,7 @@
}
@Override
- protected void addConverterClassDoesNotExistMessageTo(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void addConverterClassDoesNotExistMessageTo(List<IMessage> messages) {
// no need to add message since there will already be a compiler error
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java
index 55c2757..1bf6231 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java
@@ -11,7 +11,6 @@
import java.util.List;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -158,12 +157,12 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.validateCustomizerClass(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateCustomizerClass(messages);
}
- protected void validateCustomizerClass(List<IMessage> messages,CompilationUnit astRoot) {
+ protected void validateCustomizerClass(List<IMessage> messages) {
if (this.getFullyQualifiedCustomizerClass() == null) {
return;
}
@@ -180,30 +179,41 @@
EclipseLinkJpaValidationMessages.DESCRIPTOR_CUSTOMIZER_CLASS_NOT_VALID,
new String[] {this.getFullyQualifiedCustomizerClass()},
this,
- this.getCustomizerClassTextRange(astRoot)
+ this.getCustomizerClassTextRange()
)
);
}
- EclipseLinkCustomizerAnnotation annotation = this.getCustomizerAnnotation();
- if (!annotation.customizerClassImplementsInterface(ECLIPSELINK_DESCRIPTOR_CUSTOMIZER_CLASS_NAME, astRoot)) {
+ if (!customizerClassImplementsInterface(ECLIPSELINK_DESCRIPTOR_CUSTOMIZER_CLASS_NAME)) {
messages.add(
DefaultEclipseLinkJpaValidationMessages.buildMessage(
IMessage.HIGH_SEVERITY,
EclipseLinkJpaValidationMessages.DESCRIPTOR_CUSTOMIZER_CLASS_IMPLEMENTS_DESCRIPTOR_CUSTOMIZER,
new String[] {this.getFullyQualifiedCustomizerClass()},
this,
- this.getCustomizerClassTextRange(astRoot)
+ this.getCustomizerClassTextRange()
)
);
}
}
- protected TextRange getCustomizerClassTextRange(CompilationUnit astRoot) {
- return this.getValidationTextRange(this.getCustomizerAnnotation().getValueTextRange(), astRoot);
+ protected boolean customizerClassImplementsInterface(String interfaceName) {
+ return this.typeImplementsInterface(this.getFullyQualifiedCustomizerClass(), interfaceName);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getCustomizerAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ /**
+ * Add <code>null</code> check.
+ */
+ protected boolean typeImplementsInterface(String typeName, String interfaceName) {
+ return (typeName != null) &&
+ JDTTools.typeIsSubType(this.getJavaProject(), typeName, interfaceName);
+ }
+
+ protected TextRange getCustomizerClassTextRange() {
+ return this.getValidationTextRange(this.getCustomizerAnnotation().getValueTextRange());
+ }
+
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getCustomizerAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkElementCollectionMapping2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkElementCollectionMapping2_0.java
index f2ba879..74945d2 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkElementCollectionMapping2_0.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkElementCollectionMapping2_0.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
@@ -104,8 +103,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinFetch.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinFetch.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEmbeddableImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEmbeddableImpl.java
index aa64876..87a5002 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEmbeddableImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEmbeddableImpl.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.utility.internal.NotNullFilter;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
@@ -156,15 +155,15 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.converterContainer.validate(messages, reporter, astRoot);
- this.changeTracking.validate(messages, reporter, astRoot);
- this.customizer.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.converterContainer.validate(messages, reporter);
+ this.changeTracking.validate(messages, reporter);
+ this.customizer.validate(messages, reporter);
}
@Override
- protected JptValidator buildTypeMappingValidator(CompilationUnit astRoot) {
- return new EclipseLinkTypeMappingValidator(this, this.getJavaResourceType(), this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildTypeMappingValidator() {
+ return new EclipseLinkTypeMappingValidator(this, this.getJavaResourceType());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEntityImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEntityImpl.java
index 324e1e2..d9e9956 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEntityImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEntityImpl.java
@@ -17,7 +17,6 @@
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
-import org.eclipse.jpt.jpa.core.JpaPlatform.Version;
import org.eclipse.jpt.jpa.core.context.AttributeMapping;
import org.eclipse.jpt.jpa.core.context.InheritanceType;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
@@ -39,7 +38,6 @@
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkJpaPlatformVersion;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkEntityPrimaryKeyValidator;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkTypeMappingValidator;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.plugin.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLinkClassExtractorAnnotation2_1;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -276,23 +274,23 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.caching.validate(messages, reporter, astRoot);
- this.readOnly.validate(messages, reporter, astRoot);
- this.converterContainer.validate(messages, reporter, astRoot);
- this.changeTracking.validate(messages, reporter, astRoot);
- this.customizer.validate(messages, reporter, astRoot);
- this.multitenancy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.caching.validate(messages, reporter);
+ this.readOnly.validate(messages, reporter);
+ this.converterContainer.validate(messages, reporter);
+ this.changeTracking.validate(messages, reporter);
+ this.customizer.validate(messages, reporter);
+ this.multitenancy.validate(messages, reporter);
}
@Override
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new EclipseLinkEntityPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildPrimaryKeyValidator() {
+ return new EclipseLinkEntityPrimaryKeyValidator(this);
}
@Override
- protected JptValidator buildTypeMappingValidator(CompilationUnit astRoot) {
- return new EclipseLinkTypeMappingValidator(this, this.getJavaResourceType(), buildTextRangeResolver(astRoot));
+ protected JptValidator buildTypeMappingValidator() {
+ return new EclipseLinkTypeMappingValidator(this, this.getJavaResourceType());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkIdMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkIdMapping.java
index 584749b..7915869 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkIdMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkIdMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
import org.eclipse.jpt.jpa.core.context.java.JavaConverter;
@@ -102,8 +101,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mutable.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mutable.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkJoinFetch.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkJoinFetch.java
index fcb9dd1..21edcc4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkJoinFetch.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkJoinFetch.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
@@ -124,13 +123,13 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
EclipseLinkJoinFetchAnnotation annotation = this.getJoinFetchAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToManyMapping.java
index b169bd9..a20c7e1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToManyMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToManyMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
@@ -90,8 +89,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinFetch.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinFetch.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToOneMapping.java
index 2c1a526..84907a9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToOneMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToOneMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
@@ -89,8 +88,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinFetch.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinFetch.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMappedSuperclassImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMappedSuperclassImpl.java
index a7691ed..e18d42e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMappedSuperclassImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMappedSuperclassImpl.java
@@ -38,7 +38,6 @@
import org.eclipse.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaPlatformFactory.EclipseLinkJpaPlatformVersion;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkMappedSuperclassPrimaryKeyValidator;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkMappedSuperclassValidator;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.plugin.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -253,23 +252,23 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.caching.validate(messages, reporter, astRoot);
- this.readOnly.validate(messages, reporter, astRoot);
- this.converterContainer.validate(messages, reporter, astRoot);
- this.changeTracking.validate(messages, reporter, astRoot);
- this.customizer.validate(messages, reporter, astRoot);
- this.multitenancy.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.caching.validate(messages, reporter);
+ this.readOnly.validate(messages, reporter);
+ this.converterContainer.validate(messages, reporter);
+ this.changeTracking.validate(messages, reporter);
+ this.customizer.validate(messages, reporter);
+ this.multitenancy.validate(messages, reporter);
}
@Override
- protected JptValidator buildPrimaryKeyValidator(CompilationUnit astRoot) {
- return new EclipseLinkMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildPrimaryKeyValidator() {
+ return new EclipseLinkMappedSuperclassPrimaryKeyValidator(this);
}
@Override
- protected JptValidator buildTypeMappingValidator(CompilationUnit astRoot) {
- return new EclipseLinkMappedSuperclassValidator(this, this.getJavaResourceType(), this.buildTextRangeResolver(astRoot));
+ protected JptValidator buildTypeMappingValidator() {
+ return new EclipseLinkMappedSuperclassValidator(this, this.getJavaResourceType());
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMultitenancyImpl2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMultitenancyImpl2_3.java
index 821a4f6..5b8a6ac 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMultitenancyImpl2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMultitenancyImpl2_3.java
@@ -30,7 +30,6 @@
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkEntity;
@@ -70,7 +69,7 @@
protected Boolean specifiedIncludeCriteria;
protected boolean defaultIncludeCriteria = DEFAULT_INCLUDE_CRITERIA;
- protected final JavaReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
+ protected final ReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
protected final ContextListContainer<JavaTenantDiscriminatorColumn2_3, EclipseLinkTenantDiscriminatorColumnAnnotation2_3> specifiedTenantDiscriminatorColumnContainer;
protected final ContextListContainer<JavaVirtualTenantDiscriminatorColumn2_3, ReadOnlyTenantDiscriminatorColumn2_3> defaultTenantDiscriminatorColumnContainer;
@@ -327,7 +326,7 @@
return container;
}
- protected JavaReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -463,7 +462,7 @@
// ********** JavaReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements JavaReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -502,12 +501,12 @@
return getTypeMapping().tableNameIsInvalid(tableName);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new TenantDiscriminatorColumnValidator2_3((ReadOnlyTenantDiscriminatorColumn2_3) column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new TenantDiscriminatorColumnValidator2_3((ReadOnlyTenantDiscriminatorColumn2_3) column);
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return JavaEclipseLinkMultitenancyImpl2_3.this.getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return JavaEclipseLinkMultitenancyImpl2_3.this.getValidationTextRange();
}
}
@@ -526,8 +525,8 @@
return (EclipseLinkMultitenantAnnotation2_3) this.getJavaResourceType().getNonNullAnnotation(this.getMultitenantAnnotationName());
}
- protected TextRange getMultitenantAnnotationTextRange(CompilationUnit astRoot) {
- return this.getMultitenantAnnotation().getTextRange(astRoot);
+ protected TextRange getMultitenantAnnotationTextRange() {
+ return this.getMultitenantAnnotation().getTextRange();
}
public boolean isMultitenantAnnotationSpecified() {
@@ -673,8 +672,8 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
if (getSpecifiedType() == EclipseLinkMultitenantType2_3.TABLE_PER_TENANT && ! this.getJpaPlatformVersion().isCompatibleWithEclipseLinkVersion(EclipseLink2_4JpaPlatformFactory.VERSION)) {
messages.add(
DefaultEclipseLinkJpaValidationMessages.buildMessage(
@@ -682,7 +681,7 @@
EclipseLinkJpaValidationMessages.MULTITENANT_TABLE_PER_TENANT_NOT_SUPPORTED,
EMPTY_STRING_ARRAY,
this,
- this.getMultitenantAnnotationTextRange(astRoot)
+ this.getMultitenantAnnotationTextRange()
)
);
}
@@ -695,7 +694,7 @@
EclipseLinkJpaValidationMessages.MULTITENANT_VPD_MIGHT_NOT_BE_NOT_SUPPORTED,
EMPTY_STRING_ARRAY,
this,
- this.getMultitenantAnnotationTextRange(astRoot)
+ this.getMultitenantAnnotationTextRange()
)
);
}
@@ -706,7 +705,7 @@
EclipseLinkJpaValidationMessages.MULTITENANT_VPD_NOT_SUPPORTED_ON_NON_ORACLE_DATABASE_PLATFORM,
new String[] {targetDatabase},
this,
- this.getMultitenantAnnotationTextRange(astRoot)
+ this.getMultitenantAnnotationTextRange()
)
);
}
@@ -719,13 +718,13 @@
EclipseLinkJpaValidationMessages.MULTITENANT_METADATA_CANNOT_BE_SPECIFIED_ON_NON_ROOT_ENTITY,
EMPTY_STRING_ARRAY,
this,
- this.getJavaResourceType().getTextRange(EclipseLinkTenantDiscriminatorColumnAnnotation2_3.ANNOTATION_NAME, astRoot)
+ this.getJavaResourceType().getTextRange(EclipseLinkTenantDiscriminatorColumnAnnotation2_3.ANNOTATION_NAME)
)
);
}
else if (this.isMultitenantAnnotationSpecified()) {
for (JavaTenantDiscriminatorColumn2_3 column : this.getSpecifiedTenantDiscriminatorColumns()) {
- column.validate(messages, reporter, astRoot);
+ column.validate(messages, reporter);
}
}
else {
@@ -735,7 +734,7 @@
EclipseLinkJpaValidationMessages.MULTITENANT_NOT_SPECIFIED_WITH_TENANT_DISCRIMINATOR_COLUMNS,
EMPTY_STRING_ARRAY,
this,
- this.getJavaResourceType().getTextRange(EclipseLinkTenantDiscriminatorColumnAnnotation2_3.ANNOTATION_NAME, astRoot)
+ this.getJavaResourceType().getTextRange(EclipseLinkTenantDiscriminatorColumnAnnotation2_3.ANNOTATION_NAME)
)
);
}
@@ -743,7 +742,7 @@
if (this.specifiedTenantDiscriminatorColumnsAllowed()) {
//bug 360731 no need to validate, they will be validated where they are specified
for (JavaVirtualTenantDiscriminatorColumn2_3 column : this.getDefaultTenantDiscriminatorColumns()) {
- column.validate(messages, reporter, astRoot);
+ column.validate(messages, reporter);
}
}
if (this.getSpecifiedIncludeCriteria() == Boolean.TRUE && getType() == EclipseLinkMultitenantType2_3.VPD) {
@@ -764,8 +763,8 @@
return (EclipseLinkJpaPlatformVersion) super.getJpaPlatformVersion();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getMultitenantAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getMultitenantAnnotation().getTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMutable.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMutable.java
index 69bc1de..790c1f4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMutable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMutable.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
@@ -165,13 +164,13 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
EclipseLinkMutableAnnotation annotation = this.getMutableAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkObjectTypeConverter.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkObjectTypeConverter.java
index 8be199c..2d791f2 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkObjectTypeConverter.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkObjectTypeConverter.java
@@ -12,7 +12,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.Tools;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -265,15 +264,15 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.checkForDuplicateDataValues(messages, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.checkForDuplicateDataValues(messages);
for (JavaEclipseLinkConversionValue conversionValue : this.getConversionValues()) {
- conversionValue.validate(messages, reporter, astRoot);
+ conversionValue.validate(messages, reporter);
}
}
- protected void checkForDuplicateDataValues(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void checkForDuplicateDataValues(List<IMessage> messages) {
for (ArrayList<JavaEclipseLinkConversionValue> dups : this.mapConversionValuesByDataValue().values()) {
if (dups.size() > 1) {
for (JavaEclipseLinkConversionValue dup : dups) {
@@ -283,7 +282,7 @@
EclipseLinkJpaValidationMessages.MULTIPLE_OBJECT_VALUES_FOR_DATA_VALUE,
new String[] {dup.getDataValue()},
this,
- dup.getDataValueTextRange(astRoot)
+ dup.getDataValueTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToManyMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToManyMapping.java
index 8dfc2c5..7d7e2dd 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToManyMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToManyMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaMappingRelationship;
@@ -117,9 +116,9 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinFetch.validate(messages, reporter, astRoot);
- this.privateOwned.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinFetch.validate(messages, reporter);
+ this.privateOwned.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToOneMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToOneMapping.java
index ae6866d..459e49e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToOneMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToOneMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute;
@@ -101,9 +100,9 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.joinFetch.validate(messages, reporter, astRoot);
- this.privateOwned.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.joinFetch.validate(messages, reporter);
+ this.privateOwned.validate(messages, reporter);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkPrivateOwned.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkPrivateOwned.java
index 01b6e92..d4794f0 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkPrivateOwned.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkPrivateOwned.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaAttributeMapping;
@@ -110,13 +109,13 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getAttributeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
EclipseLinkPrivateOwnedAnnotation annotation = this.getPrivateOwnedAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkReadOnly.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkReadOnly.java
index 0cc0da0..c3f3c79 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkReadOnly.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkReadOnly.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
@@ -124,13 +123,13 @@
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- TextRange textRange = this.getAnnotationTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ TextRange textRange = this.getAnnotationTextRange();
+ return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange();
}
- protected TextRange getAnnotationTextRange(CompilationUnit astRoot) {
+ protected TextRange getAnnotationTextRange() {
EclipseLinkReadOnlyAnnotation annotation = this.getReadOnlyAnnotation();
- return (annotation == null) ? null : annotation.getTextRange(astRoot);
+ return (annotation == null) ? null : annotation.getTextRange();
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkVersionMapping.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkVersionMapping.java
index 92b1f9b..584b11d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkVersionMapping.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkVersionMapping.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
import java.util.List;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.utility.internal.ArrayTools;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
@@ -105,13 +104,13 @@
// ********** validation **********
@Override
- public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
- super.validate(messages, reporter, astRoot);
- this.mutable.validate(messages, reporter, astRoot);
+ public void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.mutable.validate(messages, reporter);
}
@Override
- protected void validateAttributeType(List<IMessage> messages, CompilationUnit astRoot) {
+ protected void validateAttributeType(List<IMessage> messages) {
if (!ArrayTools.contains(SUPPORTED_TYPE_NAMES, this.getPersistentAttribute().getTypeName())) {
messages.add(
DefaultEclipseLinkJpaValidationMessages.buildMessage(
@@ -119,7 +118,7 @@
EclipseLinkJpaValidationMessages.PERSISTENT_ATTRIBUTE_INVALID_VERSION_MAPPING_TYPE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/NullJavaEclipseLinkMultitenancy2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/NullJavaEclipseLinkMultitenancy2_3.java
index 47b1b00..1307e56 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/NullJavaEclipseLinkMultitenancy2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/NullJavaEclipseLinkMultitenancy2_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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.
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.EmptyListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
@@ -132,7 +131,7 @@
return 0;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
throw new UnsupportedOperationException("Multitenancy is only supported in EclipseLink version 2.3 and higher"); //$NON-NLS-1$
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java
index 7e9c72f..45a24cf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
import org.eclipse.jpt.common.core.resource.java.JavaResourceMethod;
@@ -102,7 +101,7 @@
// ********** validation **********
@Override
- protected JptValidator buildAttributeValidator(CompilationUnit astRoot) {
- return new EclipseLinkPersistentAttributeValidator(this, buildTextRangeResolver(astRoot));
+ protected JptValidator buildAttributeValidator() {
+ return new EclipseLinkPersistentAttributeValidator(this);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkEntityMappingsImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkEntityMappingsImpl.java
index fb7ae78..bf59eb4 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkEntityMappingsImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkEntityMappingsImpl.java
@@ -28,7 +28,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTypeMapping;
import org.eclipse.jpt.jpa.core.context.orm.OrmXml;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractEntityMappings;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConverter;
@@ -61,7 +60,7 @@
protected final OrmEclipseLinkConverterContainer converterContainer;
protected final ContextListContainer<OrmTenantDiscriminatorColumn2_3, XmlTenantDiscriminatorColumn_2_3> specifiedTenantDiscriminatorColumnContainer;
- protected final OrmReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
+ protected final ReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
protected final ContextListContainer<OrmVirtualTenantDiscriminatorColumn2_3, ReadOnlyTenantDiscriminatorColumn2_3> defaultTenantDiscriminatorColumnContainer;
@@ -270,7 +269,7 @@
}
}
- protected OrmReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -372,7 +371,7 @@
// ********** OrmReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements OrmReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -420,7 +419,7 @@
/**
* no column validation can be done in the context of the persistence unit defaults
*/
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return JptValidator.Null.instance();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmTenantDiscriminatorColumn2_3.java
index 4637562..bfd7021 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmTenantDiscriminatorColumn2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmTenantDiscriminatorColumn2_3.java
@@ -11,10 +11,8 @@
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmTableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.AbstractOrmNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmReadOnlyTenantDiscriminatorColumn2_3;
+import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlTenantDiscriminatorColumn;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.XmlTenantDiscriminatorColumn_2_3;
@@ -23,7 +21,7 @@
* <code>orm.xml</code> tenant discriminator column
*/
public class EclipseLinkOrmTenantDiscriminatorColumn2_3
- extends AbstractOrmNamedDiscriminatorColumn<XmlTenantDiscriminatorColumn_2_3, OrmReadOnlyTenantDiscriminatorColumn2_3.Owner>
+ extends AbstractOrmNamedDiscriminatorColumn<XmlTenantDiscriminatorColumn_2_3, ReadOnlyTenantDiscriminatorColumn2_3.Owner>
implements OrmTenantDiscriminatorColumn2_3
{
protected XmlTenantDiscriminatorColumn_2_3 xmlTenantDiscriminatorColumn;
@@ -37,7 +35,7 @@
protected Boolean specifiedPrimaryKey;
protected boolean defaultPrimaryKey = DEFAULT_PRIMARY_KEY;
- public EclipseLinkOrmTenantDiscriminatorColumn2_3(XmlContextNode parent, OrmReadOnlyTenantDiscriminatorColumn2_3.Owner owner, XmlTenantDiscriminatorColumn_2_3 column) {
+ public EclipseLinkOrmTenantDiscriminatorColumn2_3(XmlContextNode parent, ReadOnlyTenantDiscriminatorColumn2_3.Owner owner, XmlTenantDiscriminatorColumn_2_3 column) {
super(parent, owner, column);
this.specifiedTable = this.buildSpecifiedTable();
this.specifiedContextProperty = this.buildSpecifiedContextProperty();
@@ -245,11 +243,6 @@
return (xmlColumn == null) ? null : xmlColumn.getTableTextRange();
}
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmTableColumnTextRangeResolver(this);
- }
-
// ********** completion proposals **********
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/GenericOrmVirtualTenantDiscriminatorColumn2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/GenericOrmVirtualTenantDiscriminatorColumn2_3.java
index aceef29..0602fe2 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/GenericOrmVirtualTenantDiscriminatorColumn2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/GenericOrmVirtualTenantDiscriminatorColumn2_3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2012 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,18 +11,15 @@
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.core.context.XmlContextNode;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmVirtualNamedDiscriminatorColumn;
-import org.eclipse.jpt.jpa.core.internal.context.orm.OrmTableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmVirtualTenantDiscriminatorColumn2_3;
/**
* <code>orm.xml</code> virtual tenant discriminator column
*/
public class GenericOrmVirtualTenantDiscriminatorColumn2_3
- extends AbstractOrmVirtualNamedDiscriminatorColumn<OrmReadOnlyTenantDiscriminatorColumn2_3.Owner, ReadOnlyTenantDiscriminatorColumn2_3>
+ extends AbstractOrmVirtualNamedDiscriminatorColumn<ReadOnlyTenantDiscriminatorColumn2_3.Owner, ReadOnlyTenantDiscriminatorColumn2_3>
implements OrmVirtualTenantDiscriminatorColumn2_3
{
protected final ReadOnlyTenantDiscriminatorColumn2_3 overriddenColumn;
@@ -37,7 +34,7 @@
protected boolean defaultPrimaryKey;
- public GenericOrmVirtualTenantDiscriminatorColumn2_3(XmlContextNode parent, OrmReadOnlyTenantDiscriminatorColumn2_3.Owner owner, ReadOnlyTenantDiscriminatorColumn2_3 overridenColumn) {
+ public GenericOrmVirtualTenantDiscriminatorColumn2_3(XmlContextNode parent, ReadOnlyTenantDiscriminatorColumn2_3.Owner owner, ReadOnlyTenantDiscriminatorColumn2_3 overridenColumn) {
super(parent, owner);
this.overriddenColumn = overridenColumn;
}
@@ -188,9 +185,4 @@
public TextRange getTableTextRange() {
return this.getValidationTextRange();
}
-
- @Override
- protected NamedColumnTextRangeResolver buildTextRangeResolver() {
- return new OrmTableColumnTextRangeResolver(this);
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkArrayMapping2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkArrayMapping2_3.java
index fcfe953..ddeb574 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkArrayMapping2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkArrayMapping2_3.java
@@ -27,8 +27,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmTemporalConverter;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
-import org.eclipse.jpt.jpa.core.internal.context.TableColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmAttributeMapping;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.EntityTableDescriptionProvider;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.NamedColumnValidator;
@@ -344,8 +342,8 @@
this.converter.validate(messages, reporter);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn col, NamedColumnTextRangeResolver textRangeResolver) {
- return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, (TableColumnTextRangeResolver) textRangeResolver, new EntityTableDescriptionProvider());
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn col) {
+ return new NamedColumnValidator(this.getPersistentAttribute(), (ReadOnlyBaseColumn) col, new EntityTableDescriptionProvider());
}
// ********** completion proposals **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkConvert.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkConvert.java
index 30e6084..d65bc78 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkConvert.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkConvert.java
@@ -17,7 +17,6 @@
import org.eclipse.jpt.jpa.core.context.orm.OrmConverter;
import org.eclipse.jpt.jpa.core.context.orm.OrmXmlContextNodeFactory;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.AbstractOrmConverter;
import org.eclipse.jpt.jpa.core.resource.orm.XmlAttributeMapping;
import org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkConvert;
@@ -181,8 +180,8 @@
((XmlConvertibleMapping) xmlMapping).setConvert(null);
}
- public JptValidator buildValidator(Converter converter, ConverterTextRangeResolver textRangeResolver) {
- return new EclipseLinkConvertValidator((EclipseLinkConvert) converter, textRangeResolver);
+ public JptValidator buildValidator(Converter converter) {
+ return new EclipseLinkConvertValidator((EclipseLinkConvert) converter);
}
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEmbeddableImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEmbeddableImpl.java
index ae750c9..9107b56 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEmbeddableImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEmbeddableImpl.java
@@ -254,7 +254,7 @@
if (this.isDynamicType()) {
return new EclipseLinkDynamicTypeMappingValidator(this);
}
- return new EclipseLinkTypeMappingValidator(this, getJavaResourceType(), buildTextRangeResolver());
+ return new EclipseLinkTypeMappingValidator(this, getJavaResourceType());
}
protected boolean isDynamicType() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java
index eb03727..6343a35 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java
@@ -425,7 +425,7 @@
@Override
protected JptValidator buildPrimaryKeyValidator() {
- return new EclipseLinkEntityPrimaryKeyValidator(this, buildTextRangeResolver());
+ return new EclipseLinkEntityPrimaryKeyValidator(this);
}
@Override
@@ -433,7 +433,7 @@
if (this.isDynamicType()) {
return new EclipseLinkDynamicTypeMappingValidator(this);
}
- return new EclipseLinkTypeMappingValidator(this, getJavaResourceType(), buildTextRangeResolver());
+ return new EclipseLinkTypeMappingValidator(this, getJavaResourceType());
}
protected boolean isDynamicType() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java
index c2e2e80..947487d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java
@@ -43,7 +43,6 @@
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkDynamicTypeMappingValidator;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkMappedSuperclassPrimaryKeyValidator;
import org.eclipse.jpt.jpa.eclipselink.core.internal.context.EclipseLinkMappedSuperclassValidator;
-import org.eclipse.jpt.jpa.eclipselink.core.internal.plugin.JptJpaEclipseLinkCorePlugin;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlMappedSuperclass;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -374,7 +373,7 @@
@Override
protected JptValidator buildPrimaryKeyValidator() {
- return new EclipseLinkMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver());
+ return new EclipseLinkMappedSuperclassPrimaryKeyValidator(this);
}
@Override
@@ -382,7 +381,7 @@
if (this.isDynamicType()) {
return new EclipseLinkDynamicTypeMappingValidator(this);
}
- return new EclipseLinkMappedSuperclassValidator(this, this.getJavaResourceType(), this.buildTextRangeResolver());
+ return new EclipseLinkMappedSuperclassValidator(this, this.getJavaResourceType());
}
protected boolean isDynamicType() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMultitenancyImpl2_3.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMultitenancyImpl2_3.java
index 2e54001..256d00b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMultitenancyImpl2_3.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMultitenancyImpl2_3.java
@@ -24,7 +24,6 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.TypeMapping;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode;
import org.eclipse.jpt.jpa.core.resource.orm.XmlTypeMapping;
import org.eclipse.jpt.jpa.db.Table;
@@ -72,7 +71,7 @@
protected boolean defaultIncludeCriteria = DEFAULT_INCLUDE_CRITERIA;
protected final ContextListContainer<OrmTenantDiscriminatorColumn2_3, XmlTenantDiscriminatorColumn_2_3> specifiedTenantDiscriminatorColumnContainer;
- protected final OrmReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
+ protected final ReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
protected final ContextListContainer<OrmVirtualTenantDiscriminatorColumn2_3, ReadOnlyTenantDiscriminatorColumn2_3> defaultTenantDiscriminatorColumnContainer;
@@ -373,7 +372,7 @@
}
}
- protected OrmReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -515,7 +514,7 @@
// ********** OrmReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements OrmReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -554,8 +553,8 @@
return getTypeMapping().tableNameIsInvalid(tableName);
}
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
- return new TenantDiscriminatorColumnValidator2_3((ReadOnlyTenantDiscriminatorColumn2_3) column, textRangeResolver);
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
+ return new TenantDiscriminatorColumnValidator2_3((ReadOnlyTenantDiscriminatorColumn2_3) column);
}
public TextRange getValidationTextRange() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistenceUnitDefaults.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistenceUnitDefaults.java
index f69f857..eb45bdf 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistenceUnitDefaults.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistenceUnitDefaults.java
@@ -19,12 +19,10 @@
import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
import org.eclipse.jpt.jpa.core.context.orm.OrmPersistenceUnitMetadata;
import org.eclipse.jpt.jpa.core.internal.context.JptValidator;
-import org.eclipse.jpt.jpa.core.internal.context.NamedColumnTextRangeResolver;
import org.eclipse.jpt.jpa.core.internal.jpa1.context.orm.AbstractOrmPersistenceUnitDefaults;
import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.EclipseLinkPersistenceUnitDefaults;
-import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmReadOnlyTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.context.orm.OrmTenantDiscriminatorColumn2_3;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.EclipseLinkOrmFactory;
import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.XmlAccessMethods;
@@ -43,7 +41,7 @@
{
protected final ContextListContainer<OrmTenantDiscriminatorColumn2_3, XmlTenantDiscriminatorColumn_2_3> tenantDiscriminatorColumnContainer;
- protected final OrmReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
+ protected final ReadOnlyTenantDiscriminatorColumn2_3.Owner tenantDiscriminatorColumnOwner;
protected String specifiedGetMethod;
protected String specifiedSetMethod;
@@ -173,7 +171,7 @@
}
}
- protected OrmReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -191,7 +189,7 @@
// ********** OrmReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements OrmReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -239,7 +237,7 @@
/**
* no column validation can be done in the context of the persistence unit defaults
*/
- public JptValidator buildColumnValidator(ReadOnlyNamedColumn column, NamedColumnTextRangeResolver textRangeResolver) {
+ public JptValidator buildColumnValidator(ReadOnlyNamedColumn column) {
return JptValidator.Null.instance();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistentAttribute.java
index b95dd6f..d28a736 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistentAttribute.java
@@ -138,6 +138,6 @@
@Override
protected JptValidator buildAttibuteValidator() {
- return new EclipseLinkPersistentAttributeValidator(this, buildTextRangeResolver());
+ return new EclipseLinkPersistentAttributeValidator(this);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentAttribute.java
index 2b687ad..85e0f13 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentAttribute.java
@@ -11,7 +11,6 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.JDTTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceField;
@@ -88,7 +87,7 @@
return false;
}
- public boolean contains(int offset, CompilationUnit astRoot) {
+ public boolean contains(int offset) {
throw new UnsupportedOperationException();
}
@@ -178,7 +177,7 @@
return null;
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ public TextRange getValidationTextRange() {
throw new UnsupportedOperationException();
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java
index dceae9c..b0d353a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java
@@ -15,7 +15,6 @@
import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAttribute;
import org.eclipse.jpt.common.core.resource.java.JavaResourceType;
@@ -287,10 +286,6 @@
throw new UnsupportedOperationException();
}
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- throw new UnsupportedOperationException();
- }
-
// ********** misc **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkConverterAnnotation.java
index ead46df..3142e4e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkConverterAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.resource.java.binary;
import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLink;
@@ -77,8 +76,4 @@
public TextRange getConverterClassTextRange() {
throw new UnsupportedOperationException();
}
-
- public boolean converterClassImplementsInterface(String interfaceName, CompilationUnit astRoot) {
- throw new UnsupportedOperationException();
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkCustomizerAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkCustomizerAnnotation.java
index ee0e7da..e576243 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkCustomizerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkCustomizerAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.resource.java.binary;
import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryAnnotation;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -72,8 +71,4 @@
public TextRange getValueTextRange() {
throw new UnsupportedOperationException();
}
-
- public boolean customizerClassImplementsInterface(String interfaceName, CompilationUnit astRoot) {
- throw new UnsupportedOperationException();
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java
index d783a77..e05df2e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
import org.eclipse.jpt.common.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
@@ -152,11 +151,6 @@
return this.buildStringElementAdapter(this.converterClassDeclarationAdapter);
}
- public boolean converterClassImplementsInterface(String interfaceName, CompilationUnit astRoot) {
- return (this.converterClass != null)
- && ASTTools.typeImplementsInterface(this.converterClassAdapter.getExpression(astRoot), interfaceName);
- }
-
// ***** fully-qualified converter class name
public String getFullyQualifiedConverterClassName() {
if (this.fqConverterClassNameStale) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java
index bf7b502..0abb801 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.ASTTools;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
@@ -123,11 +122,6 @@
return this.getElementTextRange(VALUE_ADAPTER, astAnnotation);
}
- public boolean customizerClassImplementsInterface(String interfaceName, CompilationUnit astRoot) {
- return (this.value != null)
- && ASTTools.typeIsSubTypeOf(this.valueAdapter.getExpression(astRoot), interfaceName);
- }
-
// ***** fully-qualified customizer class name
public String getFullyQualifiedCustomizerClassName() {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java
index c5e176c..405e91c 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.jpa.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.Annotation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.common.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.common.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
@@ -114,8 +113,8 @@
return this.getElementTextRange(this.nameDeclarationAdapter, astAnnotation);
}
- public boolean nameTouches(int pos, CompilationUnit astRoot) {
- return this.elementTouches(this.nameDeclarationAdapter, pos, astRoot);
+ public boolean nameTouches(int pos) {
+ return this.textRangeTouches(this.nameTextRange, pos);
}
abstract String getNameElementName();
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java
index 83a0e27..20c6092 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java
@@ -38,7 +38,6 @@
private final ElementAnnotationAdapter columnAdapter;
private ColumnAnnotation column;
private final ColumnAnnotation nullColumn;
- private TextRange columnTextRange;
public SourceEclipseLinkWriteTransformerAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
@@ -59,14 +58,12 @@
this.column = createColumn(this, this.annotatedElement, this.daa);
this.column.initialize(columnAnnotation);
}
- this.columnTextRange = this.buildColumnTextRange(astRoot);
}
@Override
public void synchronizeWith(CompilationUnit astRoot) {
super.synchronizeWith(astRoot);
this.syncColumn(astRoot);
- this.columnTextRange = this.buildColumnTextRange(astRoot);
}
@Override
@@ -144,17 +141,12 @@
}
public TextRange getColumnTextRange() {
- return this.columnTextRange;
- }
-
- private TextRange buildColumnTextRange(CompilationUnit astRoot) {
if (this.column != null) {
- return this.column.getTextRange(astRoot);
+ return this.column.getTextRange();
}
- return this.getTextRange(astRoot);
+ return this.getTextRange();
}
-
// ********** static methods **********
private static DeclarationAnnotationAdapter buildColumnAnnotationAdapter(DeclarationAnnotationAdapter writeTransformerAnnotationAdapter) {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkConverterAnnotation.java
index d9b57c8..8da122a 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkConverterAnnotation.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.resource.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
/**
@@ -22,7 +21,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.1
*/
public interface EclipseLinkConverterAnnotation
@@ -59,11 +58,4 @@
* does not exist return the {@link TextRange} for the Converter annotation.
*/
TextRange getConverterClassTextRange();
-
- /**
- * Return whether the converter class implements the specified interface.
- * @see org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCustomConverter#ECLIPSELINK_CONVERTER_CLASS_NAME
- */
- boolean converterClassImplementsInterface(String interfaceName, CompilationUnit astRoot);
-
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkCustomizerAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkCustomizerAnnotation.java
index d705533..0a42fe9 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkCustomizerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkCustomizerAnnotation.java
@@ -9,7 +9,6 @@
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.resource.java;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.resource.java.Annotation;
import org.eclipse.jpt.common.core.utility.TextRange;
@@ -23,7 +22,7 @@
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.3
* @since 2.1
*/
public interface EclipseLinkCustomizerAnnotation
@@ -60,10 +59,4 @@
* does not exist return the {@link TextRange} for the Customizer annotation.
*/
TextRange getValueTextRange();
-
- /**
- * Return whether the customizer class implements the specified interface.
- * @see org.eclipse.jpt.jpa.eclipselink.core.context.EclipseLinkCustomizer#ECLIPSELINK_DESCRIPTOR_CUSTOMIZER_CLASS_NAME
- */
- boolean customizerClassImplementsInterface(String interfaceName, CompilationUnit astRoot);
}
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java
index 8e3631b..8c00d4d 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java
@@ -27,6 +27,7 @@
import java.util.Locale;
import java.util.Properties;
import java.util.Set;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -1513,7 +1514,7 @@
return newAt;
}
-
+
private void updateRelation(JavaPersistentType jpt,
IJPAEditorFeatureProvider fp, IRelation rel) {
UpdateAttributeFeature updateFeature = new UpdateAttributeFeature(fp);