Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/NullAnnotation.java2
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryAnnotatedElement.java3
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/binary/BinaryNode.java3
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java20
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotation.java76
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceCompilationUnit.java2
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/ASTTools.java34
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/utility/jdt/IndexedConversionDeclarationAnnotationElementAdapter.java6
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceAnnotatedElement.java5
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/java/JavaResourceNode.java5
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/utility/jdt/IndexedDeclarationAnnotationElementAdapter.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextNode.java21
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbContextRoot.java17
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbPackage.java15
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/JaxbQName.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/XmlElement.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/context/java/JavaContextNode.java19
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextNode.java23
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/AbstractJaxbContextRoot.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/GenericPackage.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAdaptableAttributeMapping.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaAttributeMapping.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaElementQName.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaQName.java34
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaType.java38
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaTypeMapping.java20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlJavaTypeAdapter.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNamedNodeMapping.java13
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaXmlNodeMapping.java27
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/FieldAccessor.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeMappingXmlSchemaType.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributeXmlJavaTypeAdapter.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaAttributesContainer.java11
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java64
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaElementFactoryMethod.java38
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumConstant.java14
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaEnumMapping.java6
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaJaxbClass.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageInfo.java34
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlJavaTypeAdapter.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPackageXmlSchemaType.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaPersistentAttribute.java12
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAdapter.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyAttributeMapping.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAnyElementMapping.java24
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttachmentRef.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlAttributeMapping.java30
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java32
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementMapping.java20
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefs.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRefsMapping.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementWrapper.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementsMapping.java36
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlID.java19
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlIDREF.java19
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlMixed.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlNs.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRegistry.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlRootElement.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchema.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSchemaType.java16
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlSeeAlso.java7
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlValueMapping.java15
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/PropertyAccessor.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlNsAnnotation.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/resource/java/source/SourceXmlTypeAnnotation.java11
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaClassMapping.java17
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaElementFactoryMethod.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyAttributeMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAnyElementMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlAttributeMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlCDATA.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorNode.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlDiscriminatorValue.java9
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElement.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementMapping.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementWrapper.java14
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementsMapping.java22
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlID.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlInverseReferenceMapping.java18
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNode.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlJoinNodesMapping.java12
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlKey.java5
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlPath.java8
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/binary/BinaryXmlDiscriminatorValueAnnotation.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/resource/java/source/SourceXmlDiscriminatorNodeAnnotation.java1
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFactory.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Converter.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/GeneratedValue.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Generator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaContextNode.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/JpaRootContextNode.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/OverrideContainer.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/Query.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyBaseJoinColumn.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyJoinTableRelationshipStrategy.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyNamedColumn.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverride.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyOverrideRelationship.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTable.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/ReadOnlyTableColumn.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/XmlContextNode.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/Accessor.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaColumn.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaConverter.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaDiscriminatorColumn.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGeneratedValue.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaGenerator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaJpaContextNode.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaOverrideContainer.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaPersistentAttribute.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaQuery.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyBaseJoinColumn.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyJoinColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedColumn.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyNamedDiscriminatorColumn.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyOverride.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTable.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaReadOnlyTableColumn.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaTemporalConverter.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/java/JavaVirtualColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmDiscriminatorColumn.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmEnumeratedConverter.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGeneratedValue.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmGenerator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmLobConverter.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmOverrideContainer.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmQuery.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyBaseJoinColumn.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyJoinColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedColumn.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyNamedDiscriminatorColumn.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyOverride.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTable.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmReadOnlyTableColumn.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmTemporalConverter.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmVirtualColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/context/orm/OrmXmlContextNodeFactory.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaFactory.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractJpaContextNode.java45
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/AbstractXmlContextNode.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/BaseJoinColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/EntityTextRangeResolver.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/JoinColumnTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/NamedColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/OverrideTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PersistentAttributeTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/PrimaryKeyTextRangeResolver.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TableTextRangeResolver.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/TypeMappingTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractAccessor.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaAttributeMapping.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBaseEmbeddedMapping.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaBasicMapping.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedIdMapping.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEmbeddedMapping.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaEntity.java151
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaGenerator.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaIdMapping.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinColumnRelationshipStrategy.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJoinTableRelationshipStrategy.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaJpaContextNode.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappedSuperclass.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMappingRelationship.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaMultiRelationshipMapping.java86
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumn.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaNamedColumnTextRangeResolver.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaOverride.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentAttribute.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaPersistentType.java50
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaQuery.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaRelationshipMapping.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaSingleRelationshipMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTable.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaTypeMapping.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVersionMapping.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualBaseColumn.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedColumn.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualOverride.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualReferenceTable.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/AbstractJavaVirtualTable.java34
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/FieldAccessor.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaIdClassReference.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToManyRelationship.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaManyToOneRelationship.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappedByRelationshipStrategy.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaMappingJoinColumnRelationshipStrategy.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToManyRelationship.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOneToOneRelationship.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaOverrideJoinColumnRelationshipStrategy.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaPrimaryKeyJoinColumnRelationshipStrategy.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/GenericJavaVirtualJoinTable.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaEntityTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaJoinColumnTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaMappedSuperclassTextRangeResolver.java46
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNamedColumnTextRangeResolver.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaNullTypeMapping.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaOverrideTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPersistentAttributeTextRangeResolver.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaPrimaryKeyJoinColumnTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTableTextRangeResolver.java42
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/JavaTypeMappingTextRangeResolver.java33
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/java/PropertyAccessor.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseColumn.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBaseEmbeddedMapping.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmBasicMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmEntity.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmIdMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmJoinColumnRelationshipStrategy.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMappedSuperclass.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmMultiRelationshipMapping.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmNamedColumnTextRangeResolver.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTypeMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVersionMapping.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualBaseColumn.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedColumn.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualReferenceTable.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmVirtualTable.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmXmlContextNodeFactory.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinColumnRelationshipStrategy.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmMappingJoinTableRelationshipStrategy.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmOverrideJoinColumnRelationshipStrategy.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmPrimaryKeyJoinColumnRelationshipStrategy.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualJoinTable.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualOverrideJoinColumnRelationshipStrategy.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/GenericOrmVirtualSecondaryTable.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/NullOrmJoinTableRelationshipStrategy.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmEntityTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmJoinColumnTextRangeResolver.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmMappedSuperclassTextRangeResolver.java44
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmNamedColumnTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmOverrideTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPersistentAttributeTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmPrimaryKeyJoinColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableColumnTextRangeResolver.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTableTextRangeResolver.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/OrmTypeMappingTextRangeResolver.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/SpecifiedOrmPersistentAttribute.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/VirtualOrmPersistentAttribute.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/persistence/AbstractPersistenceUnit.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractEntityPrimaryKeyValidator.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractJoinTableValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractMappedSuperclassPrimaryKeyValidator.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractNamedColumnValidator.java35
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPersistentAttributeValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractPrimaryKeyValidator.java61
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTableValidator.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTemporalConverterValidator.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AbstractTypeMappingValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideInverseJoinColumnValidator.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinColumnValidator.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideJoinTableValidator.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AssociationOverrideValidator.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideColumnValidator.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/AttributeOverrideValidator.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/BaseJoinColumnValidator.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/ConverterTextRangeResolver.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/DiscriminatorColumnValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/EntityPrimaryKeyJoinColumnValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericEntityPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericMappedSuperclassPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericRootContextNode.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/GenericTypeMappingValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/InverseJoinColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/JoinTableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideColumnValidator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyAttributeOverrideValidator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/MapKeyColumnValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/NamedColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OneToOnePrimaryKeyJoinColumnValidator.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/OverrideValidator.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentFieldValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PersistentPropertyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/PrimaryKeyJoinColumnValidator.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTablePrimaryKeyJoinColumnValidator.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/SecondaryTableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/TableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaConverter.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/AbstractJavaOverrideContainer.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverride.java22
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAssociationOverrideContainer.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaAttributeOverride.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaCascade.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaDiscriminatorColumn.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratedValue.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinColumn.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaJoinTable.java29
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaMappingJoinTableRelationshipStrategy.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOrderable.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaOverrideRelationship.java31
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPersistentAttribute.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaPrimaryKeyJoinColumn.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryContainer.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaQueryHint.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaReferenceTable.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaSecondaryTable.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaUniqueConstraint.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAssociationOverride.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualAttributeOverride.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualJoinColumn.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideJoinColumnRelationshipStrategy.java30
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualOverrideRelationship.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/GenericJavaVirtualUniqueConstraint.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaElementCollectionTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/JavaTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaConverter.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinColumnRelationshipStrategy.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/java/NullJavaJoinTableRelationshipStrategy.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmConverter.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmEmbeddedMapping.java24
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmNamedDiscriminatorColumn.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverride.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmOverrideContainer.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/AbstractOrmVirtualOverride.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverride.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAssociationOverrideContainer.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmAttributeOverride.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinColumn.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmJoinTable.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOrderable.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmOverrideRelationship.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPersistentAttribute.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmPrimaryKeyJoinColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmReferenceTable.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmSecondaryTable.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAssociationOverride.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualAttributeOverride.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualJoinColumn.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualOverrideRelationship.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa1/context/orm/GenericOrmVirtualPrimaryKeyJoinColumn.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/CollectionTableValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/MapKeyJoinColumnValidator.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/OrderColumnValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/AbstractJavaElementCollectionMapping2_0.java191
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCacheable2_0.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaCollectionTable2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaDerivedIdentity2_0.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaIdDerivedIdentityStrategy2_0.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaMapsIdDerivedIdentityStrategy2_0.java32
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOrphanRemoval2_0.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaOverrideJoinTableRelationshipStrategy2_0.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0.java27
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/JavaMapKeyTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaCacheable2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaDerivedIdentity2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaMapKeyColumn2_0.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/java/NullJavaOrphanRemoval2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/AbstractOrmElementCollectionMapping2_0.java58
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCollectionTable2_0.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmOverrideJoinTableRelationshipStrategy2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmElementCollectionTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmMapKeyTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/OrmTemporalConverterValidator.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/AssociationOverrideContainer2_0.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyAssociationOverride2_0.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/ReadOnlyOverrideRelationship2_0.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaDerivedIdentity2_0.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/java/JavaMapKeyTemporalConverter2_0.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyEnumeratedConverter2_0.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/jpa2/context/orm/OrmMapKeyTemporalConverter2_0.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/EclipseLinkConverter.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/java/JavaReadOnlyTenantDiscriminatorColumn2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/orm/OrmReadOnlyTenantDiscriminatorColumn2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/context/persistence/EclipseLinkPersistenceUnit.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/AbstractEclipseLinkTypeMappingValidator.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkConvertValidator.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkDynamicTypeMappingValidator.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkEntityPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassPrimaryKeyValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkMappedSuperclassValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkPersistentAttributeValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/EclipseLinkTypeMappingValidator.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/TenantDiscriminatorColumnValidator2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTenantDiscriminatorColumn2_3.java20
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaTimeOfDay.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3.java17
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkArrayMapping2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkBasicMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCachingImpl.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkChangeTracking.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConversionValue.java19
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConvert.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverter.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterClassConverter.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkConverterContainerImpl.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomConverter.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkCustomizer.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkElementCollectionMapping2_0.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEmbeddableImpl.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkEntityImpl.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkIdMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkJoinFetch.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToManyMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkManyToOneMapping.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMappedSuperclassImpl.java25
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMultitenancyImpl2_3.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkMutable.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkObjectTypeConverter.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToManyMapping.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkOneToOneMapping.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkPrivateOwned.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkReadOnly.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/JavaEclipseLinkVersionMapping.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/NullJavaEclipseLinkMultitenancy2_3.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/java/SpecifiedJavaEclipseLinkPersistentAttribute.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkEntityMappingsImpl.java9
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/EclipseLinkOrmTenantDiscriminatorColumn2_3.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/GenericOrmVirtualTenantDiscriminatorColumn2_3.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkArrayMapping2_3.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkConvert.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEmbeddableImpl.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkEntityImpl.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMappedSuperclassImpl.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkMultitenancyImpl2_3.java11
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistenceUnitDefaults.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/OrmEclipseLinkPersistentAttribute.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentAttribute.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/context/orm/VirtualJavaPersistentType.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkConverterAnnotation.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/binary/BinaryEclipseLinkCustomizerAnnotation.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java5
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkConverterAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.eclipselink.core/src/org/eclipse/jpt/jpa/eclipselink/core/resource/java/EclipseLinkCustomizerAnnotation.java9
443 files changed, 2507 insertions, 4574 deletions
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 07b4136705..ea0242c0a5 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 @@ public abstract class NullAnnotation<A extends Annotation>
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 6688e1426c..3c87be543c 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.IAnnotation;
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 @@ abstract class BinaryAnnotatedElement
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 b4b4941580..2f57c553a5 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.core.resources.IFile;
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 @@ public abstract class BinaryNode
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 e25c637be3..55dd5c6462 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.List;
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 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
protected TextRange nameTextRange;
+ protected TextRange textRange;
+
// ********** construction/initialization **********
SourceAnnotatedElement(JavaResourceNode parent, E annotatedElement) {
@@ -96,6 +97,7 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
// 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 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
/**
* 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 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
// ********** 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 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
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 1260efaaba..ee66766380 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 @@ public abstract class SourceAnnotation
protected final AnnotationAdapter annotationAdapter;
+ protected TextRange annotationTextRange;
/**
* constructor for straight member annotation
@@ -63,18 +64,20 @@ public abstract class SourceAnnotation
// ********** 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 @@ public abstract class SourceAnnotation
* 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 @@ public abstract class SourceAnnotation
* 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 @@ public abstract class SourceAnnotation
}
/**
- * 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 @@ public abstract class SourceAnnotation
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 @@ public abstract class SourceAnnotation
}
/**
- * 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
- */
- 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.
+ * Return the specified AST DOM element.
*/
- 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 d47133f977..e5dac765ff 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 @@ public abstract class SourceCompilationUnit
// ********** 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 1160aeab2e..020a5d4255 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 @@ public class ASTTools {
}
/**
- * 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 @@ public class ASTTools {
}
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 fe84b5a40c..a53c0fb6ab 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 @@ public class IndexedConversionDeclarationAnnotationElementAdapter<T>
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 fde46cc189..aa64a76350 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 @@ public interface JavaResourceAnnotatedElement
* 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 7b63fb800b..4a4fb50c50 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 @@ import org.eclipse.jpt.common.utility.model.Model;
* 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 @@ public interface JavaResourceNode
/**
* 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 202e094ba6..b22558b051 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 @@ public interface IndexedDeclarationAnnotationElementAdapter<T>
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 67cb961f77..96120b4678 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 @@ import org.eclipse.jpt.jaxb.core.JaxbNode;
* 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 @@ public interface JaxbContextNode
*/
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 f203a01b64..fdb9aa6ecb 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface JaxbContextRoot
// ***** 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 739cbe8806..2c730c85fb 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface JaxbPackage
* 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 5ef41785db..bd648dc8dd 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 @@ import org.eclipse.jpt.jaxb.core.context.java.JavaContextNode;
* 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 @@ public interface JaxbQName
// ***** 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 333cbcf353..378e161ee8 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 @@ public interface XmlElement
// ***** 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 b2859f03dd..c833c9915d 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 @@ public interface JavaContextNode
* 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 5e270b27f4..a8a23763ae 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 abstract class AbstractJaxbContextNode
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 e7e5170c90..ea3b3a42b4 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.JavaResourceAbstractType;
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 @@ public abstract class AbstractJaxbContextRoot
// **************** 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 5869fee34f..46927b9548 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 @@ package org.eclipse.jpt.jaxb.core.internal.context;
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.context.XmlRegistry;
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 @@ public class GenericPackage
// **************** 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 @@ public class GenericPackage
// **************** 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 f560b9e093..6789f06f05 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 @@ public abstract class AbstractJavaAdaptableAttributeMapping<A extends Annotation
@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 7c215be62b..3bec53e001 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 @@ public abstract class AbstractJavaAttributeMapping<A extends Annotation>
// ********** 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 d92a2bb966..2a20cb3dfa 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 @@ public abstract class AbstractJavaContextNode
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 d3edefc11d..f4731e9332 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 @@ public abstract class AbstractJavaElementQName
}
@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 @@ public abstract class AbstractJavaElementQName
}
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 045a6db958..2e157d714a 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 @@ public abstract class AbstractJavaQName
// ***** 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 @@ public abstract class AbstractJavaQName
}
@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 @@ public abstract class AbstractJavaQName
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 cc03ba5808..9ae8bacd3c 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.XmlJavaTypeAdapterAnnotation;
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 @@ public abstract class AbstractJavaType
}
- // ***** misc *****
-
- protected CompilationUnit buildASTRoot() {
- return this.resourceType.getJavaResourceCompilationUnit().buildASTRoot();
- }
-
-
// ***** content assist *****
@Override
@@ -310,14 +302,13 @@ public abstract class AbstractJavaType
* 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 @@ public abstract class AbstractJavaType
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 882143908f..5c59d92fe5 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 @@ public abstract class AbstractJavaTypeMapping
// ***** 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 @@ public abstract class AbstractJavaTypeMapping
}
@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 @@ public abstract class AbstractJavaTypeMapping
}
@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 @@ public abstract class AbstractJavaTypeMapping
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 f2c8bb9d3a..3a397823ee 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 @@ public abstract class AbstractJavaXmlJavaTypeAdapter
// ***** 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 57c51ad727..1a15f7881f 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 @@ public abstract class AbstractJavaXmlNamedNodeMapping<A extends JaxbBasicSchemaC
// ***** 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 8f5f0ca876..8cf22df868 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 @@ public abstract class AbstractJavaXmlNodeMapping<A extends Annotation>
// ***** 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 @@ public abstract class AbstractJavaXmlNodeMapping<A extends Annotation>
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 1eb4de5840..8d2f72bdf9 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 @@ public class FieldAccessor
}
@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 99b941df4c..3db4fca576 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 @@ public class GenericJavaAttributeMappingXmlSchemaType
// ***** 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 6090425904..f2a3fec6fe 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 @@ public class GenericJavaAttributeXmlJavaTypeAdapter
// ********** 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 b608e7280c..3df75bce52 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.HashSet;
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 @@ public class GenericJavaAttributesContainer
// ********** 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 348a972910..438f26dc1d 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 @@ public class GenericJavaClassMapping
// ***** 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 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_TYPE__UNSPECIFIED_FACTORY_METHOD,
this,
- getFactoryClassTextRange(astRoot)));
+ getFactoryClassTextRange()));
}
}
else {
@@ -812,13 +812,13 @@ public class GenericJavaClassMapping
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 @@ public class GenericJavaClassMapping
JaxbValidationMessages.XML_TYPE__MISSING_PROP,
new String[] { missingProp },
this,
- getPropOrderTextRange(astRoot)));
+ getPropOrderTextRange()));
}
for (int i : nonexistentProps) {
@@ -918,7 +918,7 @@ public class GenericJavaClassMapping
}
}
- 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 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ATTRIBUTE__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -949,12 +949,12 @@ public class GenericJavaClassMapping
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 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ANY_ELEMENT__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -985,12 +985,12 @@ public class GenericJavaClassMapping
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 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -1021,12 +1021,12 @@ public class GenericJavaClassMapping
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 @@ public class GenericJavaClassMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ID__MULTIPLE_MAPPINGS_DEFINED,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
for (JaxbPersistentAttribute anyAttribute : localAttributes) {
messages.add(
@@ -1062,24 +1062,24 @@ public class GenericJavaClassMapping
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 9ede19c6d4..be563d02d3 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 @@ public class GenericJavaElementFactoryMethod
// ***** 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 @@ public class GenericJavaElementFactoryMethod
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 @@ public class GenericJavaElementFactoryMethod
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_DECL__INVALID_METHOD_SIGNATURE_RETURN_TYPE,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@@ -294,7 +294,7 @@ public class GenericJavaElementFactoryMethod
}
@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 @@ public class GenericJavaElementFactoryMethod
}
if (xsdType.getElement(getNamespace(), getName(), true) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -314,7 +314,7 @@ public class GenericJavaElementFactoryMethod
XsdSchema xsdSchema = this.getXsdSchema();
if (xsdSchema != null) {
if (xsdSchema.getElementDeclaration(getNamespace(), getName()) == null) {
- messages.add(getUnresolveSchemaComponentMessage(astRoot));
+ messages.add(getUnresolveSchemaComponentMessage());
}
}
}
@@ -388,7 +388,7 @@ public class GenericJavaElementFactoryMethod
}
@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 @@ public class GenericJavaElementFactoryMethod
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 @@ public class GenericJavaElementFactoryMethod
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 @@ public class GenericJavaElementFactoryMethod
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 bbe30a898e..f4bb276003 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 @@ public class GenericJavaEnumConstant
// ***** 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 @@ public class GenericJavaEnumConstant
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 89e9640282..630eeeb5f3 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 @@ public class GenericJavaEnumMapping
// ***** 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 05a0a9d496..8bbd63f3b1 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 @@ public class GenericJavaJaxbClass
// ***** 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 9ad05a69bb..531d02a23c 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 @@ public class GenericJavaPackageInfo
// ***** 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 @@ public class GenericJavaPackageInfo
// ***** 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 @@ public class GenericJavaPackageInfo
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 5d0308e82c..bb5a567b33 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 @@ public class GenericJavaPackageXmlJavaTypeAdapter
}
@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 04480116be..2805645707 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 @@ public class GenericJavaPackageXmlSchemaType
// ***** 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 @@ public class GenericJavaPackageXmlSchemaType
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 01edcb52ef..d98231e1ee 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 @@ public class GenericJavaPersistentAttribute
// **************** 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 @@ public class GenericJavaPersistentAttribute
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 a18a767616..71023f335b 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 @@ public class GenericJavaXmlAdapter
// ***** 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 6b94b4273d..0057f24dd0 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 @@ package org.eclipse.jpt.jaxb.core.internal.context.java;
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 @@ public class GenericJavaXmlAnyAttributeMapping
// ***** 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 @@ public class GenericJavaXmlAnyAttributeMapping
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 a5d9f92acf..2adf2d4f33 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 @@ public class GenericJavaXmlAnyElementMapping
// ***** 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 @@ public class GenericJavaXmlAnyElementMapping
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 @@ public class GenericJavaXmlAnyElementMapping
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 @@ public class GenericJavaXmlAnyElementMapping
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 e7ca2fc909..20148b48cb 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 @@ public class GenericJavaXmlAttachmentRef
}
@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 7d9428c5a5..6ff2e165a6 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 @@ public class GenericJavaXmlAttributeMapping
// ***** 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 @@ public class GenericJavaXmlAttributeMapping
JaxbValidationMessages.XML_ATTRIBUTE__INVALID_SCHEMA_TYPE,
new String[] { getValueTypeName(), xsdFeature.getName() },
this,
- this.qName.getNameTextRange(astRoot)));
+ this.qName.getNameTextRange()));
}
}
@@ -268,11 +268,11 @@ public class GenericJavaXmlAttributeMapping
}
@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 @@ public class GenericJavaXmlAttributeMapping
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 7a7cc19cf2..aefc1e4988 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 @@ public class GenericJavaXmlElement
// ***** 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 @@ public class GenericJavaXmlElement
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 @@ public class GenericJavaXmlElement
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 @@ public class GenericJavaXmlElement
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 75aae25adc..95517d2838 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 @@ public class GenericJavaXmlElementMapping
// ***** 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 @@ public class GenericJavaXmlElementMapping
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 182936e08f..1e14a794d6 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 @@ public class GenericJavaXmlElementRef
// ***** validation *****
@Override
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return getAnnotation().getTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return getAnnotation().getTextRange();
}
public TextRange getTypeTextRange() {
@@ -238,9 +238,9 @@ public class GenericJavaXmlElementRef
}
@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 @@ public class GenericJavaXmlElementRef
}
@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 @@ public class GenericJavaXmlElementRef
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_ELEMENT_REF__NO_REGISTRY,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
return;
}
@@ -383,7 +383,7 @@ public class GenericJavaXmlElementRef
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 9362158238..6faac68cb8 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 @@ public class GenericJavaXmlElementRefMapping
// ***** 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 c4168ea161..9695ca3750 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 @@ public class GenericJavaXmlElementRefs
// ***** 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 @@ public class GenericJavaXmlElementRefs
JaxbValidationMessages.XML_ELEMENT_REFS__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName },
xmlElementRef,
- xmlElementRef.getQName().getNameTextRange(astRoot)));
+ xmlElementRef.getQName().getNameTextRange()));
}
}
}
@@ -244,6 +244,6 @@ public class GenericJavaXmlElementRefs
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 48bbf2022c..782d553e2a 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 @@ public class GenericJavaXmlElementRefsMapping
// ***** 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 @@ public class GenericJavaXmlElementRefsMapping
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 23f7c5aa00..179cf08df9 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 @@ public class GenericJavaXmlElementWrapper
//************* 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 @@ public class GenericJavaXmlElementWrapper
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 @@ public class GenericJavaXmlElementWrapper
}
@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 993b48d308..bbcc19feb8 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 @@ public class GenericJavaXmlElementsMapping
// ***** 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 @@ public class GenericJavaXmlElementsMapping
}
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 @@ public class GenericJavaXmlElementsMapping
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 @@ public class GenericJavaXmlElementsMapping
JaxbValidationMessages.XML_ELEMENTS__DUPLICATE_XML_ELEMENT_QNAME,
new String[] { xmlElementName },
xmlElement,
- xmlElement.getQName().getNameTextRange(astRoot)));
+ xmlElement.getQName().getNameTextRange()));
}
}
@@ -479,16 +479,16 @@ public class GenericJavaXmlElementsMapping
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 c9b039ad82..486c0529e4 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 @@ public class GenericJavaXmlID
//************* 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 @@ public class GenericJavaXmlID
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 903a8ead21..3ff756b67b 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 @@ public class GenericJavaXmlIDREF
// ***** 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 @@ public class GenericJavaXmlIDREF
JaxbValidationMessages.XML_ID_REF__TYPE_DOES_NOT_CONTAIN_XML_ID,
new String[] { typeName },
this,
- ref.getTypeTextRange(astRoot)));
+ ref.getTypeTextRange()));
}
}
@@ -89,7 +88,7 @@ public class GenericJavaXmlIDREF
JaxbValidationMessages.XML_ID_REF__SCHEMA_TYPE_NOT_IDREF,
new String [] { xsdFeature.getName() },
this,
- ref.getXsdFeatureTextRange(astRoot)));
+ ref.getXsdFeatureTextRange()));
}
}
}
@@ -109,10 +108,10 @@ public class GenericJavaXmlIDREF
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 4898ebd157..9713608092 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 @@ public class GenericJavaXmlMixed
//************* 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 75234dc5cf..9752b6048c 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 @@ public class GenericJavaXmlNs
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 @@ public class GenericJavaXmlNs
// ***** 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 f4cea3511f..f2718fbb9d 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 @@ public class GenericJavaXmlRegistry
// ***** 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 @@ public class GenericJavaXmlRegistry
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 @@ public class GenericJavaXmlRegistry
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 @@ public class GenericJavaXmlRegistry
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 5147639f89..3ab4c4de01 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 @@ public class GenericJavaXmlRootElement
// **************** 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 @@ public class GenericJavaXmlRootElement
}
@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 @@ public class GenericJavaXmlRootElement
// 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 @@ public class GenericJavaXmlRootElement
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 89294103cb..d4aca90eed 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 @@ public class GenericJavaXmlSchema
// **************** 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 4c76e02259..562cdc8eac 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 @@ public abstract class GenericJavaXmlSchemaType
// ***** 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 @@ public abstract class GenericJavaXmlSchemaType
JaxbValidationMessages.XML_SCHEMA_TYPE__NON_SIMPLE_TYPE,
new String[] { qName.getName() },
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
}
}
@@ -219,7 +219,7 @@ public abstract class GenericJavaXmlSchemaType
}
@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 @@ public abstract class GenericJavaXmlSchemaType
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 d4216aa54f..8ffb4efc2b 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 @@ public class GenericJavaXmlSeeAlso
}
@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 be352f4c52..f8ab01a603 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 @@ public class GenericJavaXmlValueMapping
// ***** 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 @@ public class GenericJavaXmlValueMapping
IMessage.HIGH_SEVERITY,
JaxbValidationMessages.XML_VALUE__NO_TEXT_CONTENT,
this,
- getValidationTextRange(astRoot)));
+ getValidationTextRange()));
return;
}
@@ -89,7 +88,7 @@ public class GenericJavaXmlValueMapping
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 bbbc39dded..3695c3612f 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 @@ public class PropertyAccessor
//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 6b4814ccb2..2aeb59801a 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 class SourceXmlNsAnnotation
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 9f3bf2a956..0b90fc392f 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 @@ package org.eclipse.jpt.jaxb.core.internal.resource.java.source;
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 @@ public final class SourceXmlTypeAnnotation
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 @@ public final class SourceXmlTypeAnnotation
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 @@ public final class SourceXmlTypeAnnotation
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 1065f4fd69..42725266f4 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 @@ public class ELJavaClassMapping
// ***** 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 54718bab6c..211952273d 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 @@ public class ELJavaElementFactoryMethod
@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 @@ public class ELJavaElementFactoryMethod
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 dc5fc5de21..b5e80cdcad 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 @@ public class ELJavaXmlAnyAttributeMapping
// ***** 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 ee8b129d95..bc9621b330 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 @@ public class ELJavaXmlAnyElementMapping
// ***** 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 441844448c..3f81228661 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 @@ public class ELJavaXmlAttributeMapping
// ***** 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 f9679d350e..956f5fc730 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 @@ public class ELJavaXmlCDATA
@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 daa689a07f..c984731697 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 @@ public class ELJavaXmlDiscriminatorNode
// ***** 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 2ae45cd1f3..6e2a6ada5c 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 @@ public class ELJavaXmlDiscriminatorValue
// ***** 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 54142993e5..d49e517d6f 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 @@ public class ELJavaXmlElement
}
@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 3567470085..3519eec2f7 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 @@ public class ELJavaXmlElementMapping
// ***** 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 d92928ae5e..d2ca1eaad6 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 @@ public class ELJavaXmlElementWrapper
}
@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 9f8089240a..a252c8f3a0 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 @@ public class ELJavaXmlElementsMapping
// ***** 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 @@ public class ELJavaXmlElementsMapping
IMessage.HIGH_SEVERITY,
ELJaxbValidationMessages.XML_PATH__INSUFFICIENT_XML_PATHS_FOR_XML_ELEMENTS,
this,
- getXmlPathsTextRange(astRoot)));
+ getXmlPathsTextRange()));
}
while (xmlPaths.hasNext()) {
@@ -178,29 +178,29 @@ public class ELJavaXmlElementsMapping
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 7a158912b0..91da7e08ff 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 @@ public class ELJavaXmlID
@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 3e9aa0c56d..c53dd0346b 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 @@ public class ELJavaXmlInverseReferenceMapping
// ***** 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 @@ public class ELJavaXmlInverseReferenceMapping
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 @@ public class ELJavaXmlInverseReferenceMapping
ELJaxbValidationMessages.XML_INVERSE_REFERENCE__MAPPED_BY_ILLEGAL_MAPPING_TYPE,
new String[] { mappedBy, referencedClassMapping.getJaxbType().getFullyQualifiedName() },
this,
- getMappedByTextRange(astRoot)));
+ getMappedByTextRange()));
}
}
@@ -219,8 +219,8 @@ public class ELJavaXmlInverseReferenceMapping
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 ef8a40bb3a..63ae1c3b21 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 @@ public class ELJavaXmlJoinNode
// ***** 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 898567e8b6..31edb8815e 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 @@ public class ELJavaXmlJoinNodesMapping
// ***** 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 @@ public class ELJavaXmlJoinNodesMapping
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 @@ public class ELJavaXmlJoinNodesMapping
}
@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 4f0122a7bc..3c644f21d1 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 @@ public class ELJavaXmlKey
@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 d73eefeb6c..6e9339b0f7 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 @@ public class ELJavaXmlPath
// ***** 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 44573efafb..c728adfeb3 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 @@ public class BinaryXmlDiscriminatorValueAnnotation
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 f1957a6844..6ceb40daab 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.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 7d85127312..ed877ce541 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.common.core.resource.xml.JptXmlResource;
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.JavaPrimaryKeyJoinColumn;
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 @@ import org.eclipse.jpt.jpa.core.resource.java.UniqueConstraintAnnotation;
*
* @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 @@ public interface JpaFactory
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 @@ public interface JpaFactory
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 deb2a9c932..734307d3fe 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 @@ import org.eclipse.jpt.jpa.core.internal.jpa1.context.ConverterTextRangeResolver
* 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 @@ public interface Converter
/**
*
*/
- 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 934a08f609..025f79a387 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 @@ package org.eclipse.jpt.jpa.core.context;
* 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 @@ public interface GeneratedValue
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 bb4bd3bde9..ec3ab91c85 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 @@ public interface Generator
{
/**
+ * 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 9e1e97af66..8fbdc50d54 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 @@ import org.eclipse.jpt.jpa.db.SchemaContainer;
* 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 @@ public interface JpaContextNode
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 878eb81f4d..6fa0853844 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface JpaRootContextNode
*/
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 6823b93d08..450f2692d1 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 @@ import org.eclipse.jpt.jpa.db.Table;
* 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 @@ public interface OverrideContainer
*/
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 @@ public interface OverrideContainer
*/
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 57a955034f..9ec381ee05 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 @@ import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
* 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 @@ public interface Query
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 6205b74167..0a87c1f5f6 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 @@ public interface ReadOnlyBaseJoinColumn
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 3a35c3addf..4e3dc9f521 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 @@ public interface ReadOnlyJoinTableRelationshipStrategy
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 936e49c0e0..4cdd7074c4 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 @@ public interface ReadOnlyNamedColumn
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 @@ public interface ReadOnlyNamedColumn
* 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 4e027a83c4..a12bfaf51e 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 @@ public interface ReadOnlyOverride
*/
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 079b3a282f..9178b88ccc 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 @@ public interface ReadOnlyOverrideRelationship
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 43a793961a..6cfad5b67b 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 @@ public interface ReadOnlyTable
*/
boolean validatesAgainstDatabase();
+ TextRange getNameTextRange();
+
+ TextRange getSchemaTextRange();
+
+ TextRange getCatalogTextRange();
+
// ********** owner **********
@@ -127,6 +133,6 @@ public interface ReadOnlyTable
* (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 9f7fc03f48..567978db40 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 @@ public interface ReadOnlyTableColumn
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 b4901c8b09..1e0ddf1051 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface XmlContextNode
*/
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 d483ec56ad..1ac7a1b523 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.JpaContextNode;
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 @@ import org.eclipse.jpt.jpa.core.internal.context.PersistentAttributeTextRangeRes
* 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 @@ public interface Accessor extends JpaContextNode
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 786fc76b2d..44293c03d9 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 @@ import org.eclipse.jpt.jpa.core.resource.java.CompleteColumnAnnotation;
* 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 @@ public interface JavaColumn
* (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 e56e77e046..6e5992da1a 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.common.utility.internal.StringTools;
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 @@ public interface JavaConverter
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 995f0fc681..f7daf72fe4 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 @@ import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
* 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 @@ public interface JavaDiscriminatorColumn
{
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 d93495dd04..3f29656097 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 @@ import org.eclipse.jpt.jpa.core.resource.java.GeneratedValueAnnotation;
* 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 0d6b8abbce..ae3476a566 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 @@ import org.eclipse.jpt.jpa.core.resource.java.GeneratorAnnotation;
* 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 @@ public interface JavaGenerator
{
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 068f576114..84c4bb3702 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface JavaJpaContextNode
*/
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 b300c2b616..6814cba966 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 @@ import org.eclipse.jpt.jpa.core.context.VirtualOverride;
* 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 @@ public interface JavaOverrideContainer
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 b9fc81c592..3126e073b0 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 @@ public interface JavaPersistentAttribute
* 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 500c90e4ee..0bb932e97d 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface JavaQuery
// ********** 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 530065b728..7f58a626e9 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 @@ public interface JavaReadOnlyBaseColumn
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 e391b7f967..d3b0ea5dcd 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
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 8e7a5b4840..fb1e177c58 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
* 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 bd3002ad18..6ae887ccb1 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedColumn;
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 7c0b582651..c958afd3fa 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
* 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 651e56ff29..d44f3946e8 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyOverride;
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 b2b2d342d7..c866e0faa1 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyTable;
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 f878635d69..be6cfff6e1 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
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 6e4311933d..7aa5171d01 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.JpaFactory;
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 @@ public interface JavaTemporalConverter
@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 @@ public interface JavaTemporalConverter
@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 0841b9ccfe..fa5f1b1f3a 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 @@ public interface JavaVirtualColumn
// ********** 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 313fac9dd4..5cf62db7e9 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 @@ public interface OrmColumn
* (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 a376a1da88..30ee19a5f0 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 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlDiscriminatorColumn;
* 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 @@ public interface OrmDiscriminatorColumn
* 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 0a0f4875be..d0e16364ad 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.common.core.utility.TextRange;
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 interface OrmEnumeratedConverter
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 f42e8c098b..9b46749628 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 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlGeneratedValue;
* 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 @@ public interface OrmGeneratedValue
{
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 cd1791fd1f..75a644a795 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 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlGenerator;
* 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 @@ public interface OrmGenerator
{
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 75a4744fd1..dd1ecfd348 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 @@ package org.eclipse.jpt.jpa.core.context.orm;
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 @@ public interface OrmLobConverter
((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 07357527d4..c86e8ece87 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 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlOverride;
* 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 @@ public interface OrmOverrideContainer
*/
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 f35bed776a..9d2ee47a71 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface OrmQuery
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 679d9ee1f5..b3710cb5e2 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 @@ public interface OrmReadOnlyBaseColumn
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 e31619f90c..60cce206d9 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyBaseJoinColumn;
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 25ab84a48e..3fe6158835 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyJoinColumn;
* 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 736f6cdb7d..117f78d860 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 @@ import org.eclipse.jpt.jpa.core.context.XmlContextNode;
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 1ec9da334d..fd31237410 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyNamedDiscriminatorColumn;
* 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 e38c0ac1a3..857924cef7 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 @@ import org.eclipse.jpt.jpa.core.context.XmlContextNode;
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 d49312a8ac..14190cd74a 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 @@ import org.eclipse.jpt.jpa.core.context.XmlContextNode;
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 1dcd63e64b..7ffb482617 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 @@ import org.eclipse.jpt.jpa.core.context.ReadOnlyTableColumn;
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 166231a94a..b851bfe044 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.common.core.utility.TextRange;
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 interface OrmTemporalConverter
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 interface OrmTemporalConverter
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 1deafbb7a2..77ab5fd7ac 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 @@ public interface OrmVirtualColumn
// ********** 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 c040b94603..974a1abbcf 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 @@ package org.eclipse.jpt.jpa.core.context.orm;
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 @@ import org.eclipse.jpt.jpa.core.resource.orm.XmlVersion;
* 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 @@ public interface OrmXmlContextNodeFactory
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 107c129ebe..3dcbea731e 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.JpaFile;
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.JavaPrimaryKeyJoinColumn;
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 @@ public abstract class AbstractJpaFactory
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 @@ public abstract class AbstractJpaFactory
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 65a7d0a264..a88c0924eb 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.core.internal.AbstractJpaNode;
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 @@ public abstract class AbstractJpaContextNode
}
+ // ********** 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 0af1269cc8..d9dccef777 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 @@ public abstract class AbstractXmlContextNode
}
- // ********** 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 8918e1ce48..0000000000
--- 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 19b118f3b4..0000000000
--- 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 3d237dc6ca..0000000000
--- 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 da477387e9..0000000000
--- 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 901eae1c02..0000000000
--- 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 a2345cc459..0000000000
--- 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 8a759ea107..0000000000
--- 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 877b397111..0000000000
--- 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 adb744dcfd..0000000000
--- 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 a30cac215c..0000000000
--- 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 88b544a886..f43907ce37 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 @@ public abstract class AbstractAccessor
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 @@ public abstract class AbstractAccessor
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 01e404334b..a458615f16 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 @@ package org.eclipse.jpt.jpa.core.internal.context.java;
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 @@ public abstract class AbstractJavaAttributeMapping<A extends Annotation>
// ********** 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 @@ public abstract class AbstractJavaAttributeMapping<A extends Annotation>
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 3b12b80f90..79e8e32744 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.common.utility.internal.iterables.FilteringIterable;
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 @@ public abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O e
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 abstract class AbstractJavaBaseColumn<A extends BaseColumnAnnotation, O e
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 ef53809060..214c3f7f6a 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.JavaAttributeOverrideContainer;
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 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
// ********** 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 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
JpaValidationMessages.VIRTUAL_ATTRIBUTE_TARGET_NOT_AN_EMBEDDABLE,
new String[] {this.getName(), targetEmbeddableTypeName},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -238,15 +236,15 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
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 @@ public abstract class AbstractJavaBaseEmbeddedMapping<A extends Annotation>
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 92290de84f..32f6ba3ded 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.JavaEnumeratedConverter;
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 @@ public abstract class AbstractJavaBasicMapping
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 @@ public abstract class AbstractJavaBasicMapping
// ********** 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 b256d72998..7822d98eab 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.io.Serializable;
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 @@ public abstract class AbstractJavaEmbeddedIdMapping
// ********** 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 @@ public abstract class AbstractJavaEmbeddedIdMapping
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 @@ public abstract class AbstractJavaEmbeddedIdMapping
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 @@ public abstract class AbstractJavaEmbeddedIdMapping
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 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_NO_ARG_CONSTRUCTOR,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -172,7 +171,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- 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 @@ public abstract class AbstractJavaEmbeddedIdMapping
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 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_EQUALS_HASHCODE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -203,7 +202,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- 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 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -223,7 +222,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_BE_PUBLIC,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -231,7 +230,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- 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 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.VIRTUAL_ATTRIBUTE_EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -253,7 +252,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
JpaValidationMessages.EMBEDDED_ID_CLASS_SHOULD_IMPLEMENT_SERIALIZABLE,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -261,7 +260,7 @@ public abstract class AbstractJavaEmbeddedIdMapping
}
}
- 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 @@ public abstract class AbstractJavaEmbeddedIdMapping
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 @@ public abstract class AbstractJavaEmbeddedIdMapping
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 149053efa3..a3c1a18e17 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.JavaAssociationOverrideContainer;
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 @@ public abstract class AbstractJavaEmbeddedMapping
// ********** 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 @@ public abstract class AbstractJavaEmbeddedMapping
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 31067eeefc..4fc14e78b9 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.JavaJpaContextNode;
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 @@ public abstract class AbstractJavaEntity
return this.getJpaFactory().buildJavaDiscriminatorColumn(this, this.buildDiscriminatorColumnOwner());
}
- protected JavaDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
+ protected ReadOnlyNamedDiscriminatorColumn.Owner buildDiscriminatorColumnOwner() {
return new DiscriminatorColumnOwner();
}
@@ -1313,24 +1305,24 @@ public abstract class AbstractJavaEntity
// ********** 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 @@ public abstract class AbstractJavaEntity
}
}
- 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 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_ABSTRACT_TABLE_PER_CLASS_DEFINES_TABLE,
new String[] {this.getName()},
this,
- this.table.getValidationTextRange(astRoot)
+ this.table.getValidationTextRange()
)
);
}
@@ -1388,13 +1375,13 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
(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 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_NON_ROOT_DISCRIMINATOR_COLUMN_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorColumnTextRange(astRoot)
+ this.getDiscriminatorColumnTextRange()
)
);
}
@@ -1435,14 +1422,14 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_ABSTRACT_DISCRIMINATOR_VALUE_DEFINED,
new String[] {this.getName()},
this,
- this.getDiscriminatorValueTextRange(astRoot)
+ this.getDiscriminatorValueTextRange()
)
);
}
@@ -1462,14 +1449,14 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
JpaValidationMessages.ENTITY_TABLE_PER_CLASS_NOT_SUPPORTED_ON_PLATFORM,
new String[] {this.getName()},
this,
- this.getInheritanceStrategyTextRange(astRoot)
+ this.getInheritanceStrategyTextRange()
)
);
}
@@ -1493,23 +1480,23 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
protected class DiscriminatorColumnOwner
extends NamedColumnOwner
- implements JavaDiscriminatorColumn.Owner
+ implements ReadOnlyNamedDiscriminatorColumn.Owner
{
public String getDefaultColumnName(ReadOnlyNamedColumn column) {
return this.isDescendant() ?
@@ -1733,8 +1720,8 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 @@ public abstract class AbstractJavaEntity
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 ce719f84df..d47ae6e6ca 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 @@ public abstract class AbstractJavaGenerator<A extends GeneratorAnnotation>
// ********** 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 @@ public abstract class AbstractJavaGenerator<A extends GeneratorAnnotation>
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 7f3ae83366..1c85bfdd19 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.JavaIdMapping;
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 @@ public abstract class AbstractJavaIdMapping
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 @@ public abstract class AbstractJavaIdMapping
// ********** 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 bd400ef1fe..3208673c87 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.TypeMapping;
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 @@ public abstract class AbstractJavaJoinColumnRelationshipStrategy
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 @@ public abstract class AbstractJavaJoinColumnRelationshipStrategy
}
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
// ********** default join column **********
@@ -317,10 +316,10 @@ public abstract class AbstractJavaJoinColumnRelationshipStrategy
// ********** 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 2b5f2622d9..d66bb74e56 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 @@ public abstract class AbstractJavaJoinTableRelationshipStrategy
// ********** 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 d462f5cbf7..494412bda8 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 @@ public abstract class AbstractJavaJpaContextNode
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 ebf34ebef6..1756057ae4 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.JavaMappedSuperclass;
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 @@ public abstract class AbstractJavaMappedSuperclass
// ********** 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 @@ public abstract class AbstractJavaMappedSuperclass
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 629387495a..0da8c8de73 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 @@ public abstract class AbstractJavaMappingRelationship<M extends JavaRelationship
// ********** 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 270fd3cc60..118f1e7611 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.JavaJoinColumn;
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
}
}
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -969,15 +964,15 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
// ********** 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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
new String[] {getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -998,49 +993,49 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1059,7 +1054,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1078,7 +1073,7 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -1272,16 +1267,15 @@ public abstract class AbstractJavaMultiRelationshipMapping<A extends Relationshi
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 662ffbadd0..c9ea6f80f4 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.JavaJpaContextNode;
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 @@ public abstract class AbstractJavaNamedColumn<A extends NamedColumnAnnotation, O
// ********** 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 a8139f49d2..0000000000
--- 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 83595c5711..b42fd98fd5 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.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.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 @@ public abstract class AbstractJavaOverride<C extends JavaOverrideContainer, A ex
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 @@ public abstract class AbstractJavaOverride<C extends JavaOverrideContainer, A ex
// ********** 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 075af3cd83..cdd5354400 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.JavaAttributeMappingDefinition;
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 @@ public abstract class AbstractJavaPersistentAttribute
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 @@ public abstract class AbstractJavaPersistentAttribute
// ********** 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 e5ab9be8d6..6b4d04b97e 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.context.java.JavaTypeMappingDefinition;
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 @@ public abstract class AbstractJavaPersistentType
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 @@ public abstract class AbstractJavaPersistentType
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 @@ public abstract class AbstractJavaPersistentType
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 @@ public abstract class AbstractJavaPersistentType
// ********** validation **********
+ @Override
public void validate(List<IMessage> messages, IReporter reporter) {
- if (reporter.isCancelled()) {
- throw new ValidationCancelledException();
- }
+ super.validate(messages, reporter);
if (MappingTools.nodeIsInternalSource(this, this.resourceType)) {
- // build the AST root here to pass down
- this.validate(messages, reporter, this.buildASTRoot());
+ this.validateMapping(messages, reporter);
+ this.validateAttributes(messages, reporter);
}
}
- @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);
- }
-
- 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 @@ public abstract class AbstractJavaPersistentType
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 9c0e210eab..1c358154c6 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 @@ package org.eclipse.jpt.jpa.core.internal.context.java;
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 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
// ********** 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 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
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 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
JpaValidationMessages.QUERY_STATEMENT_UNDEFINED,
new String[] {this.name},
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
} else {
@@ -229,13 +228,17 @@ public abstract class AbstractJavaQuery<A extends QueryAnnotation>
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 a87afee3be..bbd66f5847 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 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
// ********** 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 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
msg,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
return;
@@ -355,7 +355,7 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
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 @@ public abstract class AbstractJavaRelationshipMapping<A extends RelationshipMapp
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 bc2e214ecf..abd87dc939 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 @@ public abstract class AbstractJavaSingleRelationshipMapping<A extends SingleRela
// ********** 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 d327a92f32..662abdb1af 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.JavaJpaContextNode;
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 @@ public abstract class AbstractJavaTable<A extends BaseTableAnnotation>
// ********** 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 e53a0c0279..444303f100 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.JavaPersistentType;
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 @@ public abstract class AbstractJavaTypeMapping<A extends Annotation>
// ********** 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 e8bb4821e1..26695518b9 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.JavaConverter;
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 @@ public abstract class AbstractJavaVersionMapping
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 @@ public abstract class AbstractJavaVersionMapping
// ********** 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 @@ public abstract class AbstractJavaVersionMapping
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 f6718b2611..d187bebd1a 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 @@ public abstract class AbstractJavaVirtualBaseColumn<O extends JavaReadOnlyBaseCo
// ********** 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 f51541a3ac..7a38bb6d0a 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 @@ public abstract class AbstractJavaVirtualNamedColumn<O extends ReadOnlyNamedColu
// ********** 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 2d44d0ad45..0ad85f39a8 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.VirtualNamedDiscriminatorColumn;
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 be591b8022..ece272b1aa 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.TypeMapping;
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 @@ public abstract class AbstractJavaVirtualOverride<C extends JavaOverrideContaine
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 @@ public abstract class AbstractJavaVirtualOverride<C extends JavaOverrideContaine
// ********** 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 b89f1a2db8..b92578cd5d 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.ReadOnlyJoinColumn;
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 @@ public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyRefere
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 @@ public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyRefere
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 @@ public abstract class AbstractJavaVirtualReferenceTable<T extends ReadOnlyRefere
// ********** 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 3adde36a20..234f06dadf 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.JavaJpaContextNode;
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 @@ public abstract class AbstractJavaVirtualTable<T extends ReadOnlyTable>
// ********** 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 831c48c2bf..137f21895d 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.PersistentType;
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 @@ public class FieldAccessor
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 06634f886b..3c77a2b887 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 @@ public class GenericJavaIdClassReference
// ********** 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 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_PUBLIC,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -277,7 +276,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_NOT_IMPLEMENT_SERIALIZABLE,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -289,7 +288,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_EQUALS_METHOD,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -301,7 +300,7 @@ public class GenericJavaIdClassReference
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_HASHCODE_METHOD,
new String[] {jrt.getTypeBinding().getQualifiedName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -309,13 +308,13 @@ public class GenericJavaIdClassReference
}
}
- 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 efbf688c40..58751beb54 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 @@ public class GenericJavaManyToManyRelationship
// ********** 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 d2a4bff421..d0c5cc8c05 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 @@ public class GenericJavaManyToOneRelationship
// ********** 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 15c2bdf220..762088dcc8 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 @@ public class GenericJavaMappedByRelationshipStrategy
// ********** 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 @@ public class GenericJavaMappedByRelationshipStrategy
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_UNRESOLVED_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
return;
@@ -227,8 +226,7 @@ public class GenericJavaMappedByRelationshipStrategy
messages.add(
this.buildMessage(
JpaValidationMessages.MAPPING_INVALID_MAPPED_BY,
- new String[] {this.mappedByAttribute},
- astRoot
+ new String[] {this.mappedByAttribute}
)
);
return;
@@ -240,14 +238,13 @@ public class GenericJavaMappedByRelationshipStrategy
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 @@ public class GenericJavaMappedByRelationshipStrategy
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 b817526c82..c60e214277 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.RelationshipMapping;
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 @@ public class GenericJavaMappingJoinColumnRelationshipStrategy
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -143,15 +140,15 @@ public class GenericJavaMappingJoinColumnRelationshipStrategy
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 @@ public class GenericJavaMappingJoinColumnRelationshipStrategy
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 e49cb1576d..815f50a3e0 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 @@ public class GenericJavaOneToManyRelationship
// ********** 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 c0335f4611..ae00df91e4 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 @@ public class GenericJavaOneToOneRelationship
// ********** 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 5a2dfa5b02..8dfc6f76ee 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.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.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 @@ public class GenericJavaOverrideJoinColumnRelationshipStrategy
// ********** misc **********
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -158,15 +154,15 @@ public class GenericJavaOverrideJoinColumnRelationshipStrategy
// ********** 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 @@ public class GenericJavaOverrideJoinColumnRelationshipStrategy
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 4d4c15732a..a208be5d5e 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.Entity;
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 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
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 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
}
}
- protected JavaReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -258,22 +256,22 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
// ********** 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 @@ public class GenericJavaPrimaryKeyJoinColumnRelationshipStrategy
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 bcfe509caa..192cb73136 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.ReadOnlyJoinTable;
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 @@ public class GenericJavaVirtualJoinTable
{
protected final ContextListContainer<JavaVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final JavaReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected JavaVirtualJoinColumn defaultInverseJoinColumn;
@@ -197,11 +193,11 @@ public class GenericJavaVirtualJoinTable
}
@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 @@ public class GenericJavaVirtualJoinTable
// ********** 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 @@ public class GenericJavaVirtualJoinTable
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -281,8 +277,8 @@ public class GenericJavaVirtualJoinTable
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 @@ public class GenericJavaVirtualJoinTable
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 @@ public class GenericJavaVirtualJoinTable
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 af74224308..0000000000
--- 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 5d1f33cb37..0000000000
--- 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 c9319716ea..0000000000
--- 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 6dbf8d9884..0000000000
--- 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 1b98aeaff2..66f3bfefeb 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 @@ public class JavaNullTypeMapping
* 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 @@ public class JavaNullTypeMapping
}
@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 cc39280cb8..0000000000
--- 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 83fe6f95ca..0000000000
--- 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 5c48c75400..0000000000
--- 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 4b51f79094..0000000000
--- 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 8d42bc6983..0000000000
--- 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 174e6b2b7a..0000000000
--- 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 c4186584fd..cb415a6c5c 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.PersistentType;
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 class PropertyAccessor
}
- 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 5c215f88d2..272f7c1f16 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.common.core.utility.TextRange;
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 @@ public abstract class AbstractOrmBaseColumn<X extends XmlBaseColumn, O extends O
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 7e641415e8..751246c4d9 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.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.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 @@ public abstract class AbstractOrmBaseEmbeddedMapping<X extends AbstractXmlEmbedd
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 8e0b48cf95..54edef49d7 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.OrmPersistentAttribute;
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 @@ public abstract class AbstractOrmBasicMapping<X extends XmlBasic>
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 a94e4ce07f..4690e3b2ab 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.OrmOverrideContainer;
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
}
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 @@ public abstract class AbstractOrmEntity<X extends XmlEntity>
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 4fd92d485b..b9e8cc7918 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.OrmPersistentAttribute;
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 @@ public abstract class AbstractOrmIdMapping<X extends XmlId>
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 043b819a69..f294d1322a 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.TypeMapping;
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 @@ public abstract class AbstractOrmJoinColumnRelationshipStrategy
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 @@ public abstract class AbstractOrmJoinColumnRelationshipStrategy
}
}
- 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 94da3f2d40..6bc760edc2 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.OrmIdClassReference;
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 @@ public abstract class AbstractOrmMappedSuperclass<X extends XmlMappedSuperclass>
}
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 8cc63ff444..0ccc534292 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.OrmJoinColumn;
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 @@ public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlM
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 @@ public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlM
return this.getContextNodeFactory().buildOrmJoinColumn(this, this.mapKeyJoinColumnOwner, xmlJoinColumn);
}
- protected OrmReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -1173,8 +1168,8 @@ public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlM
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 @@ public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlM
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 @@ public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlM
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -1285,12 +1280,11 @@ public abstract class AbstractOrmMultiRelationshipMapping<X extends AbstractXmlM
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 99df4a66f6..cca2a36030 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.common.utility.internal.iterables.EmptyIterable;
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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public abstract class AbstractOrmNamedColumn<X extends XmlNamedColumn, O extends
}
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 73f81db31f..0000000000
--- 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 300920b453..2dd10bb563 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.XmlContextNode;
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 @@ public abstract class AbstractOrmTable<X extends AbstractXmlTable>
}
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 ffb0353267..4c7d6324d6 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.OrmReadOnlyPersistentAttribute;
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 @@ public abstract class AbstractOrmTypeMapping<X extends XmlTypeMapping>
}
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 91c75ad2a7..6d8a4248e3 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.OrmTemporalConverter;
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 abstract class AbstractOrmVersionMapping<X extends XmlVersion>
}
}
- 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 e362a7160e..33f7ca4688 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.ReadOnlyBaseColumn;
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 abstract class AbstractOrmVirtualBaseColumn<O extends OrmReadOnlyBaseColu
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 93ba7dc0a4..9ad6e61483 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.VirtualNamedColumn;
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 @@ public abstract class AbstractOrmVirtualNamedColumn<O extends ReadOnlyNamedColum
}
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 2ab7e94013..89f42a85df 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.VirtualNamedDiscriminatorColumn;
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 54bb896f70..ce598a0456 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.ReadOnlyJoinColumn;
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 @@ public abstract class AbstractOrmVirtualReferenceTable<T extends ReadOnlyReferen
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 @@ public abstract class AbstractOrmVirtualReferenceTable<T extends ReadOnlyReferen
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 6024883875..2330cb9d7e 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.XmlContextNode;
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 @@ public abstract class AbstractOrmVirtualTable<T extends ReadOnlyTable>
}
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 bb750eb8f8..5d73b1af9b 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 @@ package org.eclipse.jpt.jpa.core.internal.context.orm;
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.OrmPrimaryKeyJoinColumn;
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 @@ public abstract class AbstractOrmXmlContextNodeFactory
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 @@ public abstract class AbstractOrmXmlContextNodeFactory
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 29557dd400..1543de4494 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.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.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 @@ public class GenericOrmMappingJoinColumnRelationshipStrategy
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -101,7 +98,7 @@ public class GenericOrmMappingJoinColumnRelationshipStrategy
// ********** join column owner **********
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -154,8 +151,8 @@ public class GenericOrmMappingJoinColumnRelationshipStrategy
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 38e575d0c0..bab7e57557 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.ReadOnlyJoinTable;
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 @@ public class GenericOrmMappingJoinTableRelationshipStrategy
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 a5e10e902c..036df5bda3 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.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.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 @@ public class GenericOrmOverrideJoinColumnRelationshipStrategy
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -123,7 +120,7 @@ public class GenericOrmOverrideJoinColumnRelationshipStrategy
// ********** join column owner **********
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -174,8 +171,8 @@ public class GenericOrmOverrideJoinColumnRelationshipStrategy
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 053052e25d..e94602d64d 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.Entity;
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 @@ public class GenericOrmPrimaryKeyJoinColumnRelationshipStrategy
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 @@ public class GenericOrmPrimaryKeyJoinColumnRelationshipStrategy
}
}
- protected OrmReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -258,7 +256,7 @@ public class GenericOrmPrimaryKeyJoinColumnRelationshipStrategy
// ********** join column owner **********
protected class PrimaryKeyJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected PrimaryKeyJoinColumnOwner() {
super();
@@ -316,8 +314,8 @@ public class GenericOrmPrimaryKeyJoinColumnRelationshipStrategy
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 7febe03324..55bf49a7f3 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.ReadOnlyJoinTable;
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 @@ public class GenericOrmVirtualJoinTable
{
protected final ContextListContainer<OrmVirtualJoinColumn, ReadOnlyJoinColumn> specifiedInverseJoinColumnContainer;
- protected final OrmReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
+ protected final ReadOnlyJoinColumn.Owner inverseJoinColumnOwner;
protected OrmVirtualJoinColumn defaultInverseJoinColumn;
@@ -196,11 +193,11 @@ public class GenericOrmVirtualJoinTable
}
@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 @@ public class GenericOrmVirtualJoinTable
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -331,8 +328,8 @@ public class GenericOrmVirtualJoinTable
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 @@ public class GenericOrmVirtualJoinTable
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 fb73c1b27f..737e39d26b 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.ReadOnlyNamedColumn;
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 @@ public class GenericOrmVirtualOverrideJoinColumnRelationshipStrategy
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 @@ public class GenericOrmVirtualOverrideJoinColumnRelationshipStrategy
}
}
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -315,7 +312,7 @@ public class GenericOrmVirtualOverrideJoinColumnRelationshipStrategy
// ********** join column owner **********
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -361,8 +358,8 @@ public class GenericOrmVirtualOverrideJoinColumnRelationshipStrategy
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 dd57b2b8ae..326d102d35 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.ReadOnlyNamedColumn;
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 @@ public class GenericOrmVirtualSecondaryTable
{
protected final ContextListContainer<OrmVirtualPrimaryKeyJoinColumn, JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumnContainer;
- protected final OrmReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
+ protected final ReadOnlyBaseJoinColumn.Owner primaryKeyJoinColumnOwner;
protected OrmVirtualPrimaryKeyJoinColumn defaultPrimaryKeyJoinColumn;
@@ -191,7 +188,7 @@ public class GenericOrmVirtualSecondaryTable
return true;
}
- protected OrmReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -243,7 +240,7 @@ public class GenericOrmVirtualSecondaryTable
// ********** 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 @@ public class GenericOrmVirtualSecondaryTable
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 9902535c1d..06a161c6b2 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.ReadOnlyJoinTableRelationshipStrategy;
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 @@ public class NullOrmJoinTableRelationshipStrategy
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 af7d7c03c4..0000000000
--- 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 269baad85c..0000000000
--- 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 03c139a93e..0000000000
--- 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 0b1cd614c1..0000000000
--- 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 5f90af8a8d..0000000000
--- 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 fe9b812e24..0000000000
--- 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 385aef2de5..0000000000
--- 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 dc950eb995..0000000000
--- 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 62ef537690..0000000000
--- 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 3a769597e7..0000000000
--- 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 47dc36ef6c..87774cdcab 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.OrmPersistentType;
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 @@ public abstract class SpecifiedOrmPersistentAttribute
}
}
- 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 060ceec39f..04e1026a90 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 class VirtualOrmPersistentAttribute
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 6553ee94a9..588a98fc16 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 @@ public abstract class AbstractPersistenceUnit
JpaValidationMessages.GENERATOR_DUPLICATE_NAME,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -2529,20 +2529,13 @@ public abstract class AbstractPersistenceUnit
}
// 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 @@ public abstract class AbstractPersistenceUnit
JpaValidationMessages.QUERY_DUPLICATE_NAME,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -2600,20 +2593,13 @@ public abstract class AbstractPersistenceUnit
}
// 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 6cb8ecdbf1..2f87bde464 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 java.util.List;
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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
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 @@ public abstract class AbstractEntityPrimaryKeyValidator extends
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 @@ public abstract class AbstractEntityPrimaryKeyValidator extends
JpaValidationMessages.ENTITY_NON_ROOT_ID_CLASS_SPECIFIED,
EMPTY_STRING_ARRAY,
entity(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
@@ -102,7 +94,7 @@ public abstract class AbstractEntityPrimaryKeyValidator extends
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 56d9ae3421..7c290b0840 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 48440aac5e..74fd1c7b24 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 @@ public abstract class AbstractMappedSuperclassPrimaryKeyValidator
extends AbstractPrimaryKeyValidator
{
protected AbstractMappedSuperclassPrimaryKeyValidator(
- MappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
+ MappedSuperclass mappedSuperclass) {
- super(mappedSuperclass, textRangeResolver);
+ super(mappedSuperclass);
}
@@ -30,11 +28,6 @@ public abstract class AbstractMappedSuperclassPrimaryKeyValidator
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 0c5ee3d935..8198b71376 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.common.utility.internal.StringTools;
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 @@ public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn
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,
- R textRangeResolver) {
- this(persistentAttribute, column, textRangeResolver, TableDescriptionProvider.Null.instance());
+ C column) {
+ this(persistentAttribute, column, 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 @@ public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -120,7 +111,7 @@ public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -208,7 +199,7 @@ public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -219,10 +210,6 @@ public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn
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 @@ public abstract class AbstractNamedColumnValidator<C extends ReadOnlyNamedColumn
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 3cf01eabc4..9e154faed2 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 java.util.List;
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 @@ public abstract class AbstractPersistentAttributeValidator
{
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 @@ public abstract class AbstractPersistentAttributeValidator
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 7d9605e3b8..5d92c9e19a 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.Collection;
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.EmbeddedIdMapping;
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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
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 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_PK_REDEFINED_ID_ATTRIBUTE,
EMPTY_STRING_ARRAY,
each,
- textRangeResolver().getAttributeMappingTextRange(each.getName())));
+ getAttributeMappingTextRange(each.getName())));
}
return;
}
@@ -104,7 +105,7 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_REQUIRED,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -118,7 +119,7 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_AND_EMBEDDED_ID_BOTH_USED,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -131,7 +132,7 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_AND_EMBEDDED_ID_BOTH_USED,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -144,7 +145,7 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_MULTIPLE_EMBEDDED_ID,
EMPTY_STRING_ARRAY,
typeMapping(),
- textRangeResolver().getTypeMappingTextRange()));
+ typeMapping().getValidationTextRange()));
}
}
@@ -157,7 +158,7 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE,
new String[] {idClassAttribute.getName(), idClassAttributeTypeName},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
}
@@ -225,7 +226,7 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_NO_MATCH,
new String[] {idClassAttribute.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange()));
+ idClassReference().getValidationTextRange()));
}
}
@@ -244,7 +245,7 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_DOES_NOT_EXIST,
new String[] {attributeMapping.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange())
+ idClassReference().getValidationTextRange())
);
}
}
@@ -286,7 +287,7 @@ public abstract class AbstractPrimaryKeyValidator
JpaValidationMessages.TYPE_MAPPING_ID_CLASS_MISSING_NO_ARG_CONSTRUCTOR,
new String[] {idClass.getName()},
typeMapping(),
- textRangeResolver().getIdClassTextRange())
+ idClassReference().getValidationTextRange())
);
}
}
@@ -330,7 +331,7 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
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 @@ public abstract class AbstractPrimaryKeyValidator
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 da999a22e5..b1926fa628 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 java.util.List;
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 @@ public abstract class AbstractTableValidator
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 @@ public abstract class AbstractTableValidator
this.table.getName()
},
this.table,
- this.textRangeResolver.getCatalogTextRange()
+ this.table.getCatalogTextRange()
);
}
@@ -108,7 +98,7 @@ public abstract class AbstractTableValidator
this.table.getName()
},
this.table,
- this.textRangeResolver.getCatalogTextRange()
+ this.table.getCatalogTextRange()
);
}
@@ -131,7 +121,7 @@ public abstract class AbstractTableValidator
this.table.getName()
},
this.table,
- this.textRangeResolver.getSchemaTextRange()
+ this.table.getSchemaTextRange()
);
}
@@ -145,7 +135,7 @@ public abstract class AbstractTableValidator
this.table.getName()
},
this.table,
- this.textRangeResolver.getSchemaTextRange()
+ this.table.getSchemaTextRange()
);
}
@@ -165,7 +155,7 @@ public abstract class AbstractTableValidator
message,
new String[] {this.table.getName()},
this.table,
- this.textRangeResolver.getNameTextRange()
+ this.table.getNameTextRange()
);
}
@@ -178,7 +168,7 @@ public abstract class AbstractTableValidator
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 353e98aa69..7f1491f88e 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 @@ public abstract class AbstractTemporalConverterValidator
{
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 @@ public abstract class AbstractTemporalConverterValidator
this.getInvalidTemporalMappingType(),
StringTools.EMPTY_STRING_ARRAY,
this.converter,
- this.getTextRangeResolver().getConverterTextRange()
+ this.converter.getValidationTextRange()
);
}
@@ -88,7 +81,7 @@ public abstract class AbstractTemporalConverterValidator
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 cba68a1093..4bdb6968b8 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 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.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 @@ public abstract class AbstractTypeMappingValidator<T extends TypeMapping>
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 @@ public abstract class AbstractTypeMappingValidator<T extends TypeMapping>
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 d7df3d59c4..a07e31550c 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 @@ public class AssociationOverrideInverseJoinColumnValidator
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 @@ public class AssociationOverrideInverseJoinColumnValidator
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 @@ public class AssociationOverrideInverseJoinColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -82,7 +79,7 @@ public class AssociationOverrideInverseJoinColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -108,7 +105,7 @@ public class AssociationOverrideInverseJoinColumnValidator
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -124,7 +121,7 @@ public class AssociationOverrideInverseJoinColumnValidator
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -146,7 +143,7 @@ public class AssociationOverrideInverseJoinColumnValidator
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 @@ public class AssociationOverrideInverseJoinColumnValidator
this.override.getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -182,7 +179,7 @@ public class AssociationOverrideInverseJoinColumnValidator
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 @@ public class AssociationOverrideInverseJoinColumnValidator
this.override.getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -233,7 +230,7 @@ public class AssociationOverrideInverseJoinColumnValidator
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -254,7 +251,7 @@ public class AssociationOverrideInverseJoinColumnValidator
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 a495440ed5..b2af74f775 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 @@ public class AssociationOverrideJoinColumnValidator
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 @@ public class AssociationOverrideJoinColumnValidator
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 @@ public class AssociationOverrideJoinColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -83,7 +80,7 @@ public class AssociationOverrideJoinColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -109,7 +106,7 @@ public class AssociationOverrideJoinColumnValidator
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -125,7 +122,7 @@ public class AssociationOverrideJoinColumnValidator
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -147,7 +144,7 @@ public class AssociationOverrideJoinColumnValidator
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 @@ public class AssociationOverrideJoinColumnValidator
this.override.getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -183,7 +180,7 @@ public class AssociationOverrideJoinColumnValidator
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 @@ public class AssociationOverrideJoinColumnValidator
this.override.getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -234,7 +231,7 @@ public class AssociationOverrideJoinColumnValidator
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -255,7 +252,7 @@ public class AssociationOverrideJoinColumnValidator
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 24731b8de4..7acdd11b03 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 class AssociationOverrideJoinTableValidator
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 @@ public class AssociationOverrideJoinTableValidator
this.table.getName()
},
this.table,
- this.getTextRangeResolver().getNameTextRange()
+ this.table.getNameTextRange()
);
}
@@ -75,7 +72,7 @@ public class AssociationOverrideJoinTableValidator
this.table.getCatalog()
},
this.table,
- this.getTextRangeResolver().getCatalogTextRange()
+ this.table.getCatalogTextRange()
);
}
@@ -95,7 +92,7 @@ public class AssociationOverrideJoinTableValidator
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 b8417c6248..8341adaf4f 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 class AssociationOverrideValidator
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 7f514740be..cbcfec0d98 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 class AttributeOverrideColumnValidator
public AttributeOverrideColumnValidator(
ReadOnlyAttributeOverride override,
ReadOnlyBaseColumn column,
- TableColumnTextRangeResolver textRangeResolver,
TableDescriptionProvider message) {
- super(column, textRangeResolver, message);
+ super(column, message);
this.override = override;
}
@@ -36,9 +34,8 @@ public class AttributeOverrideColumnValidator
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 @@ public class AttributeOverrideColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -84,7 +81,7 @@ public class AttributeOverrideColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -121,7 +118,7 @@ public class AttributeOverrideColumnValidator
this.getColumnTableDescriptionMessage()
},
this.getColumn(),
- this.getTextRangeResolver().getTableTextRange()
+ this.getColumn().getTableTextRange()
);
}
@@ -142,7 +139,7 @@ public class AttributeOverrideColumnValidator
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 7f820a41c4..fb1de8b57e 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 class AttributeOverrideValidator
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 5bab03af96..967c3525ab 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 java.util.List;
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 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
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 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -108,7 +105,7 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -128,7 +125,7 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
message,
StringTools.EMPTY_STRING_ARRAY,
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -138,7 +135,7 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
this.getVirtualAttributeUnspecifiedNameMultipleJoinColumnsMessage(),
new String[] {this.persistentAttribute.getName()},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -158,7 +155,7 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
message,
StringTools.EMPTY_STRING_ARRAY,
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -168,7 +165,7 @@ public abstract class BaseJoinColumnValidator<C extends ReadOnlyBaseJoinColumn,
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 793fd8dc46..0000000000
--- 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 c993c07889..c32a75a6e7 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 cafc2d9552..9d45cd357b 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 058f7b010f..3c1816170b 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 java.util.List;
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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
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 @@ public class GenericEntityPrimaryKeyValidator
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 c431490852..21cda0fbd2 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 java.util.List;
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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
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 @@ public class GenericMappedSuperclassPrimaryKeyValidator extends
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 c8112546d8..d071191ce7 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.core.runtime.Status;
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.MetamodelSynchronizer;
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 @@ public class GenericRootContextNode
// ********** 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 21e505ec43..d099c804c5 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 a495cc48ed..06c8da2964 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 87ddf14046..c5d2a48111 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 982d7c16c4..57794bf272 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 d9c3c2f232..857fdea471 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 @@ public class MapKeyAttributeOverrideColumnValidator
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 951bd5634b..ae5ee1e32e 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 @@ public class MapKeyAttributeOverrideValidator
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 ceced2be43..88792bae63 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 0487f75ba9..1a54fdd1bc 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 5f29dd78dc..066ca4ec61 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 class OneToOnePrimaryKeyJoinColumnValidator
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 30605494ce..2c9dee4b08 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.OverrideContainer;
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 @@ public abstract class OverrideValidator
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 @@ public abstract class OverrideValidator
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 @@ public abstract class OverrideValidator
this.getUnresolvedOverrideTypeMessage(),
new String[] {this.override.getName()},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
@@ -123,7 +117,7 @@ public abstract class OverrideValidator
this.container.getOverridableTypeMapping().getName()
},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
@@ -139,7 +133,7 @@ public abstract class OverrideValidator
this.container.getOverridableTypeMapping().getName()
},
this.override,
- this.textRangeResolver.getNameTextRange()
+ this.override.getNameTextRange()
);
}
@@ -156,7 +150,7 @@ public abstract class OverrideValidator
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 6d06448154..6c6a1d61cb 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 @@ public class PersistentFieldValidator
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 b4444380b2..cad66b37fb 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 @@ public class PersistentPropertyValidator
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 c531b28f01..84da4f8f0b 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 7ecf62d72b..1c56c3c39e 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context;
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 class SecondaryTablePrimaryKeyJoinColumnValidator
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 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -81,7 +79,7 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator
this.column.getReferencedColumnDbTable().getName()
},
this.column,
- this.textRangeResolver.getReferencedColumnNameTextRange()
+ this.column.getReferencedColumnNameTextRange()
);
}
@@ -103,7 +101,7 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator
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 @@ public class SecondaryTablePrimaryKeyJoinColumnValidator
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 ff7cbe3139..a976ea6ee8 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 6a099e58b6..f9428360c4 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 413f615d76..0c25be7646 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 @@ public abstract class AbstractJavaConverter
// ********** 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(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) {
- 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 b4a8322cb5..4522137905 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 9671612069..18fcd8875a 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.JavaOverride;
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 @@ public abstract class AbstractJavaOverrideContainer<
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 @@ public abstract class AbstractJavaOverrideContainer<
// ********** 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 55f80de86c..0bb359f33b 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.RelationshipMapping;
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 @@ public class GenericJavaAssociationOverride
// ********** 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 215fc57d2d..1b8c6d2e94 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.JavaAssociationOverrideContainer;
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 @@ public class GenericJavaAssociationOverrideContainer
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 0f7fbabdfb..944f081e09 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.JavaAttributeOverride;
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 @@ public class GenericJavaAttributeOverride
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 @@ public class GenericJavaAttributeOverride
// ********** 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 @@ public class GenericJavaAttributeOverride
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 7a26de7fea..408252677e 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 @@ public class GenericJavaCascade
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 4d2f68696b..835f23f0bf 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 @@ import org.eclipse.jpt.jpa.core.resource.java.DiscriminatorColumnAnnotation;
* 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 4f8f3082fe..00eaff0d3d 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 @@ public class GenericJavaGeneratedValue
// ********** 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 @@ public class GenericJavaGeneratedValue
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 350c7b1cb3..23827c028f 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 @@ public class GenericJavaGeneratorContainer
* @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 9669a2ae3f..b3e3fdeb20 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.common.utility.internal.iterables.FilteringIterable;
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 @@ import org.eclipse.jpt.jpa.db.Table;
* 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 @@ public class GenericJavaJoinColumn
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 @@ public class GenericJavaJoinColumn
// ********** 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 9dad944af2..920e2a7f83 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.TypeMapping;
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 @@ public class GenericJavaJoinTable
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 @@ public class GenericJavaJoinTable
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -197,7 +194,7 @@ public class GenericJavaJoinTable
}
}
- protected JavaReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -310,9 +307,9 @@ public class GenericJavaJoinTable
// ********** 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 @@ public class GenericJavaJoinTable
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -365,8 +362,8 @@ public class GenericJavaJoinTable
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 @@ public class GenericJavaJoinTable
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 @@ public class GenericJavaJoinTable
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 d088cf32c9..a0d566ce93 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.ReadOnlyJoinColumn;
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 @@ public class GenericJavaMappingJoinTableRelationshipStrategy
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 ba9d430fdc..b6beaffb6f 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.JavaAttributeMapping;
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 @@ public class GenericJavaOrderable
// ********** 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 @@ public class GenericJavaOrderable
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 @@ public class GenericJavaOrderable
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 47085a1fde..4b8352f93d 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.JavaAssociationOverride;
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 @@ public class GenericJavaOverrideRelationship
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 @@ public class GenericJavaOverrideRelationship
// ********** 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 a1c781c011..3f496ed5c0 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 @@ public class GenericJavaPersistentAttribute
// ********** 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 fefc5bcb9a..479581ac9f 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.Filter;
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 @@ import org.eclipse.jpt.jpa.db.Table;
* 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 @@ public class GenericJavaPrimaryKeyJoinColumn
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 @@ public class GenericJavaPrimaryKeyJoinColumn
// ********** 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 3b77df2586..afb406a2ba 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 @@ 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.NestableAnnotation;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.internal.iterables.CompositeIterable;
@@ -252,14 +251,14 @@ public class GenericJavaQueryContainer
* @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 a5a5c469c1..639cf4d929 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 @@ public class GenericJavaQueryHint
// ********** 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 ffef9ec507..b2bf515610 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 @@ public abstract class GenericJavaReferenceTable<A extends ReferenceTableAnnotati
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 @@ public abstract class GenericJavaReferenceTable<A extends ReferenceTableAnnotati
}
}
- protected abstract JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner();
+ protected abstract ReadOnlyJoinColumn.Owner buildJoinColumnOwner();
protected ContextListContainer<JavaJoinColumn, JoinColumnAnnotation> buildSpecifiedJoinColumnContainer(){
SpecifiedJoinColumnContainer container = new SpecifiedJoinColumnContainer();
@@ -232,7 +232,7 @@ public abstract class GenericJavaReferenceTable<A extends ReferenceTableAnnotati
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 @@ public abstract class GenericJavaReferenceTable<A extends ReferenceTableAnnotati
// ********** 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 425f950fbb..c780b8cc14 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.ReadOnlyBaseJoinColumn;
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 @@ public class GenericJavaSecondaryTable
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 @@ public class GenericJavaSecondaryTable
}
}
- protected JavaReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -320,15 +317,15 @@ public class GenericJavaSecondaryTable
// ********** 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 @@ public class GenericJavaSecondaryTable
// ********** 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 @@ public class GenericJavaSecondaryTable
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 0fc14bdb45..b4f4d88c0d 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 @@ public class GenericJavaUniqueConstraint
// ********** 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 d7f6b3b98d..d0a88fe697 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.RelationshipMapping;
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 @@ public class GenericJavaVirtualAssociationOverride
// ********** 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 a4c5705f52..76ede6942a 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.JavaAttributeOverride;
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 @@ public class GenericJavaVirtualAttributeOverride
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 61d73f863a..d4ea8d0c21 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 @@ import org.eclipse.jpt.jpa.db.Table;
* 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 @@ public class GenericJavaVirtualJoinColumn
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 @@ public class GenericJavaVirtualJoinColumn
// ********** 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 71ef4b44d9..4de05f67a5 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.ReadOnlyNamedColumn;
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 @@ public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
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 @@ public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
}
}
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -290,8 +286,8 @@ public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
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 @@ public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
// ********** 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 @@ public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
// ********** join column owner **********
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -359,12 +355,12 @@ public class GenericJavaVirtualOverrideJoinColumnRelationshipStrategy
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 073d0ca591..f0d8c9f3ec 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.JavaVirtualAssociationOverride;
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 @@ public class GenericJavaVirtualOverrideRelationship
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 @@ public class GenericJavaVirtualOverrideRelationship
// ********** 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 0b5c080248..10a836d69c 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 @@ public class GenericJavaVirtualUniqueConstraint
// ********** 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 981ebaf258..313255e3de 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
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 fa5ddd6626..000860fa09 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context.java;
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 90d1ba4ff9..e37bb8d68e 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 @@ public class NullJavaConverter
// 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 1787c7655b..301ec25716 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 @@ public class NullJavaJoinColumnRelationshipStrategy
// ********** 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 547a93fa4c..abbe86491b 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 @@ public class NullJavaJoinTableRelationshipStrategy
// ********** validation **********
- public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.getRelationship().getValidationTextRange(astRoot);
+ public TextRange getValidationTextRange() {
+ return this.getRelationship().getValidationTextRange();
}
@@ -110,11 +108,11 @@ public class NullJavaJoinTableRelationshipStrategy
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 d4457f3730..3805f25344 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.common.core.utility.TextRange;
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 @@ public abstract class AbstractOrmConverter
@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 a1cb23f604..2aefecf3bb 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.OrmAttributeOverrideContainer;
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 @@ public abstract class AbstractOrmEmbeddedMapping<X extends XmlEmbedded>
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 2a5aecc2ac..3b38cfba39 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 93c19b4866..b41cbc93f8 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.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.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 @@ public abstract class AbstractOrmOverride<C extends OrmOverrideContainer, X exte
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 @@ public abstract class AbstractOrmOverride<C extends OrmOverrideContainer, X exte
}
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 038e1f2e30..7ab0fe394b 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.OrmReadOnlyOverride;
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 @@ public abstract class AbstractOrmOverrideContainer<
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 2a46f57e60..5f53f120d4 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.ReadOnlyTableColumn.Owner;
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 @@ public abstract class AbstractOrmVirtualOverride<C extends OrmOverrideContainer>
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 @@ public abstract class AbstractOrmVirtualOverride<C extends OrmOverrideContainer>
}
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 af85f006d0..6bfa16dba8 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.RelationshipMapping;
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 @@ public class GenericOrmAssociationOverride
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 f0d01182d3..a0c014fe39 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.OrmAssociationOverride;
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 @@ public class GenericOrmAssociationOverrideContainer
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 22ea7a8b00..c6c768f403 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.OrmAttributeOverrideContainer;
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 @@ public class GenericOrmAttributeOverride
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 82c9b8b39a..25bdf524e1 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.common.utility.internal.iterables.EmptyIterable;
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 @@ import org.eclipse.jpt.jpa.db.Table;
* <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 @@ public class GenericOrmJoinColumn
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 @@ public class GenericOrmJoinColumn
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 6a69301767..e81482812d 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.TypeMapping;
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 @@ public class GenericOrmJoinTable
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 @@ public class GenericOrmJoinTable
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -208,7 +205,7 @@ public class GenericOrmJoinTable
}
}
- protected OrmReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildInverseJoinColumnOwner() {
return new InverseJoinColumnOwner();
}
@@ -330,7 +327,7 @@ public class GenericOrmJoinTable
* just a little common behavior
*/
protected abstract class AbstractJoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected AbstractJoinColumnOwner() {
super();
@@ -420,8 +417,8 @@ public class GenericOrmJoinTable
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 @@ public class GenericOrmJoinTable
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 45656e8bf3..18203e77d9 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.ReadOnlyNamedColumn;
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 @@ public class GenericOrmOrderable
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 0f010df5af..3b8657c647 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.OrmAssociationOverride;
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 @@ public class GenericOrmOverrideRelationship
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 @@ public class GenericOrmOverrideRelationship
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 83ce2991a7..5bf20e8562 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 @@ public class GenericOrmPersistentAttribute
@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 26c08d3df7..8d22194f05 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa1.context.orm;
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 @@ import org.eclipse.jpt.jpa.db.Table;
* <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 @@ public class GenericOrmPrimaryKeyJoinColumn
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 @@ public class GenericOrmPrimaryKeyJoinColumn
// ********** 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 1c99fd10df..ca18fc757d 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.ReadOnlyJoinColumn;
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 @@ public abstract class GenericOrmReferenceTable<X extends AbstractXmlReferenceTab
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 @@ public abstract class GenericOrmReferenceTable<X extends AbstractXmlReferenceTab
}
}
- 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 11ab77c427..8947aad617 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.ReadOnlyPrimaryKeyJoinColumn;
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 @@ public class GenericOrmSecondaryTable
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 @@ public class GenericOrmSecondaryTable
}
}
- protected OrmReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
+ protected ReadOnlyBaseJoinColumn.Owner buildPrimaryKeyJoinColumnOwner() {
return new PrimaryKeyJoinColumnOwner();
}
@@ -360,7 +357,7 @@ public class GenericOrmSecondaryTable
// ********** 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 @@ public class GenericOrmSecondaryTable
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 4618e9f0cc..a549c171d2 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.RelationshipMapping;
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 @@ public class GenericOrmVirtualAssociationOverride
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 ca5d64aba2..e9e188e5f5 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.OrmAttributeOverride;
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 @@ public class GenericOrmVirtualAttributeOverride
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 25909adac9..477f89721d 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 @@ 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.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 @@ import org.eclipse.jpt.jpa.db.Table;
* <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 @@ public class GenericOrmVirtualJoinColumn
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 class GenericOrmVirtualJoinColumn
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 e77e69ed0c..ee60d5f28c 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.OrmVirtualAssociationOverride;
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 @@ public class GenericOrmVirtualOverrideRelationship
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 @@ public class GenericOrmVirtualOverrideRelationship
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 03c99592bb..a3caa4e015 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 @@ import org.eclipse.jpt.jpa.db.Table;
* <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 @@ public class GenericOrmVirtualPrimaryKeyJoinColumn
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 @@ public class GenericOrmVirtualPrimaryKeyJoinColumn
// ********** 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 f3e45023da..ae6dcfba65 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 @@ import org.eclipse.jpt.jpa.core.jpa2.context.CollectionTable2_0;
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 082cd49b87..ff43925cbc 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa2.context;
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 4714555ae3..872d2952c2 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 36d824fafa..1381216ddb 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.JavaEnumeratedConverter;
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
return this.getJpaFactory().buildJavaJoinColumn(this, this.mapKeyJoinColumnOwner, joinColumnAnnotation);
}
- protected JavaReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -1471,43 +1465,43 @@ public abstract class AbstractJavaElementCollectionMapping2_0
// ********** 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);
- }
-
- protected void validateNoEmbeddableInMappingContainsProhibitedMapping(List<IMessage> messages, CompilationUnit 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) {
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
new String[] {this.getName(),
embeddable.getName(), relationshipMapping.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1573,14 +1567,14 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ATTRIBUTE_TYPE_IS_NOT_SUPPORTED_COLLECTION_TYPE,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1628,14 +1622,14 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
JpaValidationMessages.VIRTUAL_ATTRIBUTE_ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1655,7 +1649,7 @@ public abstract class AbstractJavaElementCollectionMapping2_0
JpaValidationMessages.ELEMENT_COLLECTION_TARGET_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
}
@@ -1673,7 +1667,7 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
JpaValidationMessages.VIRTUAL_ATTRIBUTE_MAP_KEY_CLASS_NOT_DEFINED,
new String[] {this.getName()},
this,
- this.getValidationTextRange(astRoot)
+ this.getValidationTextRange()
)
);
} else {
@@ -1729,7 +1723,7 @@ public abstract class AbstractJavaElementCollectionMapping2_0
JpaValidationMessages.MAP_KEY_CLASS_NOT_DEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getMapKeyClassTextRange(astRoot)
+ this.getMapKeyClassTextRange()
)
);
}
@@ -1747,7 +1741,7 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
// ********** map key join column owner **********
protected class MapKeyJoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected MapKeyJoinColumnOwner() {
super();
@@ -2058,16 +2052,15 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 @@ public abstract class AbstractJavaElementCollectionMapping2_0
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 5b8595bab7..aab221ccde 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 @@ public class GenericJavaCacheable2_0
// ********** 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 dbcea8372c..3f9022e1bb 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.PersistentAttribute;
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 @@ public class GenericJavaCollectionTable2_0
}
@Override
- protected JavaReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -96,7 +92,7 @@ public class GenericJavaCollectionTable2_0
* these point at the source/owning entity
*/
protected class JoinColumnOwner
- implements JavaReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -124,8 +120,8 @@ public class GenericJavaCollectionTable2_0
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 @@ public class GenericJavaCollectionTable2_0
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 6050364ba3..3d4720bece 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 @@ public class GenericJavaDerivedIdentity2_0
// ********** 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 bdd4cd8ed6..679087ba11 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 @@ public class GenericJavaIdDerivedIdentityStrategy2_0
// ********** 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 6ba8363949..75a15ea9e8 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 @@ public class GenericJavaMapsIdDerivedIdentityStrategy2_0
// ********** 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 @@ public class GenericJavaMapsIdDerivedIdentityStrategy2_0
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 @@ public class GenericJavaMapsIdDerivedIdentityStrategy2_0
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 bc15a0356b..c73f0f454e 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 @@ public class GenericJavaOrphanRemoval2_0
// ********** 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 c4a7ab7f72..d20a993672 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 @@ public class GenericJavaOverrideJoinTableRelationshipStrategy2_0
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 4bdd41b7a4..8d9b3ee559 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.ReadOnlyRelationship;
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 @@ public class GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0
// ********** 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 @@ public class GenericJavaVirtualOverrideJoinTableRelationshipStrategy2_0
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 ec9d7da35b..77062871c7 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa2.context.java;
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 cedad0cb21..87d119352f 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 @@ public class NullJavaCacheable2_0
// ********** 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 c0259aea44..10256531ee 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 @@ public class NullJavaDerivedIdentity2_0
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 223f805202..9a7a1bdd80 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 @@ public class NullJavaMapKeyColumn2_0
// ********** 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 200f20541b..89ae8ab11a 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 @@ public class NullJavaOrphanRemoval2_0
// ********** 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 1afa139065..9f333f7fb6 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.OrmTemporalConverter;
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
return this.getContextNodeFactory().buildOrmJoinColumn(this, this.mapKeyJoinColumnOwner, xmlJoinColumn);
}
- protected OrmReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildMapKeyJoinColumnOwner() {
return new MapKeyJoinColumnOwner();
}
@@ -1886,8 +1881,8 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 @@ public abstract class AbstractOrmElementCollectionMapping2_0<X extends XmlElemen
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 cb2c10dd87..fa916e2d85 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.PersistentAttribute;
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 @@ public class GenericOrmCollectionTable2_0
}
@Override
- protected OrmReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
+ protected ReadOnlyJoinColumn.Owner buildJoinColumnOwner() {
return new JoinColumnOwner();
}
@@ -112,7 +109,7 @@ public class GenericOrmCollectionTable2_0
* these point at the source/owning entity
*/
protected class JoinColumnOwner
- implements OrmReadOnlyJoinColumn.Owner
+ implements ReadOnlyJoinColumn.Owner
{
protected JoinColumnOwner() {
super();
@@ -192,8 +189,8 @@ public class GenericOrmCollectionTable2_0
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 ce3c95d40b..ee7a6d513b 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.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.orm.AbstractOrmJoinTableRelationshipStrategy;
import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmOverrideRelationship2_0;
@@ -47,15 +45,15 @@ public class GenericOrmOverrideJoinTableRelationshipStrategy2_0
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 79133360e8..0b4c77e23e 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.ReadOnlyRelationship;
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 @@ public class GenericOrmVirtualOverrideJoinTableRelationshipStrategy2_0
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 eb31b52553..1dfb78781f 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa2.context.orm;
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 1e37f03c99..97331a5545 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa2.context.orm;
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 15a5e743bb..c14931fe69 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 @@ package org.eclipse.jpt.jpa.core.internal.jpa2.context.orm;
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 b7050489d9..293854fa33 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.AssociationOverrideContainer;
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 @@ import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
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 @@ public interface AssociationOverrideContainer2_0
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 ca67250ac0..0c0d64e03b 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 @@ package org.eclipse.jpt.jpa.core.jpa2.context;
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 @@ import org.eclipse.jpt.jpa.core.internal.context.TableTextRangeResolver;
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 da67243391..90bc2dec08 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.ReadOnlyJoinColumn;
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 @@ public interface ReadOnlyOverrideRelationship2_0
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 8deb0ade29..b43f1cc2a6 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 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* 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 @@ public interface JavaDerivedIdentity2_0
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 2b0793d0f3..14cb26ee5f 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.JavaAttributeMapping;
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 @@ public interface JavaMapKeyTemporalConverter2_0
@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 ce24f390f1..3e24e49527 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.OrmBaseEnumeratedConverter;
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 @@ public interface OrmMapKeyEnumeratedConverter2_0
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 b63d328a81..b5daa9c67f 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.OrmBaseTemporalConverter;
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 @@ public interface OrmMapKeyTemporalConverter2_0
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 c10376fc63..2b299503f8 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
@@ -8,7 +8,8 @@
* Oracle - initial API and implementation
******************************************************************************/
package org.eclipse.jpt.jpa.eclipselink.core.context;
- import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
+ import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.common.utility.internal.iterables.ArrayIterable;
import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
/**
@@ -24,7 +25,7 @@ import org.eclipse.jpt.jpa.core.context.JpaNamedContextNode;
* 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.1
*/
public interface EclipseLinkConverter
@@ -49,5 +50,8 @@ public interface EclipseLinkConverter
* @see org.eclipse.jdt.core.IType#getFullyQualifiedName(char)
*/
char getEnclosingTypeSeparator();
+
+ TextRange getNameTextRange();
+
}
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 0169a52e23..5da9b356b3 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 @@ import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorC
* 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 8879430be2..c0ee83351a 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 @@ import org.eclipse.jpt.jpa.eclipselink.core.context.ReadOnlyTenantDiscriminatorC
* 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 83698b02ee..ea438863a3 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.IJavaProject;
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 @@ public class EclipseLinkPersistenceUnit
EclipseLinkJpaValidationMessages.CONVERTER_DUPLICATE_NAME,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -1054,20 +1053,13 @@ public class EclipseLinkPersistenceUnit
}
// 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 @@ public class EclipseLinkPersistenceUnit
EclipseLinkJpaValidationMessages.GENERATOR_EQUIVALENT,
parms,
dup,
- this.extractNameTextRange(dup)
+ dup.getNameTextRange()
)
);
}
@@ -1113,7 +1105,7 @@ public class EclipseLinkPersistenceUnit
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 0ada0fb11b..3b339dd6b0 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
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 @@ import org.eclipse.wst.validation.internal.provisional.core.IMessage;
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 @@ public abstract class AbstractEclipseLinkTypeMappingValidator<T extends TypeMapp
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 8a9057b880..45a51c9632 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.ArrayTools;
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 @@ public class EclipseLinkConvertValidator
{
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 @@ public class EclipseLinkConvertValidator
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 947aecf2d9..db4da9a1b0 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 @@ public class EclipseLinkDynamicTypeMappingValidator
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 29a3a3fce5..d56ca69bb8 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
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 @@ public class EclipseLinkEntityPrimaryKeyValidator
extends AbstractEntityPrimaryKeyValidator
{
public EclipseLinkEntityPrimaryKeyValidator(
- EclipseLinkEntity entity, PrimaryKeyTextRangeResolver textRangeResolver) {
+ EclipseLinkEntity entity) {
- super(entity, textRangeResolver);
+ super(entity);
}
@@ -49,7 +48,7 @@ public class EclipseLinkEntityPrimaryKeyValidator
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 b3b97d2791..52b50687ff 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
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 @@ public class EclipseLinkMappedSuperclassPrimaryKeyValidator
extends AbstractMappedSuperclassPrimaryKeyValidator
{
public EclipseLinkMappedSuperclassPrimaryKeyValidator(
- EclipseLinkMappedSuperclass mappedSuperclass, PrimaryKeyTextRangeResolver textRangeResolver) {
+ EclipseLinkMappedSuperclass mappedSuperclass) {
- super(mappedSuperclass, textRangeResolver);
+ super(mappedSuperclass);
}
@@ -49,7 +48,7 @@ public class EclipseLinkMappedSuperclassPrimaryKeyValidator
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 aab2123010..fe4a0094f3 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
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 1a0f14d1b7..7e96c78b8c 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
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 @@ public class EclipseLinkPersistentAttributeValidator
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 a2f720f05f..82704c5ea7 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context;
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 0ca15e5edc..d2f4495968 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.jpt.jpa.eclipselink.core.internal.EclipseLinkJpaValidationMes
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 @@ public class TenantDiscriminatorColumnValidator2_3
this.column.getDbTable().getName()
},
this.column,
- this.textRangeResolver.getNameTextRange()
+ this.column.getNameTextRange()
);
}
@@ -93,7 +91,7 @@ public class TenantDiscriminatorColumnValidator2_3
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 4d558ee500..6abdf9ce6f 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.Filter;
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 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.java.EclipseLinkTenantDiscr
* 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 @@ public class EclipseLinkJavaTenantDiscriminatorColumn2_3
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 @@ public class EclipseLinkJavaTenantDiscriminatorColumn2_3
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 @@ public class EclipseLinkJavaTenantDiscriminatorColumn2_3
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 class EclipseLinkJavaTenantDiscriminatorColumn2_3
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 d04f0dc00b..b33766c951 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 @@ public class EclipseLinkJavaTimeOfDay
// ********** 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 cc66614cf4..a2e8a96516 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 @@ public class EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3
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 @@ public class EclipseLinkJavaVirtualTenantDiscriminatorColumn2_3
// ********** 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 082ca1d8ac..814459c351 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.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.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 @@ public class JavaEclipseLinkArrayMapping2_3
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 @@ public class JavaEclipseLinkArrayMapping2_3
// ********** 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 131a82acea..912f542844 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 @@ public class JavaEclipseLinkBasicMapping
// ********** 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 ff5600b69c..68aac4c74b 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 @@ public class JavaEclipseLinkCachingImpl
// ********** 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 @@ public class JavaEclipseLinkCachingImpl
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 b391bc8ddf..6f0abb9a28 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 @@ public class JavaEclipseLinkChangeTracking
// ********** 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 41c83ced16..efe66b8259 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 @@ public class JavaEclipseLinkConversionValue
// ********** 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 5704051483..5e4592ca56 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.Converter;
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 @@ public class JavaEclipseLinkConvert
@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 0b15ca6dce..b2fb77cdb4 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 @@ public abstract class JavaEclipseLinkConverter<A extends EclipseLinkNamedConvert
// ********** 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 @@ public abstract class JavaEclipseLinkConverter<A extends EclipseLinkNamedConvert
EclipseLinkJpaValidationMessages.CONVERTER_NAME_UNDEFINED,
EMPTY_STRING_ARRAY,
this,
- this.getNameTextRange(astRoot)
+ this.getNameTextRange()
)
);
return;
@@ -142,19 +141,19 @@ public abstract class JavaEclipseLinkConverter<A extends EclipseLinkNamedConvert
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 549acbf736..a2eafbf50e 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 @@ public abstract class JavaEclipseLinkConverterClassConverter<A extends EclipseLi
//************ 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 @@ public abstract class JavaEclipseLinkConverterClassConverter<A extends EclipseLi
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 @@ public abstract class JavaEclipseLinkConverterClassConverter<A extends EclipseLi
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 @@ public abstract class JavaEclipseLinkConverterClassConverter<A extends EclipseLi
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 48f7bce159..2d5fe9174c 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 @@ public class JavaEclipseLinkConverterContainerImpl
* @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 70b7d67957..e13d9e3cde 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 @@ public class JavaEclipseLinkCustomConverter
}
@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 55c275757f..1bf623178e 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
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 @@ public class JavaEclipseLinkCustomizer
// ********** 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 @@ public class JavaEclipseLinkCustomizer
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);
+ }
+
+ /**
+ * 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(CompilationUnit astRoot) {
- TextRange textRange = this.getCustomizerAnnotation().getTextRange(astRoot);
- return (textRange != null) ? textRange : this.getTypeMapping().getValidationTextRange(astRoot);
+ 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 f2ba879a37..74945d2c3e 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 @@ public class JavaEclipseLinkElementCollectionMapping2_0
// ********** 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 aa64876362..87a5002b02 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 @@ public class JavaEclipseLinkEmbeddableImpl
// ********** 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 324e1e264b..d9e9956fc0 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.NotNullFilter;
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.EclipseLink2_3JpaPlatformFa
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 @@ public class JavaEclipseLinkEntityImpl
// ********** 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 584749bc0d..7915869c6b 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 @@ public class JavaEclipseLinkIdMapping
// ********** 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 fcb9dd1148..21edcc429a 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 @@ public class JavaEclipseLinkJoinFetch
// ********** 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 b169bd9e87..a20c7e1234 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 @@ public class JavaEclipseLinkManyToManyMapping
// ********** 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 2c1a52650a..84907a9b95 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 @@ public class JavaEclipseLinkManyToOneMapping
// ********** 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 a7691ed13e..e18d42e84e 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.EclipseLink2_3JpaPlatformFa
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 @@ public class JavaEclipseLinkMappedSuperclassImpl
// ********** 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 821a4f6be5..5b8a6acd50 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.ReadOnlyNamedDiscriminatorColumn;
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
return container;
}
- protected JavaReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -463,7 +462,7 @@ public class JavaEclipseLinkMultitenancyImpl2_3
// ********** JavaReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements JavaReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -502,12 +501,12 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
// ********** 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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
EclipseLinkJpaValidationMessages.MULTITENANT_TABLE_PER_TENANT_NOT_SUPPORTED,
EMPTY_STRING_ARRAY,
this,
- this.getMultitenantAnnotationTextRange(astRoot)
+ this.getMultitenantAnnotationTextRange()
)
);
}
@@ -695,7 +694,7 @@ public class JavaEclipseLinkMultitenancyImpl2_3
EclipseLinkJpaValidationMessages.MULTITENANT_VPD_MIGHT_NOT_BE_NOT_SUPPORTED,
EMPTY_STRING_ARRAY,
this,
- this.getMultitenantAnnotationTextRange(astRoot)
+ this.getMultitenantAnnotationTextRange()
)
);
}
@@ -706,7 +705,7 @@ public class JavaEclipseLinkMultitenancyImpl2_3
EclipseLinkJpaValidationMessages.MULTITENANT_VPD_NOT_SUPPORTED_ON_NON_ORACLE_DATABASE_PLATFORM,
new String[] {targetDatabase},
this,
- this.getMultitenantAnnotationTextRange(astRoot)
+ this.getMultitenantAnnotationTextRange()
)
);
}
@@ -719,13 +718,13 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 @@ public class JavaEclipseLinkMultitenancyImpl2_3
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 69bc1deada..790c1f4650 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 @@ public class JavaEclipseLinkMutable
// ********** 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 8be199c18e..2d791f2301 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context.java;
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 @@ public class JavaEclipseLinkObjectTypeConverter
// ********** 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 @@ public class JavaEclipseLinkObjectTypeConverter
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 8dfc2c5ea7..7d7e2dde00 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 @@ public class JavaEclipseLinkOneToManyMapping
// ********** 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 ae6866d9d2..459e49ebc7 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 @@ public class JavaEclipseLinkOneToOneMapping
// ********** 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 01b6e9238b..d4794f006a 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 @@ public class JavaEclipseLinkPrivateOwned
// ********** 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 0cc0da0052..c3f3c79c43 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 @@ public class JavaEclipseLinkReadOnly
// ********** 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 92b1f9bfcf..584b11d7b1 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 @@ public class JavaEclipseLinkVersionMapping
// ********** 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 @@ public class JavaEclipseLinkVersionMapping
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 47b1b00a4a..1307e56733 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 @@ public class NullJavaEclipseLinkMultitenancy2_3
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 7e9c72ffcd..45a24cf949 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 @@ public class SpecifiedJavaEclipseLinkPersistentAttribute
// ********** 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 fb7ae7852e..bf59eb4a4b 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.ReadOnlyNamedColumn;
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 @@ public class EclipseLinkEntityMappingsImpl
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 @@ public class EclipseLinkEntityMappingsImpl
}
}
- protected OrmReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -372,7 +371,7 @@ public class EclipseLinkEntityMappingsImpl
// ********** OrmReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements OrmReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -420,7 +419,7 @@ public class EclipseLinkEntityMappingsImpl
/**
* 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 463756227a..bfd7021447 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm;
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 @@ import org.eclipse.jpt.jpa.eclipselink.core.resource.orm.v2_3.XmlTenantDiscrimin
* <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 @@ public class EclipseLinkOrmTenantDiscriminatorColumn2_3
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 @@ public class EclipseLinkOrmTenantDiscriminatorColumn2_3
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 aceef294b9..0602fe2e87 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm;
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 @@ public class GenericOrmVirtualTenantDiscriminatorColumn2_3
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 class GenericOrmVirtualTenantDiscriminatorColumn2_3
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 fcfe9537db..ddeb5749f6 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.OrmPersistentAttribute;
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 @@ public class OrmEclipseLinkArrayMapping2_3
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 30e6084c70..d65bc785d2 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.OrmAttributeMapping;
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 @@ public class OrmEclipseLinkConvert
((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 ae750c9a2d..9107b562cb 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 @@ public class OrmEclipseLinkEmbeddableImpl
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 eb03727958..6343a35ece 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 @@ public class OrmEclipseLinkEntityImpl
@Override
protected JptValidator buildPrimaryKeyValidator() {
- return new EclipseLinkEntityPrimaryKeyValidator(this, buildTextRangeResolver());
+ return new EclipseLinkEntityPrimaryKeyValidator(this);
}
@Override
@@ -433,7 +433,7 @@ public class OrmEclipseLinkEntityImpl
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 c2e2e80170..947487d6f5 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.EclipseLinkJpaPlatformFacto
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 @@ public class OrmEclipseLinkMappedSuperclassImpl
@Override
protected JptValidator buildPrimaryKeyValidator() {
- return new EclipseLinkMappedSuperclassPrimaryKeyValidator(this, this.buildTextRangeResolver());
+ return new EclipseLinkMappedSuperclassPrimaryKeyValidator(this);
}
@Override
@@ -382,7 +381,7 @@ public class OrmEclipseLinkMappedSuperclassImpl
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 2e54001c3f..256d00b8f4 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.ReadOnlyNamedColumn;
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 @@ public class OrmEclipseLinkMultitenancyImpl2_3
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 @@ public class OrmEclipseLinkMultitenancyImpl2_3
}
}
- protected OrmReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -515,7 +514,7 @@ public class OrmEclipseLinkMultitenancyImpl2_3
// ********** OrmReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements OrmReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -554,8 +553,8 @@ public class OrmEclipseLinkMultitenancyImpl2_3
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 f69f857e75..eb45bdf12f 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.ReadOnlyNamedColumn;
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 @@ public class OrmEclipseLinkPersistenceUnitDefaults
{
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 @@ public class OrmEclipseLinkPersistenceUnitDefaults
}
}
- protected OrmReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
+ protected ReadOnlyTenantDiscriminatorColumn2_3.Owner buildTenantDiscriminatorColumnOwner() {
return new TenantDiscriminatorColumnOwner();
}
@@ -191,7 +189,7 @@ public class OrmEclipseLinkPersistenceUnitDefaults
// ********** OrmReadOnlyTenantDiscriminatorColumn.Owner implementation **********
protected class TenantDiscriminatorColumnOwner
- implements OrmReadOnlyTenantDiscriminatorColumn2_3.Owner
+ implements ReadOnlyTenantDiscriminatorColumn2_3.Owner
{
public String getDefaultContextPropertyName() {
@@ -239,7 +237,7 @@ public class OrmEclipseLinkPersistenceUnitDefaults
/**
* 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 b95dd6f0e7..d28a73617b 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 @@ public class OrmEclipseLinkPersistentAttribute
@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 2b687ad899..85e0f134c7 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 @@ package org.eclipse.jpt.jpa.eclipselink.core.internal.context.orm;
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 @@ public class VirtualJavaPersistentAttribute
return false;
}
- public boolean contains(int offset, CompilationUnit astRoot) {
+ public boolean contains(int offset) {
throw new UnsupportedOperationException();
}
@@ -178,7 +177,7 @@ public class VirtualJavaPersistentAttribute
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 dceae9c072..b0d353a7c2 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.List;
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 @@ public class VirtualJavaPersistentType
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 ead46df6a2..3142e4e2aa 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 final class BinaryEclipseLinkConverterAnnotation
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 ee0e7da1b7..e5762439a7 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 final class BinaryEclipseLinkCustomizerAnnotation
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 d783a77daf..e05df2e99e 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 @@ public final class SourceEclipseLinkConverterAnnotation
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 bf7b502369..0abb801c5f 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 @@ public final class SourceEclipseLinkCustomizerAnnotation
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 c5e176cb7f..405e91c001 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 @@ abstract class SourceEclipseLinkNamedConverterAnnotation
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 83a0e27852..20c609285a 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 @@ public final class SourceEclipseLinkWriteTransformerAnnotation
private final ElementAnnotationAdapter columnAdapter;
private ColumnAnnotation column;
private final ColumnAnnotation nullColumn;
- private TextRange columnTextRange;
public SourceEclipseLinkWriteTransformerAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element) {
@@ -59,14 +58,12 @@ public final class SourceEclipseLinkWriteTransformerAnnotation
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 final class SourceEclipseLinkWriteTransformerAnnotation
}
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 d9b57c8e29..8da122a8f3 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 @@ import org.eclipse.jpt.common.core.utility.TextRange;
* 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 @@ public interface EclipseLinkConverterAnnotation
* 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 d705533cf0..0a42fe9f4a 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 @@ import org.eclipse.jpt.common.core.utility.TextRange;
* 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 @@ public interface EclipseLinkCustomizerAnnotation
* 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);
}

Back to the top